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: [Solved]: Display title in other way  (Read 2524 times)

0 Members and 1 Guest are viewing this topic.

twist3r

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
[Solved]: Display title in other way
« on: April 23, 2008, 02:39:42 pm »

My gallery title in a picture page right now is displayed in this way : AlbumName/PictureName - Gallery Name.

I want to display the title only in this way : PictureName - Gallery Name without the things before '/' that could be albumName, Lastadditions, Moswt Viewed, etc. I want to remove the bold area in the first sentence. I have to say that i have only one category if this matter in any way. Right now the function in template.php is :
Code: [Select]
// Function for writing a pageheader
function pageheader($section, $meta = '')
{
    global $CONFIG, $THEME_DIR;
    global $template_header, $lang_charset, $lang_text_dir;

    $custom_header = cpg_get_custom_include($CONFIG['custom_header_path']);

        $charset = ($CONFIG['charset'] == 'language file') ? $lang_charset : $CONFIG['charset'];

    header('P3P: CP="CAO DSP COR CURa ADMa DEVa OUR IND PHY ONL UNI COM NAV INT DEM PRE"');
        header("Content-Type: text/html; charset=$charset");
    user_save_profile();

    if (strip_tags(bb_decode($section)) == 'Home') {
        $title = $CONFIG['gallery_name'] . ' - ' . strip_tags(bb_decode($section));
    } else {
        $title =  strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
    }

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => $title,
        '{CHARSET}' => $charset,
        '{META}' => $meta,
        '{GAL_NAME}' => $CONFIG['gallery_name'],
        '{GAL_DESCRIPTION}' => $CONFIG['gallery_description'],
        '{SYS_MENU}' => theme_main_menu('sys_menu'),
        '{SUB_MENU}' => theme_main_menu('sub_menu'),
        '{ADMIN_MENU}' => theme_admin_mode_menu(),
        '{CUSTOM_HEADER}' => $custom_header,
        );

    echo template_eval($template_header, $template_vars);
}

Where do i have to do to remove that part of the title ?

Gallery is right here http://www.dlh.ro/vedete
« Last Edit: April 23, 2008, 04:38:52 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Display title in other way
« Reply #1 on: April 23, 2008, 02:49:40 pm »

Edit displayimage.php, change

Code: [Select]
pageheader($album_name . '/' . $picture_title, $meta_keywords, false);

to

Code: [Select]
pageheader($picture_title, $meta_keywords, false);
Logged

twist3r

  • Coppermine newbie
  • Offline Offline
  • Posts: 13
Re: Display title in other way
« Reply #2 on: April 23, 2008, 04:19:31 pm »

Great. It works like a charm. Thank you
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.