View Full Version : Site Description in Browser
wilkins
01-24-2007, 12:38 AM
site description in browser
Dkozikowski
01-24-2007, 03:56 AM
Hello there Mr Wilkins :)
You need to add a meta description field in your image_template.html file.
If you look at the source code of this file you will see your "keywords" -
<meta http-equiv="content-type" name="keywords" content="Ty, Wilkins, Ty Wilkins, Design, Identity, Branding, Tulsa, New Medio" />
Underneath or above this you can add the "description" like so:
<meta name="description" content="Ty Wilkins." />
You can change the Ty Wilkins part to anything you wish like, "Welcome, this is my photoblog."
Currently, google displays the weird information because it scans your webpage and pulls out text from it. It does this becuase it could not find the meta description tag. Once you add the description tag, next time google bot scans your site, it should update the description to whatever you have chosen to display.
austriaka
01-24-2007, 05:57 AM
For page ranking in Google it is said to be important having a different description in each and every page.
When I am looking at the search terms in image stats addon, I have quite a lot of hits, and most of them are images with a description.
My META description line:
<meta http-equiv="content-type" name="description" content="<SITE_TITLE>-PhotoBlog: <IMAGE_TITLE>, <IMAGE_NOTES_CLEAN>" />
KArin
Connie
01-25-2007, 06:22 AM
As Austriaka said, the image-description, which is available as a tag, must be included in the meta-tags of the template
so the meta-description will be generated dynamically all the time and the google bot will always find a new description
Dkozikowski
01-25-2007, 06:23 AM
For page ranking in Google it is said to be important having a different description in each and every page.
KArin
That's good to know! I was not aware of this as I'm not terribly concerned about my search rankings but thanks for the info!
austriaka
01-25-2007, 06:58 AM
I read an article about that a few days ago, but I cannot find it anymore.
So a short summary:
Google doesn't use the META description for displaying search results. But Google reads the descriptions when spidering a site.
Two things seem to be important for search engine bots:
+ Having different description on any page, according to the content of the page
+ Using words and phrases in META description which are also found within the specific page content (for outknocking META spam)
You saw my Image statistics. I don't have any page rank for my blog, but I have quite a lot of hits from keyword search (about 75 in January) what I think is fine for a fresh installed amateur photoblog.
LG
KArin
austriaka
04-24-2007, 06:10 AM
You have two Meta description entries on your page:
<meta name="description" content="Design portfolio of Ty Wilkins." />
<meta http-equiv="content-type" name="description" content="<Ty Wilkins>-PhotoBlog: Discipleship Focus, Discipleship Focus approached New Medio for a new website. In the process of designing their site I quickly created a new suggested logo. I was glad to discover that they chose to roll with the design. The mark consists of four arrows pointing inwards to form a cross.
" />
You can change that in the template files. If you don't want to use the image description of the page in Meta description, just strip off the <IMAGE_NOTES_CLEAN> tag
KArin
Hmm, actually with 1.6 and the new tag features... Image_template could(should?) be using the tags as keywords, instead of the image title.
But I couldn't find a pixelpost-tag that would render tags without htmlcode around them. So I just added that to the code with the use of a new tag, and it works nicely. If you want to use it too, here's how:
In addons/paged_archive.php on line 610, you'll see something like this. I've added 3 lines, marked with a +:
while(list($tag) = mysql_fetch_array($tags))
{
$tags_img .= '<a href="index.php?x=browse&tag='.$tag.'">'.$tag.'</a> ';
$tags_paged_img .= '<a href="index.php?x=browse&tag='.$tag.'&pagenum=1">'.$tag.'</a> ';
+ $tags_keywords .= $tag.', ';
}
$tags_img = trim($tags_img);
$tags_paged_img = trim($tags_paged_img);
+ $tags_keywords = str_replace('_',' ',$tags_keywords);
$tpl = str_replace("<TAG_LINKS_AS_LIST>",$tags_output,$tpl); //thumbnails in this page
$tpl = str_replace("<TAG_LINKS_AS_LIST_PAGED>",$tags_paged_output,$tpl); //thumbnails in this page
$tpl = str_replace("<TAG_IMG_LIST>",$tags_img,$tpl); // list of tags for showed image
$tpl = str_replace("<TAG_IMG_LIST_PAGED>",$tags_paged_img,$tpl); // list of tags for showed image
+ $tpl = str_replace("<TAG_IMG_LIST_KEYWORDS>",$tags_keywords,$tpl); // list of tags for meta keywords
Now you can use <TAG_IMG_LIST_KEYWORDS> instead of the image title:
<meta http-equiv="keywords" name="keywords" content="<TAG_IMG_LIST_KEYWORDS>Photography, Pixelpost, Photoblog" />
And add your own general tags, your name or whatever at the end. Note there's no space after the keywords-tag, that's already added by the script.
On an other note, this seems to be wrong: <meta http-equiv="content-type" name="description"
The w3c (http://www.w3.org/TR/html4/struct/global.html#edef-META) says that 'http-equiv' may be used in place of 'name', probably even having both is okay.* As long as they are the same. But using content-type for one is wrong. The http-equiv="Content-Type" really is intended for character encoding. And I noticed Pixelpost does that now by php header(which is better), so can actually be omitted in the meta section of the html.
*edit: It seems some search engines tend to see http-equiv=description/keywords as a spam tactic. And may not index you. (but I've also read the opposite on this somewhere, might be interesting to find out how google thinks about this?) Source: http://www.hisoftware.com/cc/searchability.htm#s41
I also just noticed that <IMAGE_NOTES_CLEAN> gets htmlspecialchars( ,ENT_QUOTES), and this causes notes with stuff like " I'm blahblah " to show up as:I&_#039;m blahblah (without the _)Is there any particular reason single quotes need to be removed from 'image_notes_clean'? The comments in the source actually say "// image notes without HTML tags and double quotes". But it's removing single quotes, not double quotes. Double quotes are removed with ENT_NOQUOTES. Small typo/bug/mistake?
*edit: pretty sure that's a small mistake, since the html starts with content="site-name etc, title, blah blah. And single quotes are not a problem, but a double quote would end the content="part like this->" if double quotes are used in a description..
Dennis
04-24-2007, 04:19 PM
Thanks mav, updated both things in SVN, so 1.6.1 will have this.
Great! :) (I assume it's the tags as keywords and the single/double quote thing you're referring to.)
I've tried to find out more about the http-equiv meta stuff tonight. Couldn't really find something at google about this, but from what I've read most people say that http-equiv="description" is wrong, and name="description" is correct, same goes for the keywords meta tag.
The default image_template.html uses <meta http-equiv="content-type" name="description"> however, and that's definitely not correct.
dakwegmo
04-25-2007, 02:04 AM
I've tried to find out more about the http-equiv meta stuff tonight. Couldn't really find something at google about this, but from what I've read most people say that http-equiv="description" is wrong, and name="description" is correct, same goes for the keywords meta tag.
The default image_template.html uses <meta http-equiv="content-type" name="description"> however, and that's definitely not correct.
I'd love to hear what you find out about using the META tags for SEO, but from what I can tell the templates are correct. I read the specification and can't find where it would indicate they are wrong: http-equiv and name are both valid attributes of the meta tag, "content-type" is a valid value for the http-equiv attribute, and "description" is a valid value for the name attribute, so there's no problem there. Also, I think if it were wrong, the w3c would throw an error when you validate, but it doesn't even give a warning.
Yes, on itself they are both correct. But not when used in the same meta line, like this: <meta http-equiv="content-type" name="description" content="blah" />.
Content-type is intended just for that, to indicate a character set and content type. Like this: <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />.
On that w3c page it does say this:
http-equiv = name [CI]; This attribute may be used in place of the name attribute.
I think this is a little misleading and makes one think you can use <meta http-equiv="description"... instead of <meta name="description"... or even both in the same meta line. But it's just to indicate there are some meta tags that use 'name, and some that use 'http-equiv' instead (See this w3c page (http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.4)).
To understand the difference between the two better, you've got to know what the purpose is of "http-equiv" and "name":
Http-equiv implies a "HTTP response header", like content-type, refresh, expires, cache-control. These are html headers and can also be used with the header() function in php (Which is recommended over the use of meta tags).
The name implies "meta information", which are not real HTTP headers, but just additional info on the page itself, these can't be set with php's header() function.
Difference between using the meta http-equiv and the php header() function is that php actually sends out the headers first before any content, so the browser already knows what it's going to receive (in case of content-type for example). And with meta the browser it retrieves the page and adjusts or resets after it has read the meta header. Note that you can send a php or http-equiv header with a customname and variable("keywords=blah, etc" for example), but it would be a HTTP header. And is probably not looked at by search engines.
Most meta tags are ignored by search engines though, only keywords, description and the robots tag seem to be used mostly. And on a lot of sites they recommend a robots.txt file too.
Notes by w3c (http://www.w3.org/TR/REC-html40/appendix/notes.html#recs)
Found a long list of meta tags here: http://vancouver-webpages.com/META/
This seems like a nice article on the basic SEO stuff: http://www.kdwebpagedesign.com/seo.asp
Damn, this took a little longer than expected hehe. But it was interesting enough to figure this out, hope I didn't make it too confusing.
dakwegmo
04-25-2007, 01:47 PM
I see what you're saying. The W3C specification doesn't do a very good job of making it clear that the two should not be used together. I think that may be why the validator doesn't pick up the problem.
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.