jQuery.noConflict(); (function(b){b.tools=b.tools||{};b.tools.scrollable={version:"1.1.2",conf:{size:5,vertical:false,speed:400,keyboard:true,keyboardSteps:null,disabledClass:"disabled",hoverClass:null,clickable:true,activeClass:"active",easing:"swing",loop:false,items:".items",item:null,prev:".prev",next:".next",prevPage:".prevPage",nextPage:".nextPage",api:false}};var c;function a(o,m){var r=this,p=b(this),d=!m.vertical,e=o.children(),k=0,i;if(!c){c=r}b.each(m,function(s,t){if(b.isFunction(t)){p.bind(s,t)}});if(e.length>1){e=b(m.items,o)}function l(t){var s=b(t);return m.globalNav?s:o.parent().find(t)}o.data("finder",l);var f=l(m.prev),h=l(m.next),g=l(m.prevPage),n=l(m.nextPage);b.extend(r,{getIndex:function(){return k},getClickIndex:function(){var s=r.getItems();return s.index(s.filter("."+m.activeClass))},getConf:function(){return m},getSize:function(){return r.getItems().size()},getPageAmount:function(){return Math.ceil(this.getSize()/m.size)},getPageIndex:function(){return Math.ceil(k/m.size)},getNaviButtons:function(){return f.add(h).add(g).add(n)},getRoot:function(){return o},getItemWrap:function(){return e},getItems:function(){return e.children(m.item)},getVisibleItems:function(){return r.getItems().slice(k,k+m.size)},seekTo:function(s,w,t){if(s<0){s=0}if(k===s){return r}if(b.isFunction(w)){t=w}if(s>r.getSize()-m.size){return m.loop?r.begin():this.end()}var u=r.getItems().eq(s);if(!u.length){return r}var v=b.Event("onBeforeSeek");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}if(w===undefined||b.isFunction(w)){w=m.speed}function x(){if(t){t.call(r,s)}p.trigger("onSeek",[s])}if(d){e.animate({left:-u.position().left},w,m.easing,x)}else{e.animate({top:-u.position().top},w,m.easing,x)}c=r;k=s;v=b.Event("onStart");p.trigger(v,[s]);if(v.isDefaultPrevented()){return r}f.add(g).toggleClass(m.disabledClass,s===0);h.add(n).toggleClass(m.disabledClass,s>=r.getSize()-m.size);return r},move:function(u,t,s){i=u>0;return this.seekTo(k+u,t,s)},next:function(t,s){return this.move(1,t,s)},prev:function(t,s){return this.move(-1,t,s)},movePage:function(w,v,u){i=w>0;var s=m.size*w;var t=k%m.size;if(t>0){s+=(w>0?-t:m.size-t)}return this.move(s,v,u)},prevPage:function(t,s){return this.movePage(-1,t,s)},nextPage:function(t,s){return this.movePage(1,t,s)},setPage:function(t,u,s){return this.seekTo(t*m.size,u,s)},begin:function(t,s){i=false;return this.seekTo(0,t,s)},end:function(t,s){i=true;var u=this.getSize()-m.size;return u>0?this.seekTo(u,t,s):r},reload:function(){p.trigger("onReload");return r},focus:function(){c=r;return r},click:function(u){var v=r.getItems().eq(u),s=m.activeClass,t=m.size;if(u<0||u>=r.getSize()){return r}if(t==1){if(m.loop){return r.next()}if(u===0||u==r.getSize()-1){i=(i===undefined)?true:!i}return i===false?r.prev():r.next()}if(t==2){if(u==k){u--}r.getItems().removeClass(s);v.addClass(s);return r.seekTo(u,time,fn)}if(!v.hasClass(s)){r.getItems().removeClass(s);v.addClass(s);var x=Math.floor(t/2);var w=u-x;if(w>r.getSize()-t){w=r.getSize()-t}if(w!==u){return r.seekTo(w)}}return r},bind:function(s,t){p.bind(s,t);return r},unbind:function(s){p.unbind(s);return r}});b.each("onBeforeSeek,onStart,onSeek,onReload".split(","),function(s,t){r[t]=function(u){return r.bind(t,u)}});f.addClass(m.disabledClass).click(function(){r.prev()});h.click(function(){r.next()});n.click(function(){r.nextPage()});if(r.getSize()"))}g=l.children().each(function(n){var o=b(this);o.click(function(p){i.setPage(n);return p.preventDefault()});if(d.indexed){o.text(n)}if(d.idPrefix){o.attr("id",d.idPrefix+n)}})}else{g=d.naviItem?l.find(d.naviItem):l.children();g.each(function(n){var o=b(this);o.click(function(p){i.setPage(n);return p.preventDefault()})})}g.eq(0).addClass(d.activeClass)}i.onStart(function(o,n){var m=d.activeClass;g.removeClass(m).eq(i.getPageIndex()).addClass(m)});i.onReload(function(){j()});j();var h=g.filter("[href="+location.hash+"]");if(h.length){i.move(g.index(h))}});return d.api?c:this}})(jQuery); (function(b){b.fn.wheel=function(e){return this[e?"bind":"trigger"]("wheel",e)};b.event.special.wheel={setup:function(){b.event.add(this,d,c,{})},teardown:function(){b.event.remove(this,d,c)}};var d=!b.browser.mozilla?"mousewheel":"DOMMouseScroll"+(b.browser.version<"1.9"?" mousemove":"");function c(e){switch(e.type){case"mousemove":return b.extend(e.data,{clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY});case"DOMMouseScroll":b.extend(e,e.data);e.delta=-e.detail/3;break;case"mousewheel":e.delta=e.wheelDelta/120;break}e.type="wheel";return b.event.handle.call(this,e,e.delta)}var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(f){var g=b.extend({},a.plugins.mousewheel.conf),e;if(typeof f=="number"){f={speed:f}}f=b.extend(g,f);this.each(function(){var h=b(this).scrollable();if(h){e=h}h.getRoot().wheel(function(i,j){h.move(j<0?1:-1,f.speed||50);return false})});return f.api?e:this}})(jQuery); document.write(''+ ''+ '
'+ '
'+ '
'+ '
'+ ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ ''+ ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ ''+ ''+ ''+ ''+ '
'+ '
'+ '
'+ '
'+ langname +':
'+ '
'); if( enableurl != '0' ) { document.write('
'+ langweb +':
'+ '
'); } else { document.write(''); } document.write('
'+ langmessage +':
'+ '
'+ ''+ '
'+ ''+ '
'+ ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'); var lastid = 0; var firstupdate = 1; var loading = ''; var smileysopen = 0; var smileysdownlaoded = 0; jQuery(document).ready(function(){ var lastid = 0; var firstupdate = 1; var loading = ''; var smileysopen = 0; var smileysdownlaoded = 0; jQuery("#shoutcamp").mouseover(function(){ jQuery("#shoutcampShoutIt").show(); }) jQuery(".postform").hide(); jQuery(".loginform").hide(); jQuery(".buttonPost").click(function(){ jQuery("#prev, #next").hide(); smileysopen=0; jQuery(".scrollable").slideUp("slow"); jQuery(".shoutmenu").hide("slow"); jQuery(".postform").show("slow"); jQuery("#smileyslist").hide(); jQuery("#smileyslink").html("smileys"); jQuery("#smileysdown").show(); jQuery("#smileysup").hide(); jQuery("#postName").focus(); return false; }) jQuery("#textButtonPost").focus(function(){ jQuery("#prev, #next").hide(); smileysopen=0; jQuery(".scrollable").slideUp("slow"); jQuery(".shoutmenu").hide("slow"); jQuery(".postform").show("slow"); jQuery("#smileyslist").hide(); jQuery("#smileyslink").html("smileys"); jQuery("#smileysdown").show(); jQuery("#smileysup").hide(); jQuery("#postName").focus(); return false; }) jQuery("#postcancel").click(function(){ jQuery(".scrollable").slideDown("slow"); jQuery(".shoutmenu").show("slow"); jQuery(".postform").hide("slow"); return false; }) jQuery("#loginlink").click(function(){ jQuery(".scrollable").slideUp("slow"); jQuery(".shoutmenu").hide("slow"); jQuery(".loginform").show("slow"); jQuery("#prev, #next").hide(); return false; }) jQuery("#logincancel").click(function(){ jQuery(".scrollable").slideDown("slow"); jQuery(".shoutmenu").show("slow"); jQuery(".loginform").hide("slow"); return false; }) jQuery("#logincancel").click(function(){ //setSmileysPreLoad(); return false; }) // submit post shout jQuery("#postForm").submit(function() { //alert('submit ok'); var passed = true; var error = ''; var postName = jQuery("#postName").val(); var postUrl = jQuery("#postUrl").val(); var postMessage = jQuery("#postMessage").val(); if (postName.length < 3 || postName.length > 20) { error = langnameFieldInvalid; passed = false } else if (postUrl.length >= 1 && postUrl != 'http://' && !isUrl(postUrl) ) { error = langpleaseInsertUrl; passed = false; } else if (postMessage.length < 3 || postMessage.length > 100) { error = langpleaseInsertMessage; passed = false; } if( !passed ) { jQuery("#shoutstatus").html(error).show().fadeOut(5000); return false; } else { if( postUrl == 'http://' ) postUrl=""; jQuery("#postStatus").html(loading + "
"+ langsubmittingShout).show(); jQuery("#postForm").hide(); jQuery.getJSON( _SHOUT_URL +"postShout.php?callback=?", { shoutname: shoutname, name: postName, url: postUrl, message: postMessage }, function(res){ //jQuery("#postForm").html(xml); //alert( res ); if( res.success != 1 ) { jQuery("#postStatus").hide(); jQuery("#postForm").show(); jQuery("#postName").attr("value", postName); jQuery("#postUrl").attr("value", postUrl); jQuery("#postMessage").attr("value", postMessage); jQuery("#postStatus").html(res.error).show(); } else { jQuery(".scrollable").slideDown("slow"); jQuery("#postStatus").hide(); jQuery("#postForm").show(); jQuery("#postName").attr("value", ""); jQuery("#postUrl").attr("value", "http://"); jQuery("#postMessage").attr("value", ""); //jQuery("#shoutbox").slideDown("slow"); jQuery(".shoutmenu").show("slow"); jQuery(".postform").hide("slow"); //updateShout(); allMessages(res, 0); } return false; }) return false; } }); jQuery("#smileyslink").click(function(){ if( smileysopen == 1 ) { jQuery("#smileyslink").html(langsmileys); jQuery("#smileyslist").hide("slow"); jQuery("#smileysdown").toggle(); jQuery("#smileysup").toggle(); smileysopen=0; } else { smileysopen=1; jQuery("#smileyslink").html(langclose + " " + langsmileys); jQuery("#smileysdown").toggle(); jQuery("#smileysup").toggle(); if( smileysdownlaoded == 1 ) { jQuery("#smileyslist").show("slow"); } else { smileysdownlaoded = 1; jQuery("#smileyslist").html(loading); jQuery("#smileyslist").show("slow"); jQuery.getJSON(_SHOUT_URL +"getSmileys.php?callback=?", { shoutname: shoutname }, function(res){ jQuery("#smileyslist").html(res.smileys); jQuery("#smileyslist a").click(function(){ jQuery("#postMessage").attr("value", jQuery("#postMessage").attr("value") + jQuery(this).attr("href")); jQuery("#postMessage").focus(); return false; }) }) } } return false; }) jQuery("#shoutcamp").scrollable({ vertical:true,size:3,clickable: false }).navigator().mousewheel(); if( checkReciprocal() ) updateShout(); /* jQuery.get("_SHOUT_URLpostShout.php", { shoutname: shoutname, start_id: lastid }, function(xml){ jQuery("#scamp_shoutbody").html(""); jQuery("#scamp_shoutbody").html(xml); //allMessages(xml); jQuery("#scamp_shoutfooter").html( jQuery("footer",xml).text() ); }); */ }); function updateShout() { var num = Math.random(); if( firstupdate ) { firstupdate = 0; jQuery.getJSON(_SHOUT_URL +"getShout.php?&callback=?", { shoutname: shoutname, start_id: lastid }, function(xml){ //alert( xml ); jQuery("#shoutbox").html(""); //jQuery("#shoutbox").html(xml); allMessages(xml,1); //jQuery("#shoutentry").scrollable({items:'#shoutbox',speed:300,horizontal:false}); jQuery("#shoutbox").hover( function(){ jQuery("#prev, #next").show(); }, function(){ //jQuery("#prev, #next").hide(); } ) //jQuery("#scamp_shoutfooter").html( jQuery("footer",xml).text() ); }); } else { //alert(lastid); jQuery.getJSON(_SHOUT_URL +"getNewShout.php?&callback=?", { shoutname: shoutname, start_id: lastid }, function(res){ if( res.newentryexist == "1") { allMessages(res, 0); } }); } updateTime = updateTime+20000; setTimeout('updateShout()', updateTime); } // isappend ini menandakan, apakah entry terbaru di append atau di prepend function allMessages(res, isappend) { lastid = res.lastid; jQuery.each(res.message, function (i, mes) { url = mes['url']; avatar =''; if( enableavatar != '0' ) { if( mes['avatar'] != "" ) { imgavatar = ''+ mes['name'] +''; if( url != "" ) avatar = ''+imgavatar+''; else avatar = imgavatar; } } if( mes['reply'] != "" ) reply = '
'+ '
'+ '
'+ '
'+ ''+ callname +': '+ mes['reply'] +''+ '
'+ '
'+ '
'; else reply = ''; if( mes['url'] != '' ) { name = ''+ mes['name'] +''; }else{ name = mes['name']; } htmlshout = ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
'+ avatar +'
'+ '
'+ name +'
'+ '
'+ mes['comment'] +'
'+ '
'+ '
'+ reply +'
'+ '
'+ mes['date'] +'
'+ '
'+ '
'+ '
'+ '
'; if( isappend ) { appendItem(htmlshout); } else { appendItem(htmlshout,"1"); } }); var api = jQuery("#shoutcamp").scrollable(); api.reload(); } function appendItem(content, isprepend) { var api = jQuery("#shoutcamp").scrollable(); if( isprepend=='1') { api.getItemWrap().prepend( content ); } else { api.getItemWrap().append( content ); } //api.reload(); } function isUrl(s) { var v = new RegExp(); v.compile("^(http|https):\/\/[A-Za-z0-9-_]+\\.[A-Za-z0-9-_%&\?\/.=]+$"); if (!v.test(s)) { return false; } return true; } function checkReciprocal() { if ( (jQuery("#shoutcamp_linkback_a").attr("href") == 'http://shoutcamp.com/' || jQuery("#shoutcamp_linkback_a").attr("href") == 'http://shoutcamp.com' ) && jQuery("#shoutcamp_linkback_a").show() ) return true; else { htmlshout = ''+ '
'+ '
'+ '
'+ '
'+ '
'+ '
Shoutcamp Alert
'+ ''+ '
Please do not remove or change the link back to http://shoutcamp.com in your shoutbox html code. To fix it, you could just easily reinstall your shoutbox html code.
This shoutbox will not working before you reinstall the shoutbox html code.
'+ '
'+ '
'+ '
now!
'+ '
'+ '
'+ '
'+ '
'; appendItem(htmlshout, 1); jQuery("#firstloadimage").hide(); return false; } }