[Solved]: Shorter title - no recapitulation of the gallery name and category name - how? [Solved]: Shorter title - no recapitulation of the gallery name and category name - how?
 

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]

Main Menu

[Solved]: Shorter title - no recapitulation of the gallery name and category name - how?

Started by Icmesa3000, July 28, 2008, 03:17:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Icmesa3000

Hello,

I won't display the gallery name on every title. On the thumbnail page there should be only the category name (e.g. My gallery - category 1 ==ONLY==> category 1) and on the display image page only the page name - not with gallery name and category name (e.g. My gallery - category 1/picture 7 ==ONLY==> Picture 7)  ???

Thank you very much 

Hein Traag



Joachim Müller

Are you refering to the individual page's <title>-tag in HTML that determines the name of the browser window/tab?

Icmesa3000


Joachim Müller

What title are you refering to? I have no idea what you're talking about. Post some real live examples like
QuoteOn page XXX I want to see the text YYY replaced by ZZZ

Icmesa3000

No  ;D, I think you misunderstood me . I had made some screenshots.

Red (in Firefox page title) = That should not display in page title
Green (in Firefox page title) = Only that should display page title


Joachim Müller


Nibbler

Copy this into your custom theme's theme.php


// 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();

    $template_vars = array('{LANG_DIR}' => $lang_text_dir,
        '{TITLE}' => strip_tags(bb_decode($section)), // removed gallery name from 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);
}


If it's already there then I commented the line to change.

Icmesa3000

Thank you very much  ;D :D. There is only one problem: In the picture view (displayimage-....html) is "album name/picture page name" but it should be only picture page name.

Nibbler

Edit displayimage and change

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

to

pageheader($picture_title, $meta_keywords, false);

Icmesa3000

Thank you very much  :o. I just like the shorter title better. What about SEO, Baidu, Google, and Yahoo?

Joachim Müller

What about the nephews of Donald Duck (I don't remember their names)? In other words: what is your question for. Are you asking on the impact that your changes will have on SEO?

Icmesa3000


Joachim Müller


Icmesa3000

I see that my mainpage is now named "Home", how can I change "home" into my gallery name (only for my mainpage)?