Adding a Download All Button on an Archive Page
-
The Goal = A user would be able to add galleries (posts) to a wish list page.
Currently, the user is able to go into a gallery (post) and download all photos. I’ve built a wish list page and can call the download all button but, it’s as though the ngg download gallery system will only zip all the files once on the individual gallery page. Is there a way for the user to be on their wish list page or archive page (essentially a page with multiple posts that has a post thumbnail, post title, link to post and download all gallery button for each gallery).
The below code is what I have for my wish list page.
##poster_ID## produces the post ID.<div id="favoritesGalleryBox"> <?php include('../lib/translate_tool.php'); ?> <?php /** Template for the NextGEN Download Gallery Based on basic template (gallery.php) with a few custom additions Follow variables are useable : $gallery : Contain all about the gallery $images : Contain all images, path, title $pagination : Contain the pagination content **/ if (!defined ('ABSPATH')) die ('No direct access allowed'); if (!empty($gallery)): // get link to download all images, or false if not configured to do so $nggDownloadAllUrl = NextGENDownloadGallery::getDownloadAllUrl($gallery); ?> <h3><a href="##postUrl##">##postTitle##</a></h3> <form action="../wp-admin/admin-ajax.php" method="post" id="ngg-gallery-3___973494768-##poster_ID##-download-frm" class="ngg-download-frm"> <input type="hidden" name="action" value="ngg-download-gallery-zip"> <input type="hidden" name="gallery" value="##poster_ID##"> <input class="button ngg-download-everything" type="button" style="" value="download all images"> <input type="hidden" name="nggDownloadAll" value="../wp-admin/admin-ajax.php?action=ngg-download-gallery-zip&all-id=3___973494768&download-all=1"> <?php if ($nggDownloadAllUrl): ?> <input class="button ngg-download-everything" type="button" style="display:none" value="<?php _e('download all images', 'nextgen-download-gallery'); ?>" /> <input type="hidden" name="nggDownloadAll" value="<?php echo esc_url($nggDownloadAllUrl); ?>" /> <?php endif; ?> </form> <a href="##postUrl##"><img src="##postImage##" class="img-book img-responsive"></a> </div>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Adding a Download All Button on an Archive Page’ is closed to new replies.