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

Title: Description Meta tag
Post 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]
Title: Re: Description Meta tag
Post by: Tranz on April 24, 2005, 10:26:57 am
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. :)
Title: Re: Description Meta tag
Post by: Joachim Müller on April 25, 2005, 12:27:10 am
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.
Title: Re: Description Meta tag
Post by: Tranz on April 25, 2005, 03:58:29 am
True, but I don't think search engines care for the keywords meta tag either.
Title: Re: Description Meta tag
Post by: Joachim Müller on April 25, 2005, 08:01:59 am
Anyway, if you want to accomplish this, edit displayimage.php, find
Code: [Select]
if ($CURRENT_PIC_DATA['keywords']) { $meta_keywords = "<meta name=\"keywords\" content=\"".$CURRENT_PIC_DATA['keywords']."\">"; }and add after it (in a new line)
Code: [Select]
if ($CURRENT_PIC_DATA['title']) { $meta_keywords .= "<meta name=\"description\" content=\"".$CURRENT_PIC_DATA['title']."\">"; }
Title: Re: Description Meta tag
Post by: falarious on July 05, 2005, 11:16:43 pm
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?
Title: Re: Description Meta tag
Post by: Joachim Müller on July 06, 2005, 07:40:07 am
try
Code: [Select]
if ($CURRENT_PIC_DATA['title']) { $meta_keywords .= "<meta name=\"description\" content=\"".$CURRENT_PIC_DATA['caption']."\">"; }
Title: Re: Description Meta tag
Post by: falarious on July 06, 2005, 10:28:58 pm
Thank you very much!  :)
Just what I was looking for
Title: Re: Description Meta tag
Post by: malooga on September 06, 2005, 12:42:57 am
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.