HowTo: FancyBox - Image Counter

Admiror Gallery 5.x.x for Joomla 3.x. support forum.
Post Reply
Message
Author
User avatar
MVN
Posts: 7
Joined: Thu Oct 16, 2014 9:59 am
Location: D-96349 Neufang
Contact:

HowTo: FancyBox - Image Counter

#1 Post by MVN »

Hi, first of all ... thanxxx a lot for this great component!

I've added some code to the "index.php" of fancybox-popup (Path: ./plugins/content/admirorgallery/admirorgallery/popups/fancybox) to show an image counter. Now my part of "index.php" looks like this:

Code: Select all

<script type="text/javascript" charset="utf-8">
	AG_jQuery("a[rel=' . $this->popupEngine->rel . ']").fancybox({
		\'transitionIn\' : \'fade\', // Options: none, elastic, fade
		\'transitionOut\' : \'fade\',
		\'easingIn\' : \'easeOutBack\', // Option: swing
		\'easingOut\' : \'easeInBack\',
		\'overlayOpacity\' : \'1.0\', // Background-Transparency
		\'overlayColor\' : \'#000\', // Background-Color
		\'titleShow\' : \'true\',
		\'titlePosition\' : \'over\',	// Options: inside, outside, over || Also change <span id> at titleFormat!
		\'titleFormat\' : function(title, currentArray, currentIndex, currentOpts) {
			return \'<span id="fancybox-title-over">Image \' +  (currentIndex + 1) + \' of \' + currentArray.length + \'</span>\';	// code without image-title
			// return \'<span id="fancybox-title-over">Image \' +  (currentIndex + 1) + \' of \' + currentArray.length + \'&nbsp;-&nbsp;\' + title + \'</span>\';	// code with image-title
		}
	});
</script>
'Cause I'm an absolutely JavaScript-Noop, -Dummy (or whatever you want to say) ... can anyone please check this code, if there's a security risk?

BTW: I've removed the copyright-link from the gallery and added it to the credits of my site. Is this ok or allowed?

Update 30.10.2014:

After the code was checked by members of stackoverflow, I changed the subject to a "HowTo".
Last edited by MVN on Fri Nov 07, 2014 8:49 am, edited 1 time in total.

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: HowTo: FancyBox - Image Counter

#2 Post by Vasiljevski »

Nice work.

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

Post Reply