Possibly to show real resolution under thumbnails?
I think it is necessary to use a code from here \modules\core\templates\blocks\PhotoSizes.tpl
Quote:
{if !empty($theme.sourceImage)}
{g->text text="Full size: "}
{if empty($theme.sourceImage.width)}
{$theme.sourceImage.itemTypeName.0}
{else}
{g->text text="%dx%d" arg1=$theme.sourceImage.width
arg2=$theme.sourceImage.height}
{/if}
{/if}
This piece of code must be included to \modules\core\templates\blocks\ItemInfo.tpl
But I can`t do that. It not works!
How is it possible to do?
I try in file ItemInfo.tpl to do next:
Quote:
{*
* $Revision: 16235 $
* Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates
*}
<div class="{$class}">
{g->text text="%dx%d" arg1=$photosize.theme.sourceImage.width
arg2=$theme.sourceImage.height}
{if !empty($showDate)}
<div class="date summary">
{capture name=childTimestamp}{g->date timestamp=$item.originationTimestamp}{/capture}
{g->text text="Date: %s" arg1=$smarty.capture.childTimestamp}
</div>
{/if}
but $theme.sourceImage.w and $theme.sourceImage.h always are empty. Why?
Posts: 16503
You can put Gallery into debug mode and see what variables are currently available by default along with their values
http://codex.gallery2.org/Gallery2:Themes:Reference:Smarty
If what you're looking for isn't available you'll need to somehow get that information loaded into the view you're looking at. The best places to start digging into that is the developer documentation for editing/creating themes: http://codex.gallery2.org/Gallery2:Themes
Theme Development forum: http://gallery.menalto.com/forum/72
And I'd also take a look at the Siriux ijonized theme. The theme.inc file shows how to add the resized ID to child values (load the resized ID in the thumbnail view of the page) This allows that theme to get all fancy with Lightbox.
http://codex.gallery2.org/Gallery2:Themes:siriux_ijonized
I don't think it's not exactly what you're looking for but may be a step in that direction. I haven't loaded that theme lately and taken a look at the variables, it may reveal exactly what you're looking for.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here