[Solved]: Display title in other way [Solved]: Display title in other way
 

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

Main Menu

[Solved]: Display title in other way

Started by twist3r, April 23, 2008, 02:39:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

twist3r

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 :
// 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

Nibbler

Edit displayimage.php, change


pageheader($album_name . '/' . $picture_title, $meta_keywords, false);


to


pageheader($picture_title, $meta_keywords, false);

twist3r

Great. It works like a charm. Thank you