CMD:
PHP:
mini manager
Path:
/
var
/
www
/
forum.shootsilhouette.com
/
public_html
/
js
/
Upload:
Edit: vbSlideshow.js
/* =======================================================================*\ || ###################################################################### || || # vBulletin 5.6.9 || # ------------------------------------------------------------------ # || || # Copyright 2000-2022 MH Sub I, LLC dba vBulletin. All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # || || # http://www.vbulletin.com | http://www.vbulletin.com/license.html # || || ###################################################################### || \*========================================================================*/ vBulletin.precache(["gallery_slideshow","no_photos_found_or_post_deleted"],[]); (function(e){function w(a,b,c,g){var f=a.find(".caption");f.html("").hide();b.links&&f.append(e("<div />").addClass("links ellipsis").html(b.links));b.title&&f.append(e("<div />").addClass("title ellipsis").html(b.title));b.caption&&f.append(e("<div />").addClass("title ellipsis").html(b.caption));b=b.links&&b.title?15:b.links||b.title?35:50;c=a.find(".slideshow-wrapper .jcarousel-item-"+c+" img");c.outerWidth();f.css({marginBottom:b+"px",width:"100%",textAlign:"center",marginLeft:"auto",marginRight:"auto"}); c.one("load",function(){var a=e(this).outerWidth();f.css("width",a+"px")});g?f.fadeIn("fast",function(){a.trigger("click")}):f.show()}function x(a){var b=vBulletin.isRtl();37==a.which?vBulletin.gallery.slideshow.jcarousel(b?"next":"prev"):39==a.which&&vBulletin.gallery.slideshow.jcarousel(b?"prev":"next");if(33<=a.which&&40>=a.which)return!1;27==a.which&&d.dialog("instance")&&d.dialog("close")}function y(a){0<(a.originalEvent.wheelDelta||-a.originalEvent.detail)?vBulletin.gallery.slideshow.jcarousel("prev"): vBulletin.gallery.slideshow.jcarousel("next");return!1}function z(a){if(a){var b=function(a){d=!0;c(a,!0)||c("restore",!0)},c=function(a,b){if(vBulletin.gallery.slideshow.jcarousel("canmove")){var c=e(".slideshow-wrapper .jcarousel-list"),d=g?"right":"left",h=parseInt(c.css(d),10);if("restore"===a)a=h+-1*f,b?(b={},b[d]=a,c.animate(b,"fast","swing")):c.css(d,a),f=0,k=!1;else if("prev"===a||"next"===a){parseInt(c.css("width"),10);h=c.find(".jcarousel-item");b=h.length;h=h.first();h=parseInt(h.css("width"), 10);var m=Math.abs(k);a="prev"===a?m-h:m+h;var q=(a?a/h:0)+1;if(0<=a&&a<=(b-1)*h&&(b={},b[d]=-1*a,c.animate(b,"fast","swing",function(){f=0;!1!==k&&(c.css("visibility","hidden"),c.css(d,k),k=!1,vBulletin.gallery.slideshow.jcarousel("scroll",q,!1),c.css("visibility","visible"))}),!1!==k))return!0}else g&&(a*=-1),c.css(d,h+a),f+=a,!1===k&&(k=h)}},g=vBulletin.isRtl(),f=0,k=!1,d=!1;e(document).swipeable({swipeleft:function(a,c){b(g?"prev":"next")},swiperight:function(a,c){b(g?"next":"prev")},swiping:function(a, b){c(b.moved.x)},swipeend:function(a,b){f&&!d&&c("restore",!0);d&&(d=!1)}})}else e(document).swipeable("disable")}function C(){var a=e("body"),b=a.css("overflow")||"auto";a.css("overflow","hidden");var c=e(window).innerWidth(),g=e(window).innerHeight();c=parseInt(c-0,10);g=parseInt(g-0,10);d.css({borderRadius:0,borderWidth:0});a.css("overflow",b);d.dialog("instance")&&(d.dialog("option","width",c),d.dialog("option","height",g))}function D(a){var b=a.closest(".js-slideshow__gallery-node"),c=0,g="", f=null,d=null;0<b.length&&(c=parseInt(b.attr("data-node-id")||b.attr("data-nodeid"),10),g=b.data("sort")||"",b=b.closest(".ui-widget-content"),b=b.find(".toolbar-filter-overlay .filter-options"),b.length&&(f=e("input[name=filter_time]:checked",b).val(),d=e("input[name=filter_show]:checked",b).val()));0==c&&(b=a.closest(".js-post-sm"),0<b.length&&(c=parseInt(b.attr("data-nodeid"),10)));0==c&&(a=a.closest(".js-post"),0<a.length&&(c=parseInt(a.attr("data-node-id"),10)));return{nodeid:c,sort:g,filter_time:f, filter_show:d}}function E(a){var b=a.closest(".js-post__content-text"),c={photos:[]},g=0;(b.length&&b.find(".js-lightbox, .js-lightbox-participant")||a).each(function(){var b=e(this),d=b.data("fullsize-url")||b.parent().attr("href")||b.attr("src")||"";let m=b.data("thumb-url")||d,h=b.data("title")||"";b=b.data("caption")||"";d&&(d={url:d,thumb:m,links:h,title:b},c.photos.push(d),this===a[0]&&(l=g),g++)});return c}async function F(a){if(a.hasClass("js-lightbox"))return E(a);var b=a.closest(".b-content-entry-panel__content--gallery").find(".js-photo-postdata input"); if(0<b.length){let a={photos:[]};b.filter('[name="filedataid[]"]').each(function(){var c=this.value;c={title:JShtmlEncode(b.filter('[name="title_'+c+'"]').val()),url:pageData.baseurl+"/filedata/fetch?filedataid="+c,thumb:pageData.baseurl+"/filedata/fetch?thumb=1&filedataid="+c};a.photos.push(c)});return new Promise((b,c)=>{setTimeout(()=>{b(a)},10)})}var c=a.attr("data-channelid"),g=a.attr("src")||a.attr("href"),f=D(a);a=f.nodeid;var d=f.sort,m=f.filter_time;f=f.filter_show;var h={nodeid:a},q=parseInt(e(".albumSlideShowPageNo").val(), 10),A=parseInt(e(".albumSlideShowPerPage").val(),10),n=e(".media-tab .media-filter-overlay .filter-options input:checked").val();vBulletin.media&&vBulletin.media.MEDIA_USERID&&(h.userid=vBulletin.media.MEDIA_USERID);c&&(h.channelid=c);isNaN(q)||(h.pageno=q);isNaN(A)||(h.perpage=A);n&&(h.dateFilter=n);isNaN(l)||(h.startIndex=l);d&&(h.sort=d);m&&(h.dateFilter=m);f&&(h.showFilter=f);0<a&&(h.startIndex="");var r=JSON.stringify(h);0<a&&(p[a]=p[a]||[],p[a].push(r));t[r]||await vBulletin.AJAX({call:"/filedata/gallery", data:h}).always(a=>{!a&&g&&(a={photos:[{title:"",url:g,thumb:""}]});t[r]=a});return t[r]}function u(a,b,c){let g=a.jcarousel("size")||1,e=a.data("curIndex")||1,d;if(b!=e)return b==g?(2<g&&(d=a.jcarousel("scroll",b-1,!1)),a.jcarousel("next")):e==g&&b==g-1?a.jcarousel("prev"):d=a.jcarousel("scroll",b,c),d}function v(a){var b=e(this);n=this;if(1==b.closest("#preview-overlay").length)return!1;a&&a.preventDefault&&a.preventDefault();!1===l&&(l=b.index());e(document).offon("click",".thumbnails .image-wrapper", function(a,b){"undefined"==typeof b&&(b=!0);e(".thumbnails .image-wrapper",d).addClass("dimmed");e(this).removeClass("dimmed");a=Number(e(this).parent().attr("jcarouselindex"));d.data("thumbclick",!0);u(vBulletin.gallery.slideshow,a,b);d.removeData("thumbclick")});a=d.find(".slideshow-wrapper");0==a.find(".slideshow-list").length&&a.append(e("<ul />").addClass("slideshow-list"));d.dialog("open");window.vBulletin.loadingIndicator.show();vBulletin.gallery.slideshow=a.jcarousel({wrap:null,animation:"fast", easing:"swing",scroll:1,rtl:vBulletin.isRtl(),initCallback:function(a,e){"init"==e&&(window.vBulletin.loadingIndicator.show(),F(b).then(b=>{window.vBulletin.loadingIndicator.hide();G(b,a)}))},itemLoadCallback:{onBeforeAnimation:function(a,b,f){f=a.first;a.inTail&&(f=a.last);if("init"==b)return!1;if(b=d.data("image-data")){vBulletin.gallery.slideshow.data("curIndex",f);var c=b.photos.length;if(0<f)for(;f>c;)f-=c;else for(;0>=f;)f+=c;w(d,b.photos[f-1],f,!0);vBulletin.gallery.thumbnails&&(a=B(a),u(vBulletin.gallery.thumbnails, Math.max(f-Math.floor(a.visibleCount/2),1),!0),d.data("thumbclick")||(e("#slideshow-dialog .thumbnails .image-wrapper").addClass("dimmed"),vBulletin.gallery.thumbnails.jcarousel("get",f).find(".image-wrapper").removeClass("dimmed")))}}}});"undefined"==typeof vBulletin.gallery.slideshow.data("curIndex")&&vBulletin.gallery.slideshow.data("curIndex",1);return!1}function G(a,b){if(a&&a.photos){d.data("image-data",a);H(b,a,d);d.find(".slideshow-wrapper").find(".jcarousel-prev-horizontal").addClass("b-icon b-icon__arrow-block-left").end().find(".jcarousel-next-horizontal").addClass("b-icon b-icon__arrow-block-right"); var c=d.find(".thumbnails");b=c.find(".jcarousel-prev-horizontal");c=c.find(".jcarousel-next-horizontal");b.addClass("b-icon b-icon__arrow-bar-left").toggleClass("b-icon--disabled",b.is(".jcarousel-prev-disabled"));c.addClass("b-icon b-icon__arrow-bar-right").toggleClass("b-icon--disabled",c.is(".jcarousel-next-disabled"));w(d,a.photos[0],1);1<a.photos.length&&vBulletin.gallery.thumbnails.jcarousel("get",1).find(".image-wrapper").removeClass("dimmed");var g=l;a=parseInt(e(".albumSlideShowPerPage").val(), 10);isNaN(a)||(g=l%a);0<g&&"undefined"!=typeof u(vBulletin.gallery.slideshow,g+1,!1)&&(d.find(".slideshow-wrapper").css("visibility","hidden"),window.setTimeout(function(){e(".thumbnails .image-wrapper",d).eq(g).trigger("click",[!1]);d.find(".slideshow-wrapper").css("visibility","")},0));window.vBulletin.loadingIndicator.hide()}else openAlertDialog({title:vBulletin.phrase.get("gallery_slideshow"),message:vBulletin.phrase.get("no_photos_found_or_post_deleted"),iconType:"warning"})}function H(a,b,c){let d= b.photos.length;a.size(d);1<d?(e("#slideshow-dialog .thumbnails").show(),I(b)):e("#slideshow-dialog .thumbnails").hide();c.toggleClass("no-thumbnails",1>=d);var f=a.first||1;e.each(b.photos,function(b,c){let d=e("<a></a>").attr("href",c.url);c=e('<img alt="{0}" class="image" />'.format(c.htmltitle||"")).attr("src",c.url);let g=e('<div class="image-wrapper"></div>');d.append(c);g.append(d);a.add(f+b,g)});b=c.find(".slideshow-wrapper .slideshow-list");c=parseFloat(b.css("width"));var k=a.get(1);k=parseFloat(k.css("width")); 0<k&&c/k<d&&b.css("width",d*k+"px");a.reload()}function B(a){var b=e("#slideshow-dialog .thumbnails .jcarousel-clip"),c=b.find(".jcarousel-item").outerWidth(!0);a=a.size();b=parseInt(b.css("max-width"),10);b=Math.min(a,Math.max(1,Math.floor(b/c)));return{visibleCount:b,recommendedContainerWidth:b*c}}function I(a){function b(a){var b=e(a.buttonPrev[0]);a=e(a.buttonNext[0]);b.toggleClass("b-icon--disabled",b.is(".jcarousel-prev-disabled"));a.toggleClass("b-icon--disabled",a.is(".jcarousel-next-disabled"))} var c=e("#slideshow-dialog .thumbnails .thumbnail-list");0==c.length&&(c=e("#slideshow-dialog .thumbnails").append(e("<ul />").addClass("thumbnail-list")));vBulletin.gallery.thumbnails=c.jcarousel({wrap:null,animation:"fast",easing:"swing",rtl:vBulletin.isRtl(),size:a.photos.length,initCallback:function(b,c){"init"==c&&(b.size(a.photos.length),e.each(a.photos,function(c,d){c=(b.first||1)+c;if(b.has(c))return!0;if(c>a.photos.length)return!1;d=e("<img />").addClass("thumbnail").on("load",function(){}).attr({src:d.thumb, alt:""}).appendTo(e("<div />").addClass("image-wrapper dimmed"));b.add(c,d.parent().get(0))}),c=B(b),e("#slideshow-dialog .thumbnails .jcarousel-clip").css("width",c.recommendedContainerWidth+"px"),b.size()<=c.visibleCount&&(b.buttonNext.hide(),b.buttonPrev.hide()))},itemVisibleInCallback:{onBeforeAnimation:function(a,b,c,d){e("#slideshow-dialog .thumbnails").data("visible-range",{first:a.first,last:a.last})}},buttonNextCallback:b,buttonPrevCallback:b}).disableSelection()}function J(){if(n){var a= n;var b=(vBulletin.gallery.slideshow&&vBulletin.gallery.slideshow.data("curIndex")||1)-1;d.dialog("close");l=b;v.call(a)}}vBulletin.ensureObj("gallery");var d=e("#slideshow-dialog"),l=!1,n=!1,t={},p={};vBulletin.gallery.clearCacheForNodeid=function(a){p.hasOwnProperty(a)&&p[a].forEach(a=>delete t[a]);p[a]=[]};e(function(){d.data("vb-lightbox-initialized")||(d.data("vb-lightbox-initialized",!0),e(document).offon("click","#slideshow-dialog .close-btn",function(){d.dialog("instance")&&d.dialog("close")}), d.dialog({autoOpen:!1,resizable:!1,closeOnEscape:!0,showTitleBar:!1,modal:!0,dialogClass:"slideshow-dialog",open:function(){C();e("body").css("overflow","hidden");e(".ui-widget-overlay").on("click",function(){d.dialog("close")});e(document).offon("keydown",x);e(document).offon("mousewheel DOMMouseScroll",y);z(!0)},close:function(a,b){vBulletin.gallery.thumbnails&&vBulletin.gallery.thumbnails.jcarousel("destroy");vBulletin.gallery.slideshow&&(vBulletin.gallery.slideshow.removeData("curIndex"),vBulletin.gallery.slideshow.jcarousel("destroy")); e("body").css("overflow","auto");e(document).off("keydown",x);e(document).off("mousewheel DOMMouseScroll",y);z(!1);l=n=!1}}))});e(function(){e(document).offon("click",".js-slideshow--item",v);e(document).offon("click",".js-lightbox",v);d.addClass("js-no-responsive-resize");e(window).on("resize",e.debounce(300,J))})})(jQuery);
[ Kembali ]
© 2026 mini manager