[SOLVED] Guidance on displaying resized images
Dayo
Joined: 2005-11-04
Posts: 1642 |
Posted: Tue, 2009-08-25 02:42 |
For reasons too long to get into, I want to load resized versions of images in an album (not thumbnails) when viewing the album page. I have the following code (formating removed for simplicity)... {if count($theme.children)} {foreach from=$theme.children item=child} {g->image item=$child image=$child class="galleryPic" name="pic$nome"} {/foreach} {/if} However, this returns the full sized images and but the resized versions. For example, I get /gallery/d/3181-3/test.jpg which is the full sized image while the resized image is actually /gallery/d/3181-4/test.jpg. As background, I am running Gallery 2.3 with PHP 5.2.9 on Centos 5.3. Any tips would be appreciated. Thanks. -- |
|
Posts: 1642
Any ideas?
Thanks
--
dakanji.com
Posts: 16504
To start with you're going to have to modify theme.inc to actually load that information. I don't know how or what you'd change. If it were me, I'd start looking at other themes to see how they do it, I think Hybrid or Slider might be good to start with to see what they are loading and the code in theme.inc. Yes, actually looking at slider it looks like theme.inc loads the data to grab the resized id info so that would then be available to your for the Smarty markup. Looks like the code for Hybrid is about the same.
That's where I'd start at least.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1642
Thanks for the tip.
However it seems that both actually pick full sized images and resize the display ... at least this is what the dimensions of the images in the head section of the pages suggest and the javascript approach used is too convoluted for me to follow anyway.
I think the answer is probably to add imageviews stuff to the loadCommonTemplateData call in the showAlbumpage function and will try that angle and see.
--
dakanji.com
Posts: 16504
I'll go along with that I'm not a coder/programmer just a hack, that's why I'd start looking at existing themes to see what they do and start copying, pasting and a bit (or a lot) of trial and error
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 1642
Thanks from a fellow hack.
Unfortunately, it seems I have to give up on this one. I would have thought there would be a relatively simple way to call a resized image but I just can't do it and adding "imageviews" to the showalbum function just causes the gallery to fall over.
It is funny that that a simple "image=$child.thumbnail" would show the thumbnails but getting to the resize is a complex matter so I am basically throwing the towel in ... a bit like this guy:- http://gallery.menalto.com/node/48869
Sigh.
--
dakanji.com
Posts: 1642
SOLVED
Added the code to get resize IDs from here to my theme.inc as set out in that thread and modified my code from the original post to
--
dakanji.com