NextGEN Gallery – WordPress Gallery Plugin - Version 1.9.7

Version Description

  • 11.13.2012 =
  • Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
  • Changed: Using JQuery UI for the image sorting interface (thanks Toms Soler)
  • Bugfix: Image uploads work in WP 3.2 when using Safari
  • Bugfix: Adjusted TinyMCE window to use built-in JavaScript libraries
  • Bugfix: Removed Photocrati acquisition announcement
  • Bugfix: Fixed incorrect usage of ImageJpeg() function
  • Bugfix: Switched from "template_redirect" to "wp_enqueue_script" hook to load scripts and styles
Download this release

Release Info

Developer photocrati
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 1.9.7
Comparing to
See all releases

Code changes from version 1.9.6 to 1.9.7

admin/admin.php CHANGED
@@ -186,7 +186,7 @@ class nggAdminPanel{
186
  // no need to go on if it's not a plugin page
187
  if( !isset($_GET['page']) )
188
  return;
189
-
190
  // If we're on a NextGen Page
191
  if (preg_match("/ngg|nextgen-gallery/", $_GET['page'])) {
192
  wp_register_script('ngg_social_media', path_join(
@@ -250,6 +250,7 @@ class nggAdminPanel{
250
  wp_enqueue_script( 'ngg-ajax' );
251
  wp_enqueue_script( 'ngg-progressbar' );
252
  wp_enqueue_script( 'jquery-ui-dialog' );
 
253
  wp_register_script('shutter', NGGALLERY_URLPATH .'shutter/shutter-reloaded.js', false ,'1.3.2');
254
  wp_localize_script('shutter', 'shutterSettings', array(
255
  'msgLoading' => __('L O A D I N G', 'nggallery'),
186
  // no need to go on if it's not a plugin page
187
  if( !isset($_GET['page']) )
188
  return;
189
+
190
  // If we're on a NextGen Page
191
  if (preg_match("/ngg|nextgen-gallery/", $_GET['page'])) {
192
  wp_register_script('ngg_social_media', path_join(
250
  wp_enqueue_script( 'ngg-ajax' );
251
  wp_enqueue_script( 'ngg-progressbar' );
252
  wp_enqueue_script( 'jquery-ui-dialog' );
253
+ wp_enqueue_script( 'jquery-ui-sortable' );
254
  wp_register_script('shutter', NGGALLERY_URLPATH .'shutter/shutter-reloaded.js', false ,'1.3.2');
255
  wp_localize_script('shutter', 'shutterSettings', array(
256
  'msgLoading' => __('L O A D I N G', 'nggallery'),
admin/ajax.php CHANGED
@@ -3,27 +3,27 @@ add_action('wp_ajax_ngg_ajax_operation', 'ngg_ajax_operation' );
3
 
4
  /**
5
  * Image edit functions via AJAX
6
- *
7
  * @author Alex Rabe
8
- *
9
- *
10
  * @return void
11
  */
12
  function ngg_ajax_operation() {
13
-
14
  global $wpdb;
15
 
16
  // if nonce is not correct it returns -1
17
  check_ajax_referer( "ngg-ajax" );
18
-
19
  // check for correct capability
20
  if ( !is_user_logged_in() )
21
  die('-1');
22
 
23
  // check for correct NextGEN capability
24
- if ( !current_user_can('NextGEN Upload images') && !current_user_can('NextGEN Manage gallery') )
25
- die('-1');
26
-
27
  // include the ngg function
28
  include_once (dirname (__FILE__) . '/functions.php');
29
 
@@ -32,7 +32,7 @@ function ngg_ajax_operation() {
32
  $id = (int) $_POST['image'];
33
  // let's get the image data
34
  $picture = nggdb::find_image( $id );
35
- // what do you want to do ?
36
  switch ( $_POST['operation'] ) {
37
  case 'create_thumbnail' :
38
  $result = nggAdmin::create_thumbnail($picture);
@@ -47,13 +47,13 @@ function ngg_ajax_operation() {
47
  case 'rotate_ccw' :
48
  $result = nggAdmin::rotate_image($picture, 'CCW');
49
  nggAdmin::create_thumbnail($picture);
50
- break;
51
  case 'set_watermark' :
52
  $result = nggAdmin::set_watermark($picture);
53
  break;
54
  case 'recover_image' :
55
  $result = nggAdmin::recover_image($picture);
56
- break;
57
  case 'import_metadata' :
58
  $result = nggAdmin::import_MetaData( $id );
59
  break;
@@ -62,30 +62,30 @@ function ngg_ajax_operation() {
62
  break;
63
  default :
64
  do_action( 'ngg_ajax_' . $_POST['operation'] );
65
- die('-1');
66
- break;
67
  }
68
  // A success should return a '1'
69
  die ($result);
70
  }
71
-
72
  // The script should never stop here
73
  die('0');
74
  }
75
 
76
  add_action('wp_ajax_createNewThumb', 'createNewThumb');
77
-
78
  function createNewThumb() {
79
-
80
  global $ngg;
81
-
82
  // check for correct capability
83
  if ( !is_user_logged_in() )
84
  die('-1');
85
-
86
  // check for correct NextGEN capability
87
- if ( !current_user_can('NextGEN Manage gallery') )
88
- die('-1');
89
 
90
  include_once( nggGallery::graphic_library() );
91
 
@@ -96,11 +96,11 @@ function createNewThumb() {
96
  $y = round( $_POST['y'] * $_POST['rr'], 0);
97
  $w = round( $_POST['w'] * $_POST['rr'], 0);
98
  $h = round( $_POST['h'] * $_POST['rr'], 0);
99
-
100
  $thumb = new ngg_Thumbnail($picture->imagePath, TRUE);
101
-
102
  $thumb->crop($x, $y, $w, $h);
103
-
104
  // Note : the routine is a bit different to create_thumbnail(), due to rounding it's resized in the other way
105
  if ($ngg->options['thumbfix']) {
106
  // check for portrait format
@@ -109,62 +109,62 @@ function createNewThumb() {
109
  $thumb->resize(0, $ngg->options['thumbheight']);
110
  // get optimal y startpos
111
  $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
112
- $thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
113
  } else {
114
  // first resize to the wanted width, here changed to create_thumbnail()
115
  $thumb->resize($ngg->options['thumbwidth'], 0);
116
- //
117
  // get optimal x startpos
118
  $xpos = ($thumb->currentDimensions['width'] - $ngg->options['thumbwidth']) / 2;
119
- $thumb->crop($xpos, 0, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
120
  }
121
- //this create a thumbnail but keep ratio settings
122
  } else {
123
- $thumb->resize($ngg->options['thumbwidth'],$ngg->options['thumbheight']);
124
- }
125
-
126
  if ( $thumb->save($picture->thumbPath, 100)) {
127
-
128
  //read the new sizes
129
  $new_size = @getimagesize ( $picture->thumbPath );
130
  $size['width'] = $new_size[0];
131
- $size['height'] = $new_size[1];
132
-
133
  // add them to the database
134
  nggdb::update_image_meta($picture->pid, array( 'thumbnail' => $size) );
135
-
136
  echo "OK";
137
  } else {
138
- header('HTTP/1.1 500 Internal Server Error');
139
  echo "KO";
140
  }
141
-
142
  exit();
143
-
144
  }
145
-
146
  add_action('wp_ajax_rotateImage', 'ngg_rotateImage');
147
-
148
  function ngg_rotateImage() {
149
-
150
  // check for correct capability
151
  if ( !is_user_logged_in() )
152
  die('-1');
153
-
154
  // check for correct NextGEN capability
155
- if ( !current_user_can('NextGEN Manage gallery') )
156
- die('-1');
157
 
158
  require_once( dirname( dirname(__FILE__) ) . '/ngg-config.php');
159
 
160
  // include the ngg function
161
  include_once (dirname (__FILE__). '/functions.php');
162
-
163
  $ngg_options = get_option('ngg_options');
164
-
165
  $id = (int) $_POST['id'];
166
  $result = '-1';
167
-
168
  switch ( $_POST['ra'] ) {
169
  case 'cw' :
170
  $result = nggAdmin::rotate_image($id, 'CW');
@@ -179,76 +179,76 @@ function ngg_rotateImage() {
179
  $result = nggAdmin::rotate_image($id, 0, 'H');
180
  break;
181
  }
182
-
183
- // recreate the thumbnail
184
  nggAdmin::create_thumbnail($id);
185
-
186
  if ( $result == 1 )
187
  die('1');
188
 
189
- header('HTTP/1.1 500 Internal Server Error');
190
  die( $result );
191
-
192
  }
193
 
194
  add_action('wp_ajax_ngg_dashboard', 'ngg_ajax_dashboard');
195
 
196
  function ngg_ajax_dashboard() {
197
-
198
  require_once( dirname( dirname(__FILE__) ) . '/admin/admin.php');
199
  require_once( dirname( dirname(__FILE__) ) . '/admin/overview.php');
200
-
201
- if ( !current_user_can('NextGEN Gallery overview') )
202
- die('-1');
203
-
204
  @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
205
- @header( 'X-Content-Type-Options: nosniff' );
206
-
207
  switch ( $_GET['jax'] ) {
208
-
209
  case 'ngg_lastdonators' :
210
  ngg_overview_donators();
211
  break;
212
-
213
  case 'dashboard_primary' :
214
  ngg_overview_news();
215
  break;
216
-
217
  case 'ngg_locale' :
218
  ngg_locale();
219
  break;
220
-
221
  case 'dashboard_plugins' :
222
  ngg_related_plugins();
223
  break;
224
 
225
  }
226
  die();
227
- }
228
 
229
  add_action('wp_ajax_ngg_file_browser', 'ngg_ajax_file_browser');
230
-
231
  /**
232
- * jQuery File Tree PHP Connector
233
  * @author Cory S.N. LaViska - A Beautiful Site (http://abeautifulsite.net/)
234
  * @version 1.0.1
235
- *
236
- * @return string folder content
237
  */
238
  function ngg_ajax_file_browser() {
239
-
240
  global $ngg;
241
 
242
  // check for correct NextGEN capability
243
- if ( !current_user_can('NextGEN Upload images') && !current_user_can('NextGEN Manage gallery') )
244
- die('No access');
245
 
246
  if ( !defined('ABSPATH') )
247
  die('No access');
248
 
249
  // if nonce is not correct it returns -1
250
  check_ajax_referer( 'ngg-ajax', 'nonce' );
251
-
252
  //PHP4 compat script
253
  if (!function_exists('scandir')) {
254
  function scandir($dir, $listDirectories = false, $skipDots = true ) {
@@ -265,61 +265,61 @@ function ngg_ajax_file_browser() {
265
  return $dirArray;
266
  }
267
  }
268
-
269
  // start from the default path
270
  $root = trailingslashit ( WINABSPATH );
271
  // get the current directory
272
  $dir = trailingslashit ( urldecode($_POST['dir']) );
273
-
274
  if( file_exists($root . $dir) ) {
275
  $files = scandir($root . $dir);
276
  natcasesort($files);
277
-
278
- // The 2 counts for . and ..
279
  if( count($files) > 2 ) {
280
  echo "<ul class=\"jqueryDirTree\" style=\"display: none;\">";
281
-
282
  // return only directories
283
  foreach( $files as $file ) {
284
-
285
  //reserved name for the thumnbnails, don't use it as folder name
286
  if ( $file == 'thumbs')
287
  continue;
288
-
289
  if ( file_exists($root . $dir . $file) && $file != '.' && $file != '..' && is_dir($root . $dir . $file) ) {
290
  echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . esc_html($dir . $file) . "/\">" . esc_html($file) . "</a></li>";
291
  }
292
  }
293
-
294
  echo "</ul>";
295
  }
296
  }
297
-
298
- die();
299
  }
300
 
301
  add_action('wp_ajax_ngg_tinymce', 'ngg_ajax_tinymce');
302
  /**
303
  * Call TinyMCE window content via admin-ajax
304
- *
305
- * @since 1.7.0
306
  * @return html content
307
  */
308
  function ngg_ajax_tinymce() {
309
 
310
  // check for rights
311
- if ( !current_user_can('edit_pages') && !current_user_can('edit_posts') )
312
  die(__("You are not allowed to be here"));
313
-
314
  include_once( dirname( dirname(__FILE__) ) . '/admin/tinymce/window.php');
315
-
316
- die();
317
  }
318
 
319
  add_action( 'wp_ajax_ngg_rebuild_unique_slugs', 'ngg_ajax_rebuild_unique_slugs' );
320
  /**
321
  * This rebuild the slugs for albums, galleries and images as ajax routine, max 50 elements per request
322
- *
323
  * @since 1.7.0
324
  * @return string '1'
325
  */
@@ -327,12 +327,12 @@ function ngg_ajax_rebuild_unique_slugs() {
327
  global $wpdb;
328
 
329
  // check for correct NextGEN capability
330
- if ( !current_user_can('NextGEN Change options') )
331
  die('No access');
332
-
333
  $action = $_POST['_action'];
334
  $offset = (int) $_POST['offset'];
335
-
336
  switch ($action) {
337
  case 'images':
338
  $images = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures ORDER BY pid ASC LIMIT $offset, 50", OBJECT_K);
@@ -352,7 +352,7 @@ function ngg_ajax_rebuild_unique_slugs() {
352
  $gallery->slug = nggdb::get_unique_slug( sanitize_title( $gallery->title ), 'gallery', $gallery->gid );
353
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->nggallery SET slug= '%s' WHERE gid = '%d'" , $gallery->slug, $gallery->gid ) );
354
  }
355
- }
356
  break;
357
  case 'album':
358
  $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id ASC LIMIT $offset, 50", OBJECT_K);
@@ -362,7 +362,7 @@ function ngg_ajax_rebuild_unique_slugs() {
362
  $album->slug = nggdb::get_unique_slug( sanitize_title( $album->name ), 'album', $album->id );
363
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->nggalbum SET slug= '%s' WHERE id = '%d'" , $album->slug, $album->id ) );
364
  }
365
- }
366
  break;
367
  }
368
 
@@ -371,26 +371,26 @@ function ngg_ajax_rebuild_unique_slugs() {
371
  add_action('wp_ajax_ngg_image_check', 'ngg_ajax_image_check');
372
  /**
373
  * Test for various image resolution
374
- *
375
- * @since 1.7.3
376
  * @return result
377
  */
378
  function ngg_ajax_image_check() {
379
 
380
  // check for correct NextGEN capability
381
- if ( !current_user_can('NextGEN Upload images') )
382
- die('No access');
383
 
384
  if ( !defined('ABSPATH') )
385
  die('No access');
386
-
387
  $step = (int) $_POST['step'];
388
 
389
  // build the test sizes
390
  $sizes = array();
391
  $sizes[1] = array ( 'width' => 800, 'height' => 600);
392
  $sizes[2] = array ( 'width' => 1024, 'height' => 768);
393
- $sizes[3] = array ( 'width' => 1280, 'height' => 960); // 1MP
394
  $sizes[4] = array ( 'width' => 1600, 'height' => 1200); // 2MP
395
  $sizes[5] = array ( 'width' => 2016, 'height' => 1512); // 3MP
396
  $sizes[6] = array ( 'width' => 2272, 'height' => 1704); // 4MP
@@ -399,28 +399,28 @@ function ngg_ajax_image_check() {
399
  $sizes[9] = array ( 'width' => 3072, 'height' => 2304); // 7MP
400
  $sizes[10] = array ( 'width' => 3264, 'height' => 2448); // 8MP
401
  $sizes[11] = array ( 'width' => 4048, 'height' => 3040); // 12MP
402
-
403
  if ( $step < 1 || $step > 11 )
404
  die('No vaild value');
405
-
406
  // let's test each image size
407
  $temp = imagecreatetruecolor ($sizes[$step]['width'], $sizes[$step]['height'] );
408
  imagedestroy ($temp);
409
-
410
  $result = array ('stat' => 'ok', 'message' => sprintf(__('Could create image with %s x %s pixel', 'nggallery'), $sizes[$step]['width'], $sizes[$step]['height'] ) );
411
-
412
  header('Content-Type: application/json; charset=' . get_option('blog_charset'), true);
413
  echo json_encode($result);
414
-
415
- die();
416
  }
417
 
418
  add_action('wp_ajax_ngg_test_head_footer', 'ngg_ajax_test_head_footer');
419
  /**
420
  * Check for the header / footer, parts taken from Matt Martz (http://sivel.net/)
421
- *
422
  * @see https://gist.github.com/378450
423
- * @since 1.7.3
424
  * @return result
425
  */
426
  function ngg_ajax_test_head_footer() {
@@ -445,6 +445,6 @@ function ngg_ajax_test_head_footer() {
445
  if ( ! strstr( $html, '<!--wp_footer-->' ) )
446
  die('Missing the call to wp_footer() in your theme, contact the theme author');
447
  }
448
- die('success');
449
  }
450
  ?>
3
 
4
  /**
5
  * Image edit functions via AJAX
6
+ *
7
  * @author Alex Rabe
8
+ *
9
+ *
10
  * @return void
11
  */
12
  function ngg_ajax_operation() {
13
+
14
  global $wpdb;
15
 
16
  // if nonce is not correct it returns -1
17
  check_ajax_referer( "ngg-ajax" );
18
+
19
  // check for correct capability
20
  if ( !is_user_logged_in() )
21
  die('-1');
22
 
23
  // check for correct NextGEN capability
24
+ if ( !current_user_can('NextGEN Upload images') && !current_user_can('NextGEN Manage gallery') )
25
+ die('-1');
26
+
27
  // include the ngg function
28
  include_once (dirname (__FILE__) . '/functions.php');
29
 
32
  $id = (int) $_POST['image'];
33
  // let's get the image data
34
  $picture = nggdb::find_image( $id );
35
+ // what do you want to do ?
36
  switch ( $_POST['operation'] ) {
37
  case 'create_thumbnail' :
38
  $result = nggAdmin::create_thumbnail($picture);
47
  case 'rotate_ccw' :
48
  $result = nggAdmin::rotate_image($picture, 'CCW');
49
  nggAdmin::create_thumbnail($picture);
50
+ break;
51
  case 'set_watermark' :
52
  $result = nggAdmin::set_watermark($picture);
53
  break;
54
  case 'recover_image' :
55
  $result = nggAdmin::recover_image($picture);
56
+ break;
57
  case 'import_metadata' :
58
  $result = nggAdmin::import_MetaData( $id );
59
  break;
62
  break;
63
  default :
64
  do_action( 'ngg_ajax_' . $_POST['operation'] );
65
+ die('-1');
66
+ break;
67
  }
68
  // A success should return a '1'
69
  die ($result);
70
  }
71
+
72
  // The script should never stop here
73
  die('0');
74
  }
75
 
76
  add_action('wp_ajax_createNewThumb', 'createNewThumb');
77
+
78
  function createNewThumb() {
79
+
80
  global $ngg;
81
+
82
  // check for correct capability
83
  if ( !is_user_logged_in() )
84
  die('-1');
85
+
86
  // check for correct NextGEN capability
87
+ if ( !current_user_can('NextGEN Manage gallery') )
88
+ die('-1');
89
 
90
  include_once( nggGallery::graphic_library() );
91
 
96
  $y = round( $_POST['y'] * $_POST['rr'], 0);
97
  $w = round( $_POST['w'] * $_POST['rr'], 0);
98
  $h = round( $_POST['h'] * $_POST['rr'], 0);
99
+
100
  $thumb = new ngg_Thumbnail($picture->imagePath, TRUE);
101
+
102
  $thumb->crop($x, $y, $w, $h);
103
+
104
  // Note : the routine is a bit different to create_thumbnail(), due to rounding it's resized in the other way
105
  if ($ngg->options['thumbfix']) {
106
  // check for portrait format
109
  $thumb->resize(0, $ngg->options['thumbheight']);
110
  // get optimal y startpos
111
  $ypos = ($thumb->currentDimensions['height'] - $ngg->options['thumbheight']) / 2;
112
+ $thumb->crop(0, $ypos, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
113
  } else {
114
  // first resize to the wanted width, here changed to create_thumbnail()
115
  $thumb->resize($ngg->options['thumbwidth'], 0);
116
+ //
117
  // get optimal x startpos
118
  $xpos = ($thumb->currentDimensions['width'] - $ngg->options['thumbwidth']) / 2;
119
+ $thumb->crop($xpos, 0, $ngg->options['thumbwidth'],$ngg->options['thumbheight']);
120
  }
121
+ //this create a thumbnail but keep ratio settings
122
  } else {
123
+ $thumb->resize($ngg->options['thumbwidth'],$ngg->options['thumbheight']);
124
+ }
125
+
126
  if ( $thumb->save($picture->thumbPath, 100)) {
127
+
128
  //read the new sizes
129
  $new_size = @getimagesize ( $picture->thumbPath );
130
  $size['width'] = $new_size[0];
131
+ $size['height'] = $new_size[1];
132
+
133
  // add them to the database
134
  nggdb::update_image_meta($picture->pid, array( 'thumbnail' => $size) );
135
+
136
  echo "OK";
137
  } else {
138
+ header('HTTP/1.1 500 Internal Server Error');
139
  echo "KO";
140
  }
141
+
142
  exit();
143
+
144
  }
145
+
146
  add_action('wp_ajax_rotateImage', 'ngg_rotateImage');
147
+
148
  function ngg_rotateImage() {
149
+
150
  // check for correct capability
151
  if ( !is_user_logged_in() )
152
  die('-1');
153
+
154
  // check for correct NextGEN capability
155
+ if ( !current_user_can('NextGEN Manage gallery') )
156
+ die('-1');
157
 
158
  require_once( dirname( dirname(__FILE__) ) . '/ngg-config.php');
159
 
160
  // include the ngg function
161
  include_once (dirname (__FILE__). '/functions.php');
162
+
163
  $ngg_options = get_option('ngg_options');
164
+
165
  $id = (int) $_POST['id'];
166
  $result = '-1';
167
+
168
  switch ( $_POST['ra'] ) {
169
  case 'cw' :
170
  $result = nggAdmin::rotate_image($id, 'CW');
179
  $result = nggAdmin::rotate_image($id, 0, 'H');
180
  break;
181
  }
182
+
183
+ // recreate the thumbnail
184
  nggAdmin::create_thumbnail($id);
185
+
186
  if ( $result == 1 )
187
  die('1');
188
 
189
+ header('HTTP/1.1 500 Internal Server Error');
190
  die( $result );
191
+
192
  }
193
 
194
  add_action('wp_ajax_ngg_dashboard', 'ngg_ajax_dashboard');
195
 
196
  function ngg_ajax_dashboard() {
197
+
198
  require_once( dirname( dirname(__FILE__) ) . '/admin/admin.php');
199
  require_once( dirname( dirname(__FILE__) ) . '/admin/overview.php');
200
+
201
+ if ( !current_user_can('NextGEN Gallery overview') )
202
+ die('-1');
203
+
204
  @header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
205
+ @header( 'X-Content-Type-Options: nosniff' );
206
+
207
  switch ( $_GET['jax'] ) {
208
+
209
  case 'ngg_lastdonators' :
210
  ngg_overview_donators();
211
  break;
212
+
213
  case 'dashboard_primary' :
214
  ngg_overview_news();
215
  break;
216
+
217
  case 'ngg_locale' :
218
  ngg_locale();
219
  break;
220
+
221
  case 'dashboard_plugins' :
222
  ngg_related_plugins();
223
  break;
224
 
225
  }
226
  die();
227
+ }
228
 
229
  add_action('wp_ajax_ngg_file_browser', 'ngg_ajax_file_browser');
230
+
231
  /**
232
+ * jQuery File Tree PHP Connector
233
  * @author Cory S.N. LaViska - A Beautiful Site (http://abeautifulsite.net/)
234
  * @version 1.0.1
235
+ *
236
+ * @return string folder content
237
  */
238
  function ngg_ajax_file_browser() {
239
+
240
  global $ngg;
241
 
242
  // check for correct NextGEN capability
243
+ if ( !current_user_can('NextGEN Upload images') && !current_user_can('NextGEN Manage gallery') )
244
+ die('No access');
245
 
246
  if ( !defined('ABSPATH') )
247
  die('No access');
248
 
249
  // if nonce is not correct it returns -1
250
  check_ajax_referer( 'ngg-ajax', 'nonce' );
251
+
252
  //PHP4 compat script
253
  if (!function_exists('scandir')) {
254
  function scandir($dir, $listDirectories = false, $skipDots = true ) {
265
  return $dirArray;
266
  }
267
  }
268
+
269
  // start from the default path
270
  $root = trailingslashit ( WINABSPATH );
271
  // get the current directory
272
  $dir = trailingslashit ( urldecode($_POST['dir']) );
273
+
274
  if( file_exists($root . $dir) ) {
275
  $files = scandir($root . $dir);
276
  natcasesort($files);
277
+
278
+ // The 2 counts for . and ..
279
  if( count($files) > 2 ) {
280
  echo "<ul class=\"jqueryDirTree\" style=\"display: none;\">";
281
+
282
  // return only directories
283
  foreach( $files as $file ) {
284
+
285
  //reserved name for the thumnbnails, don't use it as folder name
286
  if ( $file == 'thumbs')
287
  continue;
288
+
289
  if ( file_exists($root . $dir . $file) && $file != '.' && $file != '..' && is_dir($root . $dir . $file) ) {
290
  echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . esc_html($dir . $file) . "/\">" . esc_html($file) . "</a></li>";
291
  }
292
  }
293
+
294
  echo "</ul>";
295
  }
296
  }
297
+
298
+ die();
299
  }
300
 
301
  add_action('wp_ajax_ngg_tinymce', 'ngg_ajax_tinymce');
302
  /**
303
  * Call TinyMCE window content via admin-ajax
304
+ *
305
+ * @since 1.7.0
306
  * @return html content
307
  */
308
  function ngg_ajax_tinymce() {
309
 
310
  // check for rights
311
+ if ( !current_user_can('edit_pages') && !current_user_can('edit_posts') )
312
  die(__("You are not allowed to be here"));
313
+
314
  include_once( dirname( dirname(__FILE__) ) . '/admin/tinymce/window.php');
315
+
316
+ throw new E_Clean_Exit();
317
  }
318
 
319
  add_action( 'wp_ajax_ngg_rebuild_unique_slugs', 'ngg_ajax_rebuild_unique_slugs' );
320
  /**
321
  * This rebuild the slugs for albums, galleries and images as ajax routine, max 50 elements per request
322
+ *
323
  * @since 1.7.0
324
  * @return string '1'
325
  */
327
  global $wpdb;
328
 
329
  // check for correct NextGEN capability
330
+ if ( !current_user_can('NextGEN Change options') )
331
  die('No access');
332
+
333
  $action = $_POST['_action'];
334
  $offset = (int) $_POST['offset'];
335
+
336
  switch ($action) {
337
  case 'images':
338
  $images = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures ORDER BY pid ASC LIMIT $offset, 50", OBJECT_K);
352
  $gallery->slug = nggdb::get_unique_slug( sanitize_title( $gallery->title ), 'gallery', $gallery->gid );
353
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->nggallery SET slug= '%s' WHERE gid = '%d'" , $gallery->slug, $gallery->gid ) );
354
  }
355
+ }
356
  break;
357
  case 'album':
358
  $albumlist = $wpdb->get_results("SELECT * FROM $wpdb->nggalbum ORDER BY id ASC LIMIT $offset, 50", OBJECT_K);
362
  $album->slug = nggdb::get_unique_slug( sanitize_title( $album->name ), 'album', $album->id );
363
  $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->nggalbum SET slug= '%s' WHERE id = '%d'" , $album->slug, $album->id ) );
364
  }
365
+ }
366
  break;
367
  }
368
 
371
  add_action('wp_ajax_ngg_image_check', 'ngg_ajax_image_check');
372
  /**
373
  * Test for various image resolution
374
+ *
375
+ * @since 1.7.3
376
  * @return result
377
  */
378
  function ngg_ajax_image_check() {
379
 
380
  // check for correct NextGEN capability
381
+ if ( !current_user_can('NextGEN Upload images') )
382
+ die('No access');
383
 
384
  if ( !defined('ABSPATH') )
385
  die('No access');
386
+
387
  $step = (int) $_POST['step'];
388
 
389
  // build the test sizes
390
  $sizes = array();
391
  $sizes[1] = array ( 'width' => 800, 'height' => 600);
392
  $sizes[2] = array ( 'width' => 1024, 'height' => 768);
393
+ $sizes[3] = array ( 'width' => 1280, 'height' => 960); // 1MP
394
  $sizes[4] = array ( 'width' => 1600, 'height' => 1200); // 2MP
395
  $sizes[5] = array ( 'width' => 2016, 'height' => 1512); // 3MP
396
  $sizes[6] = array ( 'width' => 2272, 'height' => 1704); // 4MP
399
  $sizes[9] = array ( 'width' => 3072, 'height' => 2304); // 7MP
400
  $sizes[10] = array ( 'width' => 3264, 'height' => 2448); // 8MP
401
  $sizes[11] = array ( 'width' => 4048, 'height' => 3040); // 12MP
402
+
403
  if ( $step < 1 || $step > 11 )
404
  die('No vaild value');
405
+
406
  // let's test each image size
407
  $temp = imagecreatetruecolor ($sizes[$step]['width'], $sizes[$step]['height'] );
408
  imagedestroy ($temp);
409
+
410
  $result = array ('stat' => 'ok', 'message' => sprintf(__('Could create image with %s x %s pixel', 'nggallery'), $sizes[$step]['width'], $sizes[$step]['height'] ) );
411
+
412
  header('Content-Type: application/json; charset=' . get_option('blog_charset'), true);
413
  echo json_encode($result);
414
+
415
+ die();
416
  }
417
 
418
  add_action('wp_ajax_ngg_test_head_footer', 'ngg_ajax_test_head_footer');
419
  /**
420
  * Check for the header / footer, parts taken from Matt Martz (http://sivel.net/)
421
+ *
422
  * @see https://gist.github.com/378450
423
+ * @since 1.7.3
424
  * @return result
425
  */
426
  function ngg_ajax_test_head_footer() {
445
  if ( ! strstr( $html, '<!--wp_footer-->' ) )
446
  die('Missing the call to wp_footer() in your theme, contact the theme author');
447
  }
448
+ die('success');
449
  }
450
  ?>
admin/css/nggadmin.css CHANGED
@@ -383,21 +383,6 @@ p#sortButton{
383
  margin-bottom:2px;
384
  }
385
 
386
- .imageBox .imageBox_theImage{
387
- border:1px solid #DDD; /* Border color for not selected images */
388
- padding:2px;
389
- }
390
- .imageBoxHighlighted .imageBox_theImage{
391
- border:3px solid #316AC5; /* Border color for selected image */
392
- padding:0px;
393
-
394
- }
395
- .imageBoxHighlighted span{ /* Title of selected image */
396
- background-color: #316AC5;
397
- color:#FFFFFF;
398
- padding:2px;
399
- }
400
-
401
  .imageBox_label{ /* Title of images - both selected and not selected */
402
  text-align:center;
403
  font-family: arial;
@@ -406,44 +391,6 @@ p#sortButton{
406
  margin: 0 auto;
407
  }
408
 
409
- /*
410
- DIV that indicates where the dragged image will be placed
411
- */
412
-
413
- #insertionMarker{
414
- height:150px;
415
- width:6px;
416
- position:absolute;
417
- }
418
-
419
- #insertionMarkerLine{
420
- width:6px; /* No need to change this value */
421
- height:145px; /* To adjust the height of the div that indicates where the dragged image will be dropped */
422
-
423
- }
424
-
425
- #insertionMarker img{
426
- float:left;
427
- }
428
-
429
- /*
430
- DIV that shows the image as you drag it
431
- */
432
-
433
- #dragDropContent{
434
-
435
- opacity:0.4; /* 40 % opacity */
436
- filter:alpha(opacity=40); /* 40 % opacity */
437
-
438
- /*
439
- No need to change these three values
440
- */
441
- position:absolute;
442
- z-index:10;
443
- display:none;
444
-
445
- }
446
-
447
  /* UPGRADE PAGE */
448
 
449
  .error_inline {
383
  margin-bottom:2px;
384
  }
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  .imageBox_label{ /* Title of images - both selected and not selected */
387
  text-align:center;
388
  font-family: arial;
391
  margin: 0 auto;
392
  }
393
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
394
  /* UPGRADE PAGE */
395
 
396
  .error_inline {
admin/manage-sort.php CHANGED
@@ -56,7 +56,26 @@ function nggallery_sortorder($galleryID = 0){
56
  $base_url = $clean_url;
57
 
58
  ?>
59
- <script type='text/javascript' src='<?php echo NGGALLERY_URLPATH ?>admin/js/sorter.js'></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  <div class="wrap">
61
  <form id="sortGallery" method="POST" action="<?php echo $clean_url ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
62
  <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
@@ -82,24 +101,20 @@ function nggallery_sortorder($galleryID = 0){
82
  </ul>
83
  </form>
84
  <div id="debug" style="clear:both"></div>
85
- <?php
86
- if($picturelist) {
87
- foreach($picturelist as $picture) {
88
- ?>
89
- <div class="imageBox" id="pid-<?php echo $picture->pid ?>">
90
- <div class="imageBox_theImage" style="background-image:url('<?php echo esc_url( $picture->thumbURL ); ?>')"></div>
91
- <div class="imageBox_label"><span><?php echo esc_html( stripslashes($picture->alttext) ); ?></span></div>
92
- </div>
93
- <?php
 
 
94
  }
95
- }
96
- ?>
97
- <div id="insertionMarker">
98
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_top.gif"/>
99
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_middle.gif" id="insertionMarkerLine"/>
100
- <img src="<?php echo NGGALLERY_URLPATH ?>admin/images/marker_bottom.gif"/>
101
  </div>
102
- <div id="dragDropContent"></div>
103
  </div>
104
 
105
  <?php
56
  $base_url = $clean_url;
57
 
58
  ?>
59
+ <script type="text/javascript">
60
+ // seralize the ImageOrder
61
+ function saveImageOrder()
62
+ {
63
+ var serial = "";
64
+ var objects = document.getElementsByTagName('div');
65
+ for(var no=0;no<objects.length;no++){
66
+ if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
67
+ if (serial.length > 0) serial = serial + '&'
68
+ serial = serial + "sortArray[]=" + objects[no].id;
69
+ }
70
+ }
71
+ jQuery('input[name=sortorder]').val(serial);
72
+ // debug( 'This is the new order of the images(IDs) : <br>' + orderString );
73
+
74
+ }
75
+ jQuery(document).ready(function($) {
76
+ $(".jqui-sortable").sortable({items: 'div.imageBox'});
77
+ });
78
+ </script>
79
  <div class="wrap">
80
  <form id="sortGallery" method="POST" action="<?php echo $clean_url ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
81
  <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
101
  </ul>
102
  </form>
103
  <div id="debug" style="clear:both"></div>
104
+ <div class='jqui-sortable'>
105
+ <?php
106
+ if($picturelist) {
107
+ foreach($picturelist as $picture) {
108
+ ?>
109
+ <div class="imageBox" id="pid-<?php echo $picture->pid ?>">
110
+ <div class="imageBox_theImage" style="background-image:url('<?php echo esc_url( $picture->thumbURL ); ?>')"></div>
111
+ <div class="imageBox_label"><span><?php echo esc_html( stripslashes($picture->alttext) ); ?></span></div>
112
+ </div>
113
+ <?php
114
+ }
115
  }
116
+ ?>
 
 
 
 
 
117
  </div>
 
118
  </div>
119
 
120
  <?php
admin/tinymce/window.php CHANGED
@@ -2,10 +2,20 @@
2
 
3
  if ( !defined('ABSPATH') )
4
  die('You are not allowed to call this page directly.');
5
-
6
  global $wpdb, $nggdb;
7
 
8
  @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
 
 
 
 
 
 
 
 
 
 
9
  ?>
10
  <html xmlns="http://www.w3.org/1999/xhtml">
11
  <head>
@@ -14,18 +24,14 @@ global $wpdb, $nggdb;
14
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
15
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
16
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
17
- <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/jquery.js"></script>
18
- <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.core.min.js"></script>
19
- <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.widget.min.js"></script>
20
- <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.position.min.js"></script>
21
- <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/jquery/ui/jquery.ui.autocomplete.min.js"></script>
22
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
23
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
24
  <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
25
  <base target="_self" />
26
  </head>
27
  <script type="text/javascript">
28
- jQuery(document).ready(function(){
29
  jQuery("#gallerytag").nggAutocomplete( {
30
  type: 'gallery',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
31
  });
@@ -47,7 +53,7 @@ jQuery(document).ready(function(){
47
  <li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e('Picture', 'nggallery'); ?></a></span></li>
48
  </ul>
49
  </div>
50
-
51
  <div class="panel_wrapper">
52
  <!-- gallery panel -->
53
  <div id="gallery_panel" class="panel current">
@@ -69,7 +75,7 @@ jQuery(document).ready(function(){
69
  </table>
70
  </div>
71
  <!-- gallery panel -->
72
-
73
  <!-- album panel -->
74
  <div id="album_panel" class="panel">
75
  <br />
@@ -89,7 +95,7 @@ jQuery(document).ready(function(){
89
  </table>
90
  </div>
91
  <!-- album panel -->
92
-
93
  <!-- single pic panel -->
94
  <div id="singlepic_panel" class="panel">
95
  <br />
2
 
3
  if ( !defined('ABSPATH') )
4
  die('You are not allowed to call this page directly.');
5
+
6
  global $wpdb, $nggdb;
7
 
8
  @header('Content-Type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
9
+
10
+ // Get WordPress scripts and styles
11
+ wp_enqueue_script('jquery-ui-core');
12
+ wp_enqueue_script('jquery-ui-widget');
13
+ wp_enqueue_script('jquery-ui-position');
14
+ global $wp_scripts;
15
+ if (!isset($wp_scripts->registered['jquery-ui-autocomplete'])) {
16
+ wp_register_script( 'jquery-ui-autocomplete', NGGALLERY_URLPATH .'admin/js/jquery.ui.autocomplete.min.js', array('jquery-ui-core'), '1.8.15');
17
+ }
18
+ wp_enqueue_script('jquery-ui-autocomplete');
19
  ?>
20
  <html xmlns="http://www.w3.org/1999/xhtml">
21
  <head>
24
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
25
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
26
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
27
+ <?php wp_print_scripts() ?>
 
 
 
 
28
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/js/ngg.autocomplete.js"></script>
29
  <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>admin/tinymce/tinymce.js"></script>
30
  <link rel="stylesheet" type="text/css" href="<?php echo NGGALLERY_URLPATH ?>admin/css/jquery.ui.css" media="all" />
31
  <base target="_self" />
32
  </head>
33
  <script type="text/javascript">
34
+ jQuery(document).ready(function(){
35
  jQuery("#gallerytag").nggAutocomplete( {
36
  type: 'gallery',domain: "<?php echo home_url('index.php', is_ssl() ? 'https' : 'http'); ?>"
37
  });
53
  <li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e('Picture', 'nggallery'); ?></a></span></li>
54
  </ul>
55
  </div>
56
+
57
  <div class="panel_wrapper">
58
  <!-- gallery panel -->
59
  <div id="gallery_panel" class="panel current">
75
  </table>
76
  </div>
77
  <!-- gallery panel -->
78
+
79
  <!-- album panel -->
80
  <div id="album_panel" class="panel">
81
  <br />
95
  </table>
96
  </div>
97
  <!-- album panel -->
98
+
99
  <!-- single pic panel -->
100
  <div id="singlepic_panel" class="panel">
101
  <br />
admin/upload.php CHANGED
@@ -7,6 +7,8 @@
7
  */
8
 
9
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
 
 
10
  if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
11
  $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
12
  elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
@@ -16,16 +18,21 @@ if ( empty($_COOKIE[LOGGED_IN_COOKIE]) && !empty($_REQUEST['logged_in_cookie'])
16
 
17
  header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
18
 
19
- //check for correct capability
20
- if ( !is_user_logged_in() )
21
- die('Login failure. -1');
22
-
23
- //check for correct capability
24
- if ( !current_user_can('NextGEN Upload images') )
25
- die('You do not have permission to upload files. -2');
26
-
27
- //check for correct nonce
28
- check_admin_referer('ngg_swfupload');
 
 
 
 
 
29
 
30
  //check for nggallery
31
  if ( !defined('NGGALLERY_ABSPATH') )
7
  */
8
 
9
  // Flash often fails to send cookies with the POST or upload, so we need to pass it in GET or POST instead
10
+ // We then have to validate the cookie manually. NOTE: WordPress functions, like
11
+ // get_current_user_id() and the like are NOT available in this file.
12
  if ( is_ssl() && empty($_COOKIE[SECURE_AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
13
  $_COOKIE[SECURE_AUTH_COOKIE] = $_REQUEST['auth_cookie'];
14
  elseif ( empty($_COOKIE[AUTH_COOKIE]) && !empty($_REQUEST['auth_cookie']) )
18
 
19
  header('Content-Type: text/plain; charset=' . get_option('blog_charset'));
20
 
21
+ if (wp_validate_auth_cookie()) {
22
+ $results = wp_parse_auth_cookie();
23
+ $logged_in = FALSE;
24
+ if (isset($results['username']) && isset($results['expiration'])) {
25
+ if (time() < floatval($results['expiration'])) {
26
+ if (($userdata = get_userdatabylogin($results['username'])))
27
+ $logged_in = $userdata->ID;
28
+ }
29
+ }
30
+
31
+ if (!$logged_in) die("Login failure. -1");
32
+ else if (!user_can($logged_in, 'NextGEN Upload images')) {
33
+ die('You do not have permission to upload files. -2');
34
+ }
35
+ }
36
 
37
  //check for nggallery
38
  if ( !defined('NGGALLERY_ABSPATH') )
changelog.txt CHANGED
@@ -1,6 +1,15 @@
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
 
 
 
 
 
 
 
 
 
4
  = V1.9.6 - 07.21.2012 =
5
  * Changed: Implemented workaround for bug found in WordPress SEO, resulting in no images being added to sitemap
6
  * Bugfix: Fixed an issue with users not being able to dismiss the "Photocrati Acquisition Notice"
@@ -36,10 +45,10 @@ by Photocrati Media
36
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
37
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
38
  * Bugfix : Load piclens script via other function
39
- * Bugfix : IE7 script fix for add gallery
40
  * Bugfix : IE7/IE8 width set correctly for edit album autocomplete field
41
 
42
- = V1.9.0 - 27.11.2011 =
43
  * NEW : Keep images transparency for PNG and GIF format
44
  * NEW : Switch to Plupload, support now HTML5 Upload (only with WordPress 3.3)
45
  * NEW : Added client side resize feature (only with WordPress 3.3)
@@ -60,7 +69,7 @@ by Photocrati Media
60
 
61
  = V1.8.3 - 07.08.2011 =
62
  * Changed : Support for simple custom permalink structures (i.e. /%category%/%postname%/)
63
- * Bugfix : Sub-Albums in Albums didn't create the correct link
64
  * Bugfix : AJAX Pagination didn't work anymore
65
  * Bugfix : Adding index.php to home_url()
66
  * Bugfix : Preview picture lost on backend gallery page 2 or higher
@@ -83,7 +92,7 @@ by Photocrati Media
83
  * NEW : Adding sort operation for galleries overview page
84
  * Changed : Updated pagination to new WP3.1 style
85
  * Bugfix : Create unique slug in a better way
86
- * Bugfix : Rework screen options filter for gallery and image table
87
  * Bugfix : Empty values in XMLRPC update calls are ignored
88
  * Bugfix : Create gallery failed when safe-mode on
89
  * Bugfix : Permalink didn't work in combination with album & imagebrowser
@@ -143,7 +152,7 @@ by Photocrati Media
143
 
144
  = V1.6.0 - 07.09.2010 =
145
  * NEW : Wordpress 3.0 Network (Multi-Site) support
146
- * NEW : Integrate jQuery Cycle as NON-Flash slideshow
147
  * NEW : Adding jQuery File Tree for import folder (THX to Sergey Pasyuk )
148
  * NEW : Added action hook 'ngg_show_imagebrowser_first' on custom request
149
  * NEW : Added filter hook 'ngg_slideshow_size' to resize sildeshow for mobile browser plugins
@@ -171,11 +180,11 @@ by Photocrati Media
171
  * Changed : Prepare new filter to replace slideshow
172
  * Bugfix : Remove non-breaking space from navigation
173
  * Bugfix : Pagination of galleries
174
- * Bugfix : Fixed brackets position for old shortcode query
175
- * Bugfix : Slideshow option 'Show next image on click" has wrong default value
176
 
177
  = V1.5.2 - 25.03.2010 =
178
- * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
179
  * Bugfix : Missing $wpdb in shortcodes.php
180
 
181
  = V1.5.1 - 23.03.2010 =
@@ -192,7 +201,7 @@ by Photocrati Media
192
  * NEW : Auto downloader for translation file
193
  * Changed : Rename query var from slideshow to callback for compat reason with other plugin
194
  * Changed : Convert widget function to new WP structure
195
- * Changed : Include lookup for tags into the backend search
196
  * Changed : Restructure addgallery and settings page to enable custom tabs
197
  * Bugfix : Select album preview from gallery preview pics instead random list
198
  * Bugfix : Keep fix dimension in edit thumbnail operation
@@ -250,7 +259,7 @@ by Photocrati Media
250
  * Added : New filter ngg_gallery_object and ngg_image_object
251
  * Bugfix : Fix double rendering of a gallery if two album shortcodes are used
252
  * Bugfix : Fix for custom field ngg_gal_sort
253
- * Bugfix : Changed capability check for upload
254
  * Bugfix : Check for correct version OR memory limit
255
 
256
  = V1.3.3 - 11.06.2009 =
@@ -282,7 +291,7 @@ by Photocrati Media
282
  * Changed : Meta tag added via wp_head hook (THX to Viper)
283
  * Bugfix : Correct various PHP notice messages
284
  * Bugfix : Typo fix in custom fields for ngg_gal_ImageBrowser
285
- * Bugfix : Avoid upload of images in gallery without correct capability
286
 
287
  = V1.2.1 - 22.03.2009 =
288
  * NEW : Support for IE8 Web Slices in widgets
@@ -311,7 +320,7 @@ by Photocrati Media
311
  * NEW : Pagination for album page via custom fields ('ngg_paged_Galleries')
312
  * NEW : Support for fixed number of columns inside the gallery
313
  * NEW : Added pagination for galleries and images in admin section
314
- * NEW : New action hook after image is added to database, called 'ngg_added_new_image'
315
  * NEW : New template for caption below images, called via [nggallery id=x template=caption]
316
  * Added : SWFUpload V2.2.0 B4
317
  * Changed : Rework of Manage image tables
@@ -327,7 +336,7 @@ by Photocrati Media
327
 
328
  = V1.0.2 - 19.12.2008 =
329
  * Added : Option to enable/disable the MediaRSS Feed
330
- * Added : For flash under FF3/WIN we should use outline: none;
331
  * Added : Use sort order also for Media RSS
332
  * Changed : Descending order for TinyMCE Editor
333
  * Changed : Added screencolor flashvar as bgcolor for the flash slideshow
@@ -335,7 +344,7 @@ by Photocrati Media
335
  * Bugfix : Check for empty gallery title and show name instead
336
  * Bugfix : Album id=all / Album id=0 didn't show content
337
  * Bugfix : Check for a empty description and alttext
338
- * Bugfix : Remove HTML tags from slideshow
339
  * Bugfix : Load SWFobject always when the imagerotator exist
340
  * Bugfix : Zip-Upload in existing gallery failed
341
  * Bugifx : Typo in functions.php (THX to David Horat)
@@ -347,34 +356,34 @@ by Photocrati Media
347
 
348
  = V1.0.0 - 11.12.2008 =
349
  * NEW : Adding some rewrite rules for the Blog title for a better SEO (Will be continued...)
350
- * NEW : Added ImageMagick support (currently a bit experimental) (THX to Frederic de Ranter)
351
  * NEW : Automatic unistall via register_uninstall_hook()
352
  * NEW : Added a presort option to sort easier the images
353
  * NEW : Lookup for a nggallery.css in the theme folder
354
  * NEW : Added Date/Time field to database and import it from EXIF, new sort option
355
- * NEW : Multi Widgets to show links to Media RSS feeds (THX to Vincent Prat)
356
- * NEW : PicLens support for galleries (THX to Vincent Prat)
357
- * NEW : Copy/Move images between galleries (THX to Vincent Prat)
358
- * NEW : Media RSS feeds (either for galleries, albums or global) (THX to Vincent Prat)
359
- * NEW : Image tag management (THX to Vincent Prat)
360
  * NEW : Convert all shortcodes to WP shortcodes API
361
  * NEW : AJAX based thumbnail generator
362
  * NEW : Create output via template files, more flexible and support for multiple templates
363
  * NEW : Extended role system. Each gallery has now a author
364
  * NEW : [thumb id="4,5,12,..."] shortcode. You can now insert thumbnails for one or more images (that are not necessarly inside the same gallery).
365
- * Changed : Add swfupload 2.2.0. Support for Adobe Flash 10 upload
366
- * Changed : Update all Admin pages for Wordpress 2.7 Admin UI
367
  * Changed : New icon for TinyMCE and WP2.7 Menue from http://www.pinvoke.com/
368
  * Changed : Move update message to admin.php
369
- * Changed : Widgets are now core and doesn't need to be activate, rework as Multi Widgets
370
  * Changed : Improved the gallery management page.
371
  * Changed : Rename the filter 'ngg_create_gallery_thumbcode' to 'ngg_get_thumbcode'.
372
  * Changed : Convert tags to WP-Taxonomy tables, no more need for ngg_tags, ngg_pic2tags
373
  * Changed : Arrange manage fields in a new way
374
- * Changed : Support now SSL
375
  * Changed : Use JQuery UI instead of interface lib
376
  * Changed : Updated to swfobject 2.1
377
- * Changed : Rework of database queries and new central nggdb class
378
  * Bugfix : Changed CSS for singlepic padding to margin
379
  * Bugfix : Check for zero in Exif Focal Length
380
  * Bugfix : Round instead inval for square thumbnails
@@ -383,7 +392,7 @@ by Photocrati Media
383
  * Removed : Wordpress 2.1 - 2.3 files deleted
384
 
385
  = V0.99 - 27.09.2008 =
386
- * Changed : Included swfobject version 2.1
387
  * Bugfix : Recognize the zip better
388
  * Bugfix : Limit the length of the title in the media-upload
389
  * Bugfix : Round instead inval for square thumbnails
@@ -394,17 +403,17 @@ by Photocrati Media
394
  = V0.97 - 10.07.2008 =
395
  * Changed : Get new path contstant from WP2.6
396
  * Changed : Minor updates for WP2.6
397
- * Changed : Added new filters (THX to Vincent Prat)
398
  * Removed : Revert singlepic wrapper, breaks validation
399
 
400
  = V0.96 - 18.05.2008 =
401
- * Changed : Use postbox for gallery settings
402
  * Added : New filter function to add custom columns
403
  * Bugfix : Fixed width for Thickbox in Manage gallery
404
  * Bugfix : fixed width for media upload select box
405
  * Bugfix : Remove <p> tag in singlepic regex
406
- * Bugfix : Correct format of shutter speed
407
- * Bugfix : Album name in Short code not useable
408
 
409
  = V0.95 - 25.04.2008 =
410
  * Bugfix : Correction in media-upload to fit with Wordpress 2.5.1
@@ -445,9 +454,9 @@ by Photocrati Media
445
  * NEW : Sort order for images
446
  * NEW : Updated style for Wp 2.5
447
  * NEW : Media upload tab integration for WP 2.5
448
- * Added : Change wp shortcode filter
449
  * Added : TinyMCE V3 Button for WordPress 2.5
450
- * Added : Singlepic center class
451
  * Changed : New default parameter for ImageRotator 3.15
452
  * Changed : By default enable metadata import
453
  * Changed : Moved disable/enable flash setting to add gallery
@@ -468,7 +477,7 @@ by Photocrati Media
468
  * Changed : Add ini_set 128MB for memory-limit
469
  * Bugfix : SWFUpload Cookie Post_Params are overwritten , no upload possible
470
  * Bugfix : WPMU options are not saved after installation
471
- * Bugfix : Remove Flush rewrite rules during install
472
 
473
  = V0.82 - 09.02.2008 =
474
  * Bugfix : add_filter (searchnggallerytags) not proper included for some other plugins
@@ -476,30 +485,30 @@ by Photocrati Media
476
  = V0.81 - 04.02.2008 =
477
  * Changed : Use stristr first to reduce CPU cycles (THX to Alakhnor)
478
  * Changed : Flush Rewrites rules after option update
479
- * Changed : Rework for folder check under Safe-Mode
480
  * Bugfix : Check for array in get_option() (THX to Alessandro)
481
  * Bugfix : Add Cookie to SWFUpload, show Error code included
482
  * Bugfix : galShowOrder = Sildeshow at first didn't work
483
- * Bugfix : Remove reference from ngg_getOnlyImages
484
 
485
  = V0.80 - 02.02.2008 =
486
- * NEW : SWFUpload integrated : Show upload progress and select multiple files in the file browser dialog.
487
  * NEW : Progress bar for resize, watermark and thumbnail operation
488
  * NEW : Import Meta data from images
489
  * NEW : Show Meta data information
490
  * NEW : Cache option for SinglePic
491
  * NEW : Permalink support
492
  * NEW : Custom fields support - Change the settings for each post/page
493
- * Changed : Up to 10 Widgets, exclude galleries from random/recent images.
494
  * Changed : Refactor permission check for Safe-Mode Check and mkdir/chmod
495
  * Changed : Admin CSS in new folder/file for better structure
496
  * Changed : Clean up folder structure
497
  * Changed : Clean up code in manage.php, functions.php
498
  * Changed : Moved several functions into nggAdmin Class (functions.php)
499
  * Changed : Update to jQuery V1.1.4 (v1.2.1 causes problems with interface.js)
500
- * Changed : Hide used galleries in album admin page
501
  * Changed : Remove float in singlepic code and added class ngg-left , ngg-right (THX to Nathan Sylvain)
502
- * Changed : Edit style setting (added new class .desc , THX to Sebastian)
503
  * Changed : Check for galleryfolder instead name (THX to Luke Poland)
504
  * Changed : Delete images per default
505
  * Changed : Change CSS (ngg-album-compact) , remove width & height setting from code
@@ -559,12 +568,12 @@ by Photocrati Media
559
  * Added : Add Full size link to thickbox
560
  * Added : Check for page/postid in tag processing
561
  * Added : Sildeshow widget can now contain all images
562
- * Added : Minimize/Maximize option for albums
563
  * Added : Deregister jQuery V1.1.2 for WP2.2 (to use V1.1.3.1)
564
  * Added : Integrate wp_nonce_field at all admin pages
565
  * Changed : Update to Thickbox 3.1 + mods for NextGEN gallery
566
  * Changed : Moved "clear:both" into class "ngg-clear" (THX to Gero)
567
- * Changed : Switched from jQuery Interface to jQuery Tabs from Klaus Hartl
568
  * Remove : Remove option for singlepic link
569
  * Remove : Remove options for imagebrowser
570
  * Bugfix : Most Recent image in Widget are wrong
@@ -579,7 +588,7 @@ by Photocrati Media
579
 
580
  = V0.64 - 31.07.2007 =
581
  * Bugfix : Remove arrows in image browser text
582
- * Bugfix : Include nggadmintab.php with dirname
583
  * Bugfix : Zip-Upload under Mac > look for basename
584
 
585
  = V0.63 - 10.07.2007 =
@@ -609,19 +618,19 @@ by Photocrati Media
609
  * NEW : Show gallery without Subpages
610
  * NEW : Manage gallery : Function "Add a new page"
611
  * NEW : Manage gallery : Show/Hide thumbnails
612
- * Added : Slideshow option : Watermark / Background music
613
- * Added : Check for memory limit
614
  * Added : Show actual memory usage in overview
615
  * Added : Include function check in widget
616
  * Added : Latest Sidebar widget from KeViN
617
  * Added : Check for capability during installation
618
  * Changed : Remove P Tag around gallery tags ( THX to the work from John Godley )
619
  * Bugfix : Delete picture, check for pid
620
- * Bugfix : admin/settings.php line #172: typos corrected (this=these,maxium=maximum). (THX to Helene D.)
621
- * Bugfix : admin/settings.php line #311: missing </td> added. (THX to Helene D.)
622
 
623
  = V0.52 - 31.05.2007 =
624
- * Changed : Create better thubmnails in square mode (THX to Kees de Bruin)
625
  * Changed : Again , fixed ratio create better thumbnails (Also for widescreen photos)
626
  * Removed : Option "Resize image before cropping" removed and included in Create square thumbnail
627
  * Bugfix : Scan folder for new picture didn't set exclude = 0
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
4
+ = V1.9.7 - 11.12.2012 =
5
+ * Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
6
+ * Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
7
+ * Bugfix: Image uploads work in WP 3.2 when using Safari
8
+ * Bugfix: Adjusted TinyMCE window to use built-in JavaScript libraries
9
+ * Bugfix: Removed Photocrati acquisition announcement
10
+ * Bugfix: Fixed incorrect usage of ImageJpeg() function
11
+ * Bugfix: Switched from "template_redirect" to "wp_enqueue_script" hook to load scripts and styles
12
+
13
  = V1.9.6 - 07.21.2012 =
14
  * Changed: Implemented workaround for bug found in WordPress SEO, resulting in no images being added to sitemap
15
  * Bugfix: Fixed an issue with users not being able to dismiss the "Photocrati Acquisition Notice"
45
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
46
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
47
  * Bugfix : Load piclens script via other function
48
+ * Bugfix : IE7 script fix for add gallery
49
  * Bugfix : IE7/IE8 width set correctly for edit album autocomplete field
50
 
51
+ = V1.9.0 - 27.11.2011 =
52
  * NEW : Keep images transparency for PNG and GIF format
53
  * NEW : Switch to Plupload, support now HTML5 Upload (only with WordPress 3.3)
54
  * NEW : Added client side resize feature (only with WordPress 3.3)
69
 
70
  = V1.8.3 - 07.08.2011 =
71
  * Changed : Support for simple custom permalink structures (i.e. /%category%/%postname%/)
72
+ * Bugfix : Sub-Albums in Albums didn't create the correct link
73
  * Bugfix : AJAX Pagination didn't work anymore
74
  * Bugfix : Adding index.php to home_url()
75
  * Bugfix : Preview picture lost on backend gallery page 2 or higher
92
  * NEW : Adding sort operation for galleries overview page
93
  * Changed : Updated pagination to new WP3.1 style
94
  * Bugfix : Create unique slug in a better way
95
+ * Bugfix : Rework screen options filter for gallery and image table
96
  * Bugfix : Empty values in XMLRPC update calls are ignored
97
  * Bugfix : Create gallery failed when safe-mode on
98
  * Bugfix : Permalink didn't work in combination with album & imagebrowser
152
 
153
  = V1.6.0 - 07.09.2010 =
154
  * NEW : Wordpress 3.0 Network (Multi-Site) support
155
+ * NEW : Integrate jQuery Cycle as NON-Flash slideshow
156
  * NEW : Adding jQuery File Tree for import folder (THX to Sergey Pasyuk )
157
  * NEW : Added action hook 'ngg_show_imagebrowser_first' on custom request
158
  * NEW : Added filter hook 'ngg_slideshow_size' to resize sildeshow for mobile browser plugins
180
  * Changed : Prepare new filter to replace slideshow
181
  * Bugfix : Remove non-breaking space from navigation
182
  * Bugfix : Pagination of galleries
183
+ * Bugfix : Fixed brackets position for old shortcode query
184
+ * Bugfix : Slideshow option 'Show next image on click" has wrong default value
185
 
186
  = V1.5.2 - 25.03.2010 =
187
+ * Bugfix : XSS security vulnerability (THX to Core Security Advisories Team , Pedro Varangot)
188
  * Bugfix : Missing $wpdb in shortcodes.php
189
 
190
  = V1.5.1 - 23.03.2010 =
201
  * NEW : Auto downloader for translation file
202
  * Changed : Rename query var from slideshow to callback for compat reason with other plugin
203
  * Changed : Convert widget function to new WP structure
204
+ * Changed : Include lookup for tags into the backend search
205
  * Changed : Restructure addgallery and settings page to enable custom tabs
206
  * Bugfix : Select album preview from gallery preview pics instead random list
207
  * Bugfix : Keep fix dimension in edit thumbnail operation
259
  * Added : New filter ngg_gallery_object and ngg_image_object
260
  * Bugfix : Fix double rendering of a gallery if two album shortcodes are used
261
  * Bugfix : Fix for custom field ngg_gal_sort
262
+ * Bugfix : Changed capability check for upload
263
  * Bugfix : Check for correct version OR memory limit
264
 
265
  = V1.3.3 - 11.06.2009 =
291
  * Changed : Meta tag added via wp_head hook (THX to Viper)
292
  * Bugfix : Correct various PHP notice messages
293
  * Bugfix : Typo fix in custom fields for ngg_gal_ImageBrowser
294
+ * Bugfix : Avoid upload of images in gallery without correct capability
295
 
296
  = V1.2.1 - 22.03.2009 =
297
  * NEW : Support for IE8 Web Slices in widgets
320
  * NEW : Pagination for album page via custom fields ('ngg_paged_Galleries')
321
  * NEW : Support for fixed number of columns inside the gallery
322
  * NEW : Added pagination for galleries and images in admin section
323
+ * NEW : New action hook after image is added to database, called 'ngg_added_new_image'
324
  * NEW : New template for caption below images, called via [nggallery id=x template=caption]
325
  * Added : SWFUpload V2.2.0 B4
326
  * Changed : Rework of Manage image tables
336
 
337
  = V1.0.2 - 19.12.2008 =
338
  * Added : Option to enable/disable the MediaRSS Feed
339
+ * Added : For flash under FF3/WIN we should use outline: none;
340
  * Added : Use sort order also for Media RSS
341
  * Changed : Descending order for TinyMCE Editor
342
  * Changed : Added screencolor flashvar as bgcolor for the flash slideshow
344
  * Bugfix : Check for empty gallery title and show name instead
345
  * Bugfix : Album id=all / Album id=0 didn't show content
346
  * Bugfix : Check for a empty description and alttext
347
+ * Bugfix : Remove HTML tags from slideshow
348
  * Bugfix : Load SWFobject always when the imagerotator exist
349
  * Bugfix : Zip-Upload in existing gallery failed
350
  * Bugifx : Typo in functions.php (THX to David Horat)
356
 
357
  = V1.0.0 - 11.12.2008 =
358
  * NEW : Adding some rewrite rules for the Blog title for a better SEO (Will be continued...)
359
+ * NEW : Added ImageMagick support (currently a bit experimental) (THX to Frederic de Ranter)
360
  * NEW : Automatic unistall via register_uninstall_hook()
361
  * NEW : Added a presort option to sort easier the images
362
  * NEW : Lookup for a nggallery.css in the theme folder
363
  * NEW : Added Date/Time field to database and import it from EXIF, new sort option
364
+ * NEW : Multi Widgets to show links to Media RSS feeds (THX to Vincent Prat)
365
+ * NEW : PicLens support for galleries (THX to Vincent Prat)
366
+ * NEW : Copy/Move images between galleries (THX to Vincent Prat)
367
+ * NEW : Media RSS feeds (either for galleries, albums or global) (THX to Vincent Prat)
368
+ * NEW : Image tag management (THX to Vincent Prat)
369
  * NEW : Convert all shortcodes to WP shortcodes API
370
  * NEW : AJAX based thumbnail generator
371
  * NEW : Create output via template files, more flexible and support for multiple templates
372
  * NEW : Extended role system. Each gallery has now a author
373
  * NEW : [thumb id="4,5,12,..."] shortcode. You can now insert thumbnails for one or more images (that are not necessarly inside the same gallery).
374
+ * Changed : Add swfupload 2.2.0. Support for Adobe Flash 10 upload
375
+ * Changed : Update all Admin pages for Wordpress 2.7 Admin UI
376
  * Changed : New icon for TinyMCE and WP2.7 Menue from http://www.pinvoke.com/
377
  * Changed : Move update message to admin.php
378
+ * Changed : Widgets are now core and doesn't need to be activate, rework as Multi Widgets
379
  * Changed : Improved the gallery management page.
380
  * Changed : Rename the filter 'ngg_create_gallery_thumbcode' to 'ngg_get_thumbcode'.
381
  * Changed : Convert tags to WP-Taxonomy tables, no more need for ngg_tags, ngg_pic2tags
382
  * Changed : Arrange manage fields in a new way
383
+ * Changed : Support now SSL
384
  * Changed : Use JQuery UI instead of interface lib
385
  * Changed : Updated to swfobject 2.1
386
+ * Changed : Rework of database queries and new central nggdb class
387
  * Bugfix : Changed CSS for singlepic padding to margin
388
  * Bugfix : Check for zero in Exif Focal Length
389
  * Bugfix : Round instead inval for square thumbnails
392
  * Removed : Wordpress 2.1 - 2.3 files deleted
393
 
394
  = V0.99 - 27.09.2008 =
395
+ * Changed : Included swfobject version 2.1
396
  * Bugfix : Recognize the zip better
397
  * Bugfix : Limit the length of the title in the media-upload
398
  * Bugfix : Round instead inval for square thumbnails
403
  = V0.97 - 10.07.2008 =
404
  * Changed : Get new path contstant from WP2.6
405
  * Changed : Minor updates for WP2.6
406
+ * Changed : Added new filters (THX to Vincent Prat)
407
  * Removed : Revert singlepic wrapper, breaks validation
408
 
409
  = V0.96 - 18.05.2008 =
410
+ * Changed : Use postbox for gallery settings
411
  * Added : New filter function to add custom columns
412
  * Bugfix : Fixed width for Thickbox in Manage gallery
413
  * Bugfix : fixed width for media upload select box
414
  * Bugfix : Remove <p> tag in singlepic regex
415
+ * Bugfix : Correct format of shutter speed
416
+ * Bugfix : Album name in Short code not useable
417
 
418
  = V0.95 - 25.04.2008 =
419
  * Bugfix : Correction in media-upload to fit with Wordpress 2.5.1
454
  * NEW : Sort order for images
455
  * NEW : Updated style for Wp 2.5
456
  * NEW : Media upload tab integration for WP 2.5
457
+ * Added : Change wp shortcode filter
458
  * Added : TinyMCE V3 Button for WordPress 2.5
459
+ * Added : Singlepic center class
460
  * Changed : New default parameter for ImageRotator 3.15
461
  * Changed : By default enable metadata import
462
  * Changed : Moved disable/enable flash setting to add gallery
477
  * Changed : Add ini_set 128MB for memory-limit
478
  * Bugfix : SWFUpload Cookie Post_Params are overwritten , no upload possible
479
  * Bugfix : WPMU options are not saved after installation
480
+ * Bugfix : Remove Flush rewrite rules during install
481
 
482
  = V0.82 - 09.02.2008 =
483
  * Bugfix : add_filter (searchnggallerytags) not proper included for some other plugins
485
  = V0.81 - 04.02.2008 =
486
  * Changed : Use stristr first to reduce CPU cycles (THX to Alakhnor)
487
  * Changed : Flush Rewrites rules after option update
488
+ * Changed : Rework for folder check under Safe-Mode
489
  * Bugfix : Check for array in get_option() (THX to Alessandro)
490
  * Bugfix : Add Cookie to SWFUpload, show Error code included
491
  * Bugfix : galShowOrder = Sildeshow at first didn't work
492
+ * Bugfix : Remove reference from ngg_getOnlyImages
493
 
494
  = V0.80 - 02.02.2008 =
495
+ * NEW : SWFUpload integrated : Show upload progress and select multiple files in the file browser dialog.
496
  * NEW : Progress bar for resize, watermark and thumbnail operation
497
  * NEW : Import Meta data from images
498
  * NEW : Show Meta data information
499
  * NEW : Cache option for SinglePic
500
  * NEW : Permalink support
501
  * NEW : Custom fields support - Change the settings for each post/page
502
+ * Changed : Up to 10 Widgets, exclude galleries from random/recent images.
503
  * Changed : Refactor permission check for Safe-Mode Check and mkdir/chmod
504
  * Changed : Admin CSS in new folder/file for better structure
505
  * Changed : Clean up folder structure
506
  * Changed : Clean up code in manage.php, functions.php
507
  * Changed : Moved several functions into nggAdmin Class (functions.php)
508
  * Changed : Update to jQuery V1.1.4 (v1.2.1 causes problems with interface.js)
509
+ * Changed : Hide used galleries in album admin page
510
  * Changed : Remove float in singlepic code and added class ngg-left , ngg-right (THX to Nathan Sylvain)
511
+ * Changed : Edit style setting (added new class .desc , THX to Sebastian)
512
  * Changed : Check for galleryfolder instead name (THX to Luke Poland)
513
  * Changed : Delete images per default
514
  * Changed : Change CSS (ngg-album-compact) , remove width & height setting from code
568
  * Added : Add Full size link to thickbox
569
  * Added : Check for page/postid in tag processing
570
  * Added : Sildeshow widget can now contain all images
571
+ * Added : Minimize/Maximize option for albums
572
  * Added : Deregister jQuery V1.1.2 for WP2.2 (to use V1.1.3.1)
573
  * Added : Integrate wp_nonce_field at all admin pages
574
  * Changed : Update to Thickbox 3.1 + mods for NextGEN gallery
575
  * Changed : Moved "clear:both" into class "ngg-clear" (THX to Gero)
576
+ * Changed : Switched from jQuery Interface to jQuery Tabs from Klaus Hartl
577
  * Remove : Remove option for singlepic link
578
  * Remove : Remove options for imagebrowser
579
  * Bugfix : Most Recent image in Widget are wrong
588
 
589
  = V0.64 - 31.07.2007 =
590
  * Bugfix : Remove arrows in image browser text
591
+ * Bugfix : Include nggadmintab.php with dirname
592
  * Bugfix : Zip-Upload under Mac > look for basename
593
 
594
  = V0.63 - 10.07.2007 =
618
  * NEW : Show gallery without Subpages
619
  * NEW : Manage gallery : Function "Add a new page"
620
  * NEW : Manage gallery : Show/Hide thumbnails
621
+ * Added : Slideshow option : Watermark / Background music
622
+ * Added : Check for memory limit
623
  * Added : Show actual memory usage in overview
624
  * Added : Include function check in widget
625
  * Added : Latest Sidebar widget from KeViN
626
  * Added : Check for capability during installation
627
  * Changed : Remove P Tag around gallery tags ( THX to the work from John Godley )
628
  * Bugfix : Delete picture, check for pid
629
+ * Bugfix : admin/settings.php line #172: typos corrected (this=these,maxium=maximum). (THX to Helene D.)
630
+ * Bugfix : admin/settings.php line #311: missing </td> added. (THX to Helene D.)
631
 
632
  = V0.52 - 31.05.2007 =
633
+ * Changed : Create better thubmnails in square mode (THX to Kees de Bruin)
634
  * Changed : Again , fixed ratio create better thumbnails (Also for widescreen photos)
635
  * Removed : Option "Resize image before cropping" removed and included in Create square thumbnail
636
  * Bugfix : Scan folder for new picture didn't set exclude = 0
lib/gd.thumbnail.inc.php CHANGED
@@ -600,7 +600,7 @@ class ngg_Thumbnail {
600
  }
601
  else {
602
  header('Content-type: image/jpeg');
603
- ImageJpeg($this->newImage,'',$quality);
604
  }
605
  break;
606
  case 'PNG':
@@ -941,4 +941,4 @@ class ngg_Thumbnail {
941
  return true;
942
  }
943
  }
944
- ?>
600
  }
601
  else {
602
  header('Content-type: image/jpeg');
603
+ ImageJpeg($this->newImage,NULL,$quality);
604
  }
605
  break;
606
  case 'PNG':
941
  return true;
942
  }
943
  }
944
+ ?>
nggallery.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.nextgen-gallery.com/
5
  Description: A NextGENeration Photo Gallery for WordPress
6
  Author: Photocrati
7
  Author URI: http://www.photocrati.com/
8
- Version: 1.9.6
9
 
10
  Copyright (c) 2007-2011 by Alex Rabe & NextGEN DEV-Team
11
  Copyright (c) 2012 Photocrati Media
@@ -45,14 +45,13 @@ if (!class_exists('E_Clean_Exit')) {
45
  if (!class_exists('nggLoader')) {
46
  class nggLoader {
47
 
48
- var $version = '1.9.6';
49
- var $dbversion = '1.8.0';
50
- var $minimum_WP = '3.2';
51
  var $donators = 'http://www.nextgen-gallery.com/donators.php';
52
  var $options = '';
53
  var $manage_page;
54
  var $add_PHP5_notice = false;
55
- var $update_notice_setting = 'ngg_show_update_notice';
56
 
57
  function nggLoader() {
58
 
@@ -104,13 +103,6 @@ if (!class_exists('nggLoader')) {
104
 
105
  // Handle upload requests
106
  add_action('init', array(&$this, 'handle_upload_request'));
107
-
108
- // Display "Photocrati Acquisition Announcement"
109
- add_action('admin_init', array(&$this, 'display_update_notice'));
110
-
111
- // AJAX action to hide news notice
112
- add_action('wp_ajax_hide_news_notice', array(&$this, 'hide_news_notice'));
113
-
114
  }
115
 
116
  function start_plugin() {
@@ -147,8 +139,8 @@ if (!class_exists('nggLoader')) {
147
  add_action('parse_request', array(&$this, 'check_request') );
148
 
149
  // Add the script and style files
150
- add_action('template_redirect', array(&$this, 'load_scripts') );
151
- add_action('template_redirect', array(&$this, 'load_styles') );
152
 
153
  }
154
  }
@@ -566,62 +558,6 @@ if (!class_exists('nggLoader')) {
566
  add_action( 'wp_footer', create_function('', 'echo \'<!--wp_footer-->\';'), 99999 );
567
  }
568
 
569
- /**
570
- * Gets the notice flag
571
- * @return string
572
- */
573
- function get_notice_flag()
574
- {
575
- return str_replace('.', '', $this->update_notice_setting.$this->version);
576
- }
577
-
578
-
579
- /**
580
- * Displays the latest update notice to an Administrator
581
- */
582
- function display_update_notice()
583
- {
584
- if (is_admin() &&
585
- current_user_can('administrator') &&
586
- !(get_user_setting($this->get_notice_flag(), FALSE))) {
587
-
588
- // Register a new script
589
- wp_register_style('ngg_social_media', path_join(
590
- NGGALLERY_URLPATH,
591
- 'admin/css/ngg_social_media.css'
592
- ));
593
- wp_register_script('ngg_social_media', path_join(
594
- NGGALLERY_URLPATH,
595
- 'admin/js/ngg_social_media.js'
596
- ), array('jquery'));
597
- wp_register_script('ngg_news_notice', path_join(
598
- NGGALLERY_URLPATH,
599
- 'admin/js/ngg_news_notice.js'
600
- ), array('wp-pointer', 'ngg_social_media'));
601
-
602
- // Get the announcement notice content
603
- ob_start();
604
- require(path_join(
605
- NGGALLERY_ABSPATH,
606
- implode(DIRECTORY_SEPARATOR, array('admin', 'templates', 'latest_news_notice.php'))
607
- ));
608
- $content = ob_get_contents();
609
- ob_end_clean();
610
-
611
- // Display the pointer
612
- wp_enqueue_style( 'wp-pointer' );
613
- wp_enqueue_script( 'utils' ); // for user settings
614
- wp_enqueue_style('ngg_social_media');
615
- wp_enqueue_script('ngg_news_notice');
616
- wp_localize_script('ngg_news_notice', 'nggAdmin', array(
617
- 'content' => $content,
618
- 'setting' => $this->get_notice_flag(),
619
- 'nonce' => wp_create_nonce()
620
- ));
621
- }
622
- }
623
-
624
-
625
  /**
626
  * Handles upload requests
627
  */
5
  Description: A NextGENeration Photo Gallery for WordPress
6
  Author: Photocrati
7
  Author URI: http://www.photocrati.com/
8
+ Version: 1.9.7
9
 
10
  Copyright (c) 2007-2011 by Alex Rabe & NextGEN DEV-Team
11
  Copyright (c) 2012 Photocrati Media
45
  if (!class_exists('nggLoader')) {
46
  class nggLoader {
47
 
48
+ var $version = '1.9.7';
49
+ var $dbversion = '1.8.1';
50
+ var $minimum_WP = '3.4';
51
  var $donators = 'http://www.nextgen-gallery.com/donators.php';
52
  var $options = '';
53
  var $manage_page;
54
  var $add_PHP5_notice = false;
 
55
 
56
  function nggLoader() {
57
 
103
 
104
  // Handle upload requests
105
  add_action('init', array(&$this, 'handle_upload_request'));
 
 
 
 
 
 
 
106
  }
107
 
108
  function start_plugin() {
139
  add_action('parse_request', array(&$this, 'check_request') );
140
 
141
  // Add the script and style files
142
+ add_action('wp_enqueue_scripts', array(&$this, 'load_scripts') );
143
+ add_action('wp_enqueue_scripts', array(&$this, 'load_styles') );
144
 
145
  }
146
  }
558
  add_action( 'wp_footer', create_function('', 'echo \'<!--wp_footer-->\';'), 99999 );
559
  }
560
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
561
  /**
562
  * Handles upload requests
563
  */
readme.txt CHANGED
@@ -1,56 +1,58 @@
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
- Tags: photos,flash,slideshow,images,gallery,media,admin,post,photo-albums,pictures,widgets,photo,picture,image,nextgen-gallery,nextgen gallery
4
  Requires at least: 3.4
5
  Tested up to: 3.4.1
6
  Stable tag: trunk
7
  License: GPLv2
8
 
9
- NextGEN Gallery is a fully integrated image gallery plugin for WordPress with dozens of options and features.
10
 
11
  == Description ==
12
 
13
- NextGEN Gallery is the most popular photo gallery plugin for WordPress, and one of the most popular WordPress plugins of any kind with over 5 million downloads.
14
 
15
  It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (slideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.
16
 
17
- *NextGEN Gallery is now proudly maintained by <a href='http://www.photocrati.com'>Photocrati Media</a>. Special thanks to Alex Rabe who created and maintained the plugin from 2007 through 2011.*
18
 
19
 
20
- = Features =
21
 
22
 
23
  *Upload Galleries*
24
 
25
- * NextGEN Galleries offers diverse and powerful functionality for getting images from your desktop to your website. You can easily upload batches of images via a standard WordPress-style uploader, or upload images via zip file or FTP. NextGEN will automatically import your images meta data.
26
-
27
 
28
  *Manage Galleries*
29
 
30
- * Centralized gallery management. Enjoy a single location where you can see and manage all your galleries.
31
  * Edit galleries. Add or exclude images, change gallery title and description, reorder of images, resize thumbnails.
32
- * Thumbnail Management. Turn thumbnail cropping on off, customize how individual thumbnails are cropped, and bulk resize thumbnails across one more galleries.
33
- * Edit Individual Images. Edit meta data and image tags, rotate images, exclude images.
34
- * Watermarks. Quickly add watermarks to batches or galleries of images.
35
- * Albums. Create and organize collections of galleries (albums), and display them in either compact or extended format.
36
-
37
 
38
  *Display Galleries*
39
 
40
- * Two Gallery Types. Choose between two main display styles: Slideshow and Thumbnail, and allow visitors to toggle between the two.
41
- * Slideshow Galleries. Choose from a vast array of options for slideshows, including slideshow size, transition style, speed, image order, optional navigation bar.
42
- * Thumbnail Galleries. Choose from a wide range of options to customize thumbnail galleries, including 5 different lightboxs for individual images, optional thumbnails cropping and editing, thumbnail styles, captions, and more.
43
- * Single Image Displays. Display and format single images.
44
  * Work with Options Panel or ShortCodes.
45
 
 
46
 
47
- = Further Resources =
48
 
49
- *<a href="http://www.nextgen-gallery.com/nextgen-gallery-demos/" target="_blank">Demo</a><br>
50
- *<a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10" target="_blank">Support</a><br>
51
- *<a href="http://www.nextgen-gallery.com/languages/" target="_blank">Translations</a><br>
52
- *<a href="http://www.nextgen-gallery.com" target="_blank">NextGEN Gallery Official Website</a><br>
53
- *<a href="http://www.photocrati.com" target="_blank">Author Website - Photocrati Media</a><br>
 
 
 
54
  *Follow NextGEN Gallery on <a title="Follow NextGEN Gallery on Facebook" href="http://www.facebook.com/NextGENGallery" target="_blank">Facebook</a>, <a title="Follow NextGEN Gallery on Twitter" href="http://twitter.com/NextGENGallery" target="_blank">Twitter</a>, and <a title="Follow NextGEN Gallery on Google +" href="http://plus.google.com/101643895780935290171" target="_blank">Google +</a><br>
55
 
56
 
@@ -192,6 +194,15 @@ Yes, NextGEN Gallery has been translated into dozens of languages - <a href="htt
192
 
193
  == Changelog ==
194
 
 
 
 
 
 
 
 
 
 
195
  = V1.9.6 - 07.21.2012 =
196
  * Changed: Implemented workaround for bug found in WordPress SEO, resulting in no images being added to sitemap
197
  * Bugfix: Fixed an issue with users not being able to dismiss the "Photocrati Acquisition Notice"
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
+ Tags:gallery,image,images,photo,photos,picture,pictures,slideshow,flash,media,thumbnails,photo-albums,nextgen-gallery,nextgen
4
  Requires at least: 3.4
5
  Tested up to: 3.4.1
6
  Stable tag: trunk
7
  License: GPLv2
8
 
9
+ The most popular WordPress gallery plugin with tons of features and over 6 million downloads.
10
 
11
  == Description ==
12
 
13
+ NextGEN Gallery is the most popular **WordPress gallery plugin**, and one of the most popular WordPress plugins of any kind, with over 6 million downloads.
14
 
15
  It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (slideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.
16
 
17
+ *The NextGEN Gallery WordPress plugin is now proudly maintained by <a href='http://www.photocrati.com'>Photocrati Media</a>. Special thanks to Alex Rabe who created and maintained NextGEN from 2007 through 2011.*
18
 
19
 
20
+ = NextGEN WordPress Gallery Plugin - Features =
21
 
22
 
23
  *Upload Galleries*
24
 
25
+ * Our WordPress gallery plugin offers diverse and powerful functionality for getting images from your desktop to your website. You can easily upload batches of images via a standard WordPress-style uploader, or upload images via zip file or FTP. NextGEN will automatically import your images’ meta data.
 
26
 
27
  *Manage Galleries*
28
 
29
+ * Centralized gallery management. Enjoy a single location where you can see and manage all your galleries.
30
  * Edit galleries. Add or exclude images, change gallery title and description, reorder of images, resize thumbnails.
31
+ * Thumbnail Management. Turn thumbnail cropping on off, customize how individual thumbnails are cropped, and bulk resize thumbnails across one more galleries.
32
+ * Edit Individual Images. Edit meta data and image tags, rotate images, exclude images.
33
+ * Watermarks. Quickly add watermarks to batches or galleries of images.
34
+ * Albums. Create and organize collections of galleries (“albums”), and display them in either compact or extended format.
 
35
 
36
  *Display Galleries*
37
 
38
+ * Two Gallery Types. Choose between two main display styles: Slideshow and Thumbnail, and allow visitors to toggle between the two.
39
+ * Slideshow Galleries. Choose from a vast array of options for slideshows, including slideshow size, transition style, speed, image order, optional navigation bar.
40
+ * Thumbnail Galleries. Choose from a wide range of options to customize thumbnail galleries, including 5 different lightboxs for individual images, optional thumbnails cropping and editing, thumbnail styles, captions, and more.
41
+ * Single Image Displays. Display and format single images.
42
  * Work with Options Panel or ShortCodes.
43
 
44
+ = NextGEN WordPress Gallery Plugin - Community & Extensions =
45
 
46
+ NextGEN has been the dominant WordPress gallery plugin for years. As a result, there is large and great community of users and developers, as well as a large number of dedicated extension plugins. For a list of extension plugins, just search for NextGEN in the WordPress.org plugin repository, or visit our <a href="http://www.nextgen-gallery.com/nextgen-gallery-extension-plugins/">Complete List of NextGEN Extension Plugins</a>.
47
 
48
+ = NextGEN WordPress Gallery Plugin - Resources =
49
+
50
+ *Visit the NextGEN <a href="http://www.nextgen-gallery.com" target="_blank">WordPress Gallery Plugin</a> official homepage<br>
51
+ *View <a href="http://www.nextgen-gallery.com/nextgen-gallery-demos/" target="_blank">NextGEN Gallery Demos</a><br>
52
+ *See the <a href="http://www.nextgen-gallery.com/nextgen-gallery-extension-plugins/">Complete List of NextGEN Extension Plugins</a><br>
53
+ *Get <a href="http://wordpress.org/tags/nextgen-gallery?forum_id=10" target="_blank">NextGEN Support</a> via the WordPress.org forums<br>
54
+ *Get <a href="http://www.nextgen-gallery.com/languages/" target="_blank">Translations</a> for your own language<br>
55
+ *See <a href="http://www.photocrati.com/photography-wordpress-themes" target="_blank">WordPress Photography Themes</a> by the same author<br>
56
  *Follow NextGEN Gallery on <a title="Follow NextGEN Gallery on Facebook" href="http://www.facebook.com/NextGENGallery" target="_blank">Facebook</a>, <a title="Follow NextGEN Gallery on Twitter" href="http://twitter.com/NextGENGallery" target="_blank">Twitter</a>, and <a title="Follow NextGEN Gallery on Google +" href="http://plus.google.com/101643895780935290171" target="_blank">Google +</a><br>
57
 
58
 
194
 
195
  == Changelog ==
196
 
197
+ = V1.9.7 - 11.13.2012 =
198
+ * Secured: Removed bundled version of swfupload; using WordPress-bundled version instead for WordPress 3.2 instances
199
+ * Changed: Using JQuery UI for the image sorting interface (thanks Tomás Soler)
200
+ * Bugfix: Image uploads work in WP 3.2 when using Safari
201
+ * Bugfix: Adjusted TinyMCE window to use built-in JavaScript libraries
202
+ * Bugfix: Removed Photocrati acquisition announcement
203
+ * Bugfix: Fixed incorrect usage of ImageJpeg() function
204
+ * Bugfix: Switched from "template_redirect" to "wp_enqueue_script" hook to load scripts and styles
205
+
206
  = V1.9.6 - 07.21.2012 =
207
  * Changed: Implemented workaround for bug found in WordPress SEO, resulting in no images being added to sitemap
208
  * Bugfix: Fixed an issue with users not being able to dismiss the "Photocrati Acquisition Notice"