Showing dimensions under thumbnails instead of filename
|
freijja
Joined: 2007-06-28
Posts: 3 |
Posted: Thu, 2007-06-28 16:45
|
|
I'm running a wallpaper gallery, and trying to figure out how to change the names under each thumbnail to show the dimensions of the image instead of the filename, or maybe both. Is it possible to do this? I'm also wondering if it's possible to show all albums within my root album to show as a list, instead of thumbnails. Thanks. |
|
| Login or register to post comments |

Posts: 3
Thanks, exactly what I needed
Posts: 13
Hello,
I'd like to do approx. the same thing as freijja did (i.e. displaying the image dimensions). I'd like to display those dimensions not on the album page but on the photo page. I tried removing child from {$child.height}X{$child.width} and add this code to photo.tpl with no success! Any help would be much appreciated. Thanks!
Posts: 9507
Enable debug mode:
FAQ: How to set/use Gallery in debug mode?
In the popup you will see all the smarty variables that are available:
{$theme.item.height}X{$theme.item.width}Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 13
Many Many Thanks, Dave!
Posts: 10
Heya, I'm such a newbie please forgive me. Dave, that code is exactly what I'm looking for! However, I don't know where to put it, can you please help?
Posts: 9507
photo.tpl of the theme you are using.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
So, here's what I'm trying to do:
http://getvideoartwork.com/index.php?action=gallery&g2_itemId=1314
I want the dimensions of the image(s) to appear to the right of the thumbnail.
I tried inserting the code and did not have luck getting it to appear properly next to the thumbnails. I was able to get the X from the code to appear in the right spot but it never gave the dimensions.
Posts: 9507
The page you showed is album.tpl not photo.tpl
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 10
I finally figured it out and put
{if !($child.canContainChildren)}
Width:{$child.width} x Height:{$child.height}{/if}
in the right place and it's exactly what I needed. Thanks dave and others for the help.