part of my code in the frontend template
- i dont use any filters from WB - (not really important, works also with a filter (for jquery etc))
- i dont use register_frontend_m odfiles() - (not really important, works also with a register_frontend_m odfiles (for jquery etc))
- no colorbox-module installed, only the script from my zip
the last line's from the template
<script src="<?php echo WB_URL; ?>/include/jquery/jquery-min.js" type="text/javascript"></script>
<script type="text/javascript" src="<?php echo TEMPLATE_DIR; ?>/js/template.js"></script>
<script src="<?php echo TEMPLATE_DIR; ?>/colorbox/jquery.colorbox.js" type="text/javascript"></script>
<script src="<?php echo TEMPLATE_DIR; ?>/js/CookieNotice.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
//Examples of how to assign the Colorbox event to elements
$(".group1").colorbox({rel:'group1'});
$(".group2").colorbox({rel:'group2', transition:"fade"});
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
$(".group4").colorbox({rel:'group4', slideshow:true,loop:true,
slideshowSpeed:6000,
slideshowAuto:true,
transition:"elastic",
opacity: "0.7",
maxWidth:"90%",
maxHeight:"90%",
previous:"zurück",
next:"vor",
close:"schließen",
current: "Bild {current} von {total}",
slideshowStart: "Diashow starten",
slideshowStop: "Diashow anhalten"});
});
</script>
<?php if (function_exists('register_frontend_modfiles_body')) { register_frontend_modfiles_body(); } ?>
</body>
</html>
templates.js is a little script to change the colorbox overlay-window for a second row in the picture title under the maxi picture. if i remove this line, i've the default picture size, so no matter for your case
the next script with $(".group1").colorbox({rel:'group1'}); change intern the a-link-class "group1" to the deprecated rel-element, so that i have no problem's in the validation, the rest are default settings for a colorbox slideshow.
for a single picture with a short title, i use group1, for multiple pictures without slideshow = group2, for a single picture with a longer title over two or three lines = group3, for a slideshow = group4
foldergallery has own settings, specially shorter slideshowSpeed (4000ms) and no loop (loop=false)
i can use this solution in every frontend-template, also with filters and with register_frontend_m odfiles(), no problem
important in every case: i have to call the colorbox.js after jquery
if you want, i build a test-wb for you, so that you see it live