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

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

Changing output of dynamic page title

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

Previous topic - Next topic

0 Members and 2 Guests 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);