List Secured Galleries?

Bring Your Business to LifeSupportImage StoreList Secured Galleries?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #49482
    alunparry
    Participant

    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

    #49529
    Xpark Media
    Keymaster

    You 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.

    #50166
    AdaoDesign
    Participant

    I 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

    #50177
    Xpark Media
    Keymaster

    AdaoDesign,

    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

    #50204
    AdaoDesign
    Participant

    Hax, 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.

    #50214
    Xpark Media
    Keymaster

    yes, 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

    #50224
    AdaoDesign
    Participant

    Hax, 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 &quot;’. get_the_title( $post->ID ).’&quot; 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(); ?>

     

     

    #50254
    Xpark Media
    Keymaster

    you 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 );

     

    #50289
    AdaoDesign
    Participant

    Hi 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 &quot;’. get_the_title( $post->ID ).’&quot; 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(); ?>

    #50598
    AdaoDesign
    Participant

    Hax, 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

    #50652
    Xpark Media
    Keymaster

    if 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]

    #50728
    suzt808
    Participant

    Hax, THANK YOU! for this additional shortcode parameter

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.