display large version of the highlighted image on the album page

adam@islandtech...

Joined: 2009-08-10
Posts: 2
Posted: Mon, 2009-08-10 20:28

hi

i'd like to have a large version of an album's highlight image at the top of the album page. i found an example of how to display a thumbnail and got that working. i was able to tweak that enough to get full size images to display. but i'd like to display a large image (not full size) like is displayed by default on the photo page.

how would i go about doing this?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 6136
Posted: Tue, 2009-08-11 01:45
 
adam@islandtech...

Joined: 2009-08-10
Posts: 2
Posted: Tue, 2009-08-11 17:31

is there some way i can do this without adding another 3rd party application.

from other posts i was able to get the thumbnail to display by putting this code into the showAlbumPage function in theme.inc:

Quote:
$currentID = $item->getId();
list ($ret, $thumbnailList) = GalleryCoreApi::fetchThumbnailsByItemIds(array($currentID));

if ($ret)
{
return array($ret->wrap(__FILE__, __LINE__), null);
}

if(isset($thumbnailList[$currentID]))
{
$theme['thumbnail'] = (array)$thumbnailList[$currentID];

}

i was able to get it to show the large version of the image by putting this code into the album.tpl file

Quote:
{assign var=thumbid value="`$theme.thumbnail.derivativeSourceId`"}

{foreach from=$theme.children item=child}
{if ($thumbid==$child.thumbnail.id)}
{g->image id="%ID%" item=$child image=$child class="%CLASS% giThumbnail"}
{/if}
{/foreach}

this works when people upload fairly small images, but when someone uploads a 3072x2048 image, it is way too large. is there anyway to get the program display the default image size? it seems like i'm pretty close since i already have the image id.

thoughts?