forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: todieego on December 04, 2013, 10:22:24 pm

Title: Change title
Post by: todieego on December 04, 2013, 10:22:24 pm
Now it looks like this:

Index: Index - name of the gallery
Thumbnails: name of the category - name of the gallery
Displayimage: image name - name of the gallery

I would like to like this:

Index: Name of the Gallery
Thumbnails: name of the category
Displayimage: image name

How to do it? THANKS!!
Title: Re: Change title
Post by: phill104 on December 04, 2013, 10:56:48 pm
Could you please post links with each question, it just adds extra work for us having to find them.

From your previous thread -
Url: http://gta5pc.pl/galeria/displayimage.php?album=4&pid=8#top_display_media
Title: Re: Change title
Post by: todieego on December 05, 2013, 06:05:53 pm
Thanks! :)

But any idea for my problem? :)
Title: Re: Change title
Post by: Αndré on December 09, 2013, 11:19:52 am
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;
    switch ($CPG_PHP_SELF) {
        case 'index.php':
            $return = $CONFIG['gallery_name'];
            break;
        case 'thumbnails.php':
        case 'displayimage.php':
            $return = strip_tags(bb_decode($section));
            break;
        default:
            $return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
            break;
    }
Title: Re: Change title
Post by: todieego on December 11, 2013, 09:49:21 pm
Sorry, but I don't understand :( In my theme.php I can't find this code:
Code: [Select]
$return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
Title: Re: Change title
Post by: phill104 on December 11, 2013, 10:12:36 pm
Please re-read the above post from Andre. Not all theme-able elements have the code included in the theme.php file to make it light and easily readable. So if you need to adjust a particular function (as per above) you simply get the code from the sample theme and copy it into yours. So in your cast open the sample theme.php and find "theme_page_title" and you will see the block is clearly highlighted with the start and end of the function, just copy that block into your theme.php and make your modifications.
Title: Re: Change title
Post by: todieego on December 11, 2013, 10:55:20 pm
Thank you very much Andre and Phill. Topic solved :)