Well, I'm not a PHP guy, but i've been looking for a way to change the dimensions of the thumbnail displayed by the random-block... as have a few other people here I've noticed after reading the posts...
Well, I tracked down the code responsible and could use some help..
if (isset($index)) {
$id = $album->getPhotoId($index);
echo ""
."<a href=" .makeAlbumUrl($album->fields["name"], $id) .">"
.$album->getThumbnailTag($index)
."</a>";
the .$album->getThumbnailTag($index) is responsible for generating the <IMG> tag for the picture. The problem is that this call generates not only the <img> tag, but also the height, width, and border attributes within that tag.
What I've done is this, and I'm not sure if this is a viable solution..
if (isset($index)) {
$id = $album->getPhotoId($index);
$photocode = $album->getThumbnailTag($index);
echo ""
."<a href=" .makeAlbumUrl($album->fields["name"], $id) .">"
.$photocode
."</a>";
This $photocode variable now represents the following code
<img src=http://www.thedesantos.com/media/albums/album06/aaj.thumb.jpg width=125 height=84 border=0>
Now I need to find a way to evaluate the string, and drop off everthing after the ".jpg", unfotunately I can't search for .jpg, cause what if its a movie, or gif, or another type of image file...
Any of the PHP people out there have any ideas on how this could be done?
Greg DeSanto
Posts: 2
This is exactly the thing I need to do..... anyone can help?
Posts: 77
Hi,
I think we can combine that with this <!-- BBCode Start --><A HREF="http://gallery.menalto.com/modules.php?op=modload&name=phpBB_14&file=index&action=viewtopic&topic=930&1" TARGET="_blank">thread</A><!-- BBCode End -->. OK?
Joerg