Subject: Setting the page title for the Geeklog / Gallery integration

Posted on: 08/09/04 03:31pm
By: Dirk

Here's a (very minor) improvement of the Geeklog / Gallery integration to make Geeklog pick up Gallery's page title.

Open the file html_wrap/wrapper.header.default. Near the end of the file, you'll find this:

    case 'GeekLog':
        /*
        ** Display header and left blocks
        */
        echo COM_siteHeader();
    break;


Change this to:

    case 'GeekLog':
        /*
        ** Display header and left blocks
        */
        global $_CONF;
        
        $_CONF['pagetitle'] = $gallery->app->galleryTitle;
        echo COM_siteHeader();
    break;

Now when you call up your integrated Gallery, the page title should read "Your Site Name Here - Gallery". Unfortunately, Gallery doesn't seem to use the page title that much - it would be nice if it displayed the name of the current album there, for example. But it's a start ...

bye, Dirk

Setting the page title for the Geeklog / Gallery integration

Posted on: 09/09/04 02:00pm
By: Dirk

Okay, so Gallery does provide the album title - but in another variable. So we change the above to this:
    case 'GeekLog':
        /*
        ** Display header and left blocks
        */
        global $_CONF;

        if (!empty ($gallery->album->fields["title"])) {
            $_CONF['pagetitle'] = $gallery->album->fields["title"];
        } else {
            $_CONF['pagetitle'] = $gallery->app->galleryTitle;
        }
        echo COM_siteHeader();
    break;


That's better

bye, Dirk

Setting the page title for the Geeklog / Gallery integration

Posted on: 01/10/04 01:23pm
By: ppmnt

Dirk,

That's a great little fix that I have been messing with myself. The only problem is that after you visit an album, then go back to the top level of your gallery, $gallery->album->fields["title"] is still set to the last album's title.

So for example, on my gallery, I go into the 2002 album, then click on the photo gallery link on my site, and now the page title is "discobug.com - 2002" even though I'm on the top level...

I tried unsetting $gallery->album->fields["title"] after calling COM_siteHeader(), but of course it gets set again later down within view_album.php. I'm thinking about trying to unset it at the end of wrapper.footer.... Will have to mess with it some more.

update: That didn't work either...

Setting the page title for the Geeklog / Gallery integration

Posted on: 02/10/04 05:55am
By: JohnVanVliet

hi there dose not seam to be a change in gallery with this hack
gallery is still the same with and without this mod
on win xp apache 2 (aeonserv)

Geeklog - Forum
https://www.geeklog.net/forum/viewtopic.php?showtopic=40025