I was wondering how to access the thumbnail that is displayed in a newly created album, once you upload a picture it selects that picture as the default thumbnail.
I'm trying to set $item to whatever the current thumbnail is for that album.
list ($ret, $albumItem) = GalleryCoreApi::loadEntitiesById($itemId);
if ($ret) {
return array($ret, null);
}
list ($ret, $item) = GalleryCoreApi::fetchDerivativesBySourceIds($albumItem, DERIVATIVE_TYPE_IMAGE_THUMBNAIL);
if ($ret) {
return array($ret, null);
}
list ($ret, $path) = $item->fetchPath();
if ($ret) {
return array($ret, null);
}
I do not, however, think I am coding this correctly any ideas?
Posts: 8601
http://gallery.menalto.com/apidoc/GalleryCore/Classes/GalleryCoreApi.html#methodfetchThumbnailsByItemIds