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: [Solved]: Display title in other way  (Read 2856 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.014 seconds with 19 queries.