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 + \' - \' + title + \'</span>\'; // code with image-title
}
});
</script>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".
