coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: pressurecooker on December 31, 2008, 02:58:09 PM

Title: Dynamic Meta and Title for Each Image
Post by: pressurecooker on December 31, 2008, 02:58:09 PM
Hi folks,

I'm struggling with SEO. What I want is to have a unique Title and Meta for each intermediate image. After trying to figure out which part of the code displays titles, I found this bit in themes.inc.php (I know I'm not supposed to touch inc, but then, did I put that title bit there? ;D )
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section)),
Now my brain completely refuses to understand this $section variable. If left as it is, it will display full caption in <TITLE>. Being a considerate and hard-working person, my captions are usually at least 5 sentences long. Now, imagine what Google would think about 5-sentence Titles.

I cannot understand, where this $section gets the data from...

I changed the line to
'{TITLE}' => $CONFIG['gallery_name'] . ' - ' .$CURRENT_PIC_DATA['title'],
Although seems quite sensible to me, it produces an empty <TITLE> tag.

Has anyone tried to make dynamic Titles and if so, which is the best way to go?
Thanks.
Title: Re: Dynamic Meta and Title for Each Image
Post by: pressurecooker on January 05, 2009, 11:13:34 AM
Still haven't been able to crack this. Does anyone please have an idea?
Title: Re: Dynamic Meta and Title for Each Image
Post by: Nibbler on January 05, 2009, 01:46:52 PM
I don't know what you are trying to accomplish. Titles are already dynamic and already include the picture title.
Title: Re: Dynamic Meta and Title for Each Image
Post by: pressurecooker on January 05, 2009, 01:52:31 PM
D'oh! Happy New Year, Nibbler, and thanks for the answer. Unfortunately they are not. They display description/caption instead of a title. It is very peculiar but I'm not able to solve this.
Title: Re: Dynamic Meta and Title for Each Image
Post by: pressurecooker on January 14, 2009, 12:54:48 PM
Oh, my! That's probably the longest and most frustrating coding problem I've experienced  :-\

Can anyone be so kind and tell me what is this strip_tags(bb_decode($section)), (it is from themes.inc.php) and how is it defined? It is obviously a part of the function "pageheader"

Any clues will be highly appreciated!