Plugin Directory

Changeset 446558


Ignore:
Timestamp:
10/03/2011 05:34:48 AM (14 years ago)
Author:
unijimpe
Message:

update to 2.4

Location:
wp-swfobject/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-swfobject/trunk/2.0/swfobject.js

    r74228 r446558  
    1 /*  SWFObject v2.0 <http://code.google.com/p/swfobject/>
    2     Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
    3     This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
     1/*  SWFObject v2.2 <http://code.google.com/p/swfobject/>
     2    is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
    43*/
    5 var swfobject=function(){var Z="undefined",P="object",B="Shockwave Flash",h="ShockwaveFlash.ShockwaveFlash",W="application/x-shockwave-flash",K="SWFObjectExprInst",G=window,g=document,N=navigator,f=[],H=[],Q=null,L=null,T=null,S=false,C=false;var a=function(){var l=typeof g.getElementById!=Z&&typeof g.getElementsByTagName!=Z&&typeof g.createElement!=Z&&typeof g.appendChild!=Z&&typeof g.replaceChild!=Z&&typeof g.removeChild!=Z&&typeof g.cloneNode!=Z,t=[0,0,0],n=null;if(typeof N.plugins!=Z&&typeof N.plugins[B]==P){n=N.plugins[B].description;if(n){n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");t[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);t[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);t[2]=/r/.test(n)?parseInt(n.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof G.ActiveXObject!=Z){var o=null,s=false;try{o=new ActiveXObject(h+".7")}catch(k){try{o=new ActiveXObject(h+".6");t=[6,0,21];o.AllowScriptAccess="always"}catch(k){if(t[0]==6){s=true}}if(!s){try{o=new ActiveXObject(h)}catch(k){}}}if(!s&&o){try{n=o.GetVariable("$version");if(n){n=n.split(" ")[1].split(",");t=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(k){}}}}var v=N.userAgent.toLowerCase(),j=N.platform.toLowerCase(),r=/webkit/.test(v)?parseFloat(v.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=false,q=j?/win/.test(j):/win/.test(v),m=j?/mac/.test(j):/mac/.test(v);/*@cc_on i=true;@if(@_win32)q=true;@elif(@_mac)m=true;@end@*/return{w3cdom:l,pv:t,webkit:r,ie:i,win:q,mac:m}}();var e=function(){if(!a.w3cdom){return }J(I);if(a.ie&&a.win){try{g.write("<script id=__ie_ondomload defer=true src=//:><\/script>");var i=c("__ie_ondomload");if(i){i.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);V()}}}}catch(j){}}if(a.webkit&&typeof g.readyState!=Z){Q=setInterval(function(){if(/loaded|complete/.test(g.readyState)){V()}},10)}if(typeof g.addEventListener!=Z){g.addEventListener("DOMContentLoaded",V,null)}M(V)}();function V(){if(S){return }if(a.ie&&a.win){var m=Y("span");try{var l=g.getElementsByTagName("body")[0].appendChild(m);l.parentNode.removeChild(l)}catch(n){return }}S=true;if(Q){clearInterval(Q);Q=null}var j=f.length;for(var k=0;k<j;k++){f[k]()}}function J(i){if(S){i()}else{f[f.length]=i}}function M(j){if(typeof G.addEventListener!=Z){G.addEventListener("load",j,false)}else{if(typeof g.addEventListener!=Z){g.addEventListener("load",j,false)}else{if(typeof G.attachEvent!=Z){G.attachEvent("onload",j)}else{if(typeof G.onload=="function"){var i=G.onload;G.onload=function(){i();j()}}else{G.onload=j}}}}}function I(){var l=H.length;for(var j=0;j<l;j++){var m=H[j].id;if(a.pv[0]>0){var k=c(m);if(k){H[j].width=k.getAttribute("width")?k.getAttribute("width"):"0";H[j].height=k.getAttribute("height")?k.getAttribute("height"):"0";if(O(H[j].swfVersion)){if(a.webkit&&a.webkit<312){U(k)}X(m,true)}else{if(H[j].expressInstall&&!C&&O("6.0.65")&&(a.win||a.mac)){D(H[j])}else{d(k)}}}}else{X(m,true)}}}function U(m){var k=m.getElementsByTagName(P)[0];if(k){var p=Y("embed"),r=k.attributes;if(r){var o=r.length;for(var n=0;n<o;n++){if(r[n].nodeName.toLowerCase()=="data"){p.setAttribute("src",r[n].nodeValue)}else{p.setAttribute(r[n].nodeName,r[n].nodeValue)}}}var q=k.childNodes;if(q){var s=q.length;for(var l=0;l<s;l++){if(q[l].nodeType==1&&q[l].nodeName.toLowerCase()=="param"){p.setAttribute(q[l].getAttribute("name"),q[l].getAttribute("value"))}}}m.parentNode.replaceChild(p,m)}}function F(i){if(a.ie&&a.win&&O("8.0.0")){G.attachEvent("onunload",function(){var k=c(i);if(k){for(var j in k){if(typeof k[j]=="function"){k[j]=function(){}}}k.parentNode.removeChild(k)}})}}function D(j){C=true;var o=c(j.id);if(o){if(j.altContentId){var l=c(j.altContentId);if(l){L=l;T=j.altContentId}}else{L=b(o)}if(!(/%$/.test(j.width))&&parseInt(j.width,10)<310){j.width="310"}if(!(/%$/.test(j.height))&&parseInt(j.height,10)<137){j.height="137"}g.title=g.title.slice(0,47)+" - Flash Player Installation";var n=a.ie&&a.win?"ActiveX":"PlugIn",k=g.title,m="MMredirectURL="+G.location+"&MMplayerType="+n+"&MMdoctitle="+k,p=j.id;if(a.ie&&a.win&&o.readyState!=4){var i=Y("div");p+="SWFObjectNew";i.setAttribute("id",p);o.parentNode.insertBefore(i,o);o.style.display="none";G.attachEvent("onload",function(){o.parentNode.removeChild(o)})}R({data:j.expressInstall,id:K,width:j.width,height:j.height},{flashvars:m},p)}}function d(j){if(a.ie&&a.win&&j.readyState!=4){var i=Y("div");j.parentNode.insertBefore(i,j);i.parentNode.replaceChild(b(j),i);j.style.display="none";G.attachEvent("onload",function(){j.parentNode.removeChild(j)})}else{j.parentNode.replaceChild(b(j),j)}}function b(n){var m=Y("div");if(a.win&&a.ie){m.innerHTML=n.innerHTML}else{var k=n.getElementsByTagName(P)[0];if(k){var o=k.childNodes;if(o){var j=o.length;for(var l=0;l<j;l++){if(!(o[l].nodeType==1&&o[l].nodeName.toLowerCase()=="param")&&!(o[l].nodeType==8)){m.appendChild(o[l].cloneNode(true))}}}}}return m}function R(AE,AC,q){var p,t=c(q);if(typeof AE.id==Z){AE.id=q}if(a.ie&&a.win){var AD="";for(var z in AE){if(AE[z]!=Object.prototype[z]){if(z=="data"){AC.movie=AE[z]}else{if(z.toLowerCase()=="styleclass"){AD+=' class="'+AE[z]+'"'}else{if(z!="classid"){AD+=" "+z+'="'+AE[z]+'"'}}}}}var AB="";for(var y in AC){if(AC[y]!=Object.prototype[y]){AB+='<param name="'+y+'" value="'+AC[y]+'" />'}}t.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AD+">"+AB+"</object>";F(AE.id);p=c(AE.id)}else{if(a.webkit&&a.webkit<312){var AA=Y("embed");AA.setAttribute("type",W);for(var x in AE){if(AE[x]!=Object.prototype[x]){if(x=="data"){AA.setAttribute("src",AE[x])}else{if(x.toLowerCase()=="styleclass"){AA.setAttribute("class",AE[x])}else{if(x!="classid"){AA.setAttribute(x,AE[x])}}}}}for(var w in AC){if(AC[w]!=Object.prototype[w]){if(w!="movie"){AA.setAttribute(w,AC[w])}}}t.parentNode.replaceChild(AA,t);p=AA}else{var s=Y(P);s.setAttribute("type",W);for(var v in AE){if(AE[v]!=Object.prototype[v]){if(v.toLowerCase()=="styleclass"){s.setAttribute("class",AE[v])}else{if(v!="classid"){s.setAttribute(v,AE[v])}}}}for(var u in AC){if(AC[u]!=Object.prototype[u]&&u!="movie"){E(s,u,AC[u])}}t.parentNode.replaceChild(s,t);p=s}}return p}function E(k,i,j){var l=Y("param");l.setAttribute("name",i);l.setAttribute("value",j);k.appendChild(l)}function c(i){return g.getElementById(i)}function Y(i){return g.createElement(i)}function O(k){var j=a.pv,i=k.split(".");i[0]=parseInt(i[0],10);i[1]=parseInt(i[1],10);i[2]=parseInt(i[2],10);return(j[0]>i[0]||(j[0]==i[0]&&j[1]>i[1])||(j[0]==i[0]&&j[1]==i[1]&&j[2]>=i[2]))?true:false}function A(m,j){if(a.ie&&a.mac){return }var l=g.getElementsByTagName("head")[0],k=Y("style");k.setAttribute("type","text/css");k.setAttribute("media","screen");if(!(a.ie&&a.win)&&typeof g.createTextNode!=Z){k.appendChild(g.createTextNode(m+" {"+j+"}"))}l.appendChild(k);if(a.ie&&a.win&&typeof g.styleSheets!=Z&&g.styleSheets.length>0){var i=g.styleSheets[g.styleSheets.length-1];if(typeof i.addRule==P){i.addRule(m,j)}}}function X(k,i){var j=i?"visible":"hidden";if(S){c(k).style.visibility=j}else{A("#"+k,"visibility:"+j)}}return{registerObject:function(l,i,k){if(!a.w3cdom||!l||!i){return }var j={};j.id=l;j.swfVersion=i;j.expressInstall=k?k:false;H[H.length]=j;X(l,false)},getObjectById:function(l){var i=null;if(a.w3cdom&&S){var j=c(l);if(j){var k=j.getElementsByTagName(P)[0];if(!k||(k&&typeof j.SetVariable!=Z)){i=j}else{if(typeof k.SetVariable!=Z){i=k}}}}return i},embedSWF:function(n,u,r,t,j,m,k,p,s){if(!a.w3cdom||!n||!u||!r||!t||!j){return }r+="";t+="";if(O(j)){X(u,false);var q=(typeof s==P)?s:{};q.data=n;q.width=r;q.height=t;var o=(typeof p==P)?p:{};if(typeof k==P){for(var l in k){if(k[l]!=Object.prototype[l]){if(typeof o.flashvars!=Z){o.flashvars+="&"+l+"="+k[l]}else{o.flashvars=l+"="+k[l]}}}}J(function(){R(q,o,u);if(q.id==u){X(u,true)}})}else{if(m&&!C&&O("6.0.65")&&(a.win||a.mac)){X(u,false);J(function(){var i={};i.id=i.altContentId=u;i.width=r;i.height=t;i.expressInstall=m;D(i)})}}},getFlashPlayerVersion:function(){return{major:a.pv[0],minor:a.pv[1],release:a.pv[2]}},hasFlashPlayerVersion:O,createSWF:function(k,j,i){if(a.w3cdom&&S){return R(k,j,i)}else{return undefined}},createCSS:function(j,i){if(a.w3cdom){A(j,i)}},addDomLoadEvent:J,addLoadEvent:M,getQueryParamValue:function(m){var l=g.location.search||g.location.hash;if(m==null){return l}if(l){var k=l.substring(1).split("&");for(var j=0;j<k.length;j++){if(k[j].substring(0,k[j].indexOf("="))==m){return k[j].substring((k[j].indexOf("=")+1))}}}return""},expressInstallCallback:function(){if(C&&L){var i=c(K);if(i){i.parentNode.replaceChild(L,i);if(T){X(T,true);if(a.ie&&a.win){L.style.display="block"}}L=null;T=null;C=false}}}}}();
     4var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
  • wp-swfobject/trunk/readme.txt

    r125964 r446558  
    44Tags: flash, swf, flv, swfobject, video, youtube, media, player, post
    55Requires at least: 1.5
    6 Tested up to: 2.8
    7 Stable tag: 2.3
     6Tested up to: 3.2.1
     7Stable tag: 2.4
    88
    99Insert Flash Movies into WordPress.
     
    1111== Description ==
    1212
    13 This plugin enable insert flash movies into WordPress using **SWFObject** library for prevening EOLA'S.
     13This plugin enable insert flash movies into WordPress using **SWFObject** with simple quicktag <code>[swf][/swf]</code> .
    1414
    1515**Features**
    1616
    17 *   Easy install
    18 *   Insert Flash movie with simple code
     17*   Easy install and easy use on content and widgets
     18*   Insert Flash movie with simple shortcode
    1919*   Panel for easy configuration
    20 *   Config flash player version required
    21 *   Config message for iPhone Browser
     20*   Allow config flash player version required
     21*   Allow config message for iPhone Browser
    2222*   Support FlashVars param
    2323*   Support FullScreen param
    24 *   Generate `<object>` code for RSS compatibility 
     24*   Generate `<object>` code for RSS and iPhone compatibility   
    2525*   Select version of SWFObject (1.5 or 2.0)
    26 *   Allow use SWFObject from Google AJAX Libraries API
     26*   Allow insert SWFObject from Google AJAX Libraries API
    2727*   Detect iPhone Browser to show message o link for Youtube Videos
    2828*   Easy integration with Youtube videos
    2929*   Support for show Loading image
    3030
    31 For insert single swf into post use:
     31To insert swf into post content or text widget use:
    3232
    33 `[SWF]movie.swf, width, heigth[/SWF]`
     33`[swf]movie.swf, width, heigth[/swf]`
    3434
    35 For insert swf with flashvars use:
     35To insert swf with flashvars use:
    3636
    37 `[SWF]movie.swf, width, heigth, var1=val1&var2=val2[/SWF]`
     37`[swf]movie.swf, width, heigth, var1=val1&var2=val2[/swf]`
    3838
    39 For insert swf into code of blog use:
     39To insert swf on template, use the php code:
    4040
    4141`<?php wp_swfobject_echo("movie.swf", "width", "heigth"); ?>`
    4242
     43To insert swf with flashvars on template, use the php code:
     44
     45`<?php wp_swfobject_echo("movie.swf", "width", "heigth", "var1=val1&var2=val2"); ?>`
    4346
    4447For more information visit [plugin website](http://blog.unijimpe.net/wp-swfobject/ "plugin website")
     
    6164
    6265
     66== Changelog ==
     67
     68= 2.4 =
     69* Add property allowScriptAccess in config panel
     70* Updated library to SWFObjectc 2.2
     71* Add Support shortcode in text widgets
     72* Update docs
     73
     74= 2.3 =
     75* Fixed embed method
     76* Allow use SWFObject from Google Ajax Library
     77
     78= 2.2 =
     79* Fixed wmode param
     80* New format XHTML to embed code
     81* New param to allow fullscreen on Youtube videos
     82* Detect iPhone and show text warning
     83* Show object code to youtube videos on iPhone
     84
     85= 1.0 =
     86* First version
     87
  • wp-swfobject/trunk/wp-swfobject.php

    r125962 r446558  
    44Plugin URI: http://blog.unijimpe.net/wp-swfobject/
    55Description: Allow insert Flash Movies into WordPress blog using SWFObject library. For use this plugin: [SWF]pathtofile, width, height[/SWF].
    6 Version: 2.3
     6Version: 2.4
    77Author: Jim Penaloza Calixto
    88Author URI: http://blog.unijimpe.net
     
    1010
    1111// Define Global params
    12 $wpswf_version  = "2.3";                                        // version of plugin
     12$wpswf_version  = "2.4";                                        // version of plugin
    1313$wpswf_random   = substr(md5(uniqid(rand(), true)),0,4);        // create unique id for divs
    1414$wpswf_number   = 0;                                            // number of swf into page
     
    1919                        "swf_quality"       =>  "high",
    2020                        "swf_fullscreen"    =>  "false",
     21                        "swf_scriptaccess"  =>  "always",
    2122                        "swf_align"         =>  "none",
    2223                        "swf_message"       =>  "This movie requires Flash Player 9",
     
    3031                        "v15int"            =>  WP_PLUGIN_URL."/wp-swfobject/1.5/swfobject.js",
    3132                        "v20int"            =>  WP_PLUGIN_URL."/wp-swfobject/2.0/swfobject.js",
    32                         "v20ext"            =>  "http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"
     33                        "v20ext"            =>  "http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"
    3334                        );
    3435
     
    4041add_option("swf_quality",       $wpswf_params["swf_quality"],       'Default quality for Flash Movie.');
    4142add_option("swf_fullscreen",    $wpswf_params["swf_fullscreen"],    'If Allow Fullscreen mode for Flash Movie.');
     43add_option("swf_scriptaccess",  $wpswf_params["swf_scriptaccess"],  'Controls the ability to perform outbound URL access from SWF file');
    4244add_option("swf_align",         $wpswf_params["swf_align"],         'Align for Flash Movie.');
    4345add_option("swf_message",       $wpswf_params["swf_message"],       'Message for missing player.');
     
    154156            $writeswf.= "\tvswf.addParam(\"menu\", \"".$wpswf_config['swf_menu']."\");\n";
    155157            $writeswf.= "\tvswf.addParam(\"quality\", \"".$wpswf_config['swf_quality']."\");\n";
     158            $writeswf.= "\tvswf.addParam(\"allowScriptAccess\", \"".$wpswf_config['swf_scriptaccess']."\");\n";
    156159            if ($wpswf_config['swf_fullscreen'] == "true") {
    157160                $writeswf.= "\tvswf.addParam(\"allowFullScreen\", \"".$wpswf_config['swf_fullscreen']."\");\n";
     
    175178            $writeswf.= "<param name=\"menu\" value=\"".$wpswf_config['swf_menu']."\"></param>\n";
    176179            $writeswf.= "<param name=\"bgcolor\" value=\"".$wpswf_config['swf_bgcolor']."\"></param>\n";
     180            $writeswf.= "<param name=\"allowScriptAccess\" value=\"".$wpswf_config['swf_scriptaccess']."\"></param>\n";
    177181            if ($wpswf_config['swf_fullscreen'] == "true") {
    178182                $writeswf.= "<param name=\"allowFullScreen\" value=\"true\"></param>\n";
     
    204208            $wpswf_params.= "menu: \"".$wpswf_config['swf_menu']."\", ";
    205209            $wpswf_params.= "quality: \"".$wpswf_config['swf_quality']."\", ";
    206             $wpswf_params.= "bgcolor: \"".$wpswf_config['swf_bgcolor']."\"";
     210            $wpswf_params.= "bgcolor: \"".$wpswf_config['swf_bgcolor']."\", ";
     211            $wpswf_params.= "allowScriptAccess: \"".$wpswf_config['swf_scriptaccess']."\"";
    207212            if ($wpswf_config['swf_fullscreen'] == "true") {
    208213                $wpswf_params.= ", allowFullScreen: \"".$wpswf_config['swf_fullscreen']."\"";
     
    248253                <table class="form-table">
    249254                    <tr>
    250                         <th scope="row" valign="top">
     255                        <th scope="row">
    251256                            <label for="swf_file">SWFObject Version</label>
    252257                        </th>
     
    258263                                <option value="vxhtml" <?php if ($wpswf_config["swf_file"] == "vxhtml") { echo "selected=\"selected\""; } ?>>XHTML (&lt;object&gt;)</option>
    259264                            </select>
    260                             <span class="setting-description">Select version of SWFObject.</span>
    261                         </td>
    262                     </tr>
    263                     <tr>
    264                         <th scope="row" valign="top">
     265                            <span class="description">Select version of SWFObject.</span>
     266                        </td>
     267                    </tr>
     268                    <tr>
     269                        <th scope="row">
    265270                            <label for="swf_version">Flash Player Version</label>
    266271                        </th>
    267272                        <td>
    268                             <input type="text" size="16" maxlength="12" name="swf_version" id="swf_version" value="<?php echo $wpswf_config["swf_version"]; ?>" />
    269                             <span class="setting-description">Enter number of flash version required for flash player.</span>
    270                         </td>
    271                     </tr>
    272                     <tr>
    273                         <th scope="row" valign="top">
     273                            <input type="text" maxlength="12" name="swf_version" id="swf_version" value="<?php echo $wpswf_config["swf_version"]; ?>" class="regular-text" />
     274                            <span class="description">Enter number of flash version required for flash player.</span>
     275                        </td>
     276                    </tr>
     277                    <tr>
     278                        <th scope="row">
    274279                            <label for="swf_bgcolor">Background Color</label>
    275280                        </th>
    276281                        <td>
    277                             <input type="text" size="16" maxlength="7" name="swf_bgcolor" id="swf_bgcolor" value="<?php echo $wpswf_config["swf_bgcolor"]; ?>" />
    278                             <span class="setting-description">Enter HEX number for background color for flash movie.</span>
    279                         </td>
    280                     </tr>
    281                     <tr>
    282                         <th scope="row" valign="top">
     282                            <input type="text" maxlength="7" name="swf_bgcolor" id="swf_bgcolor" value="<?php echo $wpswf_config["swf_bgcolor"]; ?>" class="regular-text" />
     283                            <span class="description">Enter HEX number for background color for flash movie.</span>
     284                        </td>
     285                    </tr>
     286                    <tr>
     287                        <th scope="row">
    283288                            <label for="swf_wmode">Window Mode</label>
    284289                        </th>
     
    289294                                <option value="transparent" <?php if ($wpswf_config["swf_wmode"] == "transparent") { echo "selected=\"selected\""; } ?>>Transparent</option>
    290295                            </select>
    291                             <span class="setting-description">Select wmode for movie, by defaul is <strong>window</strong>.</span>
    292                         </td>
    293                     </tr>
    294                     <tr>
    295                         <th scope="row" valign="top">
     296                            <span class="description">Select wmode for movie, by defaul is <strong>window</strong>.</span>
     297                        </td>
     298                    </tr>
     299                    <tr>
     300                        <th scope="row">
    296301                            <label for="swf_menu">Show Menu</label>
    297302                        </th>
     
    301306                                <option value="false" <?php if ($wpswf_config["swf_menu"] == "false") { echo "selected=\"selected\""; } ?>>False</option>
    302307                            </select>
    303                             <span class="setting-description">Select option for show/hide menu.</span>
    304                         </td>
    305                     </tr>
    306                     <tr>
    307                         <th scope="row" valign="top">
     308                            <span class="description">Select option for show/hide menu.</span>
     309                        </td>
     310                    </tr>
     311                    <tr>
     312                        <th scope="row">
    308313                            <label for="swf_quality">Quality Movie</label>
    309314                        </th>
     
    317322                                <option value="best" <?php if ($wpswf_config["swf_quality"] == "best") { echo "selected=\"selected\""; } ?>>Best</option>
    318323                            </select>
    319                             <span class="setting-description">Select quality for flash movie, by default is <strong>hight</strong>.</span>
    320                         </td>
    321                     </tr>
    322                     <tr>
    323                         <th scope="row" valign="top">
     324                            <span class="description">Select quality for flash movie, by default is <strong>hight</strong>.</span>
     325                        </td>
     326                    </tr>
     327                    <tr>
     328                        <th scope="row">
    324329                            <label for="swf_fullscreen">Allow Fullscreen</label>
    325330                        </th>
     
    329334                                <option value="false" <?php if ($wpswf_config["swf_fullscreen"] == "false") { echo "selected=\"selected\""; } ?>>False</option>
    330335                            </select>
    331                             <span class="setting-description">Allow Fullscreen (You must have version >= 9,0,28,0 of Flash Player).</span>
    332                         </td>
    333                     </tr>
    334                     <tr>
    335                         <th scope="row" valign="top">
     336                            <span class="description">Allow Fullscreen (You must have version >= 9,0,28,0 of Flash Player).</span>
     337                        </td>
     338                    </tr>
     339                    <tr>
     340                        <th scope="row">
     341                            <label for="swf_scriptaccess">Allow Script Access</label>
     342                        </th>
     343                        <td>
     344                            <select name="swf_scriptaccess" id="swf_scriptaccess">
     345                                <option value="always" <?php if ($wpswf_config["swf_scriptaccess"] == "always") { echo "selected=\"selected\""; } ?>>Always</option>
     346                                <option value="sameDomain" <?php if ($wpswf_config["swf_scriptaccess"] == "sameDomain") { echo "selected=\"selected\""; } ?>>Same Domain</option>
     347                                <option value="never" <?php if ($wpswf_config["swf_scriptaccess"] == "never") { echo "selected=\"selected\""; } ?>>Never</option>
     348                            </select>
     349                            <span class="description">Controls the ability to perform outbound URL access from SWF file.</span>
     350                        </td>
     351                    </tr>
     352                    <tr>
     353                        <th scope="row">
    336354                            <label for="swf_align">Align</label>
    337355                        </th>
     
    347365                    </tr>
    348366                    <tr>
    349                         <th scope="row" valign="top">
     367                        <th scope="row">
    350368                            <label for="swf_message">Message Require Flash</label>
    351369                        </th>
    352370                        <td>
    353                             <input type="text" size="40" name="swf_message" id="swf_message" value="<?php echo $wpswf_config["swf_message"]; ?>" />
    354                             <span class="setting-description">Enter message for warning missing player.</span>
    355                         </td>
    356                     </tr>
    357                     <tr>
    358                         <th scope="row" valign="top">
     371                            <input type="text" name="swf_message" id="swf_message" value="<?php echo $wpswf_config["swf_message"]; ?>" class="regular-text" />
     372                            <span class="description">Enter message for warning missing player.</span>
     373                        </td>
     374                    </tr>
     375                    <tr>
     376                        <th scope="row">
    359377                            <label for="swf_message">Message iPhone Browser</label>
    360378                        </th>
    361379                        <td>
    362                             <input type="text" size="40" name="swf_msgiphone" id="swf_msgiphone" value="<?php echo $wpswf_config["swf_msgiphone"]; ?>" />
    363                             <span class="setting-description">Enter message for iphone Browser.</span>
    364                         </td>
    365                     </tr>
    366                     <tr>
    367                         <th scope="row" valign="top">
     380                            <input type="text" name="swf_msgiphone" id="swf_msgiphone" value="<?php echo $wpswf_config["swf_msgiphone"]; ?>" class="regular-text" />
     381                            <span class="description">Enter message for iphone Browser.</span>
     382                        </td>
     383                    </tr>
     384                    <tr>
     385                        <th scope="row">
    368386                            <label for="swf_align">Show Info (Youtube)</label>
    369387                        </th>
     
    377395                    </tr>
    378396                    <tr>
    379                         <th scope="row" valign="top">
     397                        <th scope="row">
    380398                            <label for="swf_annotations">Show Annotations (Youtube)</label>
    381399                        </th>
     
    385403                                <option value="false" <?php if ($wpswf_config["swf_annotations"] == "false") { echo "selected=\"selected\""; } ?>>False</option>
    386404                            </select>
    387                             <span class="setting-description">Display annotations in Youtube videos.</span>
     405                            <span class="description">Display annotations in Youtube videos.</span>
    388406                        </td>
    389407                    </tr>
    390408                    <tr>
    391                         <th scope="row" valign="top">
     409                        <th scope="row">
    392410                            <label for="swf_loading">Show Loading</label>
    393411                        </th>
     
    397415                                <option value="false" <?php if ($wpswf_config["swf_loading"] == "false") { echo "selected=\"selected\""; } ?>>False</option>
    398416                            </select>
    399                             <span class="setting-description">Display Loading for SWFs.</span>
     417                            <span class="description">Display Loading for SWFs.</span>
    400418                        </td>
    401419                    </tr>
     
    406424                    <table>
    407425                    <tr>
    408                         <th width="30%" valign="top" style="padding-top: 10px; text-align:left;" colspan="2">
     426                        <th width="30%" style="padding-top: 10px; text-align:left;" colspan="2">
    409427                            More Information and Support
    410428                        </th>
     
    440458
    441459add_filter('the_content', 'wpswfParse');
     460add_filter('widget_text', 'wpswfParse');
    442461add_action('wp_head', 'wpswfAddheader');
    443462add_action('admin_menu', 'wpswfAddMenu');
Note: See TracChangeset for help on using the changeset viewer.