forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: ChaosCrusader on April 24, 2005, 10:06:06 am
-
Is there a way to have the description entered for an image show up in the <meta name="description" content="xxxxx"> tag when viewing a specific image?[tr][/tr]
-
Although this doesn't have an effect on all search engines, it doesn't seem to be a bad idea to implement this in a future version. However, it doesn't seem straightforward to do but maybe a more determined person can figure this out. :)
-
can easily be implemented, similarly to the keyword meta tag that already exists. Little point though, as hardly taken into account by search engines these days.
-
True, but I don't think search engines care for the keywords meta tag either.
-
Anyway, if you want to accomplish this, edit displayimage.php, find
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\">"; }
and add after it (in a new line)if ($CURRENT_PIC_DATA['title']) { $meta_keywords .= "<meta name=\"description\" content=\"".$CURRENT_PIC_DATA['title']."\">"; }
-
Is that code right?
I do the instructions, but instead of giving me the images descriiption, it give me the title. Can yuo fix this?
-
try
if ($CURRENT_PIC_DATA['title']) { $meta_keywords .= "<meta name=\"description\" content=\"".$CURRENT_PIC_DATA['caption']."\">"; }
-
Thank you very much! :)
Just what I was looking for
-
can easily be implemented, similarly to the keyword meta tag that already exists. Little point though, as hardly taken into account by search engines these days.
This is not really true. Although Google uses the title tag as the primary search string and as the link text in search results, it also uses the meta description as the description text in search listings. And and keywords in your meta description are included in the search as you can see - they are highlighted bold in the results. The only exception I can find to this is if the site is in the Google Directory, it then uses this description in place of the meta one.
So your meta description is very important in that it is the text that people see when your site comes up in Google's serps. An enticiing meta description is often what convinces a surfer to click your link.