cycle js fix
piaoling 2013-04-12 13:44:00
function showCustomerGallery($galleryID){
$ngg_options = nggGallery::get_option(http://www.doingthing.com/'ngg_optionshttp://www.doingthing.com/');
//Set sort order value, if not used (upgrade issue)
$ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/']) ? $ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'] : http://www.doingthing.com/'pidhttp://www.doingthing.com/';
$ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/'] == http://www.doingthing.com/'DESChttp://www.doingthing.com/') ? http://www.doingthing.com/'DESChttp://www.doingthing.com/' : http://www.doingthing.com/'ASChttp://www.doingthing.com/';
$ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'] == 0) ? 5 : $ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'];
$width = (int) $ngg_options[http://www.doingthing.com/'irWidthhttp://www.doingthing.com/'];
$height = (int) $ngg_options[http://www.doingthing.com/'irHeighthttp://www.doingthing.com/'];
// get gallery values
//TODO: Use pagination limits here to reduce memory needs
$picturelist = nggdb::get_gallery($galleryID, $ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'], $ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/']);
$out = "<div class=http://www.doingthing.com/'gallerySlidehttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;http://www.doingthing.com/'>";
$slides = "<div class=http://www.doingthing.com/'slideshttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;height:".$height . "pxhttp://www.doingthing.com/'>";
$nav = "<div class=http://www.doingthing.com/'slides-navhttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;http://www.doingthing.com/'>";
if(!empty($picturelist)) {
foreach($picturelist as $pic){
$slides .= "<div class=http://www.doingthing.com/'slidehttp://www.doingthing.com/'><img src=http://www.doingthing.com/'" . $pic->imageURL . "http://www.doingthing.com/' /></div>";
$nav .= "<div class=http://www.doingthing.com/'slide-navhttp://www.doingthing.com/'><img src=http://www.doingthing.com/'" . $pic->thumbURL . "http://www.doingthing.com/' /></div>";
}
}
$slides .= http://www.doingthing.com/'</div>http://www.doingthing.com/';
$nav .= http://www.doingthing.com/'</div>http://www.doingthing.com/';
$out .= $slides . $nav . "<div style=http://www.doingthing.com/'clear:both;http://www.doingthing.com/'></div></div>";
$script ="
<script>
jQuery(http://www.doingthing.com/'documenthttp://www.doingthing.com/').ready(function(){
var slides = jQuery(http://www.doingthing.com/'.slideshttp://www.doingthing.com/').cycle({
fx: http://www.doingthing.com/'scrollRighthttp://www.doingthing.com/',
speed: 1000,
pause: 1 ,
timeout: {$ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/']}*1000
});
var navs = jQuery(http://www.doingthing.com/'.slides-nav imghttp://www.doingthing.com/');
navs.click(gotoSlide);
function gotoSlide(){
var navs = jQuery(http://www.doingthing.com/'.slides-nav imghttp://www.doingthing.com/');
for(var i=0;i<navs.length;i++){
var next = i;
if(jQuery(navs[i]).attr(http://www.doingthing.com/'srchttp://www.doingthing.com/') == jQuery(this).attr(http://www.doingthing.com/'srchttp://www.doingthing.com/')){
if(next>navs.length){
next = 1 ;
}
fwd=0;
if(slides.cycle.options.currSlide < next){
fwd =1;
}
var p = slides.cycle.options.$cont[0], timeout = p.cycleTimeout;
if (timeout) {
clearTimeout(timeout);
p.cycleTimeout = 0;
}
slides.cycle.options.nextSlide= next;
slides.cycle.go(slides.cycle.options.elements,slides.cycle.options,1,fwd);
break;
}
}
}
})
</script>
";
return $out .$script;
$ngg_options = nggGallery::get_option(http://www.doingthing.com/'ngg_optionshttp://www.doingthing.com/');
//Set sort order value, if not used (upgrade issue)
$ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/']) ? $ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'] : http://www.doingthing.com/'pidhttp://www.doingthing.com/';
$ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/'] == http://www.doingthing.com/'DESChttp://www.doingthing.com/') ? http://www.doingthing.com/'DESChttp://www.doingthing.com/' : http://www.doingthing.com/'ASChttp://www.doingthing.com/';
$ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'] = ($ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'] == 0) ? 5 : $ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/'];
$width = (int) $ngg_options[http://www.doingthing.com/'irWidthhttp://www.doingthing.com/'];
$height = (int) $ngg_options[http://www.doingthing.com/'irHeighthttp://www.doingthing.com/'];
// get gallery values
//TODO: Use pagination limits here to reduce memory needs
$picturelist = nggdb::get_gallery($galleryID, $ngg_options[http://www.doingthing.com/'galSorthttp://www.doingthing.com/'], $ngg_options[http://www.doingthing.com/'galSortDirhttp://www.doingthing.com/']);
$out = "<div class=http://www.doingthing.com/'gallerySlidehttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;http://www.doingthing.com/'>";
$slides = "<div class=http://www.doingthing.com/'slideshttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;height:".$height . "pxhttp://www.doingthing.com/'>";
$nav = "<div class=http://www.doingthing.com/'slides-navhttp://www.doingthing.com/' style=http://www.doingthing.com/'width:" . $width . "px;http://www.doingthing.com/'>";
if(!empty($picturelist)) {
foreach($picturelist as $pic){
$slides .= "<div class=http://www.doingthing.com/'slidehttp://www.doingthing.com/'><img src=http://www.doingthing.com/'" . $pic->imageURL . "http://www.doingthing.com/' /></div>";
$nav .= "<div class=http://www.doingthing.com/'slide-navhttp://www.doingthing.com/'><img src=http://www.doingthing.com/'" . $pic->thumbURL . "http://www.doingthing.com/' /></div>";
}
}
$slides .= http://www.doingthing.com/'</div>http://www.doingthing.com/';
$nav .= http://www.doingthing.com/'</div>http://www.doingthing.com/';
$out .= $slides . $nav . "<div style=http://www.doingthing.com/'clear:both;http://www.doingthing.com/'></div></div>";
$script ="
<script>
jQuery(http://www.doingthing.com/'documenthttp://www.doingthing.com/').ready(function(){
var slides = jQuery(http://www.doingthing.com/'.slideshttp://www.doingthing.com/').cycle({
fx: http://www.doingthing.com/'scrollRighthttp://www.doingthing.com/',
speed: 1000,
pause: 1 ,
timeout: {$ngg_options[http://www.doingthing.com/'irRotatetimehttp://www.doingthing.com/']}*1000
});
var navs = jQuery(http://www.doingthing.com/'.slides-nav imghttp://www.doingthing.com/');
navs.click(gotoSlide);
function gotoSlide(){
var navs = jQuery(http://www.doingthing.com/'.slides-nav imghttp://www.doingthing.com/');
for(var i=0;i<navs.length;i++){
var next = i;
if(jQuery(navs[i]).attr(http://www.doingthing.com/'srchttp://www.doingthing.com/') == jQuery(this).attr(http://www.doingthing.com/'srchttp://www.doingthing.com/')){
if(next>navs.length){
next = 1 ;
}
fwd=0;
if(slides.cycle.options.currSlide < next){
fwd =1;
}
var p = slides.cycle.options.$cont[0], timeout = p.cycleTimeout;
if (timeout) {
clearTimeout(timeout);
p.cycleTimeout = 0;
}
slides.cycle.options.nextSlide= next;
slides.cycle.go(slides.cycle.options.elements,slides.cycle.options,1,fwd);
break;
}
}
}
})
</script>
";
return $out .$script;
}
发表评论(评论将通过邮件发给作者):