change titlebar text change titlebar text
 

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

change titlebar text

Started by brynn, September 21, 2013, 12:58:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brynn

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

Αndré

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?

brynn

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

Αndré

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;
}

brynn

Oh ok, awesome :)   Just put it anywhere in there?

Niecher


brynn

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