It is currently Fri Dec 15, 2017 5:58 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue May 03, 2011 12:38 am 
Offline

Joined: Tue May 03, 2011 12:34 am
Posts: 2
Hey there. Need a bit of help. I have a gallery that is paginated - all works perfectly. I'd like that when my user clicks on an image though, it allows them to cycle through all the images in the gallery via slimbox rather than having to close slimbox, go to page 2 , then open it up again. Any ideas would be gratefully received.

Many thanks

Z


Top
 Profile  
 
 Post subject: HELP! Display all images in slimbox with paginated gallery
PostPosted: Tue May 03, 2011 12:38 am 
Top  
PostPosted: Thu May 05, 2011 8:30 am 
Offline
Developer
Developer
User avatar

Joined: Tue Aug 17, 2010 2:38 pm
Posts: 445
Location: Novi Sad, Serbia
Popups work by collecting all images inside of containing element. When pagination is active, containing element holds only filtered group of images, not all images. I don't have an idea how this could be done on easy way. Maybe to compare which images from some folder shouldn't be visible, and to put them in containing element with style="display:none".

_________________
Admiror Design Studio


Top
 Profile  
 
PostPosted: Thu May 05, 2011 12:59 pm 
Offline

Joined: Tue May 03, 2011 12:34 am
Posts: 2
Many thanks for the reply. I've found how get it to work possibly, however I'm not sure what code to change in Admiror.

It seems the way to work it is to put 2 calls on the page:

One for the paginated results
One that calls all the images but is set not to display.

This site has it implemented, obviously it not joomla with admiror though. : http://svr8.acornhost.com/~infinity/amanda_myers.html

Could you possibly point me to the code to play with to try this out at all - indeed was wondering if I could do it in a custom admiror template?

Many thanks

Z


Top
 Profile  
 
PostPosted: Thu May 05, 2011 1:19 pm 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Well one solution can be to add a JavaScript array off all images, and when image clicked, pass this array to slimbox and position to the current image. And this might be implemented on the template level.
You can find Slimbox API reference here : http://code.google.com/p/slimbox/wiki/j ... ple_images
It shows how to pass a custom image array to the slimbox.

P.S. When using the AdmirorGallery you should use AG_jQuery as a reference to jQuery library.
Example:
Original
Code:
jQuery.slimbox([["left.jpg"], ["middle.jpg"], ["right.jpg"]], 1, {loop: true});

AdmirorGallery
Code:
AG_jQuery.slimbox([["left.jpg"], ["middle.jpg"], ["right.jpg"]], 1, {loop: true});

_________________
Help Admiror Gallery become even better,
give us a review on JED


Top
 Profile  
 
PostPosted: Fri May 06, 2011 9:38 am 
Offline
Developer
Developer
User avatar

Joined: Tue Aug 17, 2010 2:38 pm
Posts: 445
Location: Novi Sad, Serbia
I spend some time to test this with Slimbox API. Yes, it's possible, as Vasiljevski said.

First, find /plugins/content/AdmirorGallery/popups/slimbox/js/slimbox2.js and comment lines 9-15
Code:
//if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {

//   AG_jQuery(function($) {

//      $("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {

//         return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));

//      });

//   });

//}


Then find /plugins/content/AdmirorGallery/templates/classic/index.php and add this before "?>" on the end of code:

Code:
$images_all = agHelper::ag_imageArrayFromFolder($AG->imagesFolderPhysicalPath);
if (!empty($images_all)) {
    $images_all = agHelper::array_sorting($images_all, $AG->imagesFolderPhysicalPath);
}
foreach($images_all as $key => $value){
    $images_all_array[] = '"'.$AG->imagesFolderPath.$value.'"';
    $images_all_slimbox[] = '["'.$AG->imagesFolderPath.$value.'"]';
}
$images_all_array_imploded=implode(",", $images_all_array);
$images_all_slimbox_imploded=implode(",", $images_all_slimbox);
$html.='
<script type="text/javascript">
   AG_jQuery(function($) {   
       var images_all_imploded = ['.$images_all_array_imploded.'];

       $(\'#AG_'.$AG->getGalleryID().' a[rel^="lightbox"]\').each(function(index) {                      
           $(this).click(function(e){
               e.preventDefault();
               $.slimbox(['.$images_all_slimbox_imploded.'], $.inArray($(this).attr("href"), images_all_imploded), {loop: true})     
           });       
        });
    });
</script>
';

_________________
Admiror Design Studio


Top
 Profile  
 
 Post subject: Re: HELP! Display all images in slimbox with paginated galle
PostPosted: Fri May 06, 2011 9:38 am 
Top  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

This is the official Admiror Joomla! Community Forum. You are welcome to join the Admiror Joomla! Community. All Admiror Joomla! Extensions Users, Joomla! Developers, PHP or mySQL Developers are welcome to support & contribute to Admiror Joomla! Projects.

Joomla! is a free and open source content management system (CMS) for publishing content on the World Wide Web and intranets. With a vibrant volunteer community, user-friendly features and plenty of power, Joomla is perfect for your website!

Joomla! is written in PHP, uses object-oriented programming (OOP) techniques and software patterns, stores data in a MySQL database, and includes features such as page caching, RSS feeds, printable versions of pages, news flashes, blogs, polls, search, and support for language internationalization.

Joomla! is the property of Open Source Matters, Inc. All rights reserved. Read more about Joomla! at http://www.joomla.org/.


Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group