Dynamic Meta and Title for Each Image Dynamic Meta and Title for Each Image
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Dynamic Meta and Title for Each Image

Started by pressurecooker, December 31, 2008, 02:58:09 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

pressurecooker

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.
Join the green campaign - Environmental Articles

pressurecooker

Still haven't been able to crack this. Does anyone please have an idea?
Join the green campaign - Environmental Articles

Nibbler

I don't know what you are trying to accomplish. Titles are already dynamic and already include the picture title.

pressurecooker

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.
Join the green campaign - Environmental Articles

pressurecooker

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!
Join the green campaign - Environmental Articles