function return_smooth_slider_category($catg_slug='',$offset=0) { global $smooth_slider; $slider_html=''; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0'); $slider_handle='smooth_slider_'.$catg_slug; $slider_html=return_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='0'); return $slider_html; }
function return_smooth_slider_category($catg_slug = '', $offset = 0, $data = array()) { global $smooth_slider; $slider_html = ''; $set = ''; $slider_handle = 'smooth_slider_' . $catg_slug; $data['slider_handle'] = $slider_handle; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0', $set, $data); $slider_html = return_global_smooth_slider($slider_handle, $r_array, $slider_id = '', $set, $data); return $slider_html; }
function get_smooth_slider_category($catg_slug, $offset = 0) { global $smooth_slider; $set = ''; $data = array(); $slider_handle = 'foto_slider_' . $catg_slug; $data['slider_handle'] = $slider_handle; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0', $set, $data); get_global_smooth_slider($slider_handle, $r_array, $smooth_slider, $set, $echo = '1', $data); }
function get_smooth_slider_category($catg_slug,$offset=0) { global $smooth_slider; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, $offset, '0'); $slider_handle='smooth_slider_'.$catg_slug; get_global_smooth_slider($slider_handle,$r_array,$slider_id='',$echo='1'); }
function get_smooth_slider_category($catg_slug) { global $smooth_slider; global $smooth_sldr_a; $r_array = carousel_posts_on_slider_category($smooth_slider['no_posts'], $catg_slug, '0', '0'); $smooth_sldr_a = $r_array[0]; ?> <script type="text/javascript"> <?php if (!isset($smooth_slider['fouc']) or $smooth_slider['fouc'] == '0') { ?> jQuery('html').addClass('smooth_slider_fouc'); jQuery(document).ready(function() { jQuery(".smooth_slider_fouc .smooth_sliderb").css({'display' : 'block'}); }); <?php } ?> function smooth_slider_initCallback(carousel) { jQuery('#smooth_slider .jcarousel-control a').bind('click', function() { var navclass = jQuery(this).attr("class"); var slide = navclass.replace("sldr", ""); carousel.scroll(jQuery.jcarousel.intval(slide)); carousel.startAuto(0); return false; }); <?php if ($smooth_slider['prev_next'] == 1) { ?> // Disable autoscrolling if the user clicks the prev or next button. carousel.buttonNext.bind('click', function() { carousel.startAuto(0); }); carousel.buttonPrev.bind('click', function() { carousel.startAuto(0); }); <?php } ?> // Pause autoscrolling if the user moves with the cursor over the clip. carousel.clip.hover(function() { carousel.stopAuto(); }, function() { carousel.startAuto(); }); }; function smooth_slider_itemFirstInCallback(carousel, jitem, idx, state) { jQuery("#smooth_slider .jcarousel-control a").css("fontWeight", "normal"); jQuery("#smooth_slider .jcarousel-control a").css("fontSize", "<?php echo $smooth_slider['content_fsize']; ?> px"); var curr_slide = idx; jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontWeight", "bolder"); jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("fontSize", "<?php echo $smooth_slider['content_fsize'] + 5; ?> px"); <?php if ($smooth_slider['goto_slide'] == 2) { global $sldr_nav_width; $sldr_nav_width = $smooth_slider['navimg_w']; ?> var nav_width = <?php global $sldr_nav_width; echo $sldr_nav_width; ?> ; jQuery("#smooth_slider .jcarousel-control a").css("backgroundPosition", "0 0"); jQuery("#smooth_slider .jcarousel-control a.sldr"+curr_slide).css("backgroundPosition", "-"+nav_width+"px 0"); <?php } ?> }; jQuery(document).ready(function() { jQuery("#smooth_slider").jcarousel({ size: <?php echo $smooth_sldr_a; ?> , scroll: 1, visible: 1, auto:<?php if ($smooth_slider['autostep'] == '1') { echo $smooth_slider['speed']; } else { echo 0; } ?> , wrap:"last", animation:<?php echo $smooth_slider['transition'] * 100; ?> , initCallback: smooth_slider_initCallback, itemVisibleInCallback:{ onAfterAnimation:smooth_slider_itemFirstInCallback }<?php if ($smooth_slider['prev_next'] != 1) { echo ",\n buttonPrevHTML:null,\n "; } if ($smooth_slider['prev_next'] != 1) { echo "buttonNextHTML:null"; } ?> }); }); </script> <noscript><p><strong><?php echo $smooth_slider['noscript']; ?> </strong></p></noscript> <div id="smooth_slider" class="jcarousel-skin-<?php echo $smooth_slider['stylesheet']; ?> smooth_slider"> <?php $sldr_title = $smooth_slider['title_text']; if (!empty($sldr_title)) { ?> <div class="sldr_title"><?php echo $smooth_slider['title_text']; ?> </div> <?php } ?> <ul class="smooth_sliderb"> <?php echo $r_array[1]; ?> </ul> <?php if ($smooth_slider['goto_slide'] == 1) { ?> <div class="jcarousel-control"> <?php global $smooth_sldr_a; for ($i = 1; $i <= $smooth_sldr_a; $i++) { echo "<a href=\"#\" class=\"sldr" . $i . " smooth_sliderc_nav\" >" . $i . "</a>\n"; } ?> </div> <?php } if ($smooth_slider['goto_slide'] == 2) { ?> <div class="jcarousel-control"> <?php global $smooth_sldr_a; for ($i = 1; $i <= $smooth_sldr_a; $i++) { $width = $smooth_slider['navimg_w']; echo "<a class=\"sldr" . $i . " smooth_sliderc_nav\" style=\"background-image:url(" . smooth_slider_plugin_url('images/') . "slide" . $i . ".png);background-position:0 0;width:" . $width . "px;height:" . $smooth_slider['navimg_ht'] . "px;\" href=\"#\" ></a>\n"; } ?> </div> <?php } if ($smooth_slider['goto_slide'] == 3) { ?> <div id="smooth_sliderc_nav"><?php echo $smooth_slider['custom_nav']; ?> </div> <?php } ?> <div class="sldrlink"><a href="http://www.clickonf5.org/smooth-slider" target="_blank">Smooth Slider</a></div> <div class="sldr_clearlt"></div><div class="sldr_clearrt"></div> </div> <?php }