Hoy to add noindex tag to certain media categories in Xenforo - media

I'm trying to exclude from search certain media gallery categories in Xenforo but it doesn't works.
I add the following code in xfmg_media_view template.
<xf:if is="{$media.category_id} == 1">
<meta name="robots" content="noindex">
</xf:if>
Anyone knows how to solve it?

Here is the correct conditional
<xf:if is="{$xf_mg_media_item.category_id} == 1">
<meta name="robots" content="noindex">
</xf:if>

Related

W3C validation - end tag for "meta" omitted, but OMITTAG NO was specified

I am getting an error as shown below
Error Line 6, Column 467: end tag for "meta" omitted, but OMITTAG NO was specified
…ta,Manufacturing_Industrial,Educational_Training,Teacher,Engineering_Projects">
✉
You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
How can I solve this ?
Please see the source code of the page below
<!doctype html>
<html>
<head>
<title>Jobslamp-free online resume creation and sharing,fresher jobs,experienced jobs,India jobs,Kerala jobs</title>
<meta name="keywords" content="Karnataka,Bangalore_Rural,Healthcare,Office_Assistant,Kerala,Ernakulam,IT_Hardware_Networking,Engineer,Sales___Marketing,Executive,Maharashtra,Mumbai_City,Retailing,Manager,Kollam,CRM_CallCentres_BPO_ITES_Med.Trans,Customer_Care,Hotel_Travel_Tourism_Airlines_Hospitality,Front_Office_Staff,Andhra_Pradesh,Hyderabad,IT_Software,Java_Developer,Pathanamthitta,Manufacturing_Industrial,Educational_Training,Teacher,Engineering_Projects">
<meta name="description" content="The best job oriented resume sharing system. Create and Publish your online resumes for FREE. Search and apply your dream jobs for FREE. Post your jobs for FREE.">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Thanks in advance
The error message points out the solution: replace the ending > with />.
<meta name="keywords" content="all your keywords" />
You'll need to fix the other meta tags the same way.

How to Properly Define UTF-8 Charset in in <head> Tag Section of Web Document

If my doc type is <!DOCTYPE html> is it best or more correct to use
<meta charset="utf-8" />
or
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
to define utf-8?
Thanks.
The first one is only valid with HTML5.
The second one is also valid for older (X)HTML versions
With this doctype (indicating HTML5) both are valid, I prefer the first as it is shorter. :)

Inserting images on a webpage in notepad using html5

I'm building a webpage in Notepad. I'm using html5 for the first time. I believe I did the correct coding to insert these images but they don't show up on the page. Here is the code: I could use some help, please. Thank you.
<html>
<head>
<title>My practice website</title>
<meta charset="utf-8">
<html lang="en">
<meta name="keywords" content="html, css, javascript, history, poems, poetry"/>
<meta name="description" content="This site is about my personal life, poems, poetry, images of family, myself"/>
<meta name="author" content="schweidel tyson">
<meta http-equiv="refresh" content="30" />
<link rel="stylesheet" type="text/css" href="mainstyesheet.css"/>
<body style="background-color: #ccffff;">
</head>
<body/>
<h1>Welcome to my website</h1>
<img src="http://www.html.net/logo.png"/>
<p>This is basically a personal website build to showcase my fledging talent in webdesign to put up pictures of my family and friends. I also like poetry, so there will be some poems.</p><b/>
This is a link to a good html tutorial<br/><br/>
This is another great tutorial link<br/><br/>
A tutorial for styles link
<img src=My practice website/My Website/images/high yellow.jpg" width="192 height="256"/><alt="African Amereican light-skined woman"><br/><br/>
<img src="http://www.zimbio.com/My website/images/trendy.jpg" width="352" width="400"/><alt="African American Woman">
<img src="My practice website/My website/my new pic.jpg" width="104" height="104"/> <alt="me at the domiciliary">
</body>
</html>
Your HTML is a bit off:
<img src="..." width="104" height="104"/> <alt="me at the domiciliary">
alt is just the alternate text for the image. It's an attribute just like width, src and height:
<img src="..." width="104" height="104" alt="me at the domiciliary" />
Also, make sure your URLs are correct.
Also, without a DOCTYPE, your markup is invalid. Include a DOCTYPE (here's a HTML5 one):
<!DOCTYPE html>
<html>
...

image-tags for google or facebook [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How does Facebook Sharer select Images?
i have a blog with some images on it. now i want a specific one to appear on pages like google+ or facebook.
when i click on "+1" it shows a facebook-image, but not the image of the actual blog-entry. its the same with facebook :(
do i have to give the image a special tag or so?
name="blog-name" title="blog-name" alt="blog-name" ?
example:
<img src="/TwitterIcon.png" title="Blogname auf Twitter" width="22px" border="0">
works
<img src="/m/home_button.png" title="Blogname" width="50px" border="0">
doesnt work
Forget the tags on the images, use the Open Graph protocol. Let Facebook scrape via Open Graph-friendly meta tags:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
content="A group of U.S. Marines, under command of
a renegade general, take over Alcatraz and
threaten San Francisco Bay with biological
weapons."/>
...
</head>
...
</html>
This will result in Facebook grabbing http://ia.media-imdb.com/rock.jpg.

Meta tags not valid (html5reset templates)

I am using html5reset as a reset and template for a website. However I am getting all kinds of validation errors on some meta tags:
<meta name="title" >
<meta name="google-site-verification" >
<meta name="copyright" >
<meta name="DC.title" >
<meta name="DC.subject" >
<meta name="DC.creator" >
I could simply remove those meta tags, but I'd rather know why first. Here is the link to validate my website (which is online at a temporary url): http://validator.w3.org/check?uri=http%3A%2F%2Ftanchelmus.be%2Fsten%2Fnl%2Fnews&charset=%28detect+automatically%29&doctype=Inline&group=0
If you use "property" instead of "name" you will pass HTML5 validator.
<meta property="DC.title" >
<meta property="DC.subject" >
<meta property="DC.creator" >
I'm not entirely sure if the syntax is correct, but I did see this in RDFa documentation here: http://en.wikipedia.org/wiki/RDFa
Another thing to note is that the HTML5 standard is a work in progress. And thus the W3C HTML5 validator is also a work in progress.
This blog post has some interesting background regarding Microformats (eg Dublin Core) & HTML5.
It may not always be pragmatic to develop just to please the Validator, especially one that is a work in progress.
What it looks like you're being told is that the values you're using in the name attribute are not part of the valid set of values you can use.
Ths WhatWG Website identifies many of the standard and other meta name values.
Hello to validate the Dublin Core tags, you must change dc. to dcterms.
Here you can see an example:
<meta name="dcterms.contributor" content="Your name" />
<meta name="dcterms.keywords" content="Your keywords here" />
Regards!

Resources