Jump to content


Photo
Viewer

Viewer plugin not working ok with [gallery] in template



Best Answer beardedavenger , 20 January 2013 - 12:11 AM

You are the only person out of hundreds that have asked for this. If the majority of users start asking for features, that's when things get added. I can't accommodate everyone's requests.

Go to the full post


  • This topic is locked This topic is locked
13 replies to this topic

#1 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 17 January 2013 - 04:57 PM

I recently purchased the viewer plugin and it is really looking great. But I have problems to get working properly inside a template.

I use this now html/php inside my template:

<div class="tab-pane" id="tab2">
<?php echo do_shortcode('[gallery]'); ?>
</div>

All attached images are showed but it looks like the viewer plugin is not loaded.
You van see it here:
http://apsupport.nl/...g-29-castricum/

In first tab "Omschrijving" is it working ok; In this I have included [gallery] in the post editor.

In the 2nd tab "Foto's" is it not working and this one is included in the template.
  • AngryBass likes this

#2 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 17 January 2013 - 05:26 PM

Hi!

Seems to be working ok for me? Also, it's only going to load on the page it's used on. So because Tabber pulls in content with the_content, Viewer thinks it's not being used there.

 

http://screencast.com/t/tg04y1jc

 

You also have an undefined index from your maintenance plugin.


  • AngryBass likes this

#3 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 17 January 2013 - 05:49 PM

I have included it twice:

 

1) In the tab "Omschrijving".  This is the post-content and I have added the shortcode [gallery] manually to the post content. This is working ok.

 

2) The shortcode [gallery] in the 2nd tab "Foto's" is included in the template with the code <?php echo do_shortcode('[gallery]'); ?> and in this tab it is not working ok

 

btw: I do not use the Tabber section on this site.



#4 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 17 January 2013 - 06:14 PM

Right on, looked like it sorry. But yeah Viewer is only going to work on the pages that actually have a gallery, otherwise your [gallery] shortcode has no idea what gallery to load. So in other words, it's only going to work on pages that have [gallery], as it loads the attachments from that specific page/post.



#5 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 17 January 2013 - 06:44 PM

Hmmm.. I still don't get it.

All images shown in this gallery are attachements from this specific post.  Here is another example:

http://apsupport.nl/...laan-18-limmen/

 

And as you can see in the html-source from this page are all images inside <div class="viewer-wrapper"> 



#6 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 17 January 2013 - 07:06 PM

Added the post ID, but this doesn't change anything

 

<?php echo do_shortcode('[gallery id="'.$post->ID.'"]'); ?>



#7 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 17 January 2013 - 07:45 PM

Viewer is only going to work on the pages that the gallery is used on.



#8 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 17 January 2013 - 08:10 PM

Is there another way to add a gallery to a specific page? But not manually in the post editor, because my posts are automatically generated.



#9 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 18 January 2013 - 11:49 AM

Sorry to bother you again, Nick. 

But why is the featured image not shown in the Viewer gallery?  With the plugin is disabled, the featured image is shown in the gallery.



#10 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 18 January 2013 - 03:02 PM

Hi, 

It's designed to excluded the featured image, as most folks will have a certain cropped size, and that size is too small to be displayed in the plugin.



#11 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 18 January 2013 - 03:28 PM

...... would have been better to let the user decide to include it or not (through an option in the dashboard).



#12 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 18 January 2013 - 03:47 PM

Thanks for the feedback.



#13 bluecloud

bluecloud

    Advanced Member

  • Members
  • 44 posts
  • LocationHillegom
  • Framework Version:latest (always)
  • Country: Country Flag

Posted 19 January 2013 - 07:34 AM

I'm a huge fan of your products Nick, but I think you should change this is the Viewer plugin. 

There is no way to get the image included in the Viewer gallery. Even when the image ID is specified in the IDs option, is it not shown, In my opinion is that not correct.



#14 beardedavenger

beardedavenger

    Unicorn Wrangler

  • Members

  • 1219 posts
  • Country: Country Flag

Posted 20 January 2013 - 12:11 AM   Best Answer

You are the only person out of hundreds that have asked for this. If the majority of users start asking for features, that's when things get added. I can't accommodate everyone's requests.







Also tagged with one or more of these keywords: Viewer