WebsiteBaker 2.13.9 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
<script type="text/javascript">$(document).ready(function() { $('.slideshow').cycle({ timeout: 8000, fx: 'fade', delay: 1000, speed: 1500, requeueOnImageNotLoaded: true });});</script>
<span class="slideshow"><img src="slide1.jpg" height="185" width="240" /><img src="slide2.jpg" height="185" width="240" /><img src="slide3.jpg" height="185" width="240" /><img src="slide4.jpg" height="185" width="240" /></span>
<?php$output_value ="";// check if the 'folder' Parameter is set in the Dropletif (!isset($folder)){ global $MESSAGE; $output_value = $MESSAGE['MOD_FORM']['REQUIRED_FIELDS'].":<b>microGallery call =></b> <tt>folder={path/to/the/folder}</tt>";} $img_dir = WB_PATH.MEDIA_DIRECTORY.'/'.$folder.'/';$img_url = WB_URL.MEDIA_DIRECTORY.'/'.$folder.'/'; if (is_dir($img_dir)){ $dir = dir($img_dir); while (FALSE !== $image_file = $dir->read()){ // use jpg, gif and png files only if (!preg_match('/.+\.(jpeg|jpg|gif|png)$/', $image_file) || substr($image_file, 0, 1) == ".") continue; // Make Array of images for the microGallery if image files exist // convert filenames into Titles $img_title = str_replace(array(".png", ".jpg", ".gif", ".jpeg"), "", $image_file); $img_title = str_replace("_", " ", $img_title); $width = (isset($w)) ? $w : 100; //&width=100 $height = (isset($h)) ? $h : 100; //&height=100 if (isset($img_title) && !empty($img_title)){ $img_src = $img_url.$image_file; $image_show[] = '<img src="'.$img_src.'" alt="'.$img_title.'" width="'.$width.'" height="'.$height.'" />'; } } //endwhile if(empty($image_show)){ //no images in this directory $output_value = $MESSAGE['MEDIA']['NONE_FOUND'].': (<tt> '.$img_url.' </tt>)'; } // DISPLAY microGallery $cssclass = (isset($class)) ? ' class="'.$class.'"' : ' class="slideshow"'; //&cssclass=yourclass $output_value = "<span ".$cssclass.">"; foreach ($image_show as $image){ $output_value .= $image; } $output_value .= '</span>'; } else { // directory doesn't exists ---> global $MESSAGE; $output_value = $MESSAGE['MEDIA']['DIR_DOES_NOT_EXIST'].': (<tt> '.$img_url.' </tt>)';} // endif (is_dir($img_dir)) return $output_value;
$folder = opendir(WB_PATH.MEDIA_DIRECTORY.'/'.$dir.'/.'); $names = array();if(isset($cssclass)){$class=$cssclass;}else{$class="slideshow";}while ($file = readdir($folder)) { $ext=strtolower(substr($file,-4)); if ($ext==".jpg"||$ext==".gif"||$ext==".png"){ $names[count($names)] = $file; }}closedir($folder);reset(shuffle($names));array_unshift($names," ");$count=1;while(($image=next($names))and(($count<=$num)or(!isset($num)))){$name=substr($image,0,-4);$images=$images.' <img src="'.WB_URL.MEDIA_DIRECTORY.'/'.$dir.'/'.$image.'" alt="'.$name.'" />';$count++;}return '<span class="' .$class. '">' .$images. '</span>';
$(document).ready(function(){ if($(".slideshow").length) { $.insert(WB_URL+'/templates/allcss/js/jquery.easing.js'); $.insert(WB_URL+'/templates/allcss/js/jquery.cycle.all.min.js'); $('.slideshow').cycle({ timeout: 8000, fx: 'fade', delay: 1000, speed: 1500, requeueOnImageNotLoaded: true }); }});
$(document).ready(function(){ if($(".slideshow").length) { $.insert(WB_URL+'/templates/allcss/js/jquery.easing.js'); $.insert(WB_URL+'/templates/allcss/js/jquery.cycle.all.min.js'); $('.slideshow').cycle({ fx: 'fade, fadeZoom, slideX, wipe, growX, shuffle' }); }});
Fehler: $(".slideshow").cycle is not a functionQuelldatei: http://developer-base.de/delta/templates/allcss/jquery_frontend.jsZeile: 10
$(document).ready(function(){ if($(".slideshow").length) { $.include ({'/delta/templates/allcss/js/jquery.easing.js':null}) $.include ({'/delta/templates/allcss/js/jquery.cycle.all.min.js':function(){ $('.slideshow').cycle({ fx: 'fade, fadeZoom, slideX, wipe, growX, shuffle' }); } }); } });
$(document).ready(function(){ if($(".slideshow, .fade_slideshow").length) { $.include ({'/delta/templates/allcss/js/jquery.easing.js':null}) $.include ({'/delta/templates/allcss/js/jquery.cycle.all.min.js':function(){ $('.slideshow').cycle({ fx: 'all' }); $('.fade_slideshow').cycle({ timeout: 8000, fx: 'fade', delay: 1000, speed: 1500, requeueOnImageNotLoaded: true }); } }); } });
<?php$output_value ="";// check if the 'folder' Parameter is set in the Dropletif (!isset($folder)){ global $MESSAGE; $output_value = $MESSAGE['MOD_FORM']['REQUIRED_FIELDS'].":<b>microGallery call =></b> <tt>folder={path/to/the/folder}</tt>";} $img_dir = WB_PATH.MEDIA_DIRECTORY.'/'.$folder.'/';$img_url = WB_URL.MEDIA_DIRECTORY.'/'.$folder.'/'; if (is_dir($img_dir)){ $dir = dir($img_dir); while (FALSE !== $image_file = $dir->read()){ // use jpg, gif and png files only if (!preg_match('/.+\.(jpeg|jpg|gif|png)$/', $image_file) || substr($image_file, 0, 1) == ".") continue; // Make Array of images for the microGallery if image files exist // convert filenames into Titles $img_title = str_replace(array(".png", ".jpg", ".gif", ".jpeg"), "", $image_file); $img_title = str_replace("_", " ", $img_title); $width = (isset($w)) ? $w : 100; //&width=100 $height = (isset($h)) ? $h : 100; //&height=100 if (isset($img_title) && !empty($img_title)){ $img_src = $img_url.$image_file; $image_show[] = '<img src="'.$img_src.'" alt="'.$img_title.'" width="'.$width.'" height="'.$height.'" />'; } } //endwhile if(empty($image_show)){ //no images in this directory $output_value = $MESSAGE['MEDIA']['NONE_FOUND'].': (<tt> '.$img_url.' </tt>)'; } // DISPLAY microGallery $cssclass = (isset($class)) ? ' class="'.$class.'"' : ' class="slideshow"'; //&cssclass=yourclass $output_value = "<span ".$cssclass.">"; foreach ($image_show as $image){ $output_value .= $image; } $output_value .= '</span>'; } else { // directory doesn't exists ---> global $MESSAGE; $output_value = $MESSAGE['MEDIA']['DIR_DOES_NOT_EXIST'].': (<tt> '.$img_url.' </tt>)';} // endif (is_dir($img_dir)) return $output_value;