forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: SolidSnake2003 on December 19, 2013, 08:20:07 am

Title: Customize Title: Gallery Name - Then everything after
Post by: SolidSnake2003 on December 19, 2013, 08:20:07 am
Is it possible to use the same code as used in this (http://forum.coppermine-gallery.net/index.php/topic,76888.0.html) 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
Title: Re: Customize Title: Gallery Name - Then everything after
Post by: Αndré on December 19, 2013, 09:31:38 am
So you mainly want to change the separator to "||" and add "URL" to the index page(s)?
Title: Re: Customize Title: Gallery Name - Then everything after
Post by: SolidSnake2003 on December 19, 2013, 11:05:57 am
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.
Title: Re: Customize Title: Gallery Name - Then everything after
Post by: Α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
Code: [Select]
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];and replace with
Code: [Select]
    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;
    }
Title: Re: Customize Title: Gallery Name - Then everything after
Post by: SolidSnake2003 on December 19, 2013, 03:45:26 pm
Thanks, exactly what I wanted, marking as solved.
Title: Re: Re: Customize Title: Gallery Name - Then everything after
Post by: maggie16 on December 22, 2013, 09:18:16 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
Code: [Select]
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];and replace with
Code: [Select]
    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 :)
Title: Re: Re: Customize Title: Gallery Name - Then everything after
Post by: Αndré on December 23, 2013, 03:59:25 pm
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.