Hi,
it looks like quite stupid question, but I couldn't find anything in "G2 Support" using search.
I would like to show Image Size value (in Kb) under each thumbnails in Album page (now there are only caption, date, views fields).
(JFYI: I also have tried to show Image size in Summary and Detailed views, but exif field Image Size shows value in the useless form of "Large", "Medium", "Small" size)
----
Gallery version: 2.0-alpha-4
Webserver (with version): Apache/1.3.27
Datatabase (with version): mysql 3.23.56
PHP version (eg 4.2.1): 4.1.2
Graphics Toolkit(s): GD 1.6.2, ImageMagick-5.4.3.11
Operating system: Red Hat 7.1
Web browser/version: Firefox 1.0, IE 6.0
Posts: 8601
try making a local template for layouts/matrix/templates/albumBody.tpl and find where it shows {$child.summary}, etc.. you can put {$child.size} somewhere nearby, though that will be in bytes.
Posts: 37
I quess if it's normal smarty stuff you can use math operators in it?
to get it in kb?
Posts: 63
This will give back an error.
Posts: 7994
You can use the {assign} Smarty tag to do math, see [url={assign var="foo" value="`$foo+$bar`"}]this page[/url]
Off the top of my head:
Posts: 63
i get a 0.00 Bytes from this math. And how to set it up that it is only shown, when there are only images in there not when subalbums shown.
Posts: 8601
find where it shows "Album:"
you'll see an {if} around it.. do that, but with !.
{if !$child.canContainChildren}
Posts: 63
Great mate, that works. But the math wont give me a valid result? Its always 0.00
Edit:
must be:
to get it work.