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!
Posts: 32509
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.