It is currently Mon Dec 18, 2017 8:35 pm

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Sat Mar 01, 2014 3:44 pm 
Offline

Joined: Wed Feb 05, 2014 11:47 pm
Posts: 5
I was wondering if there's a way to do the following:

Just show the first image of the gallery. Then if a visitor clicks on that image, a lightbox opens where the rest of the images are shown in a thumbnail at the bottom and the visitor can click through them.

Example:
http://www.fishermanholidays.com/en/domaine-de-bouxier

Click on Swim Pictures or Pictures Catches.

Is there any way to do something like this with Admiror Gallery?

I know you can set the Gallery template to galleryView, but I would like this gallery to show up in a popup or a lightbox popup.


Top
 Profile  
 
 Post subject: Showing just the first image of the gallery
PostPosted: Sat Mar 01, 2014 3:44 pm 
Top  
PostPosted: Mon Mar 03, 2014 11:11 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Well there is no out-of-the-box way, but you can do this in several ways with slightly changing the index.php of the, for example, classic template.

In classic template, we have this part of code:
Code:
// Loops over the array of images inside target gallery folder, adding wrapper with SPAN tag and write Popup thumbs inside this wrapper
if (!empty($AG->images)) {
    foreach ($AG->images as $imageKey => $imageName) {
        $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
        $html.= $AG->writePopupThumb($imageName);
        $html.='</span>';
    }
}

As you can see , on template level, you have access to the images that should be shown ($AG->images)
In you case, you could do is:
Code:
$first_image = true;
if (!empty($AG->images)) {
    foreach ($AG->images as $imageKey => $imageName) {
        if($first_image)
        {
              $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
              $html.= $AG->writePopupThumb($imageName);
              $html.='</span>';
              $first_image=false;
        }
        else
        {
              $html.= '<span class="ag_thumb' . $AG->params['template'] . '" style="display:none;">';
              $html.= $AG->writePopupThumb($imageName);
              $html.='</span>';
              $first_image=false;
        }
    }
}


This is just a dirty example, just to explain the idea what is possible.
Hope this helps.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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