Problem with printDownloadLinkAlbumZip (no link appears)

Hello everyone

First of all thanks in advance for your help, I just installed Zenphoto today so I am not quite used to it yet.

I am trying to allow users to download a full album into a zip.

First I checked the Downloadlist plugin.

Then I went to the folder with my theme (a copy of the default theme) and in album.php I wrote :
<?php if (function_exists(‘printDownloadLinkAlbumZip’)) { printDownloadLinkAlbumZip(); } ?>

Then I uploaded the album.php file on my server (using FTP).

But when I go to the website and open the album there is no link to download it. I tried writing the php line at several places in album.php but none of them seems to work.

I hope some of you can help me

Kargrim

Comments

  • acrylian Administrator, Developer
    Is the downloadlist plugin enabled? Errors in the logs?
  • Yes the plugin is enabled.

    Indeed there is an error in the logs, i am sorry I didn't even know there were logs before you mentionned them.

    {47328:Fri, 29 Nov 2013 11:50:03 GMT}
    REMARQUE : Use of undefined constant ‘printDownloadLinkAlbumZip’ - assumed '‘printDownloadLinkAlbumZip’' dans E:\Website\li211.fr\www\galerie\themes\defaultperso\album.php à la ligne 35
    include called from include (index.php [122])
    from index.php [22]

    I don't know what it means because I am no expert in php either but I am gonna look into that.

    Do I have to somehow include downloadList.php in album.php ?

    Thank you for your time
  • What the error means is that the script has used `printDownlodLinkAlbumZip` somewhere (line 35) and it is NOT enclosed in quotations or used in a way that the PHP interpreter knows it is a function call.
  • When I was looking on how to use this function I found this line : <?php if (function_exists(‘printDownloadLinkAlbumZip’)) { printDownloadLinkAlbumZip(); } ?>

    I didn't question the way it was written but I guess I should have, when replacing the ' with " everything works just fine.

    Thanks a lot to both of you for your help
  • You apparently got caught by some "style reformatting". The quotes above are the open/close quotes that word processors use, but unfortunately not that programming languages use.

    Probably got reformatted somewhere in the creation of the document you referenced. Sorry about that.
  • acrylian Administrator, Developer
    This sometimes sadly happens by copying code from websites. I got caught by that often, too. Best is to manually change/check the quotes.
Sign In or Register to comment.