coppermine-gallery.com/forum

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: brynn on September 21, 2013, 12:58:16 AM

Title: change titlebar text
Post by: brynn on September 21, 2013, 12:58:16 AM
Hi Friends,
I'm a big ol' newbie  :o  I want to change the text that appears in the titlebar of the Home gallery page.  It says "Home - name of gallery".  I want it to just say "name of gallery".

And I know enough about html, to know that titlebar text should be found within the title tags, near the top of the html page.  But in that place, I find {TITLE}.  And since I've read almost completely "Creating a Coppermine theme that matches your overall site layout" in the manual, including reference links, which include "Editing template.html" which explains about tokens, I know that {TITLE} is a token.  But it doesn't explain enough about tokens, to tell me how or where I can edit a token.  It says something about the Coppermine core file, but I'm not sure where that is or what it's called.  I've been perusing the folder (on my server) where I installed CPG, but I'm not really sure what I'm looking for, as far as a core file.

Can someone tell me if it's possible to change that titlebar text, and if so, how?

Thank you very much  :)
Title: Re: change titlebar text
Post by: ΑndrĂ© on October 04, 2013, 12:43:15 PM
Actually the title bar changes when you browse your gallery. It always display some information where you currently are. If you don't want to display that and always only want to display the name of your gallery, I suggest to replace the {TITLE} token with the name of your gallery. Is this what you're looking for?
Title: Re: change titlebar text
Post by: brynn on October 09, 2013, 09:28:52 PM
Sorry for the long delay, Andre.  As you know, I've been distracted with other gallery issues   :o

Well no.  I want it to display each area of the gallery as it does now.  I just want that one page, which I know is referred to as the home page, not to say "Home - Inkscape Community Gallery".  Instead, I just want "Inkscape Community Gallery".

I only generally understand tokens.  I thought there must be a file somehwere, where I could change the text, for just that page.

But if it's not a simple change, it's ok.  This isn't a major issue for me.  I wouldn't even have posted a question about it, except that I thought it would be a simple thing.  And it must not be simple, or someone would have replied sooner.

So thanks for your suggestion.  Even though I won't be using it, maybe someone else will search it out in the future.

All best   :)
Title: Re: change titlebar text
Post by: ΑndrĂ© on October 10, 2013, 09:35:28 AM
Copy this to your theme's theme.php file:
function theme_page_title($section)
{
    global $CONFIG, $lang_list_categories;
    if ($section == $lang_list_categories['home']) {
        $return = $CONFIG['gallery_name'];
    } else {
        $return = strip_tags(bb_decode($section)) . ' - ' . $CONFIG['gallery_name'];
    }
    return $return;
}
Title: Re: change titlebar text
Post by: brynn on October 10, 2013, 09:15:53 PM
Oh ok, awesome :)   Just put it anywhere in there?
Title: Re: change titlebar text
Post by: Niecher on October 10, 2013, 10:15:59 PM
place it above

?>


Regards.
Title: Re: change titlebar text
Post by: brynn on October 12, 2013, 05:25:31 PM
OMG, I have never seen a more helpful support forum than this one!  You guys ROCK!!  (insert happy dance smiley)

The code is edited, the filed is saved and uploaded.  And it works perfectly  ;D

Thank you, Andre  :)