Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 08:17 am EDT

Geeklog Forums

Setting the page title for the Geeklog / Gallery integration


Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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:

Text Formatted Code

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


Change this to:

Text Formatted Code

    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
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Okay, so Gallery does provide the album title - but in another variable. So we change the above to this:
Text Formatted Code

    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
 Quote

Status: offline

ppmnt

Forum User
Chatty
Registered: 06/09/04
Posts: 53
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...
 Quote

Status: offline

JohnVanVliet

Forum User
Full Member
Registered: 10/09/03
Posts: 161
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)
 Quote

All times are EDT. The time is now 08:17 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content