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: Show file name only  (Read 2819 times)

0 Members and 1 Guest are viewing this topic.

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Show file name only
« on: January 20, 2011, 01:56:15 am »

How to get rid of the album name and the main gallery title when viewing a single file?

E.g http://coppermine-gallery.net/demo/cpg15x/displayimage.php?pid=6#top_display_media here the title structure is: Album Name - File Name - Gallery Name (Animals - ascalaphe 4 - cpg1.5.x demo).

http://www.galsh.com/
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Show file name only
« Reply #1 on: January 20, 2011, 09:53:15 am »

Open displayimage.php, find
Code: [Select]
pageheader($album_name . ' - ' . $picture_title, $meta_keywords, false);and replace with
Code: [Select]
pageheader($picture_title, $meta_keywords, false);
Now copy the following function to your themes/yourtheme/theme.php file:
Code: [Select]
function theme_page_title($section) {
    if (defined('DISPLAYIMAGE_PHP')) {
        $return = strip_tags(bb_decode($section));
    } else {
        global $CONFIG;
        $return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
    }
    return $return;
}
Logged

profili

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 113
Re: Show file name only
« Reply #2 on: January 20, 2011, 02:48:28 pm »

Thank you. Very helpful.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 19 queries.