May 13, 2004
One more gallery trick
oh yeah, I forgot that I had also added another thing for gallery integration.
I found this neat hack which includes a php file that outputs javascript to display a link. I tweaked the script to look like this:
..
echo "document.write('<a href=\"" .
makeAlbumUrl($gallery->album->fields["name"]) . "\">" .
$gallery->album->getThumbnailTag($gallery->album->getHighlight() ) .
"</a>');";
..
getThumbnailTag is cool because it its the complete <img> tag to display the particular thumbnail. It wouldn't be hard to make that a random number to display a random thumbnail.
so now I can also say thumbnail=yes and it will display a thumbnail from the gallery specified by the gallery keyword.
This didn't quite work for me at first, until I realized the gallery->album->getThumbnailTag was missing the $ symbol
this worked for me
Posted by: Dave Golden at August 6, 2004 02:48 PMecho "document.write('album->fields["name"]) . "\"> " . $gallery->album->getThumbnailTag($gallery->album->getHighlight()) . "');";