WebsiteBaker 2.13.8 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
// Initialize or reset thumb(s) and image(s) befor laoding next item $thumb_arr = array(); $image_arr = array(); $thumb = ""; $image = ""; $img_hoogte = 400; // Prepare thumb and image directory pathes and urls $thumb_dir = WB_PATH.MEDIA_DIRECTORY.'/showroom/thumbs/item'.ITEM_ID.'/'; $img_dir = WB_PATH.MEDIA_DIRECTORY.'/showroom/images/item'.ITEM_ID.'/'; $thumb_url = WB_URL.MEDIA_DIRECTORY.'/showroom/thumbs/item'.ITEM_ID.'/'; $img_url = WB_URL.MEDIA_DIRECTORY.'/showroom/images/item'.ITEM_ID.'/'; // Check if the thumb and image directories exist if (is_dir($thumb_dir) && is_dir($img_dir)) { // Open the image directory then loop through its contents $dir = dir($img_dir); while (false !== $image_file = $dir->read()) { // Skip index file and pointers if (eregi(".php", $image_file) || substr($image_file, 0, 1) == ".") { continue; } // Thumbs use .jpg extension only $thumb_file = str_replace (".png", ".jpg", $image_file); // Convert filename to lightbox2 title $img_title = str_replace(array(".png", ".jpg"), "", $image_file); $img_title = str_replace("_", " ", $img_title); // Make array of all item thumbs and images if (file_exists($thumb_dir.$thumb_file) && file_exists($img_dir.$image_file)) { // If needed add lightbox2 link to the thumb/image... if ($setting_lightbox2 == "detail" || $setting_lightbox2 == "all") { $prepend = "<a href='".$img_url.$image_file."' rel='lightbox[image_".ITEM_ID."]' title='".$img_title."'><img src='"; $thumb_append = "' alt='".$img_title."' title='".$img_title."' /></a>"; $img_append = "' alt='".$img_title."' title='".$img_title."' /></a>"; // ...else add thumb/image only } else { $prepend = "<li><img src='"; $img_prepend = "<div class=\"panel\"><img src='"; $thumb_append = "' alt='".$img_title."' title='".$img_title."' /></li>"; $img_append = "' alt='".$img_title."' title='".$img_title."' height='".$img_hoogte."'/></div>"; } // Check if a main thumb/image is set if ($image_file == $item['main_image']) { $thumb = $prepend.$thumb_url.$thumb_file.$thumb_append; $image = $img_prepend.$img_url.$image_file.$img_append; continue; } // Make array $thumb_arr[] = $prepend.$thumb_url.$thumb_file.$thumb_append; $image_arr[] = $img_prepend.$img_url.$image_file.$img_append; } } } // Make strings for use in the item templates $thumbs = implode("\n", $thumb_arr); $images = implode("\n", $image_arr);
<script type="text/javascript" src="<?php echo TEMPLATE_DIR; ?>/scripts/jquery-1.3.2.min.js"></script><script type="text/javascript" src="<?php echo TEMPLATE_DIR; ?>/scripts/jquery.easing.1.3.js"></script><script type="text/javascript" src="<?php echo TEMPLATE_DIR; ?>/scripts/jquery.galleryview-1.1.js"></script><script type="text/javascript" src="<?php echo TEMPLATE_DIR; ?>/scripts/jquery.timers-1.1.2.js"></script><script type="text/javascript"> $(document).ready(function(){ $('#photos').galleryView({ panel_width: 600, panel_height: 450, frame_width: 100, frame_height: 100 }); });</script>
<div id="photos" class="galleryview">[IMAGE][IMAGES] <ul class="filmstrip">[THUMB][THUMBS] </ul></div>
<?phpif (function_exists('register_frontend_modfiles')) { register_frontend_modfiles('css'); register_frontend_modfiles('jquery'); register_frontend_modfiles('js');} ?>