Changing output of dynamic page title Changing output of dynamic page title
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Changing output of dynamic page title

Started by kingspice, September 03, 2012, 08:00:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kingspice

Example URL:
http://www.parishiltonzone.com/pictures/displayimage-555-9718.html#top_display_media

The title of this page is:
"Lindsay Lohan partying with Paris hilton - Paris-Hilton-Lindsay-Lohan12"
which equates to coppermine default dynamic title, for this page, of:
Album name - FileName

I'd like to change the title output so it is:
"Lindsay Lohan partying with Paris hilton - 4 / 12"
ie Album name - Picture number / Number of pictures in gallery

What function would help me achieve this?

Thanks
Gareth

Αndré

Open displayimage.php, find
pageheader($album_name . ' - ' . $picture_title, $meta_keywords, false);
and replace with
pageheader($album_name . ' - ' . preg_replace('/.*width="100%">FILE (.*)<\/td>.*/Usi', '\\1', $nav_menu), $meta_keywords, false);

kingspice

Thanks for pointing out the relevant file/function.

This preg_replace approach effected some other parts of the pages layout unfortunately (can't keep up to show you example, as corrupted the sites layout).

Is there a simple variable approach I could use, in the output, instead?

Αndré

Try
pageheader($album_name . ' - ' . ($pos + 1) . ' / ' . $pic_count, $meta_keywords, false);