Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Customize Title: Gallery Name - Then everything after  (Read 4548 times)

0 Members and 1 Guest are viewing this topic.

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Customize Title: Gallery Name - Then everything after
« on: December 19, 2013, 08:20:07 am »

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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Customize Title: Gallery Name - Then everything after
« Reply #1 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)?
Logged

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Customize Title: Gallery Name - Then everything after
« Reply #2 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Customize Title: Gallery Name - Then everything after
« Reply #3 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;
    }
Logged

SolidSnake2003

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 82
  • Solid Snake/Joshua Harris Fan
    • Legacy Designs
Re: Customize Title: Gallery Name - Then everything after
« Reply #4 on: December 19, 2013, 03:45:26 pm »

Thanks, exactly what I wanted, marking as solved.
Logged

maggie16

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 1
    • bed bug lawyer
Re: Re: Customize Title: Gallery Name - Then everything after
« Reply #5 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 :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Re: Customize Title: Gallery Name - Then everything after
« Reply #6 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.