DerivativeSourceId of Custom Thumbnail?

useb

Joined: 2006-04-06
Posts: 4
Posted: Wed, 2006-11-15 14:53

I was wondering if it is possible to find the highlight Derivative Source even for a custom thumbnail´d album?

Quote:
/* and find the highlight for this album */
list ($ret, $thumbnails) = GalleryCoreApi::fetchThumbnailsByItemIds(array($albumId));
if ($ret) {
return $ret->wrap(__FILE__, __LINE__);
}
if (!empty($thumbnails)) {
$highlightId = $thumbnails[$albumId]->getDerivativeSourceId();
}

$highlightId is the thumbnail of the "highlighted image" in the album, but how to get the DerivativeSourceId of "the custom thumbnail"?
thanks!

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2006-11-15 23:53

in the above code, $thumbnails[$albumId] is the custom thumbnail.
$thumbnails[$albumId]->getParentId() is the id of the album for which it is a thumbnail.
$thumbnails[$albumId]->getDerivativeSourceId() is the ThumbnailImage, the custom image that you uploaded. the thumbnail itself is a resized version of this image.