Possible bug?

Admiror Gallery is free extension for Joomla! 1.6. Joomla! 1.7 and Joomla! 2.5 based websites. Admiror Gallery is all in one, a simple and instant solution for rendering image gallery from folder with images, but very flexible and adaptable.
Post Reply
Message
Author
Mike321
Posts: 1
Joined: Sat Dec 15, 2012 8:24 pm

Possible bug?

#1 Post by Mike321 »

Please check this link http://www.lamayagtantra.com/index.php/artworks-of-jim

I want to organize photos into separate categories, hence the separate folders. I use galleryview template for the photos. On each folder the the gallery works fine, however, if I go the the list of folders, it shows the galleryview but nothing is in there.

Any way to fix this or any workaround?

Admiror Gallery 5 - Fundraising Campaign

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Possible bug?

#2 Post by Vasiljevski »

Well, it's difficult to say what exactly this is :)

It may be a feature or a bug :) In general galleryView is not designed for Album support.

You can add one image in the folder containing "photojournalism" and "performances" directory's, this way you won't have just a black square.

In other case you could just add a check to see if there is any image, and omit the instance of the gallery in case no image available:

Go to: plugins/admirorgallery/admirorgallery/templates/galleryView
Open: index,php
Find this part:

Code: Select all

$AG->insertJSCode('
AG_jQuery(document).ready(function(){
  AG_jQuery("#AG_'.$AG->getGalleryID().' #photos").galleryView({
	  panel_width: '.$AG->params['frameWidth'].',
	  panel_height: '.$AG->params['frameHeight'].',
	  frame_width: '.$AG->params['thumbWidth'].',
	  frame_height: '.$AG->params['thumbHeight'].',
	  nav_theme: "light",
	  pause_on_hover: true
  });
  AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos").css({backgroundColor:"black"});
  AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos .panel-content img").css({width:"'.$AG->params['frameWidth'].'px",height:"'.$AG->params['frameHeight'].'px"});
});
');
Edit it like:

Code: Select all

if(isset($AG->images[0]))
{
    $AG->insertJSCode('
    AG_jQuery(document).ready(function(){
      AG_jQuery("#AG_'.$AG->getGalleryID().' #photos").galleryView({
          panel_width: '.$AG->params['frameWidth'].',
          panel_height: '.$AG->params['frameHeight'].',
          frame_width: '.$AG->params['thumbWidth'].',
          frame_height: '.$AG->params['thumbHeight'].',
          nav_theme: "light",
          pause_on_hover: true
      });
      AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos").css({backgroundColor:"black"});
      AG_jQuery("#AG_'.$AG->getGalleryID().' div#photos .panel-content img").css({width:"'.$AG->params['frameWidth'].'px",height:"'.$AG->params['frameHeight'].'px"});
    });
    ');
}
Now when you open you gallery page you will only see albums, empty black box will not be visible.
Help Admiror Gallery become even better,
give us a review on JED

Post Reply