Hello,
I need to embed one or more images from my Piwigo gallery to the external pages of my web-site. But not just an image (this is clear how to do), but the "image block" - thumbnail of the given size which is a link to the one of the bigger size image with watermark. The image could be defined by it's path or id.
Is there any way to generate such an "image block" by Piwigo Web API or any internal Piwigo PHP-functions available for embeding to external pages? May be some examples are available or somebody already implemented that?
Piwigo version: 2.7.4
PHP version: 5.4.36
MySQL version: 5.5.41
nginx
Offline
don't really understand what you mean...
<a href="http://galerie.strangeplanet.fr/i.php?/upload/2013/10/05/20131005215449-6ceef2d2-la.jpg"> <img src="http://galerie.strangeplanet.fr/i.php?/upload/2013/10/05/20131005215449-6ceef2d2-th.jpg"> </a>
this is the thumbnail with link to large (note the "th" and "la" suffixes)
renders has
isn't that what you want ?
Offline
That's correct. But, you need to know path and image file name, which includes randomly generated part.
I know , that you can get the image url from the image page by right click on the image, etc. But, imagine that you need to install several, may be tens of such a blocks, it will take a lot of time doing this manually. I would like to generate this code by php-function only by image id. I understand, in general, how to do it - select from piwigo_images table path and file name by known id and generate the code from retrieved data. I just thought that there is already "standard" code for this.
Offline