printAlbumZip( )

Hi, all,

I have searched on this forum and on Google and cannot find an answer..

I am trying to use the printAlbumZip( ) function. Where do I place this? I understand it goes in the album.php file in whichever template you are using..

but where?

i have seen many suggestions, but the link just wont show up for me...

thanks in advance..

Comments

  • You place it in the script based on where you want it to appear on the rendered page.
  • Sbillard,

    Thanks for your response. Maybe there is something wrong with my syntax, then?

    I have tried placing it many places, and I just can't get a link to show up for download. (Ready to pull my hair out...lol)

    If you could, please, take a look and let me know what you think....(I have included the code around the printAlbumZip() as well...)

    <div id="albums">
    <?php while (next_album()): ?>
    <?php if (function_exists(’printAlbumZip’)) { printAlbumZip(); } ?>
    <div class="album">
  • Following code works fine for me:
    `

    <?php echo printAlbumZip() ?>

    `
    Unfortunately I have now idea of php, so I don't know the notation of the if-condition.
  • I am not sure why this would not work, although I have never tried it within the album loop. Have you looked at the HTML to see if the link exists but is just not showing? Maybe the lack of a closing of the album loop before the </div> is causing problems.

    There is a use of printAlbumZip() in the Effervescence+ theme in album.php if you want to look at an example.
  • I am so sorry to be a pain, guys...really...

    I got the link to appear (I put it down with the slideshow script):
    <?php if (function_exists('printSlideShowLink')) printSlideShowLink(gettext('View Slideshow')); ?>
    <div id="zip">
    <?php echo printAlbumZip() ?>
    </div>

    However, when I click the link, I am faced with a whole new set of problems:

    Warning: Missing argument 1 for pageError(), called in /home/ewilson/public_html/swim/zp-core/album-zip.php on line 49 and defined in /home/ewilson/public_html/swim/zp-core/functions.php on line 1688

    Warning: Missing argument 2 for pageError(), called in /home/ewilson/public_html/swim/zp-core/album-zip.php on line 49 and defined in /home/ewilson/public_html/swim/zp-core/functions.php on line 1688

    Notice: Undefined variable: err in /home/ewilson/public_html/swim/zp-core/functions.php on line 1689

    Notice: Undefined variable: text in /home/ewilson/public_html/swim/zp-core/functions.php on line 1689

    Warning: Cannot modify header information - headers already sent by (output started at /home/ewilson/public_html/swim/zp-core/functions.php:1688) in /home/ewilson/public_html/swim/zp-core/functions.php on line 1689

    Notice: Undefined variable: err in /home/ewilson/public_html/swim/zp-core/functions.php on line 1690

    Notice: Undefined variable: text in /home/ewilson/public_html/swim/zp-core/functions.php on line 1690

    Notice: Undefined variable: err in /home/ewilson/public_html/swim/zp-core/functions.php on line 1693

    Notice: Undefined variable: text in /home/ewilson/public_html/swim/zp-core/functions.php on line 1693
    Page access ()

    Out of curiosity, I commented out the above mentioned lines...then I am told there is a problem on line 49 of album-zip.php.

    Am I missing something? Am I supposed to do something with these files, as well?

    Thanks again for all of your wonderful help--and I am so sorry to be such a pain!!

    ~Erin
  • There is indeed a bug in the album zip script when it is denying you access to the album. The call on pageError should have two parameters `pageError(403, gettext("Forbidden"));`. But of course, there is still the question of why you are getting an error in the first place.

    The indication is that the album is password protected and the album zip does not have the correct password.
  • again, thanks for all your help!!

    rather than drive myself crazy, i just put a password on the entire directory, and removed it from the gallery (the idea was to not let anyone else see the pictures...it's a gallery for the parents of children on a swim team...)

    this happens to work splendidly for me....and now the printAlbumZip() function works!

    thanks again, really!!!!
Sign In or Register to comment.