printDownloadLink Questions

I currently use Zenphoto version [9980] (Official Build) with zpFocus Version
I have a question about the 'printDownloadLink' option. I need the link on each image to point to a url outside of Zenphoto. If I understand correctly I would need to reference an HTML list of urls in a folder. The "outside" url for each image is a link to Paypal, which after payment the user is able to download the full size image.
How would I construct this list so the url and the images are synched? For example: the url for one image is Could I use the Image id or Filename somehow to match the outside url to the correct thumbnail stored in Zenphoto?
At the moment, I put the outside link in a codeblock for each image. I would rather use the 'printDownloadLink' option if possible.
Thank-you for your time! Renee


  • acrylian Administrator
    The downloadlist plugin provides functions to either list files from a directory and to create a specific link.

    It is meant to directly download files via a php script to "hide" the actually place from your server either within the public webroot or if your host allows above that. It has not been tested for accessing other servers.

    The number in the download link is NOT the id of the item, it is an internal id assigned by the plugin on discovery based on the storage table autoincrement id. You also cannot pass links like your example not pointing to an actual file.

    I fear your will have to code your own functions to achieve what you wish.
  • ayad Member
    I have similar questions.
    I currently use Zenphoto version 1.4.3 [10393] (Official build)
    The plugin downloadList. It is active. I try the possible settings but still cannot figure out how it works.
    I call it:
    `<?php printDownloadLink('albums/'.$_zp_current_album->name.'/'.$_zp_current_image->filename, "download image");?>`

    If I put uploaded as Download directory, nothing happens, displayed download (0 Bytes) - 0 downloads and the path will be:

    If I let the Download directory empty the path is physically right:
    and the Image can be downloaded directly! ! What about the downloadlist?
    In DB _plugin_storage the path is zp//albums/fruits/avocado-f0004ps.jpg

    Debug log displays:
    Backtrace: WARNING: filesize(): stat failed for /var/www/xx/zp/cache/cache// in /var/www/xx/zp/zp-core/zp-extensions/downloadList.php on line 494
    filesize called
    from printDownloadLink (downloadList.php [494])
    I try `<?php echo DownloadList::getListItemFromDB($file);?>` it makes no output.
  • acrylian Administrator
    The usage is simply.
    This is how we use it on our own site and I just tried the downloadlink successfully. Try disabling the "Show filesize of download items" option of hte plugin as that is probably causing your issue.

    This plugin works on discovery, only if something is discovered it is added to the database.
Sign In or Register to comment.