It is currently Mon May 28, 2018 10:04 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 10, 2013 11:47 pm 
Offline

Joined: Thu Oct 10, 2013 11:14 pm
Posts: 2
Hi Vasiljevski,

First of all thank you for this perfect gallery plugin.

Now my question.
On different locations in my articles I have placed images.
Now I would like to use admiror gallery to open each image as if it was an image from a gallery.

Currently I solve this by putting each image in a seperate folder and then add this folder as a gallery in the article.
Thus I have multiple galleries in my article and each gallery containt one image.
In this case the caption works nicely and all images open in the same way.
I also have one forder containing all images, so I can open it as a normal galley as well.

Now I am wondering if it is possible to have all images in the same folder or gallery and then when adding this gallery multiple times to the article, for each time select a different image from that folder.

I have been searching through this board, but could not find anything.

Thanks in advance for an answer,

With kind regards,

Sander


Top
 Profile  
 
 Post subject: Show only one image from gallery
PostPosted: Thu Oct 10, 2013 11:47 pm 
Top  
PostPosted: Tue Oct 15, 2013 11:20 am 
Offline
Developer
Developer
User avatar

Joined: Sat Aug 14, 2010 9:31 pm
Posts: 1241
Location: Novi Sad, Serbia
Well this seems as a nice feature, but currently it is not supported in the default installation.
But maybe it could be done with some small code changes.

Let say that you use classic template, open index.php found in classic folder and change this part:
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.= '<a href="' . $AG->imagesFolderPath . $imageName . '" target="_blank"><input type="button" value="Download"></a>';             
        $html.='</span>';
    }
}

into this:
Code:
$singleImage = $AG->ag_getParams("image", $match, null);
// 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)) {
    if($singleImage)
    {
        $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
        $html.= $AG->writePopupThumb($singleImage);           
        $html.='</span>';
    }
    else
    {   
        foreach ($AG->images as $imageKey => $imageName) {
            $html.= '<span class="ag_thumb' . $AG->params['template'] . '">';
            $html.= $AG->writePopupThumb($imageName);             
            $html.='</span>';
        }
    }
}


So now when you need just one image just set {AG single_image="apple1.jpg"}fruitshop{/AG} and only that image will appear :)
single_image - should be picture name relative to the gallery that is shown. In the case above I have my image is "/images/sampledata/fruitshop/apple1.jpg"

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


Top
 Profile  
 
PostPosted: Tue Nov 05, 2013 9:52 pm 
Offline

Joined: Thu Oct 10, 2013 11:14 pm
Posts: 2
Hi Vasiljevski,

Sorry for my late response and first of all I would like to thank you for your effort making this possible.
This really works like a charm.

Maybe it is possible for a next version of admiror to add this as an option in the editor button.
Now you can select only the folder for the gallery.
Would be easy to add another option with selector to provide the file name, or even beter, select the file from the given folder.

I am trying to create this as an editor butten myself, but I am not a programmer, so it will take a while.

Nevertheless This really helped with improving my website and I am recomending admiror gallery to others.

With kindest Regards,

Sander Nobel


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

 


All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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