Customize Title: Gallery Name - Then everything after Customize Title: Gallery Name - Then everything after
 

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

Customize Title: Gallery Name - Then everything after

Started by SolidSnake2003, December 19, 2013, 08:20:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

Is it possible to use the same code as used in this topic, but change it to like this instead

Index: Name of the Gallery || URL || Description of Gallery
Thumbnails: Name of the Gallery || name of the category/categories
Displayimage: Name of the Gallery || name of the category/categories || image name

Αndré

So you mainly want to change the separator to "||" and add "URL" to the index page(s)?

SolidSnake2003

Yeah, and only only have the url, and description only appear on the front page, all other pages just the gallery name, and the categories, then individual image.

Αndré

Copy the function theme_page_title from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist. Then, find
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
and replace with
    global $CPG_PHP_SELF;
    $section = str_replace(array('-', '>'), array(' || ', '||'), $section);
    switch ($CPG_PHP_SELF) {
        case 'thumbnails.php':
        case 'displayimage.php':
            $return = strip_tags(bb_decode($section));
            break;
        default:
            $return = strip_tags(bb_decode($section)) . ' || ' . $CONFIG['ecards_more_pic_target'] . ' || ' . $CONFIG['gallery_name'];
            break;
    }

SolidSnake2003


maggie16

Quote from: Αndré on December 19, 2013, 02:07:58 PM
Copy the function theme_page_title from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist. Then, find
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
and replace with
    global $CPG_PHP_SELF;
    $section = str_replace(array('-', '>'), array(' || ', '||'), $section);
    switch ($CPG_PHP_SELF) {
        case 'thumbnails.php':
        case 'displayimage.php':
            $return = strip_tags(bb_decode($section));
            break;
        default:
            $return = strip_tags(bb_decode($section)) . ' || ' . $CONFIG['ecards_more_pic_target'] . ' || ' . $CONFIG['gallery_name'];
            break;
    }


I was having the same issue and tried this to solve the problem.  Still isn't working.  Anything else I can try?  Thanks in advance :)

Αndré

What exactly happens? i assume you've done something wrong. Please attach your theme's theme.php file as zip file to your next reply.