Posted: Sat Dec 27, 2003 5:41 pm Post subject: Dynamic titles for Gallery, anyone?
I've learned that Google Tap with Dynamic Titles can be a very powerful combination. For those who don't know what dynamic titles are, simply observe your browser's title bar as you navigate this website.
Anyway, the standard dynamic titles distribution doesn't include support for Gallery though. So now, you can insert this into you dynamic_titles.php:
Code: › // gallery
if($name=="gallery"){
$newname = "Photo Gallery"; //or whatever if you want to change the name
global $gallery;
if ($gallery->session->albumName != "") {
$albumname = $gallery->album->fields["title"];
$newpagetitle = "$item_delim $newname $item_delim $albumname";
}
else {
$newpagetitle = "$item_delim $newname";
}
}
It's not perfect but it's a start. Right now, it only displays the album title but not the photo's caption/title if you view a photo. I've been trying to figure out how to do this but I'm stuck. Can someone help?
If you want to see my dynamic titles for Gallery working click HERE [cal-family.org].
Posted: Mon Dec 29, 2003 5:03 pm Post subject: Re: Dynamic titles for Gallery, anyone?
Thanks! As usual, you make it look so easy! Although (I think) my implementation of dynamic titles isn't exactly the same I got the idea and now it works!
By the way, how do I get the caption instead of the image name? A lot of my image names are aaa, aab, etc. The captions are more meaningful though.
[edit]
Okay, I came up with something. I'm sure there's a much easier way though.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum