NextGEN Gallery – WordPress Gallery Plugin - Version 1.5.3

Version Description

  • 11.04.2010 =
  • New : Adding pagination to footer
  • Changed : Perpare new filter to replace slideshow
  • Bugfix : Remove non-breaking space from navigation
  • Bugfix : Pagination of galleries
  • Bugfix : Fixed brackets position for old shortcode query
  • Bugfix : Slideshow option 'Show next image on click" has wrong default value
Download this release

Release Info

Developer alexrabe
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 1.5.3
Comparing to
See all releases

Code changes from version 1.5.2 to 1.5.3

admin/admin.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @package NextGEN Gallery
6
  * @author Alex Rabe
7
- * @copyright 2008-2009
8
  * @since 1.0.0
9
  */
10
  class nggAdminPanel{
@@ -23,6 +23,10 @@ class nggAdminPanel{
23
 
24
  add_filter('contextual_help', array(&$this, 'show_help'), 10, 2);
25
  add_filter('screen_meta_screen', array(&$this, 'edit_screen_meta'));
 
 
 
 
26
  }
27
 
28
  // integrate the menu
@@ -46,7 +50,6 @@ class nggAdminPanel{
46
 
47
  //register the column fields
48
  $this->register_columns();
49
-
50
  }
51
 
52
  // load the script for the defined page and load only this code
@@ -86,7 +89,7 @@ class nggAdminPanel{
86
  update_option('ngg_options', $ngg->options);
87
  }
88
 
89
- if( $ngg->options['hideDonation'] !== true ) {
90
  if ( time() > ( $ngg->options['installDate'] + ( 60 * 60 * 24 * 30 ) ) ) {
91
  ?>
92
  <div id="donator_message">
@@ -105,13 +108,13 @@ class nggAdminPanel{
105
  switch ($_GET['page']){
106
  case "nggallery-add-gallery" :
107
  include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
108
- include_once ( dirname (__FILE__) . '/addgallery.php' ); // nggallery_admin_add_gallery
109
  $ngg->addgallery_page = new nggAddGallery ();
110
  $ngg->addgallery_page->controller();
111
  break;
112
  case "nggallery-manage-gallery" :
113
- include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
114
- include_once ( dirname (__FILE__) . '/manage.php' ); // nggallery_admin_manage_gallery
115
  // Initate the Manage Gallery page
116
  $ngg->manage_page = new nggManageGallery ();
117
  // Render the output now, because you cannot access a object during the constructor is not finished
@@ -119,32 +122,32 @@ class nggAdminPanel{
119
 
120
  break;
121
  case "nggallery-manage-album" :
122
- include_once ( dirname (__FILE__) . '/album.php' ); // nggallery_admin_manage_album
123
  $ngg->manage_album = new nggManageAlbum ();
124
  $ngg->manage_album->controller();
125
  break;
126
  case "nggallery-options" :
127
- include_once ( dirname (__FILE__) . '/settings.php' ); // nggallery_admin_options
128
  $ngg->option_page = new nggOptions ();
129
  $ngg->option_page->controller();
130
  break;
131
  case "nggallery-tags" :
132
- include_once ( dirname (__FILE__) . '/tags.php' ); // nggallery_admin_tags
133
  break;
134
  case "nggallery-style" :
135
- include_once ( dirname (__FILE__) . '/style.php' ); // nggallery_admin_style
136
  nggallery_admin_style();
137
  break;
138
  case "nggallery-setup" :
139
- include_once ( dirname (__FILE__) . '/setup.php' ); // nggallery_admin_setup
140
  nggallery_admin_setup();
141
  break;
142
  case "nggallery-roles" :
143
- include_once ( dirname (__FILE__) . '/roles.php' ); // nggallery_admin_roles
144
  nggallery_admin_roles();
145
  break;
146
  case "nggallery-import" :
147
- include_once ( dirname (__FILE__) . '/myimport.php' ); // nggallery_admin_import
148
  nggallery_admin_import();
149
  break;
150
  case "nggallery-about" :
@@ -153,7 +156,7 @@ class nggAdminPanel{
153
  break;
154
  case "nggallery-wpmu" :
155
  include_once ( dirname (__FILE__) . '/style.php' );
156
- include_once ( dirname (__FILE__) . '/wpmu.php' ); // nggallery_wpmu_admin
157
  nggallery_wpmu_setup();
158
  break;
159
  case "nggallery" :
4
  *
5
  * @package NextGEN Gallery
6
  * @author Alex Rabe
7
+ * @copyright 2008-2010
8
  * @since 1.0.0
9
  */
10
  class nggAdminPanel{
23
 
24
  add_filter('contextual_help', array(&$this, 'show_help'), 10, 2);
25
  add_filter('screen_meta_screen', array(&$this, 'edit_screen_meta'));
26
+
27
+ // never ever remove copyright notices and claim you are the author, that's not the way how open source should work...
28
+ add_action('admin_notices', create_function('', 'if ( isset($_GET["page"]) && $_GET["page"] == base64_decode("Zmxhc2gtYWxidW0tZ2FsbGVyeQ==") ) nggGallery::show_message( base64_decode("RG8geW91IHJlYWxseSB3b3VsZCBsaWtlIHRvIHVzZSBhIHBsdWdpbiB3aGljaCBkb2Vucyd0IHJlc3BlY3QgdGhlIHdvcmsgb2Ygb3RoZXIgcGx1Z2luIGF1dGhvcnMgPw=="));') );
29
+
30
  }
31
 
32
  // integrate the menu
50
 
51
  //register the column fields
52
  $this->register_columns();
 
53
  }
54
 
55
  // load the script for the defined page and load only this code
89
  update_option('ngg_options', $ngg->options);
90
  }
91
 
92
+ if( !isset ( $ngg->options['hideDonation']) || $ngg->options['hideDonation'] !== true ) {
93
  if ( time() > ( $ngg->options['installDate'] + ( 60 * 60 * 24 * 30 ) ) ) {
94
  ?>
95
  <div id="donator_message">
108
  switch ($_GET['page']){
109
  case "nggallery-add-gallery" :
110
  include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
111
+ include_once ( dirname (__FILE__) . '/addgallery.php' ); // nggallery_admin_add_gallery
112
  $ngg->addgallery_page = new nggAddGallery ();
113
  $ngg->addgallery_page->controller();
114
  break;
115
  case "nggallery-manage-gallery" :
116
+ include_once ( dirname (__FILE__) . '/functions.php' ); // admin functions
117
+ include_once ( dirname (__FILE__) . '/manage.php' ); // nggallery_admin_manage_gallery
118
  // Initate the Manage Gallery page
119
  $ngg->manage_page = new nggManageGallery ();
120
  // Render the output now, because you cannot access a object during the constructor is not finished
122
 
123
  break;
124
  case "nggallery-manage-album" :
125
+ include_once ( dirname (__FILE__) . '/album.php' ); // nggallery_admin_manage_album
126
  $ngg->manage_album = new nggManageAlbum ();
127
  $ngg->manage_album->controller();
128
  break;
129
  case "nggallery-options" :
130
+ include_once ( dirname (__FILE__) . '/settings.php' ); // nggallery_admin_options
131
  $ngg->option_page = new nggOptions ();
132
  $ngg->option_page->controller();
133
  break;
134
  case "nggallery-tags" :
135
+ include_once ( dirname (__FILE__) . '/tags.php' ); // nggallery_admin_tags
136
  break;
137
  case "nggallery-style" :
138
+ include_once ( dirname (__FILE__) . '/style.php' ); // nggallery_admin_style
139
  nggallery_admin_style();
140
  break;
141
  case "nggallery-setup" :
142
+ include_once ( dirname (__FILE__) . '/setup.php' ); // nggallery_admin_setup
143
  nggallery_admin_setup();
144
  break;
145
  case "nggallery-roles" :
146
+ include_once ( dirname (__FILE__) . '/roles.php' ); // nggallery_admin_roles
147
  nggallery_admin_roles();
148
  break;
149
  case "nggallery-import" :
150
+ include_once ( dirname (__FILE__) . '/myimport.php' ); // nggallery_admin_import
151
  nggallery_admin_import();
152
  break;
153
  case "nggallery-about" :
156
  break;
157
  case "nggallery-wpmu" :
158
  include_once ( dirname (__FILE__) . '/style.php' );
159
+ include_once ( dirname (__FILE__) . '/wpmu.php' ); // nggallery_wpmu_admin
160
  nggallery_wpmu_setup();
161
  break;
162
  case "nggallery" :
admin/js/sorter.js CHANGED
@@ -1,277 +1,294 @@
1
- /************************************************************************************************************
2
- (C) www.dhtmlgoodies.com, September 2005
3
-
4
- This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
5
-
6
- Terms of use:
7
- LGPL: See web page for more info.
8
-
9
- Thank you!
10
-
11
- www.dhtmlgoodies.com
12
- Alf Magne Kalleland
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- ************************************************************************************************************/
15
- var operaBrowser = navigator.userAgent.indexOf('Opera') >=0 ? 1 : false;
16
- var safariBrowser = navigator.userAgent.indexOf('Safari') >=0 ? true : false;
17
- var MSIE = navigator.userAgent.indexOf('MSIE')>= 0 ? true : false;
18
- var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
19
 
20
- function cancelEvent()
21
- {
22
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
- var activeImage = false;
25
- var readyToMove = false;
26
- var moveTimer = -1;
27
- var dragDropDiv;
28
- var insertionMarker;
29
 
30
- var offsetX_marker = -3; // offset X - element that indicates destinaton of drop
31
- var offsetY_marker = 0; // offset Y - element that indicates destinaton of drop
 
 
 
 
 
 
 
32
 
33
- var firefoxOffsetX_marker = -3;
34
- var firefoxOffsetY_marker = -2;
 
 
35
 
36
- if(navigatorVersion<6 && MSIE){ /* IE 5.5 fix */
37
- offsetX_marker-=23;
38
- offsetY_marker-=10;
 
 
 
 
39
  }
40
-
41
- var destinationObject = false;
42
-
43
- var divXPositions = new Array();
44
- var divYPositions = new Array();
45
- var divWidth = new Array();
46
- var divHeight = new Array();
47
 
48
- var tmpLeft = 0;
49
- var tmpTop = 0;
50
-
51
- var eventDiff_x = 0;
52
- var eventDiff_y = 0;
 
 
53
 
54
- function getTopPos(inputObj)
55
- {
56
- var returnValue = inputObj.offsetTop;
57
- while((inputObj = inputObj.offsetParent) != null){
58
- if(inputObj.tagName!='HTML'){
59
- returnValue += (inputObj.offsetTop - inputObj.scrollTop);
60
- if(document.all)returnValue+=inputObj.clientTop;
61
- }
62
- }
63
- return returnValue;
64
  }
 
 
 
 
 
 
 
65
 
66
- function getLeftPos(inputObj)
67
- {
68
- var returnValue = inputObj.offsetLeft;
69
- while((inputObj = inputObj.offsetParent) != null){
70
- if(inputObj.tagName!='HTML'){
71
- returnValue += inputObj.offsetLeft;
72
- if(document.all)returnValue+=inputObj.clientLeft;
73
- }
74
- }
75
- return returnValue;
 
 
76
  }
77
-
78
- function selectImage(e)
79
- {
80
- if(document.all && !operaBrowser)e = event;
81
- var obj = this.parentNode;
82
- if(activeImage)activeImage.className='imageBox';
83
- obj.className = 'imageBoxHighlighted';
84
- activeImage = obj;
85
- readyToMove = true;
86
- moveTimer=0;
87
-
88
- tmpLeft = e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
89
- tmpTop = e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop);
90
 
91
- startMoveTimer();
 
 
 
 
 
92
 
93
- return false;
 
 
 
 
 
94
  }
95
 
96
- function startMoveTimer(){
97
- if(moveTimer>=0 && moveTimer<10){
98
- moveTimer++;
99
- setTimeout('startMoveTimer()',15);
100
- }
101
- if(moveTimer==10){
102
- getDivCoordinates();
103
- var subElements = dragDropDiv.getElementsByTagName('DIV');
104
- if(subElements.length>0){
105
- dragDropDiv.removeChild(subElements[0]);
106
- }
107
-
108
- jQuery("#dragDropContent").show();
109
- // dragDropDiv.style.display='block';
110
- var newDiv = activeImage.cloneNode(true);
111
- newDiv.className='imageBox';
112
- newDiv.id='';
113
- jQuery("#dragDropContent").append(newDiv);
114
- //dragDropDiv.appendChild(newDiv);
115
 
116
- jQuery("#dragDropContent").css("top" , tmpTop + 'px');
117
- jQuery("#dragDropContent").css("left" , tmpLeft + 'px');
118
- // dragDropDiv.style.top = tmpTop + 'px';
119
- // dragDropDiv.style.left = tmpLeft + 'px';
120
-
121
- }
122
- return false;
 
 
 
 
 
 
 
 
 
 
 
123
  }
124
 
125
- function dragDropEnd()
126
- {
127
- readyToMove = false;
128
- moveTimer = -1;
129
-
130
- jQuery("#dragDropContent").hide();
131
- //dragDropDiv.style.display='none';
132
  jQuery("#insertionMarker").hide();
133
  //insertionMarker.style.display='none';
134
-
135
- if(destinationObject && destinationObject!=activeImage){
136
- var parentObj = destinationObject.parentNode;
137
- parentObj.insertBefore(activeImage,destinationObject);
138
- activeImage.className='imageBox';
139
- activeImage = false;
140
- destinationObject=false;
141
- getDivCoordinates();
142
- }
143
- return false;
144
  }
145
 
146
- function dragDropMove(e)
147
- {
148
- if(moveTimer==-1)
149
- return;
150
- if(document.all && !operaBrowser)
151
- e = event;
152
-
153
- if (safariBrowser) {
154
- var leftPos = e.pageX - eventDiff_x;
155
- var topPos = e.pageY - eventDiff_y;
156
- } else {
157
- var leftPos = e.clientX + document.documentElement.scrollLeft - eventDiff_x;
158
- var topPos = e.clientY + document.documentElement.scrollTop - eventDiff_y;
159
- }
160
-
161
- // message = " topPos: <strong>" + topPos + "</strong> e.pageY: <strong>" + e.pageY + "</strong> e.clientY: <strong>" + e.clientY + "</strong> scrollTop: <strong>" + document.documentElement.scrollTop + "</strong>";
162
- // message += "<br /> leftPos: <strong>" + leftPos + "</strong> e.pageX: <strong>" + e.pageX + "</strong> e.clientX: <strong>" + e.clientX + "</strong> scrollLeft: <strong>" + document.documentElement.scrollLeft + "</strong>";
163
- //debug( message );
164
-
165
- dragDropDiv.style.top = topPos + 'px';
166
- dragDropDiv.style.left = leftPos + 'px';
167
-
168
- leftPos = leftPos + eventDiff_x;
169
- topPos = topPos + eventDiff_y;
170
-
171
- if(e.button!=1 && document.all && !operaBrowser)dragDropEnd();
172
- var elementFound = false;
173
 
174
- for(var prop in divXPositions){
175
- // message = (divXPositions[prop]/1) + " < " + leftPos/1 + " && " + (divXPositions[prop]/1 + divWidth[prop]*0.7) + " > " + (leftPos/1);
176
- // message += "<br />" + (divYPositions[prop]/1) + " < " + topPos/1 + " && " + (divYPositions[prop]/1 + divWidth[prop]) + " > " + (topPos/1);
177
- // debug( message );
178
- if( (divXPositions[prop]/1 < leftPos/1) && ( (divXPositions[prop]/1 + divWidth[prop]*0.7) > leftPos/1) && ( (divYPositions[prop]/1) < topPos/1) && (( (divYPositions[prop]/1) + divWidth[prop]) > topPos/1)) {
179
-
180
- // check for IE who support document.all
181
- if( document.all && !safariBrowser ){
182
- offsetX = offsetX_marker;
183
- offsetY = offsetY_marker;
184
- }else{
185
- offsetX = firefoxOffsetX_marker;
186
- offsetY = firefoxOffsetY_marker;
187
- }
188
- jQuery("#insertionMarker").css("top", divYPositions[prop] + offsetY + 'px');
189
- //insertionMarker.style.top = divYPositions[prop] + offsetY + 'px';
190
- jQuery("#insertionMarker").css("left", divXPositions[prop] + offsetX + 'px');
191
- //insertionMarker.style.left = divXPositions[prop] + offsetX + 'px';
192
- jQuery("#insertionMarker").show();
193
- //insertionMarker.style.display='block';
194
- destinationObject = document.getElementById(prop);
195
- elementFound = true;
196
- break;
197
- }
198
- }
199
-
200
- if(!elementFound){
201
- jQuery("#insertionMarker").hide();
202
- //insertionMarker.style.display='none';
203
- destinationObject = false;
204
- }
205
-
206
- return false;
207
-
208
  }
 
209
 
210
- // brackets are not recognize by jQuery
211
- // see http://groups.google.com/group/jquery-en/browse_thread/thread/29438736a4369d7b
212
- function $$(selector, context){
213
- return jQuery(selector.replace(/(\[|\])/g, '\\$1'),context)
214
- }
215
-
216
- function getDivCoordinates()
217
- {
218
- var divs = document.getElementsByTagName('DIV');
219
- for(var no=0;no<divs.length;no++){
220
- if(divs[no].className=='imageBox' || divs[no].className=='imageBoxHighlighted' && divs[no].id){
221
- divXPositions[divs[no].id] = getLeftPos(divs[no]);
222
- divYPositions[divs[no].id] = getTopPos(divs[no]);
223
- divWidth[divs[no].id] = divs[no].offsetWidth;
224
- divHeight[divs[no].id] = divs[no].offsetHeight;
225
- // show coordinates
226
- // $$('#' + divs[no].id + ' span').html("X: " + getLeftPos(divs[no])+ " Y: " + getTopPos(divs[no]));
227
- }
228
- }
229
  }
 
 
230
 
231
- // seralize the ImageOrder
232
- function saveImageOrder()
233
- {
234
- var serial = "";
235
- var objects = document.getElementsByTagName('DIV');
236
- for(var no=0;no<objects.length;no++){
237
- if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
238
- if (serial.length > 0) serial = serial + '&'
239
- serial = serial + "sortArray[]=" + objects[no].id;
240
- }
241
  }
242
- jQuery('input[name=sortorder]').val(serial);
243
- // debug( 'This is the new order of the images(IDs) : <br>' + orderString );
244
-
245
  }
246
 
247
- function initGallery()
248
- {
249
- var divs = document.getElementsByTagName('DIV');
250
- for(var no=0;no<divs.length;no++){
251
- if(divs[no].className=='imageBox_theImage' || divs[no].className=='imageBox_label'){
252
- divs[no].onmousedown = selectImage;
253
 
254
- }
255
- }
256
-
257
- var insObj = document.getElementById('insertionMarker');
258
- var images = insObj.getElementsByTagName('IMG');
259
- document.body.onselectstart = cancelEvent;
260
- document.body.ondragstart = cancelEvent;
261
- document.body.onmouseup = dragDropEnd;
262
- document.body.onmousemove = dragDropMove;
263
-
264
-
265
- window.onresize = getDivCoordinates;
266
-
267
- dragDropDiv = document.getElementById('dragDropContent');
268
- // insertionMarker = document.getElementById('insertionMarker');
269
- jQuery("#insertionMarker").hide();
270
- getDivCoordinates();
271
- }
272
 
273
- function debug(value) {
274
- document.getElementById('debug').innerHTML = value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  }
276
 
277
- window.onload = initGallery;
 
 
 
 
 
 
1
+ /************************************************************************************************************
2
+ (C) www.dhtmlgoodies.com, September 2005
3
+
4
+ This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.
5
+
6
+ Terms of use:
7
+ LGPL: See web page for more info.
8
+
9
+ Thank you!
10
+
11
+ www.dhtmlgoodies.com
12
+ Alf Magne Kalleland
13
+
14
+ //TODO : Contain a marker position error when the window will be scroll down
15
+
16
+ ************************************************************************************************************/
17
+ var operaBrowser = navigator.userAgent.indexOf('Opera') >=0 ? 1 : false;
18
+ var webkitBrowser = navigator.userAgent.indexOf('Safari') >=0 ? false : false;
19
+ var MSIE = navigator.userAgent.indexOf('MSIE')>= 0 ? true : false;
20
+ var navigatorVersion = navigator.appVersion.replace(/.*?MSIE (\d\.\d).*/g,'$1')/1;
21
+
22
+ function cancelEvent()
23
+ {
24
+ return false;
25
+ }
26
+ var activeImage = false;
27
+ var readyToMove = false;
28
+ var moveTimer = -1;
29
+ var dragDropDiv;
30
+ var insertionMarker;
31
+
32
+ var offsetX_marker = -3; // offset X - element that indicates destinaton of drop
33
+ var offsetY_marker = 0; // offset Y - element that indicates destinaton of drop
34
+
35
+ var firefoxOffsetX_marker = -3;
36
+ var firefoxOffsetY_marker = -2;
37
+
38
+ if(navigatorVersion<6 && MSIE){ /* IE 5.5 fix */
39
+ offsetX_marker-=23;
40
+ offsetY_marker-=10;
41
+ }
42
+
43
+ var destinationObject = false;
44
+
45
+ var divXPositions = new Array();
46
+ var divYPositions = new Array();
47
+ var divWidth = new Array();
48
+ var divHeight = new Array();
49
 
50
+ var tmpLeft = 0;
51
+ var tmpTop = 0;
52
+
53
+ var eventDiff_x = 0;
54
+ var eventDiff_y = 0;
55
 
56
+ function getTopPos(inputObj)
57
+ {
58
+ var returnValue = inputObj.offsetTop;
59
+ while((inputObj = inputObj.offsetParent) != null){
60
+ if(inputObj.tagName!='HTML'){
61
+ returnValue += (inputObj.offsetTop - inputObj.scrollTop);
62
+ if(document.all)returnValue+=inputObj.clientTop;
63
+ }
64
+ }
65
+ return returnValue;
66
+ }
67
+
68
+ function getLeftPos(inputObj)
69
+ {
70
+ var returnValue = inputObj.offsetLeft;
71
+ while((inputObj = inputObj.offsetParent) != null){
72
+ if(inputObj.tagName!='HTML'){
73
+ returnValue += inputObj.offsetLeft;
74
+ if(document.all)returnValue+=inputObj.clientLeft;
75
  }
76
+ }
77
+ return returnValue;
78
+ }
 
 
79
 
80
+ function selectImage(e)
81
+ {
82
+ if(document.all && !operaBrowser)e = event;
83
+ var obj = this.parentNode;
84
+ if(activeImage)activeImage.className='imageBox';
85
+ obj.className = 'imageBoxHighlighted';
86
+ activeImage = obj;
87
+ readyToMove = true;
88
+ moveTimer=0;
89
 
90
+ tmpLeft = e.clientX + Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
91
+ tmpTop = e.clientY + Math.max(document.body.scrollTop,document.documentElement.scrollTop);
92
+
93
+ startMoveTimer();
94
 
95
+ return false;
96
+ }
97
+
98
+ function startMoveTimer(){
99
+ if(moveTimer>=0 && moveTimer<10){
100
+ moveTimer++;
101
+ setTimeout('startMoveTimer()',15);
102
  }
103
+ if(moveTimer==10){
104
+ getDivCoordinates();
105
+ var subElements = dragDropDiv.getElementsByTagName('DIV');
106
+ if(subElements.length>0){
107
+ dragDropDiv.removeChild(subElements[0]);
108
+ }
 
109
 
110
+ jQuery("#dragDropContent").show();
111
+ // dragDropDiv.style.display='block';
112
+ var newDiv = activeImage.cloneNode(true);
113
+ newDiv.className='imageBox';
114
+ newDiv.id='';
115
+ jQuery("#dragDropContent").append(newDiv);
116
+ //dragDropDiv.appendChild(newDiv);
117
 
118
+ jQuery("#dragDropContent").css("top" , tmpTop + 'px');
119
+ jQuery("#dragDropContent").css("left" , tmpLeft + 'px');
120
+ // dragDropDiv.style.top = tmpTop + 'px';
121
+ // dragDropDiv.style.left = tmpLeft + 'px';
122
+
 
 
 
 
 
123
  }
124
+ return false;
125
+ }
126
+
127
+ function dragDropEnd(ev)
128
+ {
129
+ readyToMove = false;
130
+ moveTimer = -1;
131
 
132
+ jQuery("#dragDropContent").hide();
133
+ //dragDropDiv.style.display='none';
134
+ jQuery("#insertionMarker").hide();
135
+ //insertionMarker.style.display='none';
136
+
137
+ if(destinationObject && destinationObject!=activeImage){
138
+ var parentObj = destinationObject.parentNode;
139
+ parentObj.insertBefore(activeImage,destinationObject);
140
+ activeImage.className='imageBox';
141
+ activeImage = false;
142
+ destinationObject=false;
143
+ getDivCoordinates();
144
  }
145
+ return false;
146
+ }
 
 
 
 
 
 
 
 
 
 
 
147
 
148
+ function dragDropMove(e)
149
+ {
150
+ if(moveTimer==-1)
151
+ return;
152
+ if(document.all && !operaBrowser)
153
+ e = event;
154
 
155
+ if (webkitBrowser) {
156
+ var leftPos = e.pageX - eventDiff_x;
157
+ var topPos = e.pageY - eventDiff_y;
158
+ } else {
159
+ var leftPos = e.clientX + document.documentElement.scrollLeft - eventDiff_x;
160
+ var topPos = e.clientY + document.documentElement.scrollTop - eventDiff_y;
161
  }
162
 
163
+ // message = " topPos: <strong>" + topPos + "</strong> e.pageY: <strong>" + e.pageY + "</strong> e.clientY: <strong>" + e.clientY + "</strong> scrollTop: <strong>" + document.documentElement.scrollTop + "</strong>";
164
+ // message += "<br /> leftPos: <strong>" + leftPos + "</strong> e.pageX: <strong>" + e.pageX + "</strong> e.clientX: <strong>" + e.clientX + "</strong> scrollLeft: <strong>" + document.documentElement.scrollLeft + "</strong>";
165
+ //debug( message );
166
+
167
+ dragDropDiv.style.top = topPos + 'px';
168
+ dragDropDiv.style.left = leftPos + 'px';
169
+
170
+ leftPos = leftPos + eventDiff_x;
171
+ topPos = topPos + eventDiff_y;
172
+
173
+ if(e.button!=1 && document.all && !operaBrowser)dragDropEnd(e);
174
+ var elementFound = false;
175
+ for(var prop in divXPositions){
176
+ // message = (divXPositions[prop]/1) + " < " + leftPos/1 + " && " + (divXPositions[prop]/1 + divWidth[prop]*0.7) + " > " + (leftPos/1);
177
+ // message += "<br />" + (divYPositions[prop]/1) + " < " + topPos/1 + " && " + (divYPositions[prop]/1 + divWidth[prop]) + " > " + (topPos/1);
178
+ // debug( message );
179
+ if( (divXPositions[prop]/1 < leftPos/1) && ( (divXPositions[prop]/1 + divWidth[prop]*0.7) > leftPos/1) && ( (divYPositions[prop]/1) < topPos/1) && (( (divYPositions[prop]/1) + divWidth[prop]) > topPos/1)) {
 
 
180
 
181
+ // check for IE who support document.all
182
+ if( document.all && !webkitBrowser ){
183
+ offsetX = offsetX_marker;
184
+ offsetY = offsetY_marker;
185
+ }else{
186
+ offsetX = firefoxOffsetX_marker;
187
+ offsetY = firefoxOffsetY_marker;
188
+ }
189
+ jQuery("#insertionMarker").css("top", divYPositions[prop] + offsetY + 'px');
190
+ //insertionMarker.style.top = divYPositions[prop] + offsetY + 'px';
191
+ jQuery("#insertionMarker").css("left", divXPositions[prop] + offsetX + 'px');
192
+ //insertionMarker.style.left = divXPositions[prop] + offsetX + 'px';
193
+ jQuery("#insertionMarker").show();
194
+ //insertionMarker.style.display='block';
195
+ destinationObject = document.getElementById(prop);
196
+ elementFound = true;
197
+ break;
198
+ }
199
  }
200
 
201
+
202
+ if(!elementFound){
 
 
 
 
 
203
  jQuery("#insertionMarker").hide();
204
  //insertionMarker.style.display='none';
205
+ destinationObject = false;
 
 
 
 
 
 
 
 
 
206
  }
207
 
208
+ return false;
209
+
210
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
211
 
212
+ // brackets are not recognize by jQuery
213
+ // see http://groups.google.com/group/jquery-en/browse_thread/thread/29438736a4369d7b
214
+ function $$(selector, context){
215
+ return jQuery(selector.replace(/(\[|\])/g, '\\$1'),context)
216
+ }
217
+
218
+ function getDivCoordinates()
219
+ {
220
+ var divs = document.getElementsByTagName('div');
221
+ for(var no=0;no<divs.length;no++){
222
+ if(divs[no].className=='imageBox' || divs[no].className=='imageBoxHighlighted' && divs[no].id){
223
+ divXPositions[divs[no].id] = getLeftPos(divs[no]);
224
+ divYPositions[divs[no].id] = getTopPos(divs[no]);
225
+ divWidth[divs[no].id] = divs[no].offsetWidth;
226
+ divHeight[divs[no].id] = divs[no].offsetHeight;
227
+ // show coordinates
228
+ // $$('#' + divs[no].id + ' span').html("X: " + getLeftPos(divs[no])+ " Y: " + getTopPos(divs[no]));
229
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
230
  }
231
+ }
232
 
233
+ // seralize the ImageOrder
234
+ function saveImageOrder()
235
+ {
236
+ var serial = "";
237
+ var objects = document.getElementsByTagName('div');
238
+ for(var no=0;no<objects.length;no++){
239
+ if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
240
+ if (serial.length > 0) serial = serial + '&'
241
+ serial = serial + "sortArray[]=" + objects[no].id;
242
+ }
 
 
 
 
 
 
 
 
 
243
  }
244
+ jQuery('input[name=sortorder]').val(serial);
245
+ // debug( 'This is the new order of the images(IDs) : <br>' + orderString );
246
 
247
+ }
248
+
249
+ function initGallery()
250
+ {
251
+ var divs = document.getElementsByTagName('div');
252
+ for(var no=0;no<divs.length;no++){
253
+ if(divs[no].className=='imageBox_theImage' || divs[no].className=='imageBox_label'){
254
+ divs[no].onmousedown = selectImage;
 
 
255
  }
 
 
 
256
  }
257
 
258
+ var insObj = document.getElementById('insertionMarker');
259
+ var images = insObj.getElementsByTagName('IMG');
260
+ document.body.onselectstart = cancelEvent;
261
+ document.body.ondragstart = cancelEvent;
262
+ document.body.onmouseup = dragDropEnd;
263
+ document.body.onmousemove = dragDropMove;
264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
 
266
+ window.onresize = getDivCoordinates;
267
+
268
+ dragDropDiv = document.getElementById('dragDropContent');
269
+ // insertionMarker = document.getElementById('insertionMarker');
270
+ jQuery("#insertionMarker").hide();
271
+ getDivCoordinates();
272
+
273
+ var list = document.getElementsByClassName('imageBox');
274
+ var container = list[0].parentNode;
275
+ var lastImage = list[list.length-1];
276
+
277
+ var fooDiv = document.createElement('div');
278
+ fooDiv.className = "imageBox";
279
+ fooDiv.id = "foo";
280
+ fooDiv.style.cssText = "visibility:hidden";
281
+
282
+ if(lastImage.nextSibling){
283
+ container.insertBefore(fooDiv,lastImage.nextSibling);
284
+ } else {
285
+ container.appendChild(fooDiv);
286
  }
287
 
288
+ }
289
+
290
+ function debug(value) {
291
+ document.getElementById('debug').innerHTML = value;
292
+ }
293
+
294
+ window.onload = initGallery;
admin/manage-galleries.php CHANGED
@@ -161,6 +161,20 @@ function nggallery_manage_gallery_main() {
161
  <th scope="col" ><?php _e('Action'); ?></th>
162
  </tr>
163
  </thead>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
  <tbody>
165
  <?php
166
 
@@ -205,6 +219,16 @@ if($gallerylist) {
205
  ?>
206
  </tbody>
207
  </table>
 
 
 
 
 
 
 
 
 
 
208
  </form>
209
  </div>
210
  <!-- #addGallery -->
161
  <th scope="col" ><?php _e('Action'); ?></th>
162
  </tr>
163
  </thead>
164
+ <tfoot>
165
+ <tr>
166
+ <th scope="col" class="column-cb" >
167
+ <input type="checkbox" onclick="checkAll(document.getElementById('editgalleries'));" name="checkall"/>
168
+ </th>
169
+ <th scope="col" ><?php _e('ID'); ?></th>
170
+ <th scope="col" ><?php _e('Title', 'nggallery'); ?></th>
171
+ <th scope="col" ><?php _e('Description', 'nggallery'); ?></th>
172
+ <th scope="col" ><?php _e('Author', 'nggallery'); ?></th>
173
+ <th scope="col" ><?php _e('Page ID', 'nggallery'); ?></th>
174
+ <th scope="col" ><?php _e('Quantity', 'nggallery'); ?></th>
175
+ <th scope="col" ><?php _e('Action'); ?></th>
176
+ </tr>
177
+ </tfoot>
178
  <tbody>
179
  <?php
180
 
219
  ?>
220
  </tbody>
221
  </table>
222
+ <div class="tablenav">
223
+ <?php if ( $page_links ) : ?>
224
+ <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
225
+ number_format_i18n( ( $_GET['paged'] - 1 ) * $nggdb->paged['objects_per_page'] + 1 ),
226
+ number_format_i18n( min( $_GET['paged'] * $nggdb->paged['objects_per_page'], $nggdb->paged['total_objects'] ) ),
227
+ number_format_i18n( $nggdb->paged['total_objects'] ),
228
+ $page_links
229
+ ); echo $page_links_text; ?></div>
230
+ <?php endif; ?>
231
+ </div>
232
  </form>
233
  </div>
234
  <!-- #addGallery -->
admin/manage-images.php CHANGED
@@ -467,7 +467,17 @@ if ( $counter == 0 )
467
 
468
  </tbody>
469
  </table>
470
- <p class="submit"><input type="submit" class="button-primary action" name="updatepictures" value="<?php _e('Save Changes', 'nggallery'); ?>" /></p>
 
 
 
 
 
 
 
 
 
 
471
  </form>
472
  <br class="clear"/>
473
  </div><!-- /#wrap -->
467
 
468
  </tbody>
469
  </table>
470
+ <div class="tablenav">
471
+ <input type="submit" class="button-primary action" name="updatepictures" value="<?php _e('Save Changes', 'nggallery'); ?>" />
472
+ <?php if ( $page_links ) : ?>
473
+ <div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s&#8211;%s of %s' ) . '</span>%s',
474
+ number_format_i18n( ( $_GET['paged'] - 1 ) * $nggdb->paged['objects_per_page'] + 1 ),
475
+ number_format_i18n( min( $_GET['paged'] * $nggdb->paged['objects_per_page'], $nggdb->paged['total_objects'] ) ),
476
+ number_format_i18n( $nggdb->paged['total_objects'] ),
477
+ $page_links
478
+ ); echo $page_links_text; ?></div>
479
+ <?php endif; ?>
480
+ </div>
481
  </form>
482
  <br class="clear"/>
483
  </div><!-- /#wrap -->
admin/manage-sort.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /**
4
  * @author Alex Rabe
5
- * @copyright 2008-2009
6
  */
7
 
8
  function nggallery_sortorder($galleryID = 0){
@@ -32,8 +32,8 @@ function nggallery_sortorder($galleryID = 0){
32
  }
33
 
34
  // look for presort args
35
- $presort = $_GET['presort'];
36
- $dir = ( $_GET['dir'] == 'DESC' ) ? 'DESC' : 'ASC';
37
  $sortitems = array('pid', 'filename', 'alttext', 'imagedate');
38
  // ensure that nobody added some evil sorting :-)
39
  if (in_array( $presort, $sortitems) )
@@ -48,7 +48,7 @@ function nggallery_sortorder($galleryID = 0){
48
 
49
  // In the case somebody presort, then we take this url
50
  if ( isset($_GET['dir']) || isset($_GET['presort']) )
51
- $base_url = esc_url( $_SERVER['REQUEST_URI'] );
52
  else
53
  $base_url = $clean_url;
54
 
2
 
3
  /**
4
  * @author Alex Rabe
5
+ * @copyright 2008-2010
6
  */
7
 
8
  function nggallery_sortorder($galleryID = 0){
32
  }
33
 
34
  // look for presort args
35
+ $presort = isset($_GET['presort']) ? $_GET['presort'] : false;
36
+ $dir = ( isset($_GET['dir']) && $_GET['dir'] == 'DESC' ) ? 'DESC' : 'ASC';
37
  $sortitems = array('pid', 'filename', 'alttext', 'imagedate');
38
  // ensure that nobody added some evil sorting :-)
39
  if (in_array( $presort, $sortitems) )
48
 
49
  // In the case somebody presort, then we take this url
50
  if ( isset($_GET['dir']) || isset($_GET['presort']) )
51
+ $base_url = $_SERVER['REQUEST_URI'];
52
  else
53
  $base_url = $clean_url;
54
 
admin/settings.php CHANGED
@@ -160,8 +160,8 @@ class nggOptions {
160
  jQuery("#thumbCode").val(effectcode);
161
  };
162
 
163
- function setcolor(fileid,color) {
164
- jQuery(fileid).css("background", color );
165
  };
166
  </script>
167
 
160
  jQuery("#thumbCode").val(effectcode);
161
  };
162
 
163
+ function setcolor(fileid, color) {
164
+ jQuery(fileid).css("background-color", '#' + color );
165
  };
166
  </script>
167
 
changelog.txt CHANGED
@@ -1,6 +1,14 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
 
 
 
 
4
  = V1.5.2 - 25.03.2010 =
5
  * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
6
  * Bugfix : Missing $wpdb in shortcodes.php
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ = V1.5.3 - 11.04.2010 =
5
+ * New : Adding pagination to footer
6
+ * Changed : Perpare new filter to replace slideshow
7
+ * Bugfix : Remove non-breaking space from navigation
8
+ * Bugfix : Pagination of galleries
9
+ * Bugfix : Fixed brackets position for old shortcode query
10
+ * Bugfix : Slideshow option 'Show next image on click" has wrong default value
11
+
12
  = V1.5.2 - 25.03.2010 =
13
  * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
14
  * Bugfix : Missing $wpdb in shortcodes.php
lib/ngg-db.php CHANGED
@@ -128,7 +128,7 @@ class nggdb {
128
  // Count the number of galleries and calculate the pagination
129
  if ($limit > 0) {
130
  $this->paged['total_objects'] = intval ( $wpdb->get_var( "SELECT FOUND_ROWS()" ) );
131
- $this->paged['objects_per_page'] = count( $this->galleries );
132
  $this->paged['max_objects_per_page'] = ( $limit > 0 ) ? ceil( $this->paged['total_objects'] / intval($limit)) : 1;
133
  }
134
 
128
  // Count the number of galleries and calculate the pagination
129
  if ($limit > 0) {
130
  $this->paged['total_objects'] = intval ( $wpdb->get_var( "SELECT FOUND_ROWS()" ) );
131
+ $this->paged['objects_per_page'] = max ( count( $this->galleries ), $limit );
132
  $this->paged['max_objects_per_page'] = ( $limit > 0 ) ? ceil( $this->paged['total_objects'] / intval($limit)) : 1;
133
  }
134
 
lib/shortcodes.php CHANGED
@@ -215,7 +215,7 @@ class NextGEN_shortcodes {
215
 
216
  // backward compat for user which uses the name instead, still deprecated
217
  if( !is_numeric($id) )
218
- $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' "), $id );
219
 
220
  $out = nggShowGallery( $id, $template, $images );
221
 
@@ -247,7 +247,7 @@ class NextGEN_shortcodes {
247
  ), $atts ));
248
 
249
  if( !is_numeric($id) )
250
- $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' "), $id );
251
 
252
  if( !empty( $id ) )
253
  $out = nggShowSlideshow($id, $w, $h);
215
 
216
  // backward compat for user which uses the name instead, still deprecated
217
  if( !is_numeric($id) )
218
+ $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' ", $id) );
219
 
220
  $out = nggShowGallery( $id, $template, $images );
221
 
247
  ), $atts ));
248
 
249
  if( !is_numeric($id) )
250
+ $id = $wpdb->get_var( $wpdb->prepare ("SELECT gid FROM $wpdb->nggallery WHERE name = '%s' ", $id) );
251
 
252
  if( !empty( $id ) )
253
  $out = nggShowSlideshow($id, $w, $h);
lib/swfobject.php CHANGED
@@ -5,7 +5,8 @@ if ( !class_exists('swfobject') ) :
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
  */
5
  *
6
  * @author Alex Rabe
7
  * @package NextGEN Gallery
8
+ * @version 0.2
9
+ * @copyright GNU General Public License Version 2
10
  * @access public
11
  * @example http://code.google.com/p/swfobject/
12
  */
nggallery.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: NextGEN Gallery
4
  Plugin URI: http://alexrabe.de/?page_id=80
5
  Description: A NextGENeration Photo gallery for the Web 2.0.
6
  Author: Alex Rabe
7
- Version: 1.5.2
8
 
9
  Author URI: http://alexrabe.de/
10
 
@@ -44,7 +44,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
44
  if (!class_exists('nggLoader')) {
45
  class nggLoader {
46
 
47
- var $version = '1.5.2';
48
  var $dbversion = '1.5.0';
49
  var $minium_WP = '2.9';
50
  var $minium_WPMU = '2.9';
4
  Plugin URI: http://alexrabe.de/?page_id=80
5
  Description: A NextGENeration Photo gallery for the Web 2.0.
6
  Author: Alex Rabe
7
+ Version: 1.5.3
8
 
9
  Author URI: http://alexrabe.de/
10
 
44
  if (!class_exists('nggLoader')) {
45
  class nggLoader {
46
 
47
+ var $version = '1.5.3';
48
  var $dbversion = '1.5.0';
49
  var $minium_WP = '2.9';
50
  var $minium_WPMU = '2.9';
nggfunctions.php CHANGED
@@ -44,7 +44,8 @@ function nggShowSlideshow($galleryID, $width, $height) {
44
  // adding the flash parameter
45
  $swfobject->add_flashvars( 'file', urlencode (get_option ('siteurl') . '/' . 'index.php?callback=imagerotator&gid=' . $galleryID ) );
46
  $swfobject->add_flashvars( 'shuffle', $ngg_options['irShuffle'], 'true', 'bool');
47
- $swfobject->add_flashvars( 'linkfromdisplay', $ngg_options['irLinkfromdisplay'], 'false', 'bool');
 
48
  $swfobject->add_flashvars( 'shownavigation', $ngg_options['irShownavigation'], 'true', 'bool');
49
  $swfobject->add_flashvars( 'showicons', $ngg_options['irShowicons'], 'true', 'bool');
50
  $swfobject->add_flashvars( 'kenburns', $ngg_options['irKenburns'], 'false', 'bool');
@@ -71,7 +72,7 @@ function nggShowSlideshow($galleryID, $width, $height) {
71
  if ($ngg_options['irXHTMLvalid']) $out .= "\n".'-->';
72
  $out .= "\n".'</script>';
73
 
74
- $out = apply_filters('ngg_show_slideshow_content', $out);
75
 
76
  return $out;
77
  }
@@ -238,7 +239,7 @@ function nggCreateGallery($picturelist, $galleryID = false, $template = '', $ima
238
  $nggNav = new nggNavigation;
239
  $navigation = $nggNav->create_navigation($page, $total, $maxElement);
240
  } else {
241
- $navigation = '<div class="ngg-clear">&nbsp;</div>';
242
  }
243
 
244
  //we cannot use the key as index, cause it's filled with the pid
@@ -515,7 +516,7 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
515
  $nggNav = new nggNavigation;
516
  $navigation = $nggNav->create_navigation($page, $total, $maxElement);
517
  } else {
518
- $navigation = '<div class="ngg-clear">&nbsp;</div>';
519
  }
520
 
521
  // apply a filter on $galleries before the output
@@ -870,7 +871,7 @@ function nggShowAlbumTags($taglist) {
870
  }
871
 
872
  //TODO: Add pagination later
873
- $navigation = '<div class="ngg-clear">&nbsp;</div>';
874
 
875
  // create the output
876
  $out = nggGallery::capture ('album-compact', array ('album' => 0, 'galleries' => $picturelist, 'pagination' => $navigation) );
44
  // adding the flash parameter
45
  $swfobject->add_flashvars( 'file', urlencode (get_option ('siteurl') . '/' . 'index.php?callback=imagerotator&gid=' . $galleryID ) );
46
  $swfobject->add_flashvars( 'shuffle', $ngg_options['irShuffle'], 'true', 'bool');
47
+ // option has oposite meaning : true should switch to next image
48
+ $swfobject->add_flashvars( 'linkfromdisplay', !$ngg_options['irLinkfromdisplay'], 'false', 'bool');
49
  $swfobject->add_flashvars( 'shownavigation', $ngg_options['irShownavigation'], 'true', 'bool');
50
  $swfobject->add_flashvars( 'showicons', $ngg_options['irShowicons'], 'true', 'bool');
51
  $swfobject->add_flashvars( 'kenburns', $ngg_options['irKenburns'], 'false', 'bool');
72
  if ($ngg_options['irXHTMLvalid']) $out .= "\n".'-->';
73
  $out .= "\n".'</script>';
74
 
75
+ $out = apply_filters('ngg_show_slideshow_content', $out, $galleryID, $width, $height);
76
 
77
  return $out;
78
  }
239
  $nggNav = new nggNavigation;
240
  $navigation = $nggNav->create_navigation($page, $total, $maxElement);
241
  } else {
242
+ $navigation = '<div class="ngg-clear"></div>';
243
  }
244
 
245
  //we cannot use the key as index, cause it's filled with the pid
516
  $nggNav = new nggNavigation;
517
  $navigation = $nggNav->create_navigation($page, $total, $maxElement);
518
  } else {
519
+ $navigation = '<div class="ngg-clear"></div>';
520
  }
521
 
522
  // apply a filter on $galleries before the output
871
  }
872
 
873
  //TODO: Add pagination later
874
+ $navigation = '<div class="ngg-clear"></div>';
875
 
876
  // create the output
877
  $out = nggGallery::capture ('album-compact', array ('album' => 0, 'galleries' => $picturelist, 'pagination' => $navigation) );
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === NextGEN Gallery ===
2
  Contributors: Alex Rabe
3
  Donate link: http://alexrabe.de/donation/
4
- Tags: nextgen gallery,photos,flash,slideshow,images,gallery,media,admin,post,photo-albums,pictures,widgets,photo,picture,image,nextgen-gallery
5
  Requires at least: 2.9
6
  Tested up to: 2.9.2
7
  Stable tag: trunk
@@ -141,6 +141,14 @@ To show the most recent added mages : **[recent max=x ]**
141
 
142
  == Changelog ==
143
 
 
 
 
 
 
 
 
 
144
  = V1.5.2 - 25.03.2010 =
145
  * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
146
  * Bugfix : Missing $wpdb in shortcodes.php
1
  === NextGEN Gallery ===
2
  Contributors: Alex Rabe
3
  Donate link: http://alexrabe.de/donation/
4
+ Tags: photos,flash,slideshow,images,gallery,media,admin,post,photo-albums,pictures,widgets,photo,picture,image,nextgen-gallery,nextgen gallery
5
  Requires at least: 2.9
6
  Tested up to: 2.9.2
7
  Stable tag: trunk
141
 
142
  == Changelog ==
143
 
144
+ = V1.5.3 - 11.04.2010 =
145
+ * New : Adding pagination to footer
146
+ * Changed : Perpare new filter to replace slideshow
147
+ * Bugfix : Remove non-breaking space from navigation
148
+ * Bugfix : Pagination of galleries
149
+ * Bugfix : Fixed brackets position for old shortcode query
150
+ * Bugfix : Slideshow option 'Show next image on click" has wrong default value
151
+
152
  = V1.5.2 - 25.03.2010 =
153
  * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
154
  * Bugfix : Missing $wpdb in shortcodes.php
widgets/widgets.php CHANGED
@@ -92,7 +92,9 @@ class nggSlideshowWidget extends WP_Widget {
92
  $out .= "\n".'//]]>';
93
  $out .= "\n".'-->';
94
  $out .= "\n".'</script>';
95
-
 
 
96
  return $out;
97
  }
98
 
92
  $out .= "\n".'//]]>';
93
  $out .= "\n".'-->';
94
  $out .= "\n".'</script>';
95
+
96
+ $out = apply_filters('ngg_show_slideshow_widget_content', $out, $galleryID, $irWidth, $irHeight);
97
+
98
  return $out;
99
  }
100
 
xml/json.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * REST Application Programming Interface PHP class for the WordPress plugin NextGEN Gallery
4
- * Should emulate some kind of Flickr JSON callback : ?format=json&api_key=1234567890&method=search&term=myterm
5
 
6
  *
7
  * @author Alex Rabe
@@ -37,7 +37,7 @@ class nggAPI {
37
  var $output = '';
38
 
39
  /**
40
- * Holds the requested innformation as array
41
  *
42
  * @since 1.5.0
43
  * @access private
@@ -59,12 +59,12 @@ class nggAPI {
59
  wp_die('Json_encode not available. You need to use PHP 5.2');
60
 
61
  // Read the parameter on init
62
- $this->format = strtolower( $_GET['format'] );
63
- $this->api_key = $_GET['api_key'];
64
- $this->method = strtolower( $_GET['method'] );
65
- $this->term = strtolower( $_GET['term'] );
66
- $this->id = (int) $_GET['id'];
67
- $this->limit = (int) $_GET['limit'];
68
  $this->result = array();
69
 
70
  $this->start_process();
1
  <?php
2
  /**
3
  * REST Application Programming Interface PHP class for the WordPress plugin NextGEN Gallery
4
+ * Should emulate some kind of Flickr JSON callback : ?callback=json&format=json&api_key=1234567890&method=search&term=myterm
5
 
6
  *
7
  * @author Alex Rabe
37
  var $output = '';
38
 
39
  /**
40
+ * Holds the requested information as array
41
  *
42
  * @since 1.5.0
43
  * @access private
59
  wp_die('Json_encode not available. You need to use PHP 5.2');
60
 
61
  // Read the parameter on init
62
+ $this->format = isset($_GET['format']) ? strtolower( $_GET['format'] ) : false;
63
+ $this->api_key = isset($_GET['api_key'])? $_GET['api_key'] : false;
64
+ $this->method = isset($_GET['method']) ? strtolower( $_GET['method'] ) : false;
65
+ $this->term = isset($_GET['term']) ? strtolower( $_GET['term'] ) : false;
66
+ $this->id = isset($_GET['id']) ? (int) $_GET['id'] : 0;
67
+ $this->limit = isset($_GET['limit']) ? (int) $_GET['limit'] : 0;
68
  $this->result = array();
69
 
70
  $this->start_process();