forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Icmesa3000 on July 28, 2008, 03:17:25 pm
-
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
-
website address ?
-
http://icmesa.org (not ready jet)
-
Are you refering to the individual page's <title>-tag in HTML that determines the name of the browser window/tab?
-
No, but every coppermine has the same title structure? How can I change this?
E.g.: http://coppermine-gallery.net/demo/cpg14x/displayimage.php?album=2&pos=0
-
What title are you refering to? I have no idea what you're talking about. Post some real live examples like
On page XXX I want to see the text YYY replaced by ZZZ
-
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
-
That is the HTML <title>-tag
-
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.
-
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.
-
Edit displayimage and change
pageheader($album_name . '/' . $picture_title, $meta_keywords, false);
to
pageheader($picture_title, $meta_keywords, false);
-
Thank you very much :o. I just like the shorter title better. What about SEO, Baidu, Google, and Yahoo?
-
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?
-
Yes, I hope that isn't a big drawback for my page?
-
Frankly: I have no idea, but I don't guess so.
-
I see that my mainpage is now named "Home", how can I change "home" into my gallery name (only for my mainpage)?