Version Description
Minimised Javascript. Set-up for I18n. Includes Javascript fix for zero height tweets problem.
=
Download this release
Release Info
Developer | mpntod |
Plugin | Rotating Tweets (Twitter widget and shortcode) |
Version | 0.505 |
Comparing to | |
See all releases |
Code changes from version 0.502 to 0.505
- js/jquery.cycle.all.min.js +52 -0
- js/rotating_tweet.min.js +2 -0
- js/rotating_tweet_zee.js +0 -19
- languages/rotatingtweets-en_GB.mo +0 -0
- languages/rotatingtweets-en_GB.po +275 -0
- languages/rotatingtweets.pot +266 -0
- readme.txt +10 -5
- rotatingtweets.php +77 -63
js/jquery.cycle.all.min.js
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(function(f,e){function g(h){f.fn.cycle.debug&&a(h)}function a(){window.console&&console.log&&console.log("[cycle] "+Array.prototype.join.call(arguments," "))}function l(a,b,o){var c=f(a).data("cycle.opts"),e=!!a.cyclePause;e&&c.paused?c.paused(a,c,b,o):!e&&c.resumed&&c.resumed(a,c,b,o)}function j(h,b,c){function j(b,d,h){if(!b&&!0===d){b=f(h).data("cycle.opts");if(!b)return a("options not found, can not resume"),!1;h.cycleTimeout&&(clearTimeout(h.cycleTimeout),h.cycleTimeout=0);r(b.elements,b,1,
|
2 |
+
!b.backwards)}}h.cycleStop===e&&(h.cycleStop=0);if(b===e||null===b)b={};if(b.constructor==String)switch(b){case "destroy":case "stop":c=f(h).data("cycle.opts");if(!c)return!1;h.cycleStop++;h.cycleTimeout&&clearTimeout(h.cycleTimeout);h.cycleTimeout=0;c.elements&&f(c.elements).stop();f(h).removeData("cycle.opts");if("destroy"==b){b=c;b.next&&f(b.next).unbind(b.prevNextEvent);b.prev&&f(b.prev).unbind(b.prevNextEvent);if(b.pager||b.pagerAnchorBuilder)f.each(b.pagerAnchors||[],function(){this.unbind().remove()});
|
3 |
+
b.pagerAnchors=null;f(h).unbind("mouseenter.cycle mouseleave.cycle");b.destroy&&b.destroy(b)}return!1;case "toggle":return h.cyclePause=1===h.cyclePause?0:1,j(h.cyclePause,c,h),l(h),!1;case "pause":return h.cyclePause=1,l(h),!1;case "resume":return h.cyclePause=0,j(!1,c,h),l(h),!1;case "prev":case "next":c=f(h).data("cycle.opts");if(!c)return a('options not found, "prev/next" ignored'),!1;f.fn.cycle[b](c);return!1;default:b={fx:b}}else if(b.constructor==Number){var p=b,b=f(h).data("cycle.opts");if(!b)return a("options not found, can not advance slide"),
|
4 |
+
!1;if(0>p||p>=b.elements.length)return a("invalid slide index: "+p),!1;b.nextSlide=p;h.cycleTimeout&&(clearTimeout(h.cycleTimeout),h.cycleTimeout=0);"string"==typeof c&&(b.oneTimeFx=c);r(b.elements,b,1,p>=b.currSlide);return!1}return b}function c(a,b){if(!f.support.opacity&&b.cleartype&&a.style.filter)try{a.style.removeAttribute("filter")}catch(c){}}function u(h,b,o,j,p){var i,d=f.extend({},f.fn.cycle.defaults,j||{},f.metadata?h.metadata():f.meta?h.data():{}),k=f.isFunction(h.data)?h.data(d.metaAttr):
|
5 |
+
null;k&&(d=f.extend(d,k));d.autostop&&(d.countdown=d.autostopCount||o.length);var u=h[0];h.data("cycle.opts",d);d.$cont=h;d.stopCount=u.cycleStop;d.elements=o;d.before=d.before?[d.before]:[];d.after=d.after?[d.after]:[];!f.support.opacity&&d.cleartype&&d.after.push(function(){c(this,d)});d.continuous&&d.after.push(function(){r(o,d,0,!d.backwards)});var s=d;s.original={before:[],after:[]};s.original.cssBefore=f.extend({},s.cssBefore);s.original.cssAfter=f.extend({},s.cssAfter);s.original.animIn=f.extend({},
|
6 |
+
s.animIn);s.original.animOut=f.extend({},s.animOut);f.each(s.before,function(){s.original.before.push(this)});f.each(s.after,function(){s.original.after.push(this)});!f.support.opacity&&(d.cleartype&&!d.cleartypeNoBg)&&B(b);"static"==h.css("position")&&h.css("position","relative");d.width&&h.width(d.width);d.height&&"auto"!=d.height&&h.height(d.height);d.startingSlide!==e?(d.startingSlide=parseInt(d.startingSlide,10),d.startingSlide>=o.length||0>d.startSlide?d.startingSlide=0:i=!0):d.startingSlide=
|
7 |
+
d.backwards?o.length-1:0;if(d.random){d.randomMap=[];for(k=0;k<o.length;k++)d.randomMap.push(k);d.randomMap.sort(function(){return Math.random()-0.5});if(i)for(i=0;i<o.length;i++)d.startingSlide==d.randomMap[i]&&(d.randomIndex=i);else d.randomIndex=1,d.startingSlide=d.randomMap[1]}else d.startingSlide>=o.length&&(d.startingSlide=0);d.currSlide=d.startingSlide||0;var t=d.startingSlide;b.css({position:"absolute",top:0,left:0}).hide().each(function(b){b=d.backwards?t?b<=t?o.length+(b-t):t-b:o.length-
|
8 |
+
b:t?b>=t?o.length-(b-t):t-b:o.length-b;f(this).css("z-index",b)});f(o[t]).css("opacity",1).show();c(o[t],d);d.fit&&(d.aspect?b.each(function(){var b=f(this),a=d.aspect===true?b.width()/b.height():d.aspect;if(d.width&&b.width()!=d.width){b.width(d.width);b.height(d.width/a)}if(d.height&&b.height()<d.height){b.height(d.height);b.width(d.height*a)}}):(d.width&&b.width(d.width),d.height&&"auto"!=d.height&&b.height(d.height)));d.center&&(!d.fit||d.aspect)&&b.each(function(){var b=f(this);b.css({"margin-left":d.width?
|
9 |
+
(d.width-b.width())/2+"px":0,"margin-top":d.height?(d.height-b.height())/2+"px":0})});d.center&&(!d.fit&&!d.slideResize)&&b.each(function(){var b=f(this);b.css({"margin-left":d.width?(d.width-b.width())/2+"px":0,"margin-top":d.height?(d.height-b.height())/2+"px":0})});if(d.containerResize&&!h.innerHeight()){for(var n=k=i=0;n<o.length;n++){var w=f(o[n]),y=w[0],z=w.outerWidth(),A=w.outerHeight();z||(z=y.offsetWidth||y.width||w.attr("width"));A||(A=y.offsetHeight||y.height||w.attr("height"));i=z>i?z:
|
10 |
+
i;k=A>k?A:k}0<i&&0<k&&h.css({width:i+"px",height:k+"px"})}var C=!1;d.pause&&h.bind("mouseenter.cycle",function(){C=true;this.cyclePause++;l(u,true)}).bind("mouseleave.cycle",function(){C&&this.cyclePause--;l(u,true)});var q;a:{i=d;n=f.fn.cycle.transitions;if(0<i.fx.indexOf(",")){i.multiFx=!0;i.fxs=i.fx.replace(/\s*/g,"").split(",");for(q=0;q<i.fxs.length;q++)if(w=i.fxs[q],k=n[w],!k||!n.hasOwnProperty(w)||!f.isFunction(k))a("discarding unknown transition: ",w),i.fxs.splice(q,1),q--;if(!i.fxs.length){a("No valid transitions named; slideshow terminating.");
|
11 |
+
q=!1;break a}}else if("all"==i.fx)for(q in i.multiFx=!0,i.fxs=[],n)n.hasOwnProperty(q)&&(k=n[q],n.hasOwnProperty(q)&&f.isFunction(k)&&i.fxs.push(q));if(i.multiFx&&i.randomizeEffects){k=Math.floor(20*Math.random())+30;for(q=0;q<k;q++)n=Math.floor(Math.random()*i.fxs.length),i.fxs.push(i.fxs.splice(n,1)[0]);g("randomized fx sequence: ",i.fxs)}q=!0}if(!1===q)return!1;var D=!1;j.requeueAttempts=j.requeueAttempts||0;b.each(function(){var b=f(this);this.cycleH=d.fit&&d.height?d.height:b.height()||this.offsetHeight||
|
12 |
+
this.height||b.attr("height")||0;this.cycleW=d.fit&&d.width?d.width:b.width()||this.offsetWidth||this.width||b.attr("width")||0;if(b.is("img")){var b=f.browser.mozilla&&this.cycleW==34&&this.cycleH==19&&!this.complete,h=f.browser.opera&&(this.cycleW==42&&this.cycleH==19||this.cycleW==37&&this.cycleH==17)&&!this.complete,c=this.cycleH===0&&this.cycleW===0&&!this.complete;if(f.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete||b||h||c){if(p.s&&d.requeueOnImageNotLoaded&&++j.requeueAttempts<
|
13 |
+
100){a(j.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){f(p.s,p.c).cycle(j)},d.requeueTimeout);D=true;return false}a("could not determine size of image: "+this.src,this.cycleW,this.cycleH)}}return true});if(D)return!1;d.cssBefore=d.cssBefore||{};d.cssAfter=d.cssAfter||{};d.cssFirst=d.cssFirst||{};d.animIn=d.animIn||{};d.animOut=d.animOut||{};b.not(":eq("+t+")").css(d.cssBefore);f(b[t]).css(d.cssFirst);if(d.timeout){d.timeout=
|
14 |
+
parseInt(d.timeout,10);d.speed.constructor==String&&(d.speed=f.fx.speeds[d.speed]||parseInt(d.speed,10));d.sync||(d.speed/=2);for(q="none"==d.fx?0:"shuffle"==d.fx?500:250;d.timeout-d.speed<q;)d.timeout+=d.speed}d.easing&&(d.easeIn=d.easeOut=d.easing);d.speedIn||(d.speedIn=d.speed);d.speedOut||(d.speedOut=d.speed);d.slideCount=o.length;d.currSlide=d.lastSlide=t;d.random?(++d.randomIndex==o.length&&(d.randomIndex=0),d.nextSlide=d.randomMap[d.randomIndex]):d.nextSlide=d.backwards?0===d.startingSlide?
|
15 |
+
o.length-1:d.startingSlide-1:d.startingSlide>=o.length-1?0:d.startingSlide+1;if(!d.multiFx)if(q=f.fn.cycle.transitions[d.fx],f.isFunction(q))q(h,b,d);else if("custom"!=d.fx&&!d.multiFx)return a("unknown transition: "+d.fx,"; slideshow terminating"),!1;h=b[t];d.skipInitializationCallbacks||(d.before.length&&d.before[0].apply(h,[h,h,d,!0]),d.after.length&&d.after[0].apply(h,[h,h,d,!0]));d.next&&f(d.next).bind(d.prevNextEvent,function(){return v(d,1)});d.prev&&f(d.prev).bind(d.prevNextEvent,function(){return v(d,
|
16 |
+
0)});if(d.pager||d.pagerAnchorBuilder){var x=d,E=f(x.pager);f.each(o,function(b,a){f.fn.cycle.createPagerAnchor(b,a,E,o,x)});x.updateActivePagerLink(x.pager,x.startingSlide,x.activePagerClass)}var m=d;m.addSlide=function(b,a){var d=f(b),h=d[0];m.autostopCount||m.countdown++;o[a?"unshift":"push"](h);if(m.els)m.els[a?"unshift":"push"](h);m.slideCount=o.length;if(m.random){m.randomMap.push(m.slideCount-1);m.randomMap.sort(function(){return Math.random()-0.5})}d.css("position","absolute");d[a?"prependTo":
|
17 |
+
"appendTo"](m.$cont);if(a){m.currSlide++;m.nextSlide++}!f.support.opacity&&(m.cleartype&&!m.cleartypeNoBg)&&B(d);m.fit&&m.width&&d.width(m.width);m.fit&&(m.height&&m.height!="auto")&&d.height(m.height);h.cycleH=m.fit&&m.height?m.height:d.height();h.cycleW=m.fit&&m.width?m.width:d.width();d.css(m.cssBefore);(m.pager||m.pagerAnchorBuilder)&&f.fn.cycle.createPagerAnchor(o.length-1,h,f(m.pager),o,m);if(f.isFunction(m.onAddSlide))m.onAddSlide(d);else d.hide()};return d}function r(a,b,c,j){function l(){var d=
|
18 |
+
0;b.timeout&&!b.continuous?(d=n(a[b.currSlide],a[b.nextSlide],b,j),"shuffle"==b.fx&&(d-=b.speedOut)):b.continuous&&i.cyclePause&&(d=10);0<d&&(i.cycleTimeout=setTimeout(function(){r(a,b,0,!b.backwards)},d))}var i=b.$cont[0],d=a[b.currSlide],k=a[b.nextSlide];c&&(b.busy&&b.manualTrump)&&(g("manualTrump in go(), stopping active transition"),f(a).stop(!0,!0),b.busy=0,clearTimeout(i.cycleTimeout));if(b.busy)g("transition active, ignoring new tx request");else if(!(i.cycleStop!=b.stopCount||0===i.cycleTimeout&&
|
19 |
+
!c))if(!c&&!i.cyclePause&&!b.bounce&&(b.autostop&&0>=--b.countdown||b.nowrap&&!b.random&&b.nextSlide<b.currSlide))b.end&&b.end(b);else{var u=!1;if((c||!i.cyclePause)&&b.nextSlide!=b.currSlide){var u=!0,s=b.fx;d.cycleH=d.cycleH||f(d).height();d.cycleW=d.cycleW||f(d).width();k.cycleH=k.cycleH||f(k).height();k.cycleW=k.cycleW||f(k).width();if(b.multiFx){if(j&&(b.lastFx===e||++b.lastFx>=b.fxs.length))b.lastFx=0;else if(!j&&(b.lastFx===e||0>--b.lastFx))b.lastFx=b.fxs.length-1;s=b.fxs[b.lastFx]}b.oneTimeFx&&
|
20 |
+
(s=b.oneTimeFx,b.oneTimeFx=null);f.fn.cycle.resetState(b,s);b.before.length&&f.each(b.before,function(a,f){i.cycleStop==b.stopCount&&f.apply(k,[d,k,b,j])});var t=function(){b.busy=0;f.each(b.after,function(a,f){i.cycleStop==b.stopCount&&f.apply(k,[d,k,b,j])});i.cycleStop||l()};g("tx firing("+s+"); currSlide: "+b.currSlide+"; nextSlide: "+b.nextSlide);b.busy=1;if(b.fxFn)b.fxFn(d,k,b,t,j,c&&b.fastOnEvent);else if(f.isFunction(f.fn.cycle[b.fx]))f.fn.cycle[b.fx](d,k,b,t,j,c&&b.fastOnEvent);else f.fn.cycle.custom(d,
|
21 |
+
k,b,t,j,c&&b.fastOnEvent)}else l();if(u||b.nextSlide==b.currSlide)if(b.lastSlide=b.currSlide,b.random){if(b.currSlide=b.nextSlide,++b.randomIndex==a.length&&(b.randomIndex=0,b.randomMap.sort(function(){return Math.random()-0.5})),b.nextSlide=b.randomMap[b.randomIndex],b.nextSlide==b.currSlide)b.nextSlide=b.currSlide==b.slideCount-1?0:b.currSlide+1}else b.backwards?(c=0>b.nextSlide-1)&&b.bounce?(b.backwards=!b.backwards,b.nextSlide=1,b.currSlide=0):(b.nextSlide=c?a.length-1:b.nextSlide-1,b.currSlide=
|
22 |
+
c?0:b.nextSlide+1):(c=b.nextSlide+1==a.length)&&b.bounce?(b.backwards=!b.backwards,b.nextSlide=a.length-2,b.currSlide=a.length-1):(b.nextSlide=c?0:b.nextSlide+1,b.currSlide=c?a.length-1:b.nextSlide-1);u&&b.pager&&b.updateActivePagerLink(b.pager,b.currSlide,b.activePagerClass)}}function n(a,b,f,c){if(f.timeoutFn){for(a=f.timeoutFn.call(a,a,b,f,c);"none"!=f.fx&&250>a-f.speed;)a+=f.speed;g("calculated timeout: "+a+"; speed: "+f.speed);if(!1!==a)return a}return f.timeout}function v(a,b){var c=b?1:-1,
|
23 |
+
j=a.elements,e=a.$cont[0],l=e.cycleTimeout;l&&(clearTimeout(l),e.cycleTimeout=0);if(a.random&&0>c)a.randomIndex--,-2==--a.randomIndex?a.randomIndex=j.length-2:-1==a.randomIndex&&(a.randomIndex=j.length-1),a.nextSlide=a.randomMap[a.randomIndex];else if(a.random)a.nextSlide=a.randomMap[a.randomIndex];else if(a.nextSlide=a.currSlide+c,0>a.nextSlide){if(a.nowrap)return!1;a.nextSlide=j.length-1}else if(a.nextSlide>=j.length){if(a.nowrap)return!1;a.nextSlide=0}e=a.onPrevNextEvent||a.prevNextClick;f.isFunction(e)&&
|
24 |
+
e(0<c,a.nextSlide,j[a.nextSlide]);r(j,a,1,b);return!1}function B(a){function b(a){a=parseInt(a,10).toString(16);return 2>a.length?"0"+a:a}function c(a){for(;a&&"html"!=a.nodeName.toLowerCase();a=a.parentNode){var h=f.css(a,"background-color");if(h&&0<=h.indexOf("rgb"))return a=h.match(/\d+/g),"#"+b(a[0])+b(a[1])+b(a[2]);if(h&&"transparent"!=h)return h}return"#ffffff"}g("applying clearType background-color hack");a.each(function(){f(this).css("background-color",c(this))})}f.support===e&&(f.support=
|
25 |
+
{opacity:!f.browser.msie});f.expr[":"].paused=function(a){return a.cyclePause};f.fn.cycle=function(c,b){var e={s:this.selector,c:this.context};if(this.length===0&&c!="stop"){if(!f.isReady&&e.s){a("DOM not ready, queuing slideshow");f(function(){f(e.s,e.c).cycle(c,b)});return this}a("terminating; zero elements found by selector"+(f.isReady?"":" (DOM not ready)"));return this}return this.each(function(){var l=j(this,c,b);if(l!==false){l.updateActivePagerLink=l.updateActivePagerLink||f.fn.cycle.updateActivePagerLink;
|
26 |
+
this.cycleTimeout&&clearTimeout(this.cycleTimeout);this.cycleStop=this.cycleTimeout=this.cyclePause=0;var p=f(this),i=l.slideExpr?f(l.slideExpr,this):p.children(),d=i.get();if(d.length<2)a("terminating; too few slides: "+d.length);else{var k=u(p,i,d,l,e);if(k!==false)if(p=k.continuous?10:n(d[k.currSlide],d[k.nextSlide],k,!k.backwards)){p=p+(k.delay||0);p<10&&(p=10);g("first timeout: "+p);this.cycleTimeout=setTimeout(function(){r(d,k,0,!l.backwards)},p)}}}})};f.fn.cycle.resetState=function(a,b){b=
|
27 |
+
b||a.fx;a.before=[];a.after=[];a.cssBefore=f.extend({},a.original.cssBefore);a.cssAfter=f.extend({},a.original.cssAfter);a.animIn=f.extend({},a.original.animIn);a.animOut=f.extend({},a.original.animOut);a.fxFn=null;f.each(a.original.before,function(){a.before.push(this)});f.each(a.original.after,function(){a.after.push(this)});var c=f.fn.cycle.transitions[b];f.isFunction(c)&&c(a.$cont,f(a.elements),a)};f.fn.cycle.updateActivePagerLink=function(a,b,c){f(a).each(function(){f(this).children().removeClass(c).eq(b).addClass(c)})};
|
28 |
+
f.fn.cycle.next=function(a){v(a,1)};f.fn.cycle.prev=function(a){v(a,0)};f.fn.cycle.createPagerAnchor=function(a,b,c,j,e){if(f.isFunction(e.pagerAnchorBuilder)){b=e.pagerAnchorBuilder(a,b);g("pagerAnchorBuilder("+a+", el) returned: "+b)}else b='<a href="#">'+(a+1)+"</a>";if(b){var i=f(b);if(i.parents("body").length===0){var d=[];if(c.length>1){c.each(function(){var a=i.clone(true);f(this).append(a);d.push(a[0])});i=f(d)}else i.appendTo(c)}e.pagerAnchors=e.pagerAnchors||[];e.pagerAnchors.push(i);c=
|
29 |
+
function(b){b.preventDefault();e.nextSlide=a;var b=e.$cont[0],d=b.cycleTimeout;if(d){clearTimeout(d);b.cycleTimeout=0}b=e.onPagerEvent||e.pagerClick;f.isFunction(b)&&b(e.nextSlide,j[e.nextSlide]);r(j,e,1,e.currSlide<a)};/mouseenter|mouseover/i.test(e.pagerEvent)?i.hover(c,function(){}):i.bind(e.pagerEvent,c);!/^click/.test(e.pagerEvent)&&!e.allowPagerClickBubble&&i.bind("click.cycle",function(){return false});var k=e.$cont[0],n=false;e.pauseOnPagerHover&&i.hover(function(){n=true;k.cyclePause++;l(k,
|
30 |
+
true,true)},function(){n&&k.cyclePause--;l(k,true,true)})}};f.fn.cycle.hopsFromLast=function(a,b){var f=a.lastSlide,c=a.currSlide;return b?c>f?c-f:a.slideCount-f:c<f?f-c:f+a.slideCount-c};f.fn.cycle.commonReset=function(a,b,c,e,j,l){f(c.elements).not(a).hide();if(typeof c.cssBefore.opacity=="undefined")c.cssBefore.opacity=1;c.cssBefore.display="block";if(c.slideResize&&e!==false&&b.cycleW>0)c.cssBefore.width=b.cycleW;if(c.slideResize&&j!==false&&b.cycleH>0)c.cssBefore.height=b.cycleH;c.cssAfter=c.cssAfter||
|
31 |
+
{};c.cssAfter.display="none";f(a).css("zIndex",c.slideCount+(l===true?1:0));f(b).css("zIndex",c.slideCount+(l===true?0:1))};f.fn.cycle.custom=function(a,b,c,e,j,l){var d=f(a),k=f(b),g=c.speedIn,a=c.speedOut,n=c.easeIn,b=c.easeOut;k.css(c.cssBefore);if(l){g=typeof l=="number"?a=l:a=1;n=b=null}var u=function(){k.animate(c.animIn,g,n,function(){e()})};d.animate(c.animOut,a,b,function(){d.css(c.cssAfter);c.sync||u()});c.sync&&u()};f.fn.cycle.transitions={fade:function(a,b,c){b.not(":eq("+c.currSlide+
|
32 |
+
")").css("opacity",0);c.before.push(function(a,b,c){f.fn.cycle.commonReset(a,b,c);c.cssBefore.opacity=0});c.animIn={opacity:1};c.animOut={opacity:0};c.cssBefore={top:0,left:0}}};f.fn.cycle.ver=function(){return"2.9999.5"};f.fn.cycle.defaults={activePagerClass:"activeSlide",after:null,allowPagerClickBubble:!1,animIn:null,animOut:null,aspect:!1,autostop:0,autostopCount:0,backwards:!1,before:null,center:null,cleartype:!f.support.opacity,cleartypeNoBg:!1,containerResize:1,continuous:0,cssAfter:null,cssBefore:null,
|
33 |
+
delay:0,easeIn:null,easeOut:null,easing:null,end:null,fastOnEvent:0,fit:0,fx:"fade",fxFn:null,height:"auto",manualTrump:!0,metaAttr:"cycle",next:null,nowrap:0,onPagerEvent:null,onPrevNextEvent:null,pager:null,pagerAnchorBuilder:null,pagerEvent:"click.cycle",pause:0,pauseOnPagerHover:0,prev:null,prevNextEvent:"click.cycle",random:0,randomizeEffects:1,requeueOnImageNotLoaded:!0,requeueTimeout:250,rev:0,shuffle:null,skipInitializationCallbacks:!1,slideExpr:null,slideResize:1,speed:1E3,speedIn:null,speedOut:null,
|
34 |
+
startingSlide:e,sync:1,timeout:4E3,timeoutFn:null,updateActivePagerLink:null,width:null}})(jQuery);
|
35 |
+
(function(f){f.fn.cycle.transitions.none=function(e,g,a){a.fxFn=function(a,e,c,g){f(e).show();f(a).hide();g()}};f.fn.cycle.transitions.fadeout=function(e,g,a){g.not(":eq("+a.currSlide+")").css({display:"block",opacity:1});a.before.push(function(a,e,c,g,r,n){f(a).css("zIndex",c.slideCount+(!0!==n?1:0));f(e).css("zIndex",c.slideCount+(!0!==n?0:1))});a.animIn.opacity=1;a.animOut.opacity=0;a.cssBefore.opacity=1;a.cssBefore.display="block";a.cssAfter.zIndex=0};f.fn.cycle.transitions.scrollUp=function(e,
|
36 |
+
g,a){e.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);e=e.height();a.cssBefore.top=e;a.cssBefore.left=0;a.cssFirst.top=0;a.animIn.top=0;a.animOut.top=-e};f.fn.cycle.transitions.scrollDown=function(e,g,a){e.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);e=e.height();a.cssFirst.top=0;a.cssBefore.top=-e;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=e};f.fn.cycle.transitions.scrollLeft=function(e,g,a){e.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);e=
|
37 |
+
e.width();a.cssFirst.left=0;a.cssBefore.left=e;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=0-e};f.fn.cycle.transitions.scrollRight=function(e,g,a){e.css("overflow","hidden");a.before.push(f.fn.cycle.commonReset);e=e.width();a.cssFirst.left=0;a.cssBefore.left=-e;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=e};f.fn.cycle.transitions.scrollHorz=function(e,g,a){e.css("overflow","hidden").width();a.before.push(function(a,e,c,g){c.rev&&(g=!g);f.fn.cycle.commonReset(a,e,c);c.cssBefore.left=g?e.cycleW-
|
38 |
+
1:1-e.cycleW;c.animOut.left=g?-a.cycleW:a.cycleW});a.cssFirst.left=0;a.cssBefore.top=0;a.animIn.left=0;a.animOut.top=0};f.fn.cycle.transitions.scrollVert=function(e,g,a){e.css("overflow","hidden");a.before.push(function(a,e,c,g){c.rev&&(g=!g);f.fn.cycle.commonReset(a,e,c);c.cssBefore.top=g?1-e.cycleH:e.cycleH-1;c.animOut.top=g?a.cycleH:-a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.animIn.top=0;a.animOut.left=0};f.fn.cycle.transitions.slideX=function(e,g,a){a.before.push(function(a,e,c){f(c.elements).not(a).hide();
|
39 |
+
f.fn.cycle.commonReset(a,e,c,!1,!0);c.animIn.width=e.cycleW});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.width="show";a.animOut.width=0};f.fn.cycle.transitions.slideY=function(e,g,a){a.before.push(function(a,e,c){f(c.elements).not(a).hide();f.fn.cycle.commonReset(a,e,c,!0,!1);c.animIn.height=e.cycleH});a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animIn.height="show";a.animOut.height=0};f.fn.cycle.transitions.shuffle=function(e,g,a){e=e.css("overflow","visible").width();
|
40 |
+
g.css({left:0,top:0});a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!0,!0,!0)});a.speedAdjusted||(a.speed/=2,a.speedAdjusted=!0);a.random=0;a.shuffle=a.shuffle||{left:-e,top:15};a.els=[];for(e=0;e<g.length;e++)a.els.push(g[e]);for(e=0;e<a.currSlide;e++)a.els.push(a.els.shift());a.fxFn=function(a,e,c,g,r){c.rev&&(r=!r);var n=r?f(a):f(e);f(e).css(c.cssBefore);var v=c.slideCount;n.animate(c.shuffle,c.speedIn,c.easeIn,function(){for(var e=f.fn.cycle.hopsFromLast(c,r),j=0;j<e;j++)r?c.els.push(c.els.shift()):
|
41 |
+
c.els.unshift(c.els.pop());if(r){e=0;for(j=c.els.length;e<j;e++)f(c.els[e]).css("z-index",j-e+v)}else{e=f(a).css("z-index");n.css("z-index",parseInt(e,10)+1+v)}n.animate({left:0,top:0},c.speedOut,c.easeOut,function(){f(r?this:a).hide();g&&g()})})};f.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0})};f.fn.cycle.transitions.turnUp=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!0,!1);c.cssBefore.top=e.cycleH;c.animIn.height=e.cycleH;c.animOut.width=e.cycleW});
|
42 |
+
a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.height=0;a.animIn.top=0;a.animOut.height=0};f.fn.cycle.transitions.turnDown=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!0,!1);c.animIn.height=e.cycleH;c.animOut.top=a.cycleH});a.cssFirst.top=0;a.cssBefore.left=0;a.cssBefore.top=0;a.cssBefore.height=0;a.animOut.height=0};f.fn.cycle.transitions.turnLeft=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!0);c.cssBefore.left=e.cycleW;c.animIn.width=
|
43 |
+
e.cycleW});a.cssBefore.top=0;a.cssBefore.width=0;a.animIn.left=0;a.animOut.width=0};f.fn.cycle.transitions.turnRight=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!0);c.animIn.width=e.cycleW;c.animOut.left=a.cycleW});f.extend(a.cssBefore,{top:0,left:0,width:0});a.animIn.left=0;a.animOut.width=0};f.fn.cycle.transitions.zoom=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!1,!0);c.cssBefore.top=e.cycleH/2;c.cssBefore.left=e.cycleW/2;f.extend(c.animIn,
|
44 |
+
{top:0,left:0,width:e.cycleW,height:e.cycleH});f.extend(c.animOut,{width:0,height:0,top:a.cycleH/2,left:a.cycleW/2})});a.cssFirst.top=0;a.cssFirst.left=0;a.cssBefore.width=0;a.cssBefore.height=0};f.fn.cycle.transitions.fadeZoom=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!1);c.cssBefore.left=e.cycleW/2;c.cssBefore.top=e.cycleH/2;f.extend(c.animIn,{top:0,left:0,width:e.cycleW,height:e.cycleH})});a.cssBefore.width=0;a.cssBefore.height=0;a.animOut.opacity=0};f.fn.cycle.transitions.blindX=
|
45 |
+
function(e,g,a){e=e.css("overflow","hidden").width();a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c);c.animIn.width=e.cycleW;c.animOut.left=a.cycleW});a.cssBefore.left=e;a.cssBefore.top=0;a.animIn.left=0;a.animOut.left=e};f.fn.cycle.transitions.blindY=function(e,g,a){e=e.css("overflow","hidden").height();a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c);c.animIn.height=e.cycleH;c.animOut.top=a.cycleH});a.cssBefore.top=e;a.cssBefore.left=0;a.animIn.top=0;a.animOut.top=e};f.fn.cycle.transitions.blindZ=
|
46 |
+
function(e,g,a){g=e.css("overflow","hidden").height();e=e.width();a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c);c.animIn.height=e.cycleH;c.animOut.top=a.cycleH});a.cssBefore.top=g;a.cssBefore.left=e;a.animIn.top=0;a.animIn.left=0;a.animOut.top=g;a.animOut.left=e};f.fn.cycle.transitions.growX=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!0);c.cssBefore.left=this.cycleW/2;c.animIn.left=0;c.animIn.width=this.cycleW;c.animOut.left=0});a.cssBefore.top=0;a.cssBefore.width=
|
47 |
+
0};f.fn.cycle.transitions.growY=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!0,!1);c.cssBefore.top=this.cycleH/2;c.animIn.top=0;c.animIn.height=this.cycleH;c.animOut.top=0});a.cssBefore.height=0;a.cssBefore.left=0};f.fn.cycle.transitions.curtainX=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!1,!0,!0);c.cssBefore.left=e.cycleW/2;c.animIn.left=0;c.animIn.width=this.cycleW;c.animOut.left=a.cycleW/2;c.animOut.width=0});a.cssBefore.top=0;a.cssBefore.width=
|
48 |
+
0};f.fn.cycle.transitions.curtainY=function(e,g,a){a.before.push(function(a,e,c){f.fn.cycle.commonReset(a,e,c,!0,!1,!0);c.cssBefore.top=e.cycleH/2;c.animIn.top=0;c.animIn.height=e.cycleH;c.animOut.top=a.cycleH/2;c.animOut.height=0});a.cssBefore.height=0;a.cssBefore.left=0};f.fn.cycle.transitions.cover=function(e,g,a){var l=a.direction||"left",j=e.css("overflow","hidden").width(),c=e.height();a.before.push(function(a,e,g){f.fn.cycle.commonReset(a,e,g);"right"==l?g.cssBefore.left=-j:"up"==l?g.cssBefore.top=
|
49 |
+
c:"down"==l?g.cssBefore.top=-c:g.cssBefore.left=j});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};f.fn.cycle.transitions.uncover=function(e,g,a){var l=a.direction||"left",j=e.css("overflow","hidden").width(),c=e.height();a.before.push(function(a,e,g){f.fn.cycle.commonReset(a,e,g,!0,!0,!0);"right"==l?g.animOut.left=j:"up"==l?g.animOut.top=-c:"down"==l?g.animOut.top=c:g.animOut.left=-j});a.animIn.left=0;a.animIn.top=0;a.cssBefore.top=0;a.cssBefore.left=0};f.fn.cycle.transitions.toss=
|
50 |
+
function(e,g,a){var l=e.css("overflow","visible").width(),j=e.height();a.before.push(function(a,e,g){f.fn.cycle.commonReset(a,e,g,!0,!0,!0);!g.animOut.left&&!g.animOut.top?f.extend(g.animOut,{left:2*l,top:-j/2,opacity:0}):g.animOut.opacity=0});a.cssBefore.left=0;a.cssBefore.top=0;a.animIn.left=0};f.fn.cycle.transitions.wipe=function(e,g,a){var l=e.css("overflow","hidden").width(),j=e.height();a.cssBefore=a.cssBefore||{};var c;a.clip&&(/l2r/.test(a.clip)?c="rect(0px 0px "+j+"px 0px)":/r2l/.test(a.clip)?
|
51 |
+
c="rect(0px "+l+"px "+j+"px "+l+"px)":/t2b/.test(a.clip)?c="rect(0px "+l+"px 0px 0px)":/b2t/.test(a.clip)?c="rect("+j+"px "+l+"px "+j+"px 0px)":/zoom/.test(a.clip)&&(e=parseInt(j/2,10),g=parseInt(l/2,10),c="rect("+e+"px "+g+"px "+e+"px "+g+"px)"));a.cssBefore.clip=a.cssBefore.clip||c||"rect(0px 0px 0px 0px)";var e=a.cssBefore.clip.match(/(\d+)/g),u=parseInt(e[0],10),r=parseInt(e[1],10),n=parseInt(e[2],10),v=parseInt(e[3],10);a.before.push(function(a,c,b){if(a!=c){var e=f(a),g=f(c);f.fn.cycle.commonReset(a,
|
52 |
+
c,b,true,true,false);b.cssAfter.display="block";var p=1,i=parseInt(b.speedIn/13,10)-1;(function k(){var a=u?u-parseInt(p*(u/i),10):0,b=v?v-parseInt(p*(v/i),10):0,c=n<j?n+parseInt(p*((j-n)/i||1),10):j,f=r<l?r+parseInt(p*((l-r)/i||1),10):l;g.css({clip:"rect("+a+"px "+f+"px "+c+"px "+b+"px)"});p++<=i?setTimeout(k,13):e.css("display","none")})()}});f.extend(a.cssBefore,{display:"block",opacity:1,top:0,left:0});a.animIn={left:0};a.animOut={left:0}}})(jQuery);
|
js/rotating_tweet.min.js
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
jQuery(document).ready(function(){jQuery(".rotatingtweets").each(function(){var a="#"+this.id,b=a.split("_"),d=b[1],b=b[2];null==b&&(b="scrollUp");jQuery(a).cycle({pause:1,height:"auto",timeout:d,fx:b});var c=jQuery(a).height();if(0==c){c=0;jQuery(a+" .rotatingtweet").each(function(){var a=jQuery(this).height();a>c&&(c=a)});var e=c+"px";jQuery(a).cycle("destroy");jQuery(a).cycle({pause:1,height:e,timeout:d,fx:b})}})});
|
2 |
+
!function(a,b,d){var c=a.getElementsByTagName(b)[0];a.getElementById(d)||(a=a.createElement(b),a.id=d,a.src="//platform.twitter.com/widgets.js",c.parentNode.insertBefore(a,c))}(document,"script","twitter-wjs");
|
js/rotating_tweet_zee.js
DELETED
@@ -1,19 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Script to cycle the rotating tweets (adjusted for the zeebizzcard template
|
3 |
-
For some reason we need to fix the minimum height of the rotating tweet area - since without it it defaults to zero
|
4 |
-
*/
|
5 |
-
jQuery(document).ready(function() {
|
6 |
-
jQuery('.rotatingtweets').each(function() {
|
7 |
-
var rotate_id = "#"+this.id
|
8 |
-
var timeoutdelay = rotate_id.split('_');
|
9 |
-
jQuery(rotate_id).cycle({
|
10 |
-
pause: 1,
|
11 |
-
height: '7em',
|
12 |
-
timeout: timeoutdelay[1],
|
13 |
-
fx: 'scrollUp'
|
14 |
-
});
|
15 |
-
});
|
16 |
-
});
|
17 |
-
/* And call the Twitter script while we're at it! */
|
18 |
-
/* Standard script to call Twitter */
|
19 |
-
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
languages/rotatingtweets-en_GB.mo
ADDED
Binary file
|
languages/rotatingtweets-en_GB.po
ADDED
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012 Rotating Tweets (Twitter widget & shortcode)
|
2 |
+
# This file is distributed under the same license as the Rotating Tweets (Twitter widget & shortcode) package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.504\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
|
7 |
+
"POT-Creation-Date: 2012-08-16 18:01:34+00:00\n"
|
8 |
+
"PO-Revision-Date: 2012-08-16 19:22-0000\n"
|
9 |
+
"Last-Translator: Martin Tod <martin@martintod.org.uk>\n"
|
10 |
+
"Language-Team: Martin Tod <martin@martintod.org.uk>\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
|
15 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
16 |
+
"Language: en_GB\n"
|
17 |
+
|
18 |
+
#: rotatingtweets.php:41
|
19 |
+
msgid "A widget to show tweets for a particular user in rotation."
|
20 |
+
msgstr "A widget to show tweets for a particular user in rotation."
|
21 |
+
|
22 |
+
#: rotatingtweets.php:142
|
23 |
+
msgid "Title:"
|
24 |
+
msgstr "Title:"
|
25 |
+
|
26 |
+
#: rotatingtweets.php:143
|
27 |
+
msgid "Twitter name:"
|
28 |
+
msgstr "Twitter name:"
|
29 |
+
|
30 |
+
#: rotatingtweets.php:144
|
31 |
+
msgid "Include retweets?"
|
32 |
+
msgstr "Include retweets?"
|
33 |
+
|
34 |
+
#: rotatingtweets.php:145
|
35 |
+
msgid "Exclude replies?"
|
36 |
+
msgstr "Exclude replies?"
|
37 |
+
|
38 |
+
#: rotatingtweets.php:146
|
39 |
+
msgid "How many tweets?"
|
40 |
+
msgstr "How many tweets?"
|
41 |
+
|
42 |
+
#: rotatingtweets.php:154
|
43 |
+
msgid "Speed"
|
44 |
+
msgstr "Speed"
|
45 |
+
|
46 |
+
#: rotatingtweets.php:157
|
47 |
+
msgid "Faster (3 seconds)"
|
48 |
+
msgstr "Faster (3 seconds)"
|
49 |
+
|
50 |
+
#: rotatingtweets.php:158
|
51 |
+
msgid "Normal (4 seconds)"
|
52 |
+
msgstr "Normal (4 seconds)"
|
53 |
+
|
54 |
+
#: rotatingtweets.php:159
|
55 |
+
msgid "Slower (5 seconds)"
|
56 |
+
msgstr "Slower (5 seconds)"
|
57 |
+
|
58 |
+
#: rotatingtweets.php:160
|
59 |
+
msgid "Slowest (6 seconds)"
|
60 |
+
msgstr "Slowest (6 seconds)"
|
61 |
+
|
62 |
+
#: rotatingtweets.php:172
|
63 |
+
msgid "Scroll Up"
|
64 |
+
msgstr "Scroll Up"
|
65 |
+
|
66 |
+
#: rotatingtweets.php:173
|
67 |
+
msgid "Scroll Down"
|
68 |
+
msgstr "Scroll Down"
|
69 |
+
|
70 |
+
#: rotatingtweets.php:174
|
71 |
+
msgid "Scroll Left"
|
72 |
+
msgstr "Scroll Left"
|
73 |
+
|
74 |
+
#: rotatingtweets.php:175
|
75 |
+
msgid "Scroll Right"
|
76 |
+
msgstr "Scroll Right"
|
77 |
+
|
78 |
+
#: rotatingtweets.php:176
|
79 |
+
msgid "Fade"
|
80 |
+
msgstr "Fade"
|
81 |
+
|
82 |
+
#: rotatingtweets.php:180
|
83 |
+
msgid "Type of rotation"
|
84 |
+
msgstr "Type of rotation"
|
85 |
+
|
86 |
+
#: rotatingtweets.php:189
|
87 |
+
msgid "Show tweet details?"
|
88 |
+
msgstr "Show tweet details?"
|
89 |
+
|
90 |
+
#: rotatingtweets.php:192
|
91 |
+
msgid "Time/date of tweet"
|
92 |
+
msgstr "Time/date of tweet"
|
93 |
+
|
94 |
+
#: rotatingtweets.php:193
|
95 |
+
msgid "Name of person tweeting"
|
96 |
+
msgstr "Name of person tweeting"
|
97 |
+
|
98 |
+
#: rotatingtweets.php:194
|
99 |
+
msgid "Source of tweet"
|
100 |
+
msgstr "Source of tweet"
|
101 |
+
|
102 |
+
#: rotatingtweets.php:195
|
103 |
+
msgid "'reply · retweet · favorite' links"
|
104 |
+
msgstr "'reply · retweet · favourite' links"
|
105 |
+
|
106 |
+
#: rotatingtweets.php:205
|
107 |
+
msgid "Show follow button?"
|
108 |
+
msgstr "Show follow button?"
|
109 |
+
|
110 |
+
#: rotatingtweets.php:208
|
111 |
+
msgctxt "Show follow button?"
|
112 |
+
msgid "None"
|
113 |
+
msgstr "None"
|
114 |
+
|
115 |
+
#: rotatingtweets.php:209
|
116 |
+
msgid "Show name and number of followers"
|
117 |
+
msgstr "Show name and number of followers"
|
118 |
+
|
119 |
+
#: rotatingtweets.php:210
|
120 |
+
msgid "Show name only"
|
121 |
+
msgstr "Show name only"
|
122 |
+
|
123 |
+
#: rotatingtweets.php:211
|
124 |
+
msgid "Show followers only"
|
125 |
+
msgstr "Show followers only"
|
126 |
+
|
127 |
+
#: rotatingtweets.php:212
|
128 |
+
msgid "Show button only"
|
129 |
+
msgstr "Show button only"
|
130 |
+
|
131 |
+
#: rotatingtweets.php:229
|
132 |
+
msgid "less than a second ago"
|
133 |
+
msgstr "less than a second ago"
|
134 |
+
|
135 |
+
#: rotatingtweets.php:230
|
136 |
+
msgid "%d seconds ago"
|
137 |
+
msgstr "%d seconds ago"
|
138 |
+
|
139 |
+
#: rotatingtweets.php:231
|
140 |
+
msgid "about a minute ago"
|
141 |
+
msgid_plural "about %d minutes ago"
|
142 |
+
msgstr[0] "about a minute ago"
|
143 |
+
msgstr[1] "about %d minutes ago"
|
144 |
+
|
145 |
+
#: rotatingtweets.php:232 rotatingtweets.php:234
|
146 |
+
msgid "about an hour ago"
|
147 |
+
msgid_plural "about %d hours ago"
|
148 |
+
msgstr[0] "about an hour ago"
|
149 |
+
msgstr[1] "about %d hours ago"
|
150 |
+
|
151 |
+
#: rotatingtweets.php:233
|
152 |
+
msgid "yesterday"
|
153 |
+
msgstr "yesterday"
|
154 |
+
|
155 |
+
#: rotatingtweets.php:235
|
156 |
+
msgid "about a day ago"
|
157 |
+
msgid_plural "about %d days ago"
|
158 |
+
msgstr[0] "about a day ago"
|
159 |
+
msgstr[1] "about %d days ago"
|
160 |
+
|
161 |
+
#: rotatingtweets.php:236
|
162 |
+
msgid "last week"
|
163 |
+
msgstr "last week"
|
164 |
+
|
165 |
+
#: rotatingtweets.php:237
|
166 |
+
msgid "about a week ago"
|
167 |
+
msgid_plural "about %d weeks ago"
|
168 |
+
msgstr[0] "about a week ago"
|
169 |
+
msgstr[1] "about %d weeks ago"
|
170 |
+
|
171 |
+
#: rotatingtweets.php:238
|
172 |
+
msgid "last month"
|
173 |
+
msgstr "last month"
|
174 |
+
|
175 |
+
#: rotatingtweets.php:239
|
176 |
+
msgid "about a month ago"
|
177 |
+
msgid_plural "about %d months ago"
|
178 |
+
msgstr[0] "about a month ago"
|
179 |
+
msgstr[1] "about %d months ago"
|
180 |
+
|
181 |
+
#: rotatingtweets.php:240
|
182 |
+
msgid "last year"
|
183 |
+
msgstr "last year"
|
184 |
+
|
185 |
+
#: rotatingtweets.php:241
|
186 |
+
msgid "about a year ago"
|
187 |
+
msgid_plural "about %d years ago"
|
188 |
+
msgstr[0] "about a year ago"
|
189 |
+
msgstr[1] "about %d years ago"
|
190 |
+
|
191 |
+
#: rotatingtweets.php:374
|
192 |
+
msgid "Problem retrieving data from Twitter"
|
193 |
+
msgstr "Problem retrieving data from Twitter"
|
194 |
+
|
195 |
+
#: rotatingtweets.php:378
|
196 |
+
msgid ""
|
197 |
+
"This website is currently <a href='https://dev.twitter.com/docs/rate-"
|
198 |
+
"limiting/faq'>rate-limited by Twitter</a>."
|
199 |
+
msgstr ""
|
200 |
+
"This website is currently <a href='https://dev.twitter.com/docs/rate-"
|
201 |
+
"limiting/faq'>rate-limited by Twitter</a>."
|
202 |
+
|
203 |
+
#: rotatingtweets.php:380
|
204 |
+
msgid "Next attempt to get data will be in %d minute"
|
205 |
+
msgid_plural "Next attempt to get data will be in %d minutes"
|
206 |
+
msgstr[0] "Next attempt to get data will be in %d minute"
|
207 |
+
msgstr[1] "Next attempt to get data will be in %d minutes"
|
208 |
+
|
209 |
+
#: rotatingtweets.php:381
|
210 |
+
msgid "Next attempt to get data will be in less than a minute"
|
211 |
+
msgstr "Next attempt to get data will be in less than a minute"
|
212 |
+
|
213 |
+
#: rotatingtweets.php:387
|
214 |
+
msgid "Wordpress error message"
|
215 |
+
msgstr "Wordpress error message"
|
216 |
+
|
217 |
+
#: rotatingtweets.php:390
|
218 |
+
msgid "Please check the Twitter name used in the settings."
|
219 |
+
msgstr "Please check the Twitter name used in the settings."
|
220 |
+
|
221 |
+
#: rotatingtweets.php:459
|
222 |
+
msgid ""
|
223 |
+
"from <a target='_BLANK' href='http://twitter.com/%1$s' title='%2$s'>%2$s's "
|
224 |
+
"Twitter</a>"
|
225 |
+
msgstr ""
|
226 |
+
"from <a target='_BLANK' href='http://twitter.com/%1$s' title='%2$s'>%2$s's "
|
227 |
+
"Twitter</a>"
|
228 |
+
|
229 |
+
#: rotatingtweets.php:463
|
230 |
+
msgid "via %s"
|
231 |
+
msgstr "via %s"
|
232 |
+
|
233 |
+
#: rotatingtweets.php:470
|
234 |
+
msgid "reply"
|
235 |
+
msgstr "reply"
|
236 |
+
|
237 |
+
#: rotatingtweets.php:470
|
238 |
+
msgid "retweet"
|
239 |
+
msgstr "retweet"
|
240 |
+
|
241 |
+
#: rotatingtweets.php:470
|
242 |
+
msgid "favorite"
|
243 |
+
msgstr "favourite"
|
244 |
+
|
245 |
+
#: rotatingtweets.php:482
|
246 |
+
msgid "Problem retrieving data from Twitter."
|
247 |
+
msgstr "Problem retrieving data from Twitter."
|
248 |
+
|
249 |
+
#: rotatingtweets.php:484
|
250 |
+
msgid "Please check the comments on this page's HTML to understand more."
|
251 |
+
msgstr "Please check the comments on this page's HTML to understand more."
|
252 |
+
|
253 |
+
#: rotatingtweets.php:504
|
254 |
+
msgid "Follow @%s"
|
255 |
+
msgstr "Follow @%s"
|
256 |
+
|
257 |
+
#. Plugin Name of the plugin/theme
|
258 |
+
msgid "Rotating Tweets (Twitter widget & shortcode)"
|
259 |
+
msgstr "Rotating Tweets (Twitter widget & shortcode)"
|
260 |
+
|
261 |
+
#. Description of the plugin/theme
|
262 |
+
msgid ""
|
263 |
+
"Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or "
|
264 |
+
"a widget, with a rotating tweets display"
|
265 |
+
msgstr ""
|
266 |
+
"Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or "
|
267 |
+
"a widget, with a rotating tweets display"
|
268 |
+
|
269 |
+
#. Author of the plugin/theme
|
270 |
+
msgid "Martin Tod"
|
271 |
+
msgstr "Martin Tod"
|
272 |
+
|
273 |
+
#. Author URI of the plugin/theme
|
274 |
+
msgid "http://www.martintod.org.uk"
|
275 |
+
msgstr "http://www.martintod.org.uk"
|
languages/rotatingtweets.pot
ADDED
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2012 Rotating Tweets (Twitter widget & shortcode)
|
2 |
+
# This file is distributed under the same license as the Rotating Tweets (Twitter widget & shortcode) package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Rotating Tweets (Twitter widget & shortcode) 0.505\n"
|
6 |
+
"Report-Msgid-Bugs-To: http://wordpress.org/tag/rotatingtweets\n"
|
7 |
+
"POT-Creation-Date: 2012-08-16 18:01:34+00:00\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
|
12 |
+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
13 |
+
"Language-Team: LANGUAGE <LL@li.org>\n"
|
14 |
+
|
15 |
+
#: rotatingtweets.php:41
|
16 |
+
msgid "A widget to show tweets for a particular user in rotation."
|
17 |
+
msgstr ""
|
18 |
+
|
19 |
+
#: rotatingtweets.php:142
|
20 |
+
msgid "Title:"
|
21 |
+
msgstr ""
|
22 |
+
|
23 |
+
#: rotatingtweets.php:143
|
24 |
+
msgid "Twitter name:"
|
25 |
+
msgstr ""
|
26 |
+
|
27 |
+
#: rotatingtweets.php:144
|
28 |
+
msgid "Include retweets?"
|
29 |
+
msgstr ""
|
30 |
+
|
31 |
+
#: rotatingtweets.php:145
|
32 |
+
msgid "Exclude replies?"
|
33 |
+
msgstr ""
|
34 |
+
|
35 |
+
#: rotatingtweets.php:146
|
36 |
+
msgid "How many tweets?"
|
37 |
+
msgstr ""
|
38 |
+
|
39 |
+
#: rotatingtweets.php:154
|
40 |
+
msgid "Speed"
|
41 |
+
msgstr ""
|
42 |
+
|
43 |
+
#: rotatingtweets.php:157
|
44 |
+
msgid "Faster (3 seconds)"
|
45 |
+
msgstr ""
|
46 |
+
|
47 |
+
#: rotatingtweets.php:158
|
48 |
+
msgid "Normal (4 seconds)"
|
49 |
+
msgstr ""
|
50 |
+
|
51 |
+
#: rotatingtweets.php:159
|
52 |
+
msgid "Slower (5 seconds)"
|
53 |
+
msgstr ""
|
54 |
+
|
55 |
+
#: rotatingtweets.php:160
|
56 |
+
msgid "Slowest (6 seconds)"
|
57 |
+
msgstr ""
|
58 |
+
|
59 |
+
#: rotatingtweets.php:172
|
60 |
+
msgid "Scroll Up"
|
61 |
+
msgstr ""
|
62 |
+
|
63 |
+
#: rotatingtweets.php:173
|
64 |
+
msgid "Scroll Down"
|
65 |
+
msgstr ""
|
66 |
+
|
67 |
+
#: rotatingtweets.php:174
|
68 |
+
msgid "Scroll Left"
|
69 |
+
msgstr ""
|
70 |
+
|
71 |
+
#: rotatingtweets.php:175
|
72 |
+
msgid "Scroll Right"
|
73 |
+
msgstr ""
|
74 |
+
|
75 |
+
#: rotatingtweets.php:176
|
76 |
+
msgid "Fade"
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: rotatingtweets.php:180
|
80 |
+
msgid "Type of rotation"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: rotatingtweets.php:189
|
84 |
+
msgid "Show tweet details?"
|
85 |
+
msgstr ""
|
86 |
+
|
87 |
+
#: rotatingtweets.php:192
|
88 |
+
msgid "Time/date of tweet"
|
89 |
+
msgstr ""
|
90 |
+
|
91 |
+
#: rotatingtweets.php:193
|
92 |
+
msgid "Name of person tweeting"
|
93 |
+
msgstr ""
|
94 |
+
|
95 |
+
#: rotatingtweets.php:194
|
96 |
+
msgid "Source of tweet"
|
97 |
+
msgstr ""
|
98 |
+
|
99 |
+
#: rotatingtweets.php:195
|
100 |
+
msgid "'reply · retweet · favorite' links"
|
101 |
+
msgstr ""
|
102 |
+
|
103 |
+
#: rotatingtweets.php:205
|
104 |
+
msgid "Show follow button?"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: rotatingtweets.php:208
|
108 |
+
msgctxt "Show follow button?"
|
109 |
+
msgid "None"
|
110 |
+
msgstr ""
|
111 |
+
|
112 |
+
#: rotatingtweets.php:209
|
113 |
+
msgid "Show name and number of followers"
|
114 |
+
msgstr ""
|
115 |
+
|
116 |
+
#: rotatingtweets.php:210
|
117 |
+
msgid "Show name only"
|
118 |
+
msgstr ""
|
119 |
+
|
120 |
+
#: rotatingtweets.php:211
|
121 |
+
msgid "Show followers only"
|
122 |
+
msgstr ""
|
123 |
+
|
124 |
+
#: rotatingtweets.php:212
|
125 |
+
msgid "Show button only"
|
126 |
+
msgstr ""
|
127 |
+
|
128 |
+
#: rotatingtweets.php:229
|
129 |
+
msgid "less than a second ago"
|
130 |
+
msgstr ""
|
131 |
+
|
132 |
+
#: rotatingtweets.php:230
|
133 |
+
msgid "%d seconds ago"
|
134 |
+
msgstr ""
|
135 |
+
|
136 |
+
#: rotatingtweets.php:231
|
137 |
+
msgid "about a minute ago"
|
138 |
+
msgid_plural "about %d minutes ago"
|
139 |
+
msgstr[0] ""
|
140 |
+
msgstr[1] ""
|
141 |
+
|
142 |
+
#: rotatingtweets.php:232 rotatingtweets.php:234
|
143 |
+
msgid "about an hour ago"
|
144 |
+
msgid_plural "about %d hours ago"
|
145 |
+
msgstr[0] ""
|
146 |
+
msgstr[1] ""
|
147 |
+
|
148 |
+
#: rotatingtweets.php:233
|
149 |
+
msgid "yesterday"
|
150 |
+
msgstr ""
|
151 |
+
|
152 |
+
#: rotatingtweets.php:235
|
153 |
+
msgid "about a day ago"
|
154 |
+
msgid_plural "about %d days ago"
|
155 |
+
msgstr[0] ""
|
156 |
+
msgstr[1] ""
|
157 |
+
|
158 |
+
#: rotatingtweets.php:236
|
159 |
+
msgid "last week"
|
160 |
+
msgstr ""
|
161 |
+
|
162 |
+
#: rotatingtweets.php:237
|
163 |
+
msgid "about a week ago"
|
164 |
+
msgid_plural "about %d weeks ago"
|
165 |
+
msgstr[0] ""
|
166 |
+
msgstr[1] ""
|
167 |
+
|
168 |
+
#: rotatingtweets.php:238
|
169 |
+
msgid "last month"
|
170 |
+
msgstr ""
|
171 |
+
|
172 |
+
#: rotatingtweets.php:239
|
173 |
+
msgid "about a month ago"
|
174 |
+
msgid_plural "about %d months ago"
|
175 |
+
msgstr[0] ""
|
176 |
+
msgstr[1] ""
|
177 |
+
|
178 |
+
#: rotatingtweets.php:240
|
179 |
+
msgid "last year"
|
180 |
+
msgstr ""
|
181 |
+
|
182 |
+
#: rotatingtweets.php:241
|
183 |
+
msgid "about a year ago"
|
184 |
+
msgid_plural "about %d years ago"
|
185 |
+
msgstr[0] ""
|
186 |
+
msgstr[1] ""
|
187 |
+
|
188 |
+
#: rotatingtweets.php:374
|
189 |
+
msgid "Problem retrieving data from Twitter"
|
190 |
+
msgstr ""
|
191 |
+
|
192 |
+
#: rotatingtweets.php:378
|
193 |
+
msgid ""
|
194 |
+
"This website is currently <a href='https://dev.twitter.com/docs/rate-"
|
195 |
+
"limiting/faq'>rate-limited by Twitter</a>."
|
196 |
+
msgstr ""
|
197 |
+
|
198 |
+
#: rotatingtweets.php:380
|
199 |
+
msgid "Next attempt to get data will be in %d minute"
|
200 |
+
msgid_plural "Next attempt to get data will be in %d minutes"
|
201 |
+
msgstr[0] ""
|
202 |
+
msgstr[1] ""
|
203 |
+
|
204 |
+
#: rotatingtweets.php:381
|
205 |
+
msgid "Next attempt to get data will be in less than a minute"
|
206 |
+
msgstr ""
|
207 |
+
|
208 |
+
#: rotatingtweets.php:387
|
209 |
+
msgid "Wordpress error message"
|
210 |
+
msgstr ""
|
211 |
+
|
212 |
+
#: rotatingtweets.php:390
|
213 |
+
msgid "Please check the Twitter name used in the settings."
|
214 |
+
msgstr ""
|
215 |
+
|
216 |
+
#: rotatingtweets.php:459
|
217 |
+
msgid ""
|
218 |
+
"from <a target='_BLANK' href='http://twitter.com/%1$s' title='%2$s'>%2$s's "
|
219 |
+
"Twitter</a>"
|
220 |
+
msgstr ""
|
221 |
+
|
222 |
+
#: rotatingtweets.php:463
|
223 |
+
msgid "via %s"
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: rotatingtweets.php:470
|
227 |
+
msgid "reply"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: rotatingtweets.php:470
|
231 |
+
msgid "retweet"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: rotatingtweets.php:470
|
235 |
+
msgid "favorite"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: rotatingtweets.php:482
|
239 |
+
msgid "Problem retrieving data from Twitter."
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: rotatingtweets.php:484
|
243 |
+
msgid "Please check the comments on this page's HTML to understand more."
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: rotatingtweets.php:504
|
247 |
+
msgid "Follow @%s"
|
248 |
+
msgstr ""
|
249 |
+
|
250 |
+
#. Plugin Name of the plugin/theme
|
251 |
+
msgid "Rotating Tweets (Twitter widget & shortcode)"
|
252 |
+
msgstr ""
|
253 |
+
|
254 |
+
#. Description of the plugin/theme
|
255 |
+
msgid ""
|
256 |
+
"Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or "
|
257 |
+
"a widget, with a rotating tweets display"
|
258 |
+
msgstr ""
|
259 |
+
|
260 |
+
#. Author of the plugin/theme
|
261 |
+
msgid "Martin Tod"
|
262 |
+
msgstr ""
|
263 |
+
|
264 |
+
#. Author URI of the plugin/theme
|
265 |
+
msgid "http://www.martintod.org.uk"
|
266 |
+
msgstr ""
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Rotating Tweets (Twitter widget and shortcode) ===
|
2 |
Contributors: mpntod
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9XCNM4QSVHYT8
|
4 |
-
Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 3.4.1
|
7 |
-
Stable tag: 0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -19,8 +19,10 @@ Twitter widget and shortcode to show your latest tweets one at a time an animate
|
|
19 |
* Replaces [t.co](http://t.co) links with the original link
|
20 |
* Caches the most recent data from Twitter to avoid problems with rate limiting
|
21 |
* Uses [jQuery](http://jquery.com/) and [jQuery.Cycle](http://jquery.malsup.com/cycle/) to produce a nice smooth result.
|
|
|
|
|
|
|
22 |
|
23 |
-
If you'd like to see what it looks like in action, you can [see the plug-in working here](http://www.martintod.org.uk/2012/05/29/new-twitter-plugin-to-show-tweets-in-rotation/).
|
24 |
== Installation ==
|
25 |
= Installation =
|
26 |
1. Upload the contents of `rotatingtweets.zip` to the `/wp-content/plugins/` directory or use the Wordpress installer
|
@@ -58,10 +60,13 @@ although the only one you *have* to have is `screen_name`.
|
|
58 |
In most cases, each use (or "instance") of this plug-in gets data from Twitter every 2 minutes. The exception is when two or more instances share the same settings (screen name etc.), in which case they share the same data rather than each calling it separately.
|
59 |
|
60 |
== Upgrade notice ==
|
61 |
-
= 0.
|
62 |
-
Javascript fix for zero height tweets problem
|
63 |
|
64 |
== Changelog ==
|
|
|
|
|
|
|
65 |
= 0.502 =
|
66 |
Javascript fix for zero height tweets problem
|
67 |
|
1 |
=== Rotating Tweets (Twitter widget and shortcode) ===
|
2 |
Contributors: mpntod
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9XCNM4QSVHYT8
|
4 |
+
Tags: shortcode,widget,twitter,rotating,rotate,rotator,tweet,tweets,animation,jquery,jquery cycle,cycle,multilingual
|
5 |
Requires at least: 2.6
|
6 |
Tested up to: 3.4.1
|
7 |
+
Stable tag: 0.505
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
19 |
* Replaces [t.co](http://t.co) links with the original link
|
20 |
* Caches the most recent data from Twitter to avoid problems with rate limiting
|
21 |
* Uses [jQuery](http://jquery.com/) and [jQuery.Cycle](http://jquery.malsup.com/cycle/) to produce a nice smooth result.
|
22 |
+
* **Multi-lingual** - now set up to be multi-lingual. The Twitter 'follow' button is automatically translated to match your site's language setting [if Twitter has made the appropriate language available](https://dev.twitter.com/docs/api/1/get/help/languages). Also uses [Wordpress's multi-lingual capability](http://codex.wordpress.org/I18n_for_WordPress_Developers) to enable translation of all the other text used by the plug-in via language packs. If you have made the plug-in work in your language, please send the [gettext PO and MO files](http://codex.wordpress.org/I18n_for_WordPress_Developers) to [me](http://www.martintod.org.uk/contact-martin/) and I will then share them with everyone else. You can download [the latest POT file](http://plugins.svn.wordpress.org/rotatingtweets/trunk/languages/rotatingtweets.pot), and [PO files in each language](http://plugins.svn.wordpress.org/rotatingtweets/trunk/languages/) from this site. You may find [Poedit](http://www.poedit.net/) rather useful for translation and creation of PO and MO files.
|
23 |
+
|
24 |
+
If you'd like to see what the plug-in looks like in action, you can [see the plug-in working here](http://www.martintod.org.uk/2012/05/29/new-twitter-plugin-to-show-tweets-in-rotation/).
|
25 |
|
|
|
26 |
== Installation ==
|
27 |
= Installation =
|
28 |
1. Upload the contents of `rotatingtweets.zip` to the `/wp-content/plugins/` directory or use the Wordpress installer
|
60 |
In most cases, each use (or "instance") of this plug-in gets data from Twitter every 2 minutes. The exception is when two or more instances share the same settings (screen name etc.), in which case they share the same data rather than each calling it separately.
|
61 |
|
62 |
== Upgrade notice ==
|
63 |
+
= 0.505 =
|
64 |
+
Minimised Javascript. Set-up for I18n. Includes Javascript fix for zero height tweets problem.
|
65 |
|
66 |
== Changelog ==
|
67 |
+
= 0.505 =
|
68 |
+
Minimised Javascript. Set-up for I18n.
|
69 |
+
|
70 |
= 0.502 =
|
71 |
Javascript fix for zero height tweets problem
|
72 |
|
rotatingtweets.php
CHANGED
@@ -2,7 +2,8 @@
|
|
2 |
/*
|
3 |
Plugin Name: Rotating Tweets (Twitter widget & shortcode)
|
4 |
Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
|
5 |
-
Version: 0.
|
|
|
6 |
Author: Martin Tod
|
7 |
Author URI: http://www.martintod.org.uk
|
8 |
License: GPL2
|
@@ -37,18 +38,18 @@ License: GPL2
|
|
37 |
class rotatingtweets_Widget extends WP_Widget {
|
38 |
/** constructor */
|
39 |
function rotatingtweets_Widget() {
|
40 |
-
parent::WP_Widget(false, $name = 'Rotating Tweets',array('description'=>'A widget to show tweets for a particular user in rotation.'));
|
41 |
if ( is_active_widget( false, false, $this->id_base ) )
|
42 |
wp_enqueue_script( 'jquery' );
|
43 |
# Get Stylesheet
|
44 |
$style = get_stylesheet();
|
45 |
switch ($style):
|
46 |
case 'zeebizzcard':
|
47 |
-
wp_enqueue_script( 'rotating_tweet', plugins_url('js/rotating_tweet.js', __FILE__),array('jquery','zee_jquery-cycle'),FALSE,FALSE );
|
48 |
break;
|
49 |
default:
|
50 |
-
wp_enqueue_script( 'jquery-cycle', plugins_url('js/jquery.cycle.all.js', __FILE__),array('jquery'),FALSE,FALSE );
|
51 |
-
wp_enqueue_script( 'rotating_tweet', plugins_url('js/rotating_tweet.js', __FILE__),array('jquery','jquery-cycle'),FALSE,FALSE );
|
52 |
break;
|
53 |
endswitch;
|
54 |
wp_enqueue_style( 'rotating_tweet', plugins_url('css/style.css', __FILE__));
|
@@ -138,11 +139,11 @@ class rotatingtweets_Widget extends WP_Widget {
|
|
138 |
if(empty($tw_timeout)) $tw_timeout = 4000;
|
139 |
if(empty($tw_tweet_count)) $tw_tweet_count = 5;
|
140 |
?>
|
141 |
-
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
|
142 |
-
<p><label for="<?php echo $this->get_field_id('tw_screen_name'); ?>"><?php _e('Twitter name:'); ?> <input class="widefat" id="<?php echo $this->get_field_id('tw_screen_name'); ?>" name="<?php echo $this->get_field_name('tw_screen_name'); ?>" value="<?php echo $tw_screen_name; ?>" /></label></p>
|
143 |
-
<p><input id="<?php echo $this->get_field_id('tw_include_rts'); ?>" name="<?php echo $this->get_field_name('tw_include_rts'); ?>" type="checkbox" value="1" <?php if($tw_include_rts==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id('tw_include_rts'); ?>"> <?php _e('Include retweets?'); ?></label></p>
|
144 |
-
<p><input id="<?php echo $this->get_field_id('tw_exclude_replies'); ?>" name="<?php echo $this->get_field_name('tw_exclude_replies'); ?>" type="checkbox" value="1" <?php if($tw_exclude_replies==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id('tw_exclude_replies'); ?>"> <?php _e('Exclude replies?'); ?></label></p>
|
145 |
-
<p><label for="<?php echo $this->get_field_id('tw_tweet_count'); ?>"><?php _e('How many tweets?'); ?> <select id="<?php echo $this->get_field_id('tw_tweet_count'); ?>" name="<?php echo $this->get_field_name('tw_tweet_count');?>">
|
146 |
<?php
|
147 |
for ($i=1; $i<20; $i++) {
|
148 |
echo "\n\t<option value='$i' ";
|
@@ -150,13 +151,13 @@ class rotatingtweets_Widget extends WP_Widget {
|
|
150 |
echo ">$i</option>";
|
151 |
}
|
152 |
?></select></label></p>
|
153 |
-
<p><label for="<?php echo $this->get_field_id('tw_timeout'); ?>"><?php _e('Speed'); ?> <select id="<?php echo $this->get_field_id('tw_timeout'); ?>" name="<?php echo $this->get_field_name('tw_timeout');?>">
|
154 |
<?php
|
155 |
$timeoutoptions = array (
|
156 |
-
"3000" => "Faster (3 seconds)",
|
157 |
-
"4000" => "Normal (4 seconds)",
|
158 |
-
"5000" => "Slower (5 seconds)",
|
159 |
-
"6000" => "Slowest (6 seconds)"
|
160 |
);
|
161 |
foreach ($timeoutoptions as $val => $words) {
|
162 |
echo "\n\t<option value='$val' ";
|
@@ -168,15 +169,15 @@ class rotatingtweets_Widget extends WP_Widget {
|
|
168 |
# For reference, all the rotations that look good.
|
169 |
# $goodRotations = array('blindX','blindY','blindZ','cover','curtainY','fade','growY','none','scrollUp','scrollDown','scrollLeft','scrollRight','scrollHorz','scrollVert','shuffle','toss','turnUp','turnDown','uncover');
|
170 |
$rotationoptions = array (
|
171 |
-
'scrollUp' => 'Scroll Up',
|
172 |
-
'scrollDown' => 'Scroll Down',
|
173 |
-
'scrollLeft' => 'Scroll Left',
|
174 |
-
'scrollRight' => 'Scroll Right',
|
175 |
-
'fade' => 'Fade'
|
176 |
);
|
177 |
asort($rotationoptions);
|
178 |
?>
|
179 |
-
<p><label for="<?php echo $this->get_field_id('tw_rotation_type'); ?>"><?php _e('Type of rotation'); ?> <select id="<?php echo $this->get_field_id('tw_rotation_type'); ?>" name="<?php echo $this->get_field_name('tw_rotation_type');?>">
|
180 |
<?php
|
181 |
foreach ($rotationoptions as $val => $words) {
|
182 |
echo "\n\t<option value='$val' ";
|
@@ -185,30 +186,30 @@ class rotatingtweets_Widget extends WP_Widget {
|
|
185 |
}
|
186 |
?></select></label></p>
|
187 |
<?php /* Ask about which Tweet details to show */ ?>
|
188 |
-
<p><?php _e('Show tweet details?'); ?></p><p>
|
189 |
<?php
|
190 |
$tweet_detail_options = array(
|
191 |
-
'tw_show_meta_timestamp' => 'Time/date of tweet',
|
192 |
-
'tw_show_meta_screen_name' => 'Name of person tweeting',
|
193 |
-
'tw_show_meta_via' => 'Source of tweet',
|
194 |
-
'tw_show_meta_reply_retweet_favorite' => "'reply · retweet ·
|
195 |
);
|
196 |
$tw_br='';
|
197 |
foreach ($tweet_detail_options as $field => $text):
|
198 |
echo $tw_br;
|
199 |
?>
|
200 |
-
<input id="<?php echo $this->get_field_id($field); ?>" name="<?php echo $this->get_field_name($field); ?>" type="checkbox" value="1" <?php if($metaoption[$field]==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id($field); ?>"> <?php
|
201 |
<?php
|
202 |
$tw_br = "<br />";
|
203 |
endforeach; ?></p>
|
204 |
-
<p><?php _e('Show follow button?'); ?></p>
|
205 |
<?php
|
206 |
$showfollowoptions = array (
|
207 |
-
0 => 'None',
|
208 |
-
1 => "Show name and number of followers",
|
209 |
-
2 => "Show name only",
|
210 |
-
3 => "Show followers only",
|
211 |
-
4 => "Show button only"
|
212 |
);
|
213 |
|
214 |
foreach ($showfollowoptions as $val => $html) {
|
@@ -225,22 +226,19 @@ add_action('widgets_init', create_function('', 'return register_widget("rotating
|
|
225 |
function rotatingtweets_contextualtime($small_ts, $large_ts=false) {
|
226 |
if(!$large_ts) $large_ts = time();
|
227 |
$n = $large_ts - $small_ts;
|
228 |
-
if($n <= 1) return 'less than
|
229 |
-
if($n < (60)) return
|
230 |
-
if($n < (60*60)) { $minutes = round($n/60); return 'about
|
231 |
-
if($n < (60*60*16)) { $hours = round($n/(60*60)); return 'about
|
232 |
-
if($n < (time() - strtotime('yesterday'))) return 'yesterday';
|
233 |
-
if($n < (60*60*24)) { $hours = round($n/(60*60)); return 'about
|
234 |
-
if($n < (60*60*24*6.5))
|
235 |
-
if($n < (time() - strtotime('last week'))) return 'last week';
|
236 |
-
if(round($n/(60*60*24*7))
|
237 |
-
if($n < (
|
238 |
-
if($n < (
|
239 |
-
if(
|
240 |
-
if($n
|
241 |
-
if($n < (time() - strtotime('last year'))) return 'last year';
|
242 |
-
if(round($n/(60*60*24*7*52)) == 1) return 'about a year ago';
|
243 |
-
if($n >= (60*60*24*7*4*12)) return 'about ' . round($n/(60*60*24*7*52)) . ' years ago';
|
244 |
return false;
|
245 |
}
|
246 |
|
@@ -373,24 +371,23 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
373 |
$id = uniqid('rotatingtweets_'.$timeout.'_'.$rotation_type.'_');
|
374 |
$result = "\n<div class='rotatingtweets' id='$id'>";
|
375 |
if(empty($json)):
|
376 |
-
$result .= "\n\t<div class = 'rotatingtweet'><p class='rtw_main'>Problem retrieving data from Twitter
|
377 |
$rate = rotatingtweets_get_rate_data();
|
378 |
# Check if the problem is rate limiting
|
379 |
if($rate && $rate->remaining_hits == 0):
|
380 |
-
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>This website is currently <a href='https://dev.twitter.com/docs/rate-limiting/faq'>rate-limited by Twitter</a
|
381 |
$waittimevalue = intval(($rate->reset_time_in_seconds-time - time())/60);
|
382 |
-
$waittime =
|
383 |
-
if($waittimevalue ==
|
384 |
-
|
385 |
-
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>Next attempt to get data will be in {$waittime}.</p></div>";
|
386 |
else:
|
387 |
$error_messages = get_transient('rotatingtweets_wp_error');
|
388 |
if($error_messages):
|
389 |
foreach($error_messages as $error_message):
|
390 |
-
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>Wordpress error message: ".$error_message.".</p></div>";
|
391 |
endforeach;
|
392 |
endif;
|
393 |
-
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>Please check the Twitter name used in the settings
|
394 |
endif;
|
395 |
else:
|
396 |
$tweet_counter = 0;
|
@@ -459,18 +456,18 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
459 |
endif;
|
460 |
if($args['show_meta_screen_name']):
|
461 |
if(!empty($meta)) $meta .= ' ';
|
462 |
-
$meta .=
|
463 |
endif;
|
464 |
if($args['show_meta_via']):
|
465 |
if(!empty($meta)) $meta .= ' ';
|
466 |
-
$meta .="via "
|
467 |
endif;
|
468 |
if($args['show_meta_reply_retweet_favorite']):
|
469 |
/* Code for $meta showing graphics
|
470 |
$meta .= ' <a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'" title="Reply"><img src="'.plugins_url('images/reply.png', __FILE__).'" width="16" height="16" alt="Reply" /></a> <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'" title="Retweet" ><img src="'.plugins_url('images/retweet.png', __FILE__).'" width="16" height="16" alt="Retweet" /></a> <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'" title="Favourite"><img src="'.plugins_url('images/favorite.png', __FILE__).'" alt="Favorite" width="16" height="16" /></a></p>';
|
471 |
*/
|
472 |
if(!empty($meta)) $meta .= ' · ';
|
473 |
-
$meta .= '<a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'">reply</a> · <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'">retweet</a> · <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'">favorite</a>';
|
474 |
endif;
|
475 |
/* Experiment with Prev / Next buttons
|
476 |
if($args['show_meta_prev_next']):
|
@@ -482,9 +479,9 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
482 |
$result .= "\n\t\t<p class='rtw_meta'>".ucfirst($meta)."</p>";
|
483 |
endif;
|
484 |
else:
|
485 |
-
$result .= "\n\t\t<p class='rtw_main'>Problem retrieving data from Twitter
|
486 |
$result .= "<!-- rotatingtweets plugin was unable to parse this data: ".print_r($json,TRUE)." -->";
|
487 |
-
$result .= "\n\t\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>Please check the comments on this page's HTML to understand more
|
488 |
endif;
|
489 |
$result .= "\n\t</div>";
|
490 |
endif;
|
@@ -502,9 +499,21 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
502 |
*/
|
503 |
if($args['show_follow'] && !empty($user->screen_name)):
|
504 |
unset($shortenvariables);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';
|
506 |
if($args['no_show_screen_name']) $shortenvariables .= ' data-show-screen-name="false"';
|
507 |
-
$
|
|
|
508 |
endif;
|
509 |
wp_enqueue_script( 'jquery' );
|
510 |
wp_enqueue_script( 'jquery-cycle', plugins_url('js/jquery.cycle.all.js', __FILE__),array('jquery'),FALSE,FALSE );
|
@@ -513,4 +522,9 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
|
|
513 |
if($print) echo $result;
|
514 |
return($result);
|
515 |
}
|
|
|
|
|
|
|
|
|
|
|
516 |
?>
|
2 |
/*
|
3 |
Plugin Name: Rotating Tweets (Twitter widget & shortcode)
|
4 |
Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
|
5 |
+
Version: 0.505
|
6 |
+
Text Domain: rotatingtweets
|
7 |
Author: Martin Tod
|
8 |
Author URI: http://www.martintod.org.uk
|
9 |
License: GPL2
|
38 |
class rotatingtweets_Widget extends WP_Widget {
|
39 |
/** constructor */
|
40 |
function rotatingtweets_Widget() {
|
41 |
+
parent::WP_Widget(false, $name = 'Rotating Tweets',array('description'=>__('A widget to show tweets for a particular user in rotation.','rotatingtweets')));
|
42 |
if ( is_active_widget( false, false, $this->id_base ) )
|
43 |
wp_enqueue_script( 'jquery' );
|
44 |
# Get Stylesheet
|
45 |
$style = get_stylesheet();
|
46 |
switch ($style):
|
47 |
case 'zeebizzcard':
|
48 |
+
wp_enqueue_script( 'rotating_tweet', plugins_url('js/rotating_tweet.min.js', __FILE__),array('jquery','zee_jquery-cycle'),FALSE,FALSE );
|
49 |
break;
|
50 |
default:
|
51 |
+
wp_enqueue_script( 'jquery-cycle', plugins_url('js/jquery.cycle.all.min.js', __FILE__),array('jquery'),FALSE,FALSE );
|
52 |
+
wp_enqueue_script( 'rotating_tweet', plugins_url('js/rotating_tweet.min.js', __FILE__),array('jquery','jquery-cycle'),FALSE,FALSE );
|
53 |
break;
|
54 |
endswitch;
|
55 |
wp_enqueue_style( 'rotating_tweet', plugins_url('css/style.css', __FILE__));
|
139 |
if(empty($tw_timeout)) $tw_timeout = 4000;
|
140 |
if(empty($tw_tweet_count)) $tw_tweet_count = 5;
|
141 |
?>
|
142 |
+
<p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:','rotatingtweets'); ?> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></label></p>
|
143 |
+
<p><label for="<?php echo $this->get_field_id('tw_screen_name'); ?>"><?php _e('Twitter name:','rotatingtweets'); ?> <input class="widefat" id="<?php echo $this->get_field_id('tw_screen_name'); ?>" name="<?php echo $this->get_field_name('tw_screen_name'); ?>" value="<?php echo $tw_screen_name; ?>" /></label></p>
|
144 |
+
<p><input id="<?php echo $this->get_field_id('tw_include_rts'); ?>" name="<?php echo $this->get_field_name('tw_include_rts'); ?>" type="checkbox" value="1" <?php if($tw_include_rts==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id('tw_include_rts'); ?>"> <?php _e('Include retweets?','rotatingtweets'); ?></label></p>
|
145 |
+
<p><input id="<?php echo $this->get_field_id('tw_exclude_replies'); ?>" name="<?php echo $this->get_field_name('tw_exclude_replies'); ?>" type="checkbox" value="1" <?php if($tw_exclude_replies==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id('tw_exclude_replies'); ?>"> <?php _e('Exclude replies?','rotatingtweets'); ?></label></p>
|
146 |
+
<p><label for="<?php echo $this->get_field_id('tw_tweet_count'); ?>"><?php _e('How many tweets?','rotatingtweets'); ?> <select id="<?php echo $this->get_field_id('tw_tweet_count'); ?>" name="<?php echo $this->get_field_name('tw_tweet_count');?>">
|
147 |
<?php
|
148 |
for ($i=1; $i<20; $i++) {
|
149 |
echo "\n\t<option value='$i' ";
|
151 |
echo ">$i</option>";
|
152 |
}
|
153 |
?></select></label></p>
|
154 |
+
<p><label for="<?php echo $this->get_field_id('tw_timeout'); ?>"><?php _e('Speed','rotatingtweets'); ?> <select id="<?php echo $this->get_field_id('tw_timeout'); ?>" name="<?php echo $this->get_field_name('tw_timeout');?>">
|
155 |
<?php
|
156 |
$timeoutoptions = array (
|
157 |
+
"3000" => __("Faster (3 seconds)",'rotatingtweets'),
|
158 |
+
"4000" => __("Normal (4 seconds)",'rotatingtweets'),
|
159 |
+
"5000" => __("Slower (5 seconds)",'rotatingtweets'),
|
160 |
+
"6000" => __("Slowest (6 seconds)",'rotatingtweets')
|
161 |
);
|
162 |
foreach ($timeoutoptions as $val => $words) {
|
163 |
echo "\n\t<option value='$val' ";
|
169 |
# For reference, all the rotations that look good.
|
170 |
# $goodRotations = array('blindX','blindY','blindZ','cover','curtainY','fade','growY','none','scrollUp','scrollDown','scrollLeft','scrollRight','scrollHorz','scrollVert','shuffle','toss','turnUp','turnDown','uncover');
|
171 |
$rotationoptions = array (
|
172 |
+
'scrollUp' => __('Scroll Up','rotatingtweets'),
|
173 |
+
'scrollDown' => __('Scroll Down','rotatingtweets'),
|
174 |
+
'scrollLeft' => __('Scroll Left','rotatingtweets'),
|
175 |
+
'scrollRight' => __('Scroll Right','rotatingtweets'),
|
176 |
+
'fade' => __('Fade','rotatingtweets')
|
177 |
);
|
178 |
asort($rotationoptions);
|
179 |
?>
|
180 |
+
<p><label for="<?php echo $this->get_field_id('tw_rotation_type'); ?>"><?php _e('Type of rotation','rotatingtweets'); ?> <select id="<?php echo $this->get_field_id('tw_rotation_type'); ?>" name="<?php echo $this->get_field_name('tw_rotation_type');?>">
|
181 |
<?php
|
182 |
foreach ($rotationoptions as $val => $words) {
|
183 |
echo "\n\t<option value='$val' ";
|
186 |
}
|
187 |
?></select></label></p>
|
188 |
<?php /* Ask about which Tweet details to show */ ?>
|
189 |
+
<p><?php _e('Show tweet details?','rotatingtweets'); ?></p><p>
|
190 |
<?php
|
191 |
$tweet_detail_options = array(
|
192 |
+
'tw_show_meta_timestamp' => __('Time/date of tweet','rotatingtweets'),
|
193 |
+
'tw_show_meta_screen_name' => __('Name of person tweeting','rotatingtweets'),
|
194 |
+
'tw_show_meta_via' => __('Source of tweet','rotatingtweets'),
|
195 |
+
'tw_show_meta_reply_retweet_favorite' => __("'reply · retweet · favorite' links",'rotatingtweets')
|
196 |
);
|
197 |
$tw_br='';
|
198 |
foreach ($tweet_detail_options as $field => $text):
|
199 |
echo $tw_br;
|
200 |
?>
|
201 |
+
<input id="<?php echo $this->get_field_id($field); ?>" name="<?php echo $this->get_field_name($field); ?>" type="checkbox" value="1" <?php if($metaoption[$field]==1): ?>checked="checked" <?php endif; ?>/><label for="<?php echo $this->get_field_id($field); ?>"> <?php echo $text; ?></label>
|
202 |
<?php
|
203 |
$tw_br = "<br />";
|
204 |
endforeach; ?></p>
|
205 |
+
<p><?php _e('Show follow button?','rotatingtweets'); ?></p>
|
206 |
<?php
|
207 |
$showfollowoptions = array (
|
208 |
+
0 => _x('None','Show follow button?','rotatingtweets'),
|
209 |
+
1 => __("Show name and number of followers",'rotatingtweets'),
|
210 |
+
2 => __("Show name only",'rotatingtweets'),
|
211 |
+
3 => __("Show followers only",'rotatingtweets'),
|
212 |
+
4 => __("Show button only",'rotatingtweets')
|
213 |
);
|
214 |
|
215 |
foreach ($showfollowoptions as $val => $html) {
|
226 |
function rotatingtweets_contextualtime($small_ts, $large_ts=false) {
|
227 |
if(!$large_ts) $large_ts = time();
|
228 |
$n = $large_ts - $small_ts;
|
229 |
+
if($n <= 1) return __('less than a second ago','rotatingtweets');
|
230 |
+
if($n < (60)) return sprintf(__('%d seconds ago','rotatingtweets'),$n);
|
231 |
+
if($n < (60*60)) { $minutes = round($n/60); return sprintf(_n('about a minute ago','about %d minutes ago',$minutes,'rotatingtweets'),$minutes); }
|
232 |
+
if($n < (60*60*16)) { $hours = round($n/(60*60)); return sprintf(_n('about an hour ago','about %d hours ago',$hours,'rotatingtweets'),$hours); }
|
233 |
+
if($n < (time() - strtotime('yesterday'))) return __('yesterday','rotatingtweets');
|
234 |
+
if($n < (60*60*24)) { $hours = round($n/(60*60)); return sprintf(_n('about an hour ago','about %d hours ago',$hours,'rotatingtweets'),$hours); }
|
235 |
+
if($n < (60*60*24*6.5)) { $days = round($n/(60*60*24)); return sprintf(_n('about a day ago','about %d days ago',$days,'rotatingtweets'),$days); }
|
236 |
+
if($n < (time() - strtotime('last week'))) return __('last week','rotatingtweets');
|
237 |
+
if($n < (60*60*24*7*3.5)) { $weeks = round($n/(60*60*24*7)); return sprintf(_n('about a week ago','about %d weeks ago',$weeks,'rotatingtweets'),$weeks); }
|
238 |
+
if($n < (time() - strtotime('last month'))) return __('last month','rotatingtweets');
|
239 |
+
if($n < (60*60*24*7*4*11.5)) { $months = round($n/(60*60*24*7*4)) ; return sprintf(_n('about a month ago','about %d months ago',$months,'rotatingtweets'),$months);}
|
240 |
+
if($n < (time() - strtotime('last year'))) return __('last year','rotatingtweets');
|
241 |
+
if($n >= (60*60*24*7*4*12)){$years=round($n/(60*60*24*7*52)) ;return sprintf(_n('about a year ago','about %d years ago',$years,'rotatingtweets'),$years);}
|
|
|
|
|
|
|
242 |
return false;
|
243 |
}
|
244 |
|
371 |
$id = uniqid('rotatingtweets_'.$timeout.'_'.$rotation_type.'_');
|
372 |
$result = "\n<div class='rotatingtweets' id='$id'>";
|
373 |
if(empty($json)):
|
374 |
+
$result .= "\n\t<div class = 'rotatingtweet'><p class='rtw_main'>". __('Problem retrieving data from Twitter','rotatingtweets'). "</p></div>";
|
375 |
$rate = rotatingtweets_get_rate_data();
|
376 |
# Check if the problem is rate limiting
|
377 |
if($rate && $rate->remaining_hits == 0):
|
378 |
+
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>". __("This website is currently <a href='https://dev.twitter.com/docs/rate-limiting/faq'>rate-limited by Twitter</a>.",'rotatingtweets')."</p></div>";
|
379 |
$waittimevalue = intval(($rate->reset_time_in_seconds-time - time())/60);
|
380 |
+
$waittime = sprintf(_n('Next attempt to get data will be in %d minute','Next attempt to get data will be in %d minutes',$waittimevalue,'rotatingtweets'),$waittimevalue);
|
381 |
+
if($waittimevalue == 0) $waittime = __("Next attempt to get data will be in less than a minute",'rotatingtweets');
|
382 |
+
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>{$waittime}.</p></div>";
|
|
|
383 |
else:
|
384 |
$error_messages = get_transient('rotatingtweets_wp_error');
|
385 |
if($error_messages):
|
386 |
foreach($error_messages as $error_message):
|
387 |
+
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>". __('Wordpress error message','rotatingtweets').": ".$error_message.".</p></div>";
|
388 |
endforeach;
|
389 |
endif;
|
390 |
+
$result .= "\n\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>". __('Please check the Twitter name used in the settings.','rotatingtweets')."</p></div>";
|
391 |
endif;
|
392 |
else:
|
393 |
$tweet_counter = 0;
|
456 |
endif;
|
457 |
if($args['show_meta_screen_name']):
|
458 |
if(!empty($meta)) $meta .= ' ';
|
459 |
+
$meta .= sprintf(__('from <a target=\'_BLANK\' href=\'http://twitter.com/%1$s\' title=\'%2$s\'>%2$s\'s Twitter</a>','rotatingtweets'),$user->screen_name,$user->name);
|
460 |
endif;
|
461 |
if($args['show_meta_via']):
|
462 |
if(!empty($meta)) $meta .= ' ';
|
463 |
+
$meta .=sprintf(__("via %s",'rotatingtweets'),$twitter_object->source);
|
464 |
endif;
|
465 |
if($args['show_meta_reply_retweet_favorite']):
|
466 |
/* Code for $meta showing graphics
|
467 |
$meta .= ' <a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'" title="Reply"><img src="'.plugins_url('images/reply.png', __FILE__).'" width="16" height="16" alt="Reply" /></a> <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'" title="Retweet" ><img src="'.plugins_url('images/retweet.png', __FILE__).'" width="16" height="16" alt="Retweet" /></a> <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'" title="Favourite"><img src="'.plugins_url('images/favorite.png', __FILE__).'" alt="Favorite" width="16" height="16" /></a></p>';
|
468 |
*/
|
469 |
if(!empty($meta)) $meta .= ' · ';
|
470 |
+
$meta .= '<a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'">'.__('reply','rotatingtweets').'</a> · <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'">'.__('retweet','rotatingtweets').'</a> · <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'">'.__('favorite','rotatingtweets').'</a>';
|
471 |
endif;
|
472 |
/* Experiment with Prev / Next buttons
|
473 |
if($args['show_meta_prev_next']):
|
479 |
$result .= "\n\t\t<p class='rtw_meta'>".ucfirst($meta)."</p>";
|
480 |
endif;
|
481 |
else:
|
482 |
+
$result .= "\n\t\t<p class='rtw_main'>".__("Problem retrieving data from Twitter.",'rotatingtweets')."</p></div>";
|
483 |
$result .= "<!-- rotatingtweets plugin was unable to parse this data: ".print_r($json,TRUE)." -->";
|
484 |
+
$result .= "\n\t\t<div class = 'rotatingtweet' style='display:none'><p class='rtw_main'>".__("Please check the comments on this page's HTML to understand more.",'rotatingtweets')."</p>";
|
485 |
endif;
|
486 |
$result .= "\n\t</div>";
|
487 |
endif;
|
499 |
*/
|
500 |
if($args['show_follow'] && !empty($user->screen_name)):
|
501 |
unset($shortenvariables);
|
502 |
+
$rtlocale = strtolower(get_locale());
|
503 |
+
$rtlocaleMain = explode('_',$rtlocale);
|
504 |
+
$possibleOptions = array ('id','da','ru','msa','ja','no','ur','nl','fa','hi','de','ko','sv','tr','fr','it','en','fil','pt','he','zh-tw','fi','pl','ar','es','hu','th','zh-cn'); // Source https://api.twitter.com/1/help/languages.xml
|
505 |
+
if(in_array($rtlocale,$possibleOptions)):
|
506 |
+
$twitterlocale = $rtlocale;
|
507 |
+
elseif(in_array($rtlocaleMain[0],$possibleOptions)):
|
508 |
+
$twitterlocale = $rtlocaleMain[0];
|
509 |
+
else:
|
510 |
+
# Default
|
511 |
+
$twitterlocale = 'en';
|
512 |
+
endif;
|
513 |
if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';
|
514 |
if($args['no_show_screen_name']) $shortenvariables .= ' data-show-screen-name="false"';
|
515 |
+
$followUserText = sprintf(__('Follow @%s','rotatingtweets'),$user->screen_name);
|
516 |
+
$result .= "\n<div class='follow-button'><a href='http://twitter.com/".$user->screen_name."' class='twitter-follow-button'{$shortenvariables} title='".$followUserText."' data-lang='{$twitterlocale}'>".$followUserText."</a></div>";
|
517 |
endif;
|
518 |
wp_enqueue_script( 'jquery' );
|
519 |
wp_enqueue_script( 'jquery-cycle', plugins_url('js/jquery.cycle.all.js', __FILE__),array('jquery'),FALSE,FALSE );
|
522 |
if($print) echo $result;
|
523 |
return($result);
|
524 |
}
|
525 |
+
# Load the language files - needs to come after the widget_init line - and possibly the shortcode one too!
|
526 |
+
function rotatingtweets_init() {
|
527 |
+
load_plugin_textdomain( 'rotatingtweets', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
528 |
+
}
|
529 |
+
add_action('plugins_loaded', 'rotatingtweets_init');
|
530 |
?>
|