Home › Support › Image Store › List Secured Galleries?
-
AuthorPosts
-
August 31, 2012 at 3:59 am #49482alunparryParticipant
Hi
Is it possible with this plug in to automatically (ie not manually type in) list each gallery (both secured and unsecured) as links.
Then when a secure gallery is clicked on, it shows the log in page then.
Ideally too, is it possible for the Gallery ID bit of the log in form to be automatically filled in from the outset upon clicking the link, leaving the user with just the task of entering the password.
Thanks
Al
September 2, 2012 at 1:28 pm #49529Xpark MediaKeymasterYou can use an plugin that will allow you to list content types using “ims_gallery” to display them this will list protected and public galleries; or you can create a template using the wp loop and use “ims_gallery” as content type.
The link will send the user to the gallery page were the user only needs to enter the password if the galley is pasword-protected.
October 2, 2012 at 1:30 am #50166AdaoDesignParticipantI also really need this!
The photography website we have developed http://www.anievansphotography.co.uk/image-store/ really need ALL the galleries (not protected and protected together) to show up on the image store page, and then if someone clicks on a password protected gallery, the secure login page should show up so they can login.
Hax: above you said to use a plugin that will allow you to list content type “ims_gallery”. What plugin? How can I do this?
Thanks
October 3, 2012 at 12:11 am #50177Xpark MediaKeymasterAdaoDesign,
The plugin needs to be created by you or a developer, also you can create a new theme template and use the WP_Query to display all the galleries
something like this
$query = new WP_Query(array('post_type'=>'ims_gallery'));
Then just use the WordPress loop like any template
October 4, 2012 at 5:47 am #50204AdaoDesignParticipantHax, will that just literally print out a list of the galleries though? I would like it to look exactly as the image-store page, but with the extra secured galleries within the list.
October 4, 2012 at 8:18 pm #50214Xpark MediaKeymasteryes, you can use the loop used in the “taxonomy-ims_album.php” file inside im-store/theme/ folder.
other option is to use an album to display all the images, I think this is an easier approach just add an album and assign all the galleries to the albums, this is how the galleries section is setup on this site
October 5, 2012 at 4:50 am #50224AdaoDesignParticipantHax, I have made the following template file, and made the page which is being used as the image-store to use this template.
All this does though is prints out the main gallery page, and does not print out the children? When you click on the link it gives you it doesn’t actually go anywhere, just to the same page!
<?php
/**
* Template Name: IMS Gallery
*
* @package WordPress
* @subpackage Invictus
* @since Invictus 1.0
*/get_header(); ?>
<section id=”primary”>
<div id=”content” role=”main”><header class=”page-header”>
<h1 class=”page-title”><?php single_term_title( ); ?></h1>
</header><div class=”ims-gallery”>
<?php while ( have_posts( ) ) : the_post(); ?>
<figure class=”hmedia ims-img”><?php
$images = get_children( array(
‘numberposts’ => 1,
‘post_type’=>’ims_gallery’,
‘post_parent’ => $post->ID,
‘orderby’ => ‘menu_order’,
‘order’ => ‘ASC’
));
foreach( $images as $image )
$data = wp_get_attachment_metadata( $image->ID );$size = ‘ width=”‘. $data[‘sizes’][‘thumbnail’][‘width’] .'” height=”‘.$data[‘sizes’][‘thumbnail’][‘height’].'”‘;
echo ‘<a href=”‘. get_permalink() . ‘” title=”View "’. get_the_title( $post->ID ).’" gallery” rel=”enclosure”>
<img src=”‘. $ImStore->get_image_url($image->ID, 2 ) .'” class=”colorbox-2″ alt=”‘.get_the_title( $post->ID ).'”‘.$size.’ /></a>’;
echo ‘<figcaption class=”gallery-caption”><span class=”fn ims-img-name”>’.get_the_title( $post->ID ).'</span></figcaption>’;
?></figure><?php endwhile; ?>
</div><?php //theme_content_nav( ‘nav-below’ , ‘galleries’ ); ?>
</div><!– #content –>
</section><!– #primary –><?php get_sidebar( ‘galleries’ ); ?>
<?php get_footer(); ?>October 8, 2012 at 8:51 pm #50254Xpark MediaKeymasteryou need to use a custom query to pull the galleries that you need including the child albums, use the taxonomy option, add it before the look, something like this
$args = array( 'post_type' => 'ims_gallery', 'tax_query' => array( array( 'taxonomy' => 'ims_album', 'field' => 'id', 'terms' => array("IDS") ) ) ); $query = new WP_Query( $args );
October 9, 2012 at 1:15 am #50289AdaoDesignParticipantHi Hax,
I have made the following page template with the custom query you gave me. I then use this page template as the template in the page attributes on the page that the image store shortcode call is being used on.
It still doesn’t return any posts, galleries or anything! Am I doing anything wrong? Even if I set the album template in the general image store galleries settings to the below template it still doesn’t do anything. Thanks for all your help, I’m looking forward to hearing back from you.
<?php
/**
* Template Name: IMS Gallery
*
* @package WordPress
* @subpackage Invictus
* @since Invictus 1.0
*/get_header(); ?>
<section id=”primary”>
<div id=”content” role=”main”><header class=”page-header”>
<h1 class=”page-title”><?php single_term_title( ); ?></h1>
</header><div class=”ims-gallery”>
<?php
$args = array(
‘post_type’ => ‘ims_gallery’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘ims_album’,
‘field’ => ‘id’,
‘terms’ => array(“IDS”)
)
)
);
$my_query = new WP_Query( $args );
?><?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<figure class=”hmedia ims-img”><?php
$images = get_children( array(
‘numberposts’ => 1,
‘post_type’=>’ims_gallery’,
‘post_parent’ => $post->ID,
‘orderby’ => ‘menu_order’,
‘order’ => ‘ASC’
));
foreach( $images as $image )
$data = wp_get_attachment_metadata( $image->ID );$size = ‘ width=”‘. $data[‘sizes’][‘thumbnail’][‘width’] .'” height=”‘.$data[‘sizes’][‘thumbnail’][‘height’].'”‘;
echo ‘<a href=”‘. get_permalink() . ‘” title=”View "’. get_the_title( $post->ID ).’" gallery” rel=”enclosure”>
<img src=”‘. $ImStore->get_image_url($image->ID, 2 ) .'” class=”colorbox-2″ alt=”‘.get_the_title( $post->ID ).'”‘.$size.’ /></a>’;
echo ‘<figcaption class=”gallery-caption”><span class=”fn ims-img-name”>’.get_the_title( $post->ID ).'</span></figcaption>’;
?></figure><?php endwhile; ?>
</div><?php //theme_content_nav( ‘nav-below’ , ‘galleries’ ); ?>
</div><!– #content –>
</section><!– #primary –><?php get_sidebar( ‘galleries’ ); ?>
<?php get_footer(); ?>October 29, 2012 at 3:54 am #50598AdaoDesignParticipantHax, any news in this? We still really need to sort this and have all the galleries listed together whether they are locked or not!
Thanks
October 31, 2012 at 9:39 pm #50652Xpark MediaKeymasterif you are using version 3.1.7 there is a new value that you can add to the shortcode to display all the galleries [image-store all=true]
November 4, 2012 at 4:37 am #50728suzt808ParticipantHax, THANK YOU! for this additional shortcode parameter
-
AuthorPosts
- You must be logged in to reply to this topic.