Advanced search  

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

Pages: [1]   Go Down

Author Topic: Customize Title: Gallery Name - Then everything after  (Read 4703 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: 15764
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: 15764
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: 15764
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.026 seconds with 19 queries.