Version Description
Download this release
Release Info
Developer | alexrabe |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 0.61 |
Comparing to | |
See all releases |
Code changes from version 0.60 to 0.61
- admin/js/jquery.nextgen.js +247 -0
- admin/js/jquery.nextgen.pack.js +13 -0
- readme.txt +1 -1
admin/js/jquery.nextgen.js
ADDED
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* NextGEN Gallery Navigation -
|
3 |
+
* http://alexrabe.boelinger.com/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2007 Alex Rabe (http://alexrabe.boelinger.com)
|
6 |
+
* Licensed under GPL (GPL-LICENSE.txt) licenses.
|
7 |
+
*
|
8 |
+
* Built on top of the jQuery library
|
9 |
+
* http://jquery.com
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
|
13 |
+
(function($) {
|
14 |
+
/**
|
15 |
+
* Creates a Gallery navigation
|
16 |
+
*
|
17 |
+
* @name NextGEN
|
18 |
+
* @type jQuery
|
19 |
+
* @param Hash o A set of key/value pairs to set as configuration properties.
|
20 |
+
* @cat Plugins/NextGEN
|
21 |
+
*/
|
22 |
+
$.fn.nggallery = function(o) {
|
23 |
+
return this.each(function() {
|
24 |
+
new $ngg(this, o);
|
25 |
+
});
|
26 |
+
};
|
27 |
+
|
28 |
+
// Default configuration properties.
|
29 |
+
var defaults = {
|
30 |
+
imgarray: new Array(),
|
31 |
+
name : 'gallery',
|
32 |
+
galleryurl : '',
|
33 |
+
thumbfolder : 'thumbs',
|
34 |
+
maxelement: 0
|
35 |
+
};
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The NextGEN Gallery object.
|
39 |
+
*
|
40 |
+
* @constructor
|
41 |
+
* @name $.nggallery
|
42 |
+
* @param Object e The element to create the gallery
|
43 |
+
* @param Hash o A set of key/value pairs to set as configuration properties.
|
44 |
+
* @cat Plugins/NextGEN
|
45 |
+
*/
|
46 |
+
$.nggallery = function(e,o) {
|
47 |
+
// get the parameter
|
48 |
+
this.options = $.extend({}, defaults, o || {});
|
49 |
+
this.container = null;
|
50 |
+
|
51 |
+
// set the gallery pointer
|
52 |
+
this.gallery = $(e);
|
53 |
+
|
54 |
+
// check if array is longer then page elements
|
55 |
+
var o = this.options;
|
56 |
+
this.pagelimit = o.imgarray.length < o.maxelement ? o.imgarray.length : o.maxelement;
|
57 |
+
|
58 |
+
// get to start point
|
59 |
+
this.container = this.gallery.append('<div class="ngg-galleryoverview"></div>').children();
|
60 |
+
|
61 |
+
// create thumbnail path
|
62 |
+
if (o.thumbfolder == 'tumbs')
|
63 |
+
this.thumbpath = o.galleryurl + o.thumbfolder + '/' + 'tmb_';
|
64 |
+
else
|
65 |
+
this.thumbpath = o.galleryurl + o.thumbfolder + '/' + o.thumbfolder + '_';
|
66 |
+
|
67 |
+
for (var idx = 0; idx < this.pagelimit; idx++) {
|
68 |
+
|
69 |
+
var imglink = $.A().attr({ href: o.galleryurl + o.imgarray[idx][0], title: o.imgarray[idx][2], rel: o.name });
|
70 |
+
$(imglink).addClass("thickbox");
|
71 |
+
var image = $.IMG().attr({ src: this.thumbpath + o.imgarray[idx][0], alt: o.imgarray[idx][1] , title: o.imgarray[idx][1] });
|
72 |
+
$(imglink).append(image);
|
73 |
+
$.tb_init(imglink); //apply thickbox
|
74 |
+
|
75 |
+
this.pictures = this.container.append(imglink).children();
|
76 |
+
//console.log(this.options.galleryurl);
|
77 |
+
}
|
78 |
+
// add the div container
|
79 |
+
this.pictures.wrap('<div class="ngg-gallery-thumbnail-box"></div>');
|
80 |
+
this.pictures.wrap('<div class="ngg-gallery-thumbnail"></div>');
|
81 |
+
// add the navigation
|
82 |
+
this.navigation();
|
83 |
+
|
84 |
+
};
|
85 |
+
|
86 |
+
// Create shortcut for internal use
|
87 |
+
var $ngg = $.nggallery;
|
88 |
+
|
89 |
+
$ngg.fn = $ngg.prototype = {
|
90 |
+
nggallery: '0.0.1'
|
91 |
+
};
|
92 |
+
|
93 |
+
$ngg.fn.extend = $ngg.extend = $.extend;
|
94 |
+
|
95 |
+
// Internal functions
|
96 |
+
$ngg.fn.extend({
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Add the page navigation
|
100 |
+
*
|
101 |
+
* @name navigation
|
102 |
+
* @type undefined
|
103 |
+
* @cat Plugins/NextGEN
|
104 |
+
*/
|
105 |
+
navigation: function(step, total) {
|
106 |
+
|
107 |
+
var self = this;
|
108 |
+
var step = this.options.maxelement; // how many pics per page ?
|
109 |
+
var total = this.options.imgarray.length; // how many elements ?
|
110 |
+
var start = 0;
|
111 |
+
var end = start + step - 1;
|
112 |
+
|
113 |
+
if (total > step) {
|
114 |
+
var navigator = $.DIV({className: "ngg-navigation"});
|
115 |
+
var offset = 0, page = 1;
|
116 |
+
while (offset < total) {
|
117 |
+
var listelement = $.SPAN({className: "page-numbers"}, $.TEXT(page++));
|
118 |
+
$(navigator).append(listelement);
|
119 |
+
|
120 |
+
var f = (function(offset) {
|
121 |
+
return function() {
|
122 |
+
self.show(offset);
|
123 |
+
};
|
124 |
+
})(offset);
|
125 |
+
|
126 |
+
// bound click to SPAN class
|
127 |
+
$(listelement).css('cursor', 'pointer');
|
128 |
+
$(listelement).click(f);
|
129 |
+
offset += step;
|
130 |
+
}
|
131 |
+
this.gallery.append(navigator);
|
132 |
+
}
|
133 |
+
|
134 |
+
this.gallery.append('<div style="clear:both;"></div>');
|
135 |
+
},
|
136 |
+
|
137 |
+
/**
|
138 |
+
* show images
|
139 |
+
*
|
140 |
+
* @name next
|
141 |
+
* @type undefined
|
142 |
+
* @cat Plugins/NextGEN
|
143 |
+
*/
|
144 |
+
show: function( offset ) {
|
145 |
+
|
146 |
+
var imagecounter = $(this.gallery.children(".ngg-galleryoverview").children()).length;
|
147 |
+
|
148 |
+
var imagelist = this.gallery.children(".ngg-galleryoverview").children();
|
149 |
+
|
150 |
+
for (var i = 0; i < imagecounter; i++) {
|
151 |
+
// get the image div container
|
152 |
+
var imagecontainer = this.gallery.children(".ngg-galleryoverview").find(".ngg-gallery-thumbnail")[i];
|
153 |
+
// delete the content
|
154 |
+
if (imagecontainer != null) {
|
155 |
+
$(imagecontainer).empty();
|
156 |
+
|
157 |
+
// create a new image
|
158 |
+
var idx = offset + i;
|
159 |
+
if (idx < this.options.imgarray.length ) {
|
160 |
+
var imglink = $.A().attr({ href: this.options.galleryurl + this.options.imgarray[idx][0], title: this.options.imgarray[idx][0], rel: this.options.name });
|
161 |
+
$(imglink).addClass("thickbox");
|
162 |
+
var image = $.IMG().attr({ src: this.thumbpath + this.options.imgarray[idx][0], alt: this.options.imgarray[idx][0] , title: this.options.imgarray[idx][0] });
|
163 |
+
$(imglink).append(image);
|
164 |
+
// add the new image to the div container
|
165 |
+
$(imagecontainer).append(imglink);
|
166 |
+
$.tb_init(imglink);//apply thickbox
|
167 |
+
// show it
|
168 |
+
$(imagelist[i]).fadeIn("normal");
|
169 |
+
}
|
170 |
+
}
|
171 |
+
};
|
172 |
+
}
|
173 |
+
|
174 |
+
});
|
175 |
+
|
176 |
+
/**
|
177 |
+
* DOM element creator for jQuery and Prototype by Michael Geary
|
178 |
+
* http://mg.to/topics/programming/javascript/jquery
|
179 |
+
* Inspired by MochiKit.DOM by Bob Ippolito
|
180 |
+
*
|
181 |
+
* @method : $.DIV({ id: 'somethingNew'}).appendTo('#somethingOld').click(doSomething);
|
182 |
+
* @cat Plugins/NextGEN
|
183 |
+
*/
|
184 |
+
|
185 |
+
$.defineTag = function( tag ) {
|
186 |
+
$[tag.toUpperCase()] = function() {
|
187 |
+
return $._createNode( tag, arguments );
|
188 |
+
}
|
189 |
+
};
|
190 |
+
|
191 |
+
(function() {
|
192 |
+
var tags = [
|
193 |
+
'a', 'br', 'button', 'canvas', 'div', 'fieldset', 'form',
|
194 |
+
'h1', 'h2', 'h3', 'hr', 'img', 'input', 'label', 'legend',
|
195 |
+
'li', 'ol', 'optgroup', 'option', 'p', 'pre', 'select',
|
196 |
+
'span', 'strong', 'table', 'tbody', 'td', 'textarea',
|
197 |
+
'tfoot', 'th', 'thead', 'tr', 'tt', 'ul' ];
|
198 |
+
for( var i = tags.length - 1; i >= 0; i-- ) {
|
199 |
+
$.defineTag( tags[i] );
|
200 |
+
}
|
201 |
+
})();
|
202 |
+
|
203 |
+
$.NBSP = '\u00a0';
|
204 |
+
|
205 |
+
$._createNode = function( tag, args ) {
|
206 |
+
var fix = { 'class':'className', 'Class':'className' };
|
207 |
+
var e;
|
208 |
+
try {
|
209 |
+
var attrs = args[0] || {};
|
210 |
+
e = document.createElement( tag );
|
211 |
+
for( var attr in attrs ) {
|
212 |
+
var a = fix[attr] || attr;
|
213 |
+
e[a] = attrs[attr];
|
214 |
+
}
|
215 |
+
for( var i = 1; i < args.length; i++ ) {
|
216 |
+
var arg = args[i];
|
217 |
+
if( arg == null ) continue;
|
218 |
+
if( arg.constructor != Array ) append( arg );
|
219 |
+
else for( var j = 0; j < arg.length; j++ )
|
220 |
+
append( arg[j] );
|
221 |
+
}
|
222 |
+
}
|
223 |
+
catch( ex ) {
|
224 |
+
alert( 'Cannot create <' + tag + '> element:\n' +
|
225 |
+
args.toSource() + '\n' + args );
|
226 |
+
e = null;
|
227 |
+
}
|
228 |
+
|
229 |
+
function append( arg ) {
|
230 |
+
if( arg == null ) return;
|
231 |
+
if (arg.get) arg = arg.get(0);
|
232 |
+
var c = arg.constructor;
|
233 |
+
switch( typeof arg ) {
|
234 |
+
case 'number': arg = '' + arg; // fall through
|
235 |
+
case 'string': arg = document.createTextNode( arg );
|
236 |
+
}
|
237 |
+
e.appendChild( arg );
|
238 |
+
}
|
239 |
+
|
240 |
+
return $(e);
|
241 |
+
};
|
242 |
+
|
243 |
+
$.TEXT = function(s) {
|
244 |
+
return document.createTextNode(s);
|
245 |
+
};
|
246 |
+
|
247 |
+
})(jQuery);
|
admin/js/jquery.nextgen.pack.js
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* NextGEN Gallery Navigation -
|
3 |
+
* http://alexrabe.boelinger.com/
|
4 |
+
*
|
5 |
+
* Copyright (c) 2007 Alex Rabe (http://alexrabe.boelinger.com)
|
6 |
+
* Licensed under GPL (GPL-LICENSE.txt) licenses.
|
7 |
+
*
|
8 |
+
* Built on top of the jQuery library
|
9 |
+
* http://jquery.com
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
|
13 |
+
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(6($){$.D.E=6(o){w 3.1e(6(){T m(3,o)})};4 l={5:T U(),M:\'8\',y:\'\',z:\'1f\',F:0};$.E=6(e,o){3.7=$.B({},l,o||{});3.N=C;3.8=$(e);4 o=3.7;3.V=o.5.r<o.F?o.5.r:o.F;3.N=3.8.9(\'<q G="t-H"></q>\').v();u(o.z==\'1g\')3.I=o.y+o.z+\'/\'+\'1h\';W 3.I=o.y+o.z+\'/\'+o.z+\'1i\';x(4 a=0;a<3.V;a++){4 b=$.A().J({X:o.y+o.5[a][0],K:o.5[a][2],Y:o.M});$(b).Z("10");4 c=$.11().J({12:3.I+o.5[a][0],13:o.5[a][1],K:o.5[a][1]});$(b).9(c);$.14(b);3.O=3.N.9(b).v()}3.O.15(\'<q G="t-8-P-1j"></q>\');3.O.15(\'<q G="t-8-P"></q>\');3.Q()};4 m=$.E;m.D=m.1k={E:\'0.0.1\'};m.D.B=m.B=$.B;m.D.B({Q:6(b,c){4 d=3;4 b=3.7.F;4 c=3.7.5.r;4 e=0;4 g=e+b-1;u(c>b){4 h=$.1l({L:"t-Q"});4 i=0,R=1;1m(i<c){4 j=$.1n({L:"R-1o"},$.16(R++));$(h).9(j);4 f=(6(a){w 6(){d.17(a)}})(i);$(j).1p(\'1q\',\'1r\');$(j).1s(f);i+=b}3.8.9(h)}3.8.9(\'<q 1t="1u:1v;"></q>\')},17:6(a){4 b=$(3.8.v(".t-H").v()).r;4 c=3.8.v(".t-H").v();x(4 i=0;i<b;i++){4 d=3.8.v(".t-H").1w(".t-8-P")[i];u(d!=C){$(d).1x();4 e=a+i;u(e<3.7.5.r){4 f=$.A().J({X:3.7.y+3.7.5[e][0],K:3.7.5[e][0],Y:3.7.M});$(f).Z("10");4 g=$.11().J({12:3.I+3.7.5[e][0],13:3.7.5[e][0],K:3.7.5[e][0]});$(f).9(g);$(d).9(f);$.14(f);$(c[i]).1y("1z")}}}}});$.18=6(a){$[a.1A()]=6(){w $.19(a,1B)}};(6(){4 a=[\'a\',\'1C\',\'1D\',\'1E\',\'q\',\'1F\',\'1G\',\'1H\',\'1I\',\'1J\',\'1K\',\'1L\',\'1M\',\'1N\',\'1O\',\'1P\',\'1Q\',\'1R\',\'1S\',\'p\',\'1T\',\'1U\',\'1V\',\'1W\',\'1X\',\'1Y\',\'1Z\',\'20\',\'21\',\'22\',\'23\',\'24\',\'25\',\'26\'];x(4 i=a.r-1;i>=0;i--){$.18(a[i])}})();$.27=\'\\28\';$.19=6(b,d){4 f={\'G\':\'L\',\'29\':\'L\'};4 e;2a{4 g=d[0]||{};e=S.2b(b);x(4 h 2c g){4 a=f[h]||h;e[a]=g[h]}x(4 i=1;i<d.r;i++){4 k=d[i];u(k==C)2d;u(k.1a!=U)9(k);W x(4 j=0;j<k.r;j++)9(k[j])}}2e(2f){2g(\'2h 2i <\'+b+\'> 2j:\\n\'+d.2k()+\'\\n\'+d);e=C}6 9(a){u(a==C)w;u(a.1b)a=a.1b(0);4 c=a.1a;2l(2m a){1c\'2n\':a=\'\'+a;1c\'2o\':a=S.1d(a)}e.2p(a)}w $(e)};$.16=6(s){w S.1d(s)}})(2q);',62,151,'|||this|var|imgarray|function|options|gallery|append|||||||||||||||||div|length||ngg|if|children|return|for|galleryurl|thumbfolder||extend|null|fn|nggallery|maxelement|class|galleryoverview|thumbpath|attr|title|className|name|container|pictures|thumbnail|navigation|page|document|new|Array|pagelimit|else|href|rel|addClass|thickbox|IMG|src|alt|tb_init|wrap|TEXT|show|defineTag|_createNode|constructor|get|case|createTextNode|each|thumbs|tumbs|tmb_|_|box|prototype|DIV|while|SPAN|numbers|css|cursor|pointer|click|style|clear|both|find|empty|fadeIn|normal|toUpperCase|arguments|br|button|canvas|fieldset|form|h1|h2|h3|hr|img|input|label|legend|li|ol|optgroup|option|pre|select|span|strong|table|tbody|td|textarea|tfoot|th|thead|tr|tt|ul|NBSP|u00a0|Class|try|createElement|in|continue|catch|ex|alert|Cannot|create|element|toSource|switch|typeof|number|string|appendChild|jQuery'.split('|'),0,{}))
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://alexrabe.boelinger.com/?page_id=80
|
|
4 |
Tags: photos, flash, slideshow, images, gallery, media, admin, post, photo-albums, pictures, widgets
|
5 |
Requires at least: 2.1.3
|
6 |
Tested up to: 2.2
|
7 |
-
Stable tag: 0.
|
8 |
|
9 |
NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.
|
10 |
|
4 |
Tags: photos, flash, slideshow, images, gallery, media, admin, post, photo-albums, pictures, widgets
|
5 |
Requires at least: 2.1.3
|
6 |
Tested up to: 2.2
|
7 |
+
Stable tag: 0.61
|
8 |
|
9 |
NextGEN Gallery is a full integrated Image Gallery plugin for WordPress with a Flash slideshow option.
|
10 |
|