Version Description
Download this release
Release Info
Developer | alexrabe |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 0.99 |
Comparing to | |
See all releases |
Code changes from version 0.97 to 0.99
- admin/addgallery.php +0 -1
- admin/album.php +1 -0
- admin/functions.php +7 -9
- admin/js/swfobject.js +5 -138
- admin/myimport.php +89 -0
- admin/roles.php +0 -1
- admin/setup.php +0 -1
- admin/uploadtab.php +1 -1
- admin/wp25/about.php +1 -0
- admin/wp25/addgallery.php +0 -1
- admin/wp25/admin.php +1 -0
- admin/wp25/album.php +1 -0
- admin/wp25/functions.php +7 -9
- admin/wp25/media-upload.php +2 -2
- admin/wp25/roles.php +0 -1
- admin/wp25/settings.php +1 -0
- admin/wp25/setup.php +0 -1
- admin/wp25/wpmu.php +1 -2
- admin/wpmu.php +1 -1
- changelog.txt +9 -0
- lib/nggallery.lib.php +1 -1
- lib/swfobject.php +195 -0
- nggallery.php +4 -4
- nggfunctions.php +42 -39
- nggwidget.php +33 -28
- readme.txt +2 -2
- tinymce/window.php +1 -1
- tinymce3/window.php +1 -1
admin/addgallery.php
CHANGED
@@ -318,5 +318,4 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
318 |
<?php
|
319 |
}
|
320 |
|
321 |
-
|
322 |
?>
|
318 |
<?php
|
319 |
}
|
320 |
|
|
|
321 |
?>
|
admin/album.php
CHANGED
@@ -284,4 +284,5 @@ function getallusedgalleries() {
|
|
284 |
}
|
285 |
return $used;
|
286 |
}
|
|
|
287 |
?>
|
284 |
}
|
285 |
return $used;
|
286 |
}
|
287 |
+
|
288 |
?>
|
admin/functions.php
CHANGED
@@ -319,8 +319,8 @@ class nggAdmin{
|
|
319 |
} else {
|
320 |
$aspect = (100 * $curheight) / $curwidth;
|
321 |
}
|
322 |
-
$width =
|
323 |
-
$height =
|
324 |
$thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
|
325 |
$thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
|
326 |
}
|
@@ -494,13 +494,11 @@ class nggAdmin{
|
|
494 |
$filename = $_FILES['zipfile']['name'];
|
495 |
|
496 |
// check if file is a zip file
|
497 |
-
if (!eregi('zip', $_FILES['zipfile']['type']))
|
498 |
-
//
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
return;
|
503 |
-
}
|
504 |
|
505 |
// get foldername if selected
|
506 |
$foldername = $_POST['zipgalselect'];
|
319 |
} else {
|
320 |
$aspect = (100 * $curheight) / $curwidth;
|
321 |
}
|
322 |
+
$width = round(($width * $aspect) / 100);
|
323 |
+
$height = round(($height * $aspect) / 100);
|
324 |
$thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
|
325 |
$thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
|
326 |
}
|
494 |
$filename = $_FILES['zipfile']['name'];
|
495 |
|
496 |
// check if file is a zip file
|
497 |
+
if (!eregi('zip|download|octet-stream', $_FILES['zipfile']['type'])) {
|
498 |
+
@unlink($temp_zipfile); // del temp file
|
499 |
+
nggallery::show_error(__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type']);
|
500 |
+
return;
|
501 |
+
}
|
|
|
|
|
502 |
|
503 |
// get foldername if selected
|
504 |
$foldername = $_POST['zipgalselect'];
|
admin/js/swfobject.js
CHANGED
@@ -1,138 +1,5 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
*
|
7 |
-
* **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
|
8 |
-
* legal reasons.
|
9 |
-
*/
|
10 |
-
if(typeof deconcept=="undefined"){var deconcept=new Object();}
|
11 |
-
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
|
12 |
-
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
|
13 |
-
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
|
14 |
-
this.DETECT_KEY=_b?_b:"detectflash";
|
15 |
-
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
|
16 |
-
this.params=new Object();
|
17 |
-
this.variables=new Object();
|
18 |
-
this.attributes=new Array();
|
19 |
-
if(_1){this.setAttribute("swf",_1);}
|
20 |
-
if(id){this.setAttribute("id",id);}
|
21 |
-
if(w){this.setAttribute("width",w);}
|
22 |
-
if(h){this.setAttribute("height",h);}
|
23 |
-
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
|
24 |
-
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
|
25 |
-
if(c){this.addParam("bgcolor",c);}
|
26 |
-
var q=_8?_8:"high";
|
27 |
-
this.addParam("quality",q);
|
28 |
-
this.setAttribute("useExpressInstall",_7);
|
29 |
-
this.setAttribute("doExpressInstall",false);
|
30 |
-
var _d=(_9)?_9:window.location;
|
31 |
-
this.setAttribute("xiRedirectUrl",_d);
|
32 |
-
this.setAttribute("redirectUrl","");
|
33 |
-
if(_a){this.setAttribute("redirectUrl",_a);}};
|
34 |
-
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
|
35 |
-
this.attributes[_e]=_f;
|
36 |
-
},getAttribute:function(_10){
|
37 |
-
return this.attributes[_10];
|
38 |
-
},addParam:function(_11,_12){
|
39 |
-
this.params[_11]=_12;
|
40 |
-
},getParams:function(){
|
41 |
-
return this.params;
|
42 |
-
},addVariable:function(_13,_14){
|
43 |
-
this.variables[_13]=_14;
|
44 |
-
},getVariable:function(_15){
|
45 |
-
return this.variables[_15];
|
46 |
-
},getVariables:function(){
|
47 |
-
return this.variables;
|
48 |
-
},getVariablePairs:function(){
|
49 |
-
var _16=new Array();
|
50 |
-
var key;
|
51 |
-
var _18=this.getVariables();
|
52 |
-
for(key in _18){_16.push(key+"="+_18[key]);}
|
53 |
-
return _16;},getSWFHTML:function(){var _19="";
|
54 |
-
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
|
55 |
-
if(this.getAttribute("doExpressInstall")){
|
56 |
-
this.addVariable("MMplayerType","PlugIn");}
|
57 |
-
_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
|
58 |
-
_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
|
59 |
-
var _1a=this.getParams();
|
60 |
-
for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
|
61 |
-
var _1c=this.getVariablePairs().join("&");
|
62 |
-
if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
|
63 |
-
}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
|
64 |
-
_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
|
65 |
-
_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
|
66 |
-
var _1d=this.getParams();
|
67 |
-
for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
|
68 |
-
var _1f=this.getVariablePairs().join("&");
|
69 |
-
if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
|
70 |
-
return _19;
|
71 |
-
},write:function(_20){
|
72 |
-
if(this.getAttribute("useExpressInstall")){
|
73 |
-
var _21=new deconcept.PlayerVersion([6,0,65]);
|
74 |
-
if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
|
75 |
-
this.setAttribute("doExpressInstall",true);
|
76 |
-
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
|
77 |
-
document.title=document.title.slice(0,47)+" - Flash Player Installation";
|
78 |
-
this.addVariable("MMdoctitle",document.title);}}
|
79 |
-
if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
|
80 |
-
var n=(typeof _20=="string")?document.getElementById(_20):_20;
|
81 |
-
n.innerHTML=this.getSWFHTML();return true;
|
82 |
-
}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
|
83 |
-
return false;}};
|
84 |
-
deconcept.SWFObjectUtil.getPlayerVersion=function(){
|
85 |
-
var _23=new deconcept.PlayerVersion([0,0,0]);
|
86 |
-
if(navigator.plugins&&navigator.mimeTypes.length){
|
87 |
-
var x=navigator.plugins["Shockwave Flash"];
|
88 |
-
if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
|
89 |
-
}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
|
90 |
-
catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
|
91 |
-
_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
|
92 |
-
catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
|
93 |
-
catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
|
94 |
-
return _23;};
|
95 |
-
deconcept.PlayerVersion=function(_27){
|
96 |
-
this.major=_27[0]!=null?parseInt(_27[0]):0;
|
97 |
-
this.minor=_27[1]!=null?parseInt(_27[1]):0;
|
98 |
-
this.rev=_27[2]!=null?parseInt(_27[2]):0;
|
99 |
-
};
|
100 |
-
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
|
101 |
-
if(this.major<fv.major){return false;}
|
102 |
-
if(this.major>fv.major){return true;}
|
103 |
-
if(this.minor<fv.minor){return false;}
|
104 |
-
if(this.minor>fv.minor){return true;}
|
105 |
-
if(this.rev<fv.rev){
|
106 |
-
return false;
|
107 |
-
}return true;};
|
108 |
-
deconcept.util={getRequestParameter:function(_29){
|
109 |
-
var q=document.location.search||document.location.hash;
|
110 |
-
if(q){var _2b=q.substring(1).split("&");
|
111 |
-
for(var i=0;i<_2b.length;i++){
|
112 |
-
if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
|
113 |
-
return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
|
114 |
-
return "";}};
|
115 |
-
deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
|
116 |
-
var _2d=document.getElementsByTagName("OBJECT");
|
117 |
-
for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
|
118 |
-
if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
|
119 |
-
deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
|
120 |
-
__flash_savedUnloadHandler=function(){};
|
121 |
-
if(typeof window.onunload=="function"){
|
122 |
-
var _30=window.onunload;
|
123 |
-
window.onunload=function(){
|
124 |
-
deconcept.SWFObjectUtil.cleanupSWFs();_30();};
|
125 |
-
}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
|
126 |
-
if(typeof window.onbeforeunload=="function"){
|
127 |
-
var oldBeforeUnload=window.onbeforeunload;
|
128 |
-
window.onbeforeunload=function(){
|
129 |
-
deconcept.SWFObjectUtil.prepUnload();
|
130 |
-
oldBeforeUnload();};
|
131 |
-
}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
|
132 |
-
if(Array.prototype.push==null){
|
133 |
-
Array.prototype.push=function(_31){
|
134 |
-
this[this.length]=_31;
|
135 |
-
return this.length;};}
|
136 |
-
var getQueryParamValue=deconcept.util.getRequestParameter;
|
137 |
-
var FlashObject=deconcept.SWFObject;
|
138 |
-
var SWFObject=deconcept.SWFObject;
|
1 |
+
/* SWFObject v2.1 <http://code.google.com/p/swfobject/>
|
2 |
+
Copyright (c) 2007-2008 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>
|
4 |
+
*/
|
5 |
+
var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return }f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return }if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return }}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return }var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return }var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return }AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
admin/myimport.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
|
3 |
+
|
4 |
+
function nggallery_admin_import() {
|
5 |
+
|
6 |
+
global $wpdb;
|
7 |
+
|
8 |
+
$ngg_mygallery = $wpdb->prefix . 'mygallery';
|
9 |
+
$ngg_mygprelation = $wpdb->prefix . 'mygprelation';
|
10 |
+
$ngg_mypictures = $wpdb->prefix . 'mypictures';
|
11 |
+
|
12 |
+
// GET variables
|
13 |
+
$gid = trim(attribute_escape($_GET['gid']));
|
14 |
+
$mode = trim(attribute_escape($_GET['mode']));
|
15 |
+
|
16 |
+
// do the import
|
17 |
+
if ($mode == 'import') {
|
18 |
+
|
19 |
+
// load path setting
|
20 |
+
$mygoptions = get_option('mygalleryoptions');
|
21 |
+
$mygbasepath = $mygoptions['gallerybasepath'];
|
22 |
+
|
23 |
+
$gallery = $wpdb->get_row("SELECT * FROM $ngg_mygallery WHERE id = '$gid'");
|
24 |
+
if ($gallery) {
|
25 |
+
$galleryfolder = $mygbasepath . $gallery->name;
|
26 |
+
$result = $wpdb->query("INSERT INTO $wpdb->nggallery (name, path, title, galdesc, pageid) VALUES ('$gallery->name', '$galleryfolder', '$gallery->longname', '$gallery->galdescrip' ,'$gallery->pageid') ");
|
27 |
+
if ($result) {
|
28 |
+
$newgid = $wpdb->insert_id; // get new index_id
|
29 |
+
$pictures = $wpdb->get_results("SELECT * FROM $ngg_mypictures, $ngg_mygprelation WHERE $ngg_mygprelation.gid = '$gid' AND $ngg_mypictures.id = $ngg_mygprelation.pid ORDER BY $ngg_mygprelation.pid");
|
30 |
+
// import each picture
|
31 |
+
if (is_array($pictures)) {
|
32 |
+
foreach ($pictures as $picture) {
|
33 |
+
$wpdb->query("INSERT INTO $wpdb->nggpictures (galleryid, filename, description, alttext, exclude) VALUES ('$newgid', '$picture->picturepath', '$picture->description', '$picture->alttitle' ,'$picture->picexclude') ");
|
34 |
+
}
|
35 |
+
nggallery::show_message(__('Gallery ',"nggallery"). $gallery->name . __(' : Import successfull',"nggallery"));
|
36 |
+
}
|
37 |
+
} else {
|
38 |
+
nggallery::show_error(__('Database error. Could not add gallery!',"nggallery"));
|
39 |
+
}
|
40 |
+
}
|
41 |
+
}
|
42 |
+
|
43 |
+
?>
|
44 |
+
<div class="wrap">
|
45 |
+
<h2><?php _e('myGallery Import', 'nggallery') ?></h2>
|
46 |
+
<table id="the-list-x" width="100%" cellspacing="3" cellpadding="3" >
|
47 |
+
<thead>
|
48 |
+
<tr>
|
49 |
+
<th scope="col" ><?php _e('ID') ?></th>
|
50 |
+
<th scope="col" ><?php _e('Gallery name', 'nggallery') ?></th>
|
51 |
+
<th scope="col" ><?php _e('Title', 'nggallery') ?></th>
|
52 |
+
<th scope="col" ><?php _e('Description', 'nggallery') ?></th>
|
53 |
+
<th scope="col" ><?php _e('Page ID', 'nggallery') ?></th>
|
54 |
+
<th scope="col" ><?php _e('Quantity', 'nggallery') ?></th>
|
55 |
+
<th scope="col" ><?php _e('Action'); ?></th>
|
56 |
+
</tr>
|
57 |
+
</thead>
|
58 |
+
<tbody>
|
59 |
+
<?php
|
60 |
+
$gallerylist = $wpdb->get_results("SELECT * FROM $ngg_mygallery ORDER BY id ASC");
|
61 |
+
if($gallerylist) {
|
62 |
+
foreach($gallerylist as $gallery) {
|
63 |
+
$class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
|
64 |
+
$gid = $gallery->id;
|
65 |
+
$counter = $wpdb->get_var("SELECT COUNT(*) FROM $ngg_mygprelation WHERE gid = '$gid'");
|
66 |
+
?>
|
67 |
+
<tr id="gallery-<?php echo $gid ?>" <?php echo $class; ?> style="text-align:center">
|
68 |
+
<th scope="row" style="text-align: center"><?php echo $gid; ?></th>
|
69 |
+
<td><?php echo $gallery->name; ?></td>
|
70 |
+
<td><?php echo $gallery->longname; ?></td>
|
71 |
+
<td><?php echo $gallery->galdescrip; ?></td>
|
72 |
+
<td><?php echo $gallery->pageid; ?></td>
|
73 |
+
<td><?php echo $counter; ?></td>
|
74 |
+
<td><a href="admin.php?page=nggallery-import&mode=import&gid=<?php echo $gid; ?>" class="edit" onclick="javascript:check=confirm( '<?php _e("Import this gallery ?",'nggallery')?>');if(check==false) return false;"><?php _e('Import','nggallery') ?></a></td>
|
75 |
+
</tr>
|
76 |
+
<?php
|
77 |
+
}
|
78 |
+
} else {
|
79 |
+
echo '<tr><td colspan="7" align="center"><strong>'.__('No entries found','nggallery').'</strong></td></tr>';
|
80 |
+
}
|
81 |
+
?>
|
82 |
+
</tbody>
|
83 |
+
</table>
|
84 |
+
</div>
|
85 |
+
<?php
|
86 |
+
|
87 |
+
}
|
88 |
+
|
89 |
+
?>
|
admin/roles.php
CHANGED
@@ -107,5 +107,4 @@ function ngg_set_capability($lowest_role, $capability){
|
|
107 |
|
108 |
}
|
109 |
|
110 |
-
|
111 |
?>
|
107 |
|
108 |
}
|
109 |
|
|
|
110 |
?>
|
admin/setup.php
CHANGED
@@ -81,5 +81,4 @@ function ngg_remove_capability($capability){
|
|
81 |
|
82 |
}
|
83 |
|
84 |
-
|
85 |
?>
|
81 |
|
82 |
}
|
83 |
|
|
|
84 |
?>
|
admin/uploadtab.php
CHANGED
@@ -229,4 +229,4 @@ function ngg_admintab_insert_pic($picid) {
|
|
229 |
add_action('upload_files_ngg_gallery', 'ngg_action_upload_Tab');
|
230 |
add_filter('wp_upload_tabs', 'ngg_wp_upload_tabs');
|
231 |
|
232 |
-
?>
|
229 |
add_action('upload_files_ngg_gallery', 'ngg_action_upload_Tab');
|
230 |
add_filter('wp_upload_tabs', 'ngg_wp_upload_tabs');
|
231 |
|
232 |
+
?>
|
admin/wp25/about.php
CHANGED
@@ -221,4 +221,5 @@ function ngg_list_support() {
|
|
221 |
echo ", ";
|
222 |
}
|
223 |
}
|
|
|
224 |
?>
|
221 |
echo ", ";
|
222 |
}
|
223 |
}
|
224 |
+
|
225 |
?>
|
admin/wp25/addgallery.php
CHANGED
@@ -293,5 +293,4 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
293 |
<?php
|
294 |
}
|
295 |
|
296 |
-
|
297 |
?>
|
293 |
<?php
|
294 |
}
|
295 |
|
|
|
296 |
?>
|
admin/wp25/admin.php
CHANGED
@@ -164,4 +164,5 @@ add_action('admin_menu', 'add_nextgen_gallery_menu');
|
|
164 |
// if this is not WPMU, enable it !
|
165 |
return true;
|
166 |
}
|
|
|
167 |
?>
|
164 |
// if this is not WPMU, enable it !
|
165 |
return true;
|
166 |
}
|
167 |
+
|
168 |
?>
|
admin/wp25/album.php
CHANGED
@@ -283,4 +283,5 @@ function getallusedgalleries() {
|
|
283 |
}
|
284 |
return $used;
|
285 |
}
|
|
|
286 |
?>
|
283 |
}
|
284 |
return $used;
|
285 |
}
|
286 |
+
|
287 |
?>
|
admin/wp25/functions.php
CHANGED
@@ -319,8 +319,8 @@ class nggAdmin{
|
|
319 |
} else {
|
320 |
$aspect = (100 * $curheight) / $curwidth;
|
321 |
}
|
322 |
-
$width =
|
323 |
-
$height =
|
324 |
$thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
|
325 |
$thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
|
326 |
}
|
@@ -494,13 +494,11 @@ class nggAdmin{
|
|
494 |
$filename = $_FILES['zipfile']['name'];
|
495 |
|
496 |
// check if file is a zip file
|
497 |
-
if (!eregi('zip', $_FILES['zipfile']['type']))
|
498 |
-
//
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
return;
|
503 |
-
}
|
504 |
|
505 |
// get foldername if selected
|
506 |
$foldername = $_POST['zipgalselect'];
|
319 |
} else {
|
320 |
$aspect = (100 * $curheight) / $curwidth;
|
321 |
}
|
322 |
+
$width = round(($width * $aspect) / 100);
|
323 |
+
$height = round(($height * $aspect) / 100);
|
324 |
$thumb->resize($width,$height,$ngg_options['thumbResampleMode']);
|
325 |
$thumb->cropFromCenter($width,$ngg_options['thumbResampleMode']);
|
326 |
}
|
494 |
$filename = $_FILES['zipfile']['name'];
|
495 |
|
496 |
// check if file is a zip file
|
497 |
+
if (!eregi('zip|download|octet-stream', $_FILES['zipfile']['type'])) {
|
498 |
+
@unlink($temp_zipfile); // del temp file
|
499 |
+
nggallery::show_error(__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type']);
|
500 |
+
return;
|
501 |
+
}
|
|
|
|
|
502 |
|
503 |
// get foldername if selected
|
504 |
$foldername = $_POST['zipgalselect'];
|
admin/wp25/media-upload.php
CHANGED
@@ -171,7 +171,7 @@ function media_upload_nextgen_form($errors) {
|
|
171 |
<div class='filename'></div>
|
172 |
<a class='toggle describe-toggle-on' href='#'><?php attribute_escape( _e('Show',"nggallery") ); ?></a>
|
173 |
<a class='toggle describe-toggle-off' href='#'><?php attribute_escape( _e('Hide',"nggallery") );?></a>
|
174 |
-
<div class='filename new'><?php echo ( empty($picture->alttext) ) ? $picture->filename
|
175 |
<table class='slidetoggle describe startclosed'><tbody>
|
176 |
<tr>
|
177 |
<td rowspan='4'><img class='thumbnail' alt='<?php echo attribute_escape( $picture->alttext ); ?>' src='<?php echo attribute_escape( $picture->thumbPath ); ?>'/></td>
|
@@ -235,4 +235,4 @@ function media_upload_nextgen_form($errors) {
|
|
235 |
<?php
|
236 |
}
|
237 |
|
238 |
-
?>
|
171 |
<div class='filename'></div>
|
172 |
<a class='toggle describe-toggle-on' href='#'><?php attribute_escape( _e('Show',"nggallery") ); ?></a>
|
173 |
<a class='toggle describe-toggle-off' href='#'><?php attribute_escape( _e('Hide',"nggallery") );?></a>
|
174 |
+
<div class='filename new'><?php echo ( empty($picture->alttext) ) ? wp_html_excerpt($picture->filename,75): stripslashes( wp_html_excerpt($picture->alttext,75) ); ?></div>
|
175 |
<table class='slidetoggle describe startclosed'><tbody>
|
176 |
<tr>
|
177 |
<td rowspan='4'><img class='thumbnail' alt='<?php echo attribute_escape( $picture->alttext ); ?>' src='<?php echo attribute_escape( $picture->thumbPath ); ?>'/></td>
|
235 |
<?php
|
236 |
}
|
237 |
|
238 |
+
?>
|
admin/wp25/roles.php
CHANGED
@@ -105,5 +105,4 @@ function ngg_set_capability($lowest_role, $capability){
|
|
105 |
|
106 |
}
|
107 |
|
108 |
-
|
109 |
?>
|
105 |
|
106 |
}
|
107 |
|
|
|
108 |
?>
|
admin/wp25/settings.php
CHANGED
@@ -629,4 +629,5 @@ function ngg_input_checked( $checked, $current) {
|
|
629 |
if ( $checked == $current)
|
630 |
return ' checked="checked"';
|
631 |
}
|
|
|
632 |
?>
|
629 |
if ( $checked == $current)
|
630 |
return ' checked="checked"';
|
631 |
}
|
632 |
+
|
633 |
?>
|
admin/wp25/setup.php
CHANGED
@@ -80,5 +80,4 @@ function ngg_remove_capability($capability){
|
|
80 |
|
81 |
}
|
82 |
|
83 |
-
|
84 |
?>
|
80 |
|
81 |
}
|
82 |
|
|
|
83 |
?>
|
admin/wp25/wpmu.php
CHANGED
@@ -103,5 +103,4 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
103 |
<?php
|
104 |
}
|
105 |
|
106 |
-
|
107 |
-
?>
|
103 |
<?php
|
104 |
}
|
105 |
|
106 |
+
?>
|
|
admin/wpmu.php
CHANGED
@@ -104,4 +104,4 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
104 |
}
|
105 |
|
106 |
|
107 |
-
?>
|
104 |
}
|
105 |
|
106 |
|
107 |
+
?>
|
changelog.txt
CHANGED
@@ -1,6 +1,15 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
V0.97 - 10.07.2008
|
5 |
- Changed : Get new path contstant from WP2.6
|
6 |
- Changed : Minor updates for WP2.6
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
4 |
+
V0.99 - 27.09.2008
|
5 |
+
- Changed : Included swfobject version 2.1
|
6 |
+
- Bugfix : Recognize the zip better
|
7 |
+
- Bugfix : Limit the length of the title in the media-upload
|
8 |
+
- Bugfix : Round instead inval for square thumbnails
|
9 |
+
|
10 |
+
V0.98 - 15.07.2008
|
11 |
+
- Bugfix : Removed all whitespaces at EOF
|
12 |
+
|
13 |
V0.97 - 10.07.2008
|
14 |
- Changed : Get new path contstant from WP2.6
|
15 |
- Changed : Minor updates for WP2.6
|
lib/nggallery.lib.php
CHANGED
@@ -834,4 +834,4 @@ class nggRewrite {
|
|
834 |
|
835 |
} // of nggRewrite CLASS
|
836 |
|
837 |
-
?>
|
834 |
|
835 |
} // of nggRewrite CLASS
|
836 |
|
837 |
+
?>
|
lib/swfobject.php
ADDED
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !class_exists('swfobject') ) :
|
3 |
+
/**
|
4 |
+
* swfobject - PHP class for creating dynamic content of SWFObject V2.1
|
5 |
+
*
|
6 |
+
* @author Alex Rabe
|
7 |
+
* @package NextGEN Gallery
|
8 |
+
* @copyrigh V0.2
|
9 |
+
* @access public
|
10 |
+
* @example http://code.google.com/p/swfobject/
|
11 |
+
*/
|
12 |
+
class swfobject {
|
13 |
+
/**
|
14 |
+
* id of the HTML element
|
15 |
+
*
|
16 |
+
* @var string
|
17 |
+
*/
|
18 |
+
var $id;
|
19 |
+
/**
|
20 |
+
* specifies the width of your SWF
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
* @private
|
24 |
+
*/
|
25 |
+
var $width;
|
26 |
+
/**
|
27 |
+
* specifies the height of your SWF
|
28 |
+
*
|
29 |
+
* @var string
|
30 |
+
* @privat
|
31 |
+
*/
|
32 |
+
var $height;
|
33 |
+
/**
|
34 |
+
* the javascript output
|
35 |
+
*
|
36 |
+
* @var string
|
37 |
+
*/
|
38 |
+
var $js;
|
39 |
+
/**
|
40 |
+
* the replacemnt message
|
41 |
+
*
|
42 |
+
* @var string
|
43 |
+
*/
|
44 |
+
var $message = 'The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..';
|
45 |
+
/**
|
46 |
+
* the classname for the div element
|
47 |
+
*
|
48 |
+
* @var string
|
49 |
+
*/
|
50 |
+
var $classname = 'swfobject';
|
51 |
+
/**
|
52 |
+
* array of flashvars
|
53 |
+
*
|
54 |
+
* @var array
|
55 |
+
*/
|
56 |
+
var $flashvars;
|
57 |
+
/**
|
58 |
+
* array of nested object element params
|
59 |
+
*
|
60 |
+
* @var array
|
61 |
+
*/
|
62 |
+
var $params;
|
63 |
+
/**
|
64 |
+
* array of object's attributest
|
65 |
+
*
|
66 |
+
* @var array
|
67 |
+
*/
|
68 |
+
var $attributes;
|
69 |
+
|
70 |
+
/**
|
71 |
+
* swfobject::swfobject()
|
72 |
+
*
|
73 |
+
* @param string $swfUrl (required) specifies the URL of your SWF
|
74 |
+
* @param string $id (required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content
|
75 |
+
* @param string $width (required) specifies the width of your SWF
|
76 |
+
* @param string $height (required) specifies the height of your SWF
|
77 |
+
* @param string $version (required) specifies the Flash player version your SWF is published for (format is: "major.minor.release")
|
78 |
+
* @param string $expressInstallSwfurl (optional) specifies the URL of your express install SWF and activates Adobe express install
|
79 |
+
* @param array $flashvars (optional) specifies your flashvars with name:value pairs
|
80 |
+
* @param array $params (optional) specifies your nested object element params with name:value pair
|
81 |
+
* @param array $attributes (optional) specifies your object's attributes with name:value pairs
|
82 |
+
* @return string the content
|
83 |
+
*/
|
84 |
+
function swfobject( $swfUrl, $id, $width, $height, $version, $expressInstallSwfurl = false, $flashvars = false, $params = false, $attributes = false ) {
|
85 |
+
|
86 |
+
global $swfCounter;
|
87 |
+
|
88 |
+
// look for a other swfobject instance
|
89 |
+
if ( !isset($swfCounter) )
|
90 |
+
$swfCounter = 1;
|
91 |
+
|
92 |
+
$this->id = $id . '_' . $swfCounter;
|
93 |
+
$this->width = $width;
|
94 |
+
$this->height = $height;
|
95 |
+
|
96 |
+
$this->flashvars = ( is_array($flashvars) ) ? $flashvars : array();
|
97 |
+
$this->params = ( is_array($params) ) ? $params : array();
|
98 |
+
$this->attributes = ( is_array($attributes) ) ? $attributes : array();
|
99 |
+
|
100 |
+
$this->embedSWF = 'swfobject.embedSWF("'. $swfUrl .'", "'. $this->id .'", "'. $width .'", "'. $height .'", "'. $version .'", '. $expressInstallSwfurl .', this.flashvars, this.params , this.attr );' . "\n";
|
101 |
+
}
|
102 |
+
|
103 |
+
function output () {
|
104 |
+
|
105 |
+
global $swfCounter;
|
106 |
+
|
107 |
+
// count up if we have more than one swfobject
|
108 |
+
$swfCounter++;
|
109 |
+
|
110 |
+
$out = "\n" . '<div class="'. $this->classname .'" id="'. $this->id .'" style="width:'.$this->width .'px; height:'. $this->height .'px;">';
|
111 |
+
$out .= "\n" . $this->message;
|
112 |
+
$out .= "\n" . '</div>';
|
113 |
+
|
114 |
+
return $out;
|
115 |
+
}
|
116 |
+
|
117 |
+
function javascript () {
|
118 |
+
|
119 |
+
//Build javascript
|
120 |
+
$this->js = "\nvar " . $this->id . " = {\n";
|
121 |
+
$this->js .= $this->add_js_parameters('params', $this->params) . ",\n";
|
122 |
+
$this->js .= $this->add_js_parameters('flashvars', $this->flashvars) . ",\n";
|
123 |
+
$this->js .= $this->add_js_parameters('attr', $this->attributes) . ",\n";
|
124 |
+
$this->js .= "\tstart : function() {" . "\n\t\t";
|
125 |
+
$this->js .= $this->embedSWF;
|
126 |
+
$this->js .= "\t}\n}\n";
|
127 |
+
$this->js .= $this->id . '.start();';
|
128 |
+
|
129 |
+
return $this->js;
|
130 |
+
}
|
131 |
+
|
132 |
+
function add_flashvars ( $key, $value, $default = '', $type = '', $prefix = '' ) {
|
133 |
+
|
134 |
+
if ( is_bool( $value ) )
|
135 |
+
$value = ( $value ) ? "true" : "false";
|
136 |
+
|
137 |
+
if ( $type == "bool" )
|
138 |
+
$value = ( $value == "1" ) ? "true" : "false";
|
139 |
+
|
140 |
+
// do not add the variable if we hit the default setting
|
141 |
+
if ( $value == $default )
|
142 |
+
return;
|
143 |
+
|
144 |
+
$this->flashvars[$key] = $prefix . $value;
|
145 |
+
return;
|
146 |
+
}
|
147 |
+
|
148 |
+
function add_params ( $key, $value, $default = '', $type = '', $prefix = '' ) {
|
149 |
+
|
150 |
+
if ( is_bool( $value ) )
|
151 |
+
$value = ( $value ) ? "true" : "false";
|
152 |
+
|
153 |
+
if ( $type == "bool" )
|
154 |
+
$value = ( $value == "1" ) ? "true" : "false";
|
155 |
+
|
156 |
+
// do not add the variable if we hit the default setting
|
157 |
+
if ( $value == $default )
|
158 |
+
return;
|
159 |
+
|
160 |
+
$this->params[$key] = $prefix . $value;
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
function add_attributes ( $key, $value, $default = '', $type = '', $prefix = '' ) {
|
165 |
+
|
166 |
+
if ( is_bool( $value ) )
|
167 |
+
$value = ( $value ) ? "true" : "false";
|
168 |
+
|
169 |
+
if ( $type == "bool" )
|
170 |
+
$value = ( $value == "1" ) ? "true" : "false";
|
171 |
+
|
172 |
+
// do not add the variable if we hit the default setting
|
173 |
+
if ( $value == $default )
|
174 |
+
return;
|
175 |
+
|
176 |
+
$this->attributes[$key] = $prefix . $value;
|
177 |
+
return;
|
178 |
+
}
|
179 |
+
|
180 |
+
function add_js_parameters( $name, $params ) {
|
181 |
+
$list = '';
|
182 |
+
if ( is_array($params) ) {
|
183 |
+
foreach ($params as $key => $value) {
|
184 |
+
if ( !empty($list) )
|
185 |
+
$list .= ",";
|
186 |
+
$list .= "\n\t\t" . $key . ' : ' . '"' . $value .'"';
|
187 |
+
}
|
188 |
+
}
|
189 |
+
$js = "\t" . $name . ' : {' . $list . '}';
|
190 |
+
return $js;
|
191 |
+
}
|
192 |
+
|
193 |
+
}
|
194 |
+
endif;
|
195 |
+
?>
|
nggallery.php
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
/*
|
3 |
Plugin Name: NextGEN Gallery
|
4 |
Plugin URI: http://alexrabe.boelinger.com/?page_id=80
|
5 |
-
Description: A NextGENeration Photo gallery
|
6 |
Author: NextGEN DEV-Team
|
7 |
-
Version: 0.
|
8 |
|
9 |
Author URI: http://alexrabe.boelinger.com/
|
10 |
|
@@ -70,7 +70,7 @@ if ( ($memory_limit != 0) && ($memory_limit < 12 ) ) {
|
|
70 |
}
|
71 |
|
72 |
// Version and path to check version
|
73 |
-
define('NGGVERSION', "0.
|
74 |
// Minimum required database version
|
75 |
define('NGG_DBVERSION', "0.84");
|
76 |
define('NGGURL', "http://nextgen.boelinger.com/version.php");
|
@@ -196,7 +196,7 @@ function ngg_addjs() {
|
|
196 |
|
197 |
// test for wordTube function
|
198 |
if (!function_exists('integrate_swfobject')) {
|
199 |
-
wp_enqueue_script('swfobject', NGGALLERY_URLPATH .'admin/js/swfobject.js', FALSE, '1
|
200 |
}
|
201 |
}
|
202 |
|
2 |
/*
|
3 |
Plugin Name: NextGEN Gallery
|
4 |
Plugin URI: http://alexrabe.boelinger.com/?page_id=80
|
5 |
+
Description: A NextGENeration Photo gallery
|
6 |
Author: NextGEN DEV-Team
|
7 |
+
Version: 0.99
|
8 |
|
9 |
Author URI: http://alexrabe.boelinger.com/
|
10 |
|
70 |
}
|
71 |
|
72 |
// Version and path to check version
|
73 |
+
define('NGGVERSION', "0.99");
|
74 |
// Minimum required database version
|
75 |
define('NGG_DBVERSION', "0.84");
|
76 |
define('NGGURL', "http://nextgen.boelinger.com/version.php");
|
196 |
|
197 |
// test for wordTube function
|
198 |
if (!function_exists('integrate_swfobject')) {
|
199 |
+
wp_enqueue_script('swfobject', NGGALLERY_URLPATH .'admin/js/swfobject.js', FALSE, '2.1');
|
200 |
}
|
201 |
}
|
202 |
|
nggfunctions.php
CHANGED
@@ -155,48 +155,51 @@ function nggShowSlideshow($galleryID,$irWidth,$irHeight) {
|
|
155 |
|
156 |
global $wpdb;
|
157 |
|
|
|
|
|
158 |
$ngg_options = nggallery::get_option('ngg_options');
|
159 |
-
|
160 |
-
//TODO: bad intermediate solution until refactor to class
|
161 |
-
$obj = 'so' . $galleryID . rand(10,1000);
|
162 |
-
|
163 |
if (empty($irWidth) ) $irWidth = (int) $ngg_options['irWidth'];
|
164 |
if (empty($irHeight)) $irHeight = (int) $ngg_options['irHeight'];
|
165 |
|
166 |
-
|
167 |
-
$
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
$
|
172 |
-
$
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
$
|
188 |
-
|
189 |
-
|
190 |
-
$
|
191 |
-
|
192 |
-
$
|
193 |
-
|
194 |
-
$out
|
195 |
-
|
196 |
-
|
197 |
-
if ($ngg_options['irXHTMLvalid']) $out .= "\n
|
198 |
-
if ($ngg_options['irXHTMLvalid']) $out .= "\n
|
199 |
-
$out .=
|
|
|
|
|
|
|
|
|
200 |
|
201 |
$out = apply_filters('ngg_show_slideshow_content', $out);
|
202 |
return $out;
|
@@ -825,4 +828,4 @@ function ngg_emulate_objekt_k($old_array) {
|
|
825 |
return $new_array;
|
826 |
}
|
827 |
|
828 |
-
?>
|
155 |
|
156 |
global $wpdb;
|
157 |
|
158 |
+
require_once (dirname (__FILE__).'/lib/swfobject.php');
|
159 |
+
|
160 |
$ngg_options = nggallery::get_option('ngg_options');
|
161 |
+
|
|
|
|
|
|
|
162 |
if (empty($irWidth) ) $irWidth = (int) $ngg_options['irWidth'];
|
163 |
if (empty($irHeight)) $irHeight = (int) $ngg_options['irHeight'];
|
164 |
|
165 |
+
// init the flash output
|
166 |
+
$swfobject = new swfobject( NGGALLERY_URLPATH . 'imagerotator.swf', 'so' . $galleryID, $irWidth, $irHeight, '7.0.0', 'false');
|
167 |
+
|
168 |
+
$swfobject->classname = 'slideshow';
|
169 |
+
$swfobject->message = '<p>'. __('The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..', 'nggallery').'</p>';
|
170 |
+
$swfobject->add_params('wmode', 'opaque');
|
171 |
+
$swfobject->add_params('allowfullscreen', 'true');
|
172 |
+
|
173 |
+
// adding the flash parameter
|
174 |
+
$swfobject->add_flashvars( 'file', NGGALLERY_URLPATH . 'nggextractXML.php?gid='.$galleryID );
|
175 |
+
$swfobject->add_flashvars( 'shuffle', $ngg_options['irShuffle'], 'false', 'bool');
|
176 |
+
$swfobject->add_flashvars( 'linkfromdisplay', $ngg_options['irLinkfromdisplay'], 'false', 'bool');
|
177 |
+
$swfobject->add_flashvars( 'shownavigation', $ngg_options['irShownavigation'], 'false', 'bool');
|
178 |
+
$swfobject->add_flashvars( 'showicons', $ngg_options['irShowicons'], 'true', 'bool');
|
179 |
+
$swfobject->add_flashvars( 'kenburns', $ngg_options['irKenburns'], 'false', 'bool');
|
180 |
+
$swfobject->add_flashvars( 'overstretch', $ngg_options['irOverstretch'], 'false', 'string');
|
181 |
+
$swfobject->add_flashvars( 'rotatetime', $ngg_options['irRotatetime'], 5, 'int');
|
182 |
+
$swfobject->add_flashvars( 'transition', $ngg_options['irTransition'], 'random', 'string');
|
183 |
+
$swfobject->add_flashvars( 'backcolor', $ngg_options['irBackcolor'], 'FFFFFF', 'string', '0x');
|
184 |
+
$swfobject->add_flashvars( 'frontcolor', $ngg_options['irFrontcolor'], '000000', 'string', '0x');
|
185 |
+
$swfobject->add_flashvars( 'lightcolor', $ngg_options['irLightcolor'], '000000', 'string', '0x');
|
186 |
+
$swfobject->add_flashvars( 'screencolor', $ngg_options['irScreencolor'], '000000', 'string', '0x');
|
187 |
+
if ($ngg_options['irWatermark'])
|
188 |
+
$swfobject->add_flashvars( 'logo', $ngg_options['wmPath'], '', 'string');
|
189 |
+
$swfobject->add_flashvars( 'audio', $ngg_options['irAudio'], '', 'string');
|
190 |
+
$swfobject->add_flashvars( 'width', $irWidth, '260');
|
191 |
+
$swfobject->add_flashvars( 'height', $irHeight, '320');
|
192 |
+
// create the output
|
193 |
+
$out = $swfobject->output();
|
194 |
+
// add now the script code
|
195 |
+
$out .= "\n".'<script type="text/javascript" defer="defer">';
|
196 |
+
if ($ngg_options['irXHTMLvalid']) $out .= "\n".'<!--';
|
197 |
+
if ($ngg_options['irXHTMLvalid']) $out .= "\n".'//<![CDATA[';
|
198 |
+
$out .= $swfobject->javascript();
|
199 |
+
if ($ngg_options['irXHTMLvalid']) $out .= "\n".'//]]>';
|
200 |
+
if ($ngg_options['irXHTMLvalid']) $out .= "\n".'-->';
|
201 |
+
$out .= "\n".'</script>';
|
202 |
+
|
203 |
|
204 |
$out = apply_filters('ngg_show_slideshow_content', $out);
|
205 |
return $out;
|
828 |
return $new_array;
|
829 |
}
|
830 |
|
831 |
+
?>
|
nggwidget.php
CHANGED
@@ -32,39 +32,44 @@ function nggSlideshowWidget($galleryID,$irWidth,$irHeight) {
|
|
32 |
if ( !function_exists('nggShowSlideshow') )
|
33 |
return;
|
34 |
|
|
|
|
|
35 |
global $wpdb;
|
36 |
$ngg_options = get_option('ngg_options');
|
37 |
|
38 |
if (empty($irWidth) ) $irWidth = $ngg_options['irWidth'];
|
39 |
if (empty($irHeight)) $irHeight = $ngg_options['irHeight'];
|
40 |
|
41 |
-
|
42 |
-
$
|
43 |
-
|
44 |
-
|
45 |
-
$
|
46 |
-
$
|
47 |
-
|
48 |
-
|
49 |
-
$
|
50 |
-
$
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
$
|
56 |
-
$
|
57 |
-
$
|
58 |
-
$
|
59 |
-
|
60 |
-
$
|
61 |
-
|
62 |
-
$out
|
63 |
-
|
64 |
-
|
65 |
-
$out .= "\n
|
66 |
-
$out .= "\n
|
67 |
-
$out .=
|
|
|
|
|
|
|
68 |
|
69 |
echo $out;
|
70 |
}
|
@@ -500,4 +505,4 @@ function nggDisplayRecentImages($number, $width = "75", $height = "50", $exclude
|
|
500 |
nggWidget::ngg_widget_output($args = array(), 1, $options);
|
501 |
}
|
502 |
|
503 |
-
?>
|
32 |
if ( !function_exists('nggShowSlideshow') )
|
33 |
return;
|
34 |
|
35 |
+
require_once (dirname (__FILE__).'/lib/swfobject.php');
|
36 |
+
|
37 |
global $wpdb;
|
38 |
$ngg_options = get_option('ngg_options');
|
39 |
|
40 |
if (empty($irWidth) ) $irWidth = $ngg_options['irWidth'];
|
41 |
if (empty($irHeight)) $irHeight = $ngg_options['irHeight'];
|
42 |
|
43 |
+
// init the flash output
|
44 |
+
$swfobject = new swfobject( NGGALLERY_URLPATH . 'imagerotator.swf', 'sbsl' . $galleryID, $irWidth, $irHeight, '7.0.0', 'false');
|
45 |
+
|
46 |
+
$swfobject->classname = 'ngg-widget-slideshow';
|
47 |
+
$swfobject->message = __('<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see the slideshow.', 'nggallery');
|
48 |
+
$swfobject->add_params('wmode', 'opaque');
|
49 |
+
|
50 |
+
// adding the flash parameter
|
51 |
+
$swfobject->add_flashvars( 'file', NGGALLERY_URLPATH . 'nggextractXML.php?gid='.$galleryID );
|
52 |
+
$swfobject->add_flashvars( 'shuffle', $ngg_options['irShuffle'], 'false', 'bool');
|
53 |
+
$swfobject->add_flashvars( 'showicons', $ngg_options['irShowicons'], 'true', 'bool');
|
54 |
+
$swfobject->add_flashvars( 'overstretch', $ngg_options['irOverstretch'], 'false', 'string');
|
55 |
+
$swfobject->add_flashvars( 'rotatetime', $ngg_options['irRotatetime'], 5, 'int');
|
56 |
+
$swfobject->add_flashvars( 'transition', $ngg_options['irTransition'], 'random', 'string');
|
57 |
+
$swfobject->add_flashvars( 'backcolor', $ngg_options['irBackcolor'], 'FFFFFF', 'string', '0x');
|
58 |
+
$swfobject->add_flashvars( 'frontcolor', $ngg_options['irFrontcolor'], '000000', 'string', '0x');
|
59 |
+
$swfobject->add_flashvars( 'lightcolor', $ngg_options['irLightcolor'], '000000', 'string', '0x');
|
60 |
+
$swfobject->add_flashvars( 'screencolor', $ngg_options['irScreencolor'], '000000', 'string', '0x');
|
61 |
+
$swfobject->add_flashvars( 'width', $irWidth, '260');
|
62 |
+
$swfobject->add_flashvars( 'height', $irHeight, '320');
|
63 |
+
// create the output
|
64 |
+
$out = $swfobject->output();
|
65 |
+
// add now the script code
|
66 |
+
$out .= "\n".'<script type="text/javascript" defer="defer">';
|
67 |
+
$out .= "\n".'<!--';
|
68 |
+
$out .= "\n".'//<![CDATA[';
|
69 |
+
$out .= $swfobject->javascript();
|
70 |
+
$out .= "\n".'//]]>';
|
71 |
+
$out .= "\n".'-->';
|
72 |
+
$out .= "\n".'</script>';
|
73 |
|
74 |
echo $out;
|
75 |
}
|
505 |
nggWidget::ngg_widget_output($args = array(), 1, $options);
|
506 |
}
|
507 |
|
508 |
+
?>
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Alex Rabe
|
|
3 |
Donate link: http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/
|
4 |
Tags: photos, flash, slideshow, images, gallery, media, admin, post, photo-albums, pictures, widgets, photo, picture
|
5 |
Requires at least: 2.1.3
|
6 |
-
Tested up to: 2.6
|
7 |
|
8 |
NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.
|
9 |
|
@@ -22,7 +22,7 @@ Features:
|
|
22 |
* Slideshow : Full integrated flash slideshow
|
23 |
* TinyMCE : Button integration for easy adding the gallery tags
|
24 |
* Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
|
25 |
-
* Language support : Translated in more than
|
26 |
* Upload tab integration : You have access to all pictures via the upload tab
|
27 |
* Tag support for images : Append related images to your post
|
28 |
* Meta data support : Import EXIF, IPTC or XMP meta data
|
3 |
Donate link: http://alexrabe.boelinger.com/wordpress-plugins/nextgen-gallery/
|
4 |
Tags: photos, flash, slideshow, images, gallery, media, admin, post, photo-albums, pictures, widgets, photo, picture
|
5 |
Requires at least: 2.1.3
|
6 |
+
Tested up to: 2.6.2
|
7 |
|
8 |
NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.
|
9 |
|
22 |
* Slideshow : Full integrated flash slideshow
|
23 |
* TinyMCE : Button integration for easy adding the gallery tags
|
24 |
* Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
|
25 |
+
* Language support : Translated in more than 30 languages
|
26 |
* Upload tab integration : You have access to all pictures via the upload tab
|
27 |
* Tag support for images : Append related images to your post
|
28 |
* Meta data support : Import EXIF, IPTC or XMP meta data
|
tinymce/window.php
CHANGED
@@ -153,4 +153,4 @@ global $wpdb;
|
|
153 |
</div>
|
154 |
</form>
|
155 |
</body>
|
156 |
-
</html>
|
153 |
</div>
|
154 |
</form>
|
155 |
</body>
|
156 |
+
</html>
|
tinymce3/window.php
CHANGED
@@ -159,4 +159,4 @@ global $wpdb;
|
|
159 |
</div>
|
160 |
</form>
|
161 |
</body>
|
162 |
-
</html>
|
159 |
</div>
|
160 |
</form>
|
161 |
</body>
|
162 |
+
</html>
|