NextGEN Gallery – WordPress Gallery Plugin - Version 1.9.2

Version Description

  • 17.01.2012 =
  • NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
  • Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
  • Bugfix : Check first for valid images on unzip (only Mac OS zip-files)
  • Bugfix : Increase z-index for twenty eleven theme
  • Bugfix : Support non latin chars in tagcloud
  • Bugfix : Allow other tinymce intance
  • Bugfix : Better support for WPML translation
Download this release

Release Info

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

Code changes from version 1.9.1 to 1.9.2

admin/album.php CHANGED
@@ -68,7 +68,7 @@ class nggManageAlbum {
68
  function controller() {
69
  global $nggdb;
70
 
71
- $this->currentID = isset($_POST['act_album']) ? (int) $_POST['act_album'] : 0 ;
72
 
73
  if (isset ($_POST['update']) || isset( $_POST['delete'] ) || isset( $_POST['add'] ) )
74
  $this->processor();
68
  function controller() {
69
  global $nggdb;
70
 
71
+ $this->currentID = isset($_REQUEST['act_album']) ? (int) $_REQUEST['act_album'] : 0 ;
72
 
73
  if (isset ($_POST['update']) || isset( $_POST['delete'] ) || isset( $_POST['add'] ) )
74
  $this->processor();
admin/functions.php CHANGED
@@ -797,17 +797,19 @@ class nggAdmin{
797
  $p_header['filename'] = substr ( $p_header['filename'], 0, strpos($p_header['filename'], chr(0) ));
798
  // check for extension
799
  $info = pathinfo($p_header['filename']);
800
- // sanitize the file name before we do further processing
801
- $info['basename'] = sanitize_file_name( $info['basename'] );
802
- $p_header['filename'] = $info['dirname'] . '/' . $info['basename'];
803
  // check for extension
804
  $ext = apply_filters('ngg_allowed_file_types', array('jpeg', 'jpg', 'png', 'gif') );
805
  if ( in_array( strtolower($info['extension']), $ext) ) {
806
  // For MAC skip the ".image" files
807
  if ($info['basename']{0} == '.' )
808
  return 0;
809
- else
810
- return 1;
 
 
 
 
 
811
  }
812
  // ----- all other files are skipped
813
  else {
797
  $p_header['filename'] = substr ( $p_header['filename'], 0, strpos($p_header['filename'], chr(0) ));
798
  // check for extension
799
  $info = pathinfo($p_header['filename']);
 
 
 
800
  // check for extension
801
  $ext = apply_filters('ngg_allowed_file_types', array('jpeg', 'jpg', 'png', 'gif') );
802
  if ( in_array( strtolower($info['extension']), $ext) ) {
803
  // For MAC skip the ".image" files
804
  if ($info['basename']{0} == '.' )
805
  return 0;
806
+ else {
807
+ // sanitize the file name before we do further processing
808
+ $info['basename'] = sanitize_file_name( $info['basename'] );
809
+ $p_header['filename'] = $info['dirname'] . '/' . $info['basename'];
810
+ return 1;
811
+ }
812
+
813
  }
814
  // ----- all other files are skipped
815
  else {
admin/tinymce/tinymce.js CHANGED
@@ -64,8 +64,7 @@ function insertNGGLink() {
64
  }
65
 
66
  if(window.tinyMCE) {
67
- //TODO: For QTranslate we should use here 'qtrans_textarea_content' instead 'content'
68
- window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, tagtext);
69
  //Peforms a clean up of the current editor HTML.
70
  //tinyMCEPopup.editor.execCommand('mceCleanup');
71
  //Repaints the editor. Sometimes the browser has graphic glitches.
64
  }
65
 
66
  if(window.tinyMCE) {
67
+ window.tinyMCE.execInstanceCommand(window.tinyMCE.activeEditor.id, 'mceInsertContent', false, tagtext);
 
68
  //Peforms a clean up of the current editor HTML.
69
  //tinyMCEPopup.editor.execCommand('mceCleanup');
70
  //Repaints the editor. Sometimes the browser has graphic glitches.
changelog.txt CHANGED
@@ -1,6 +1,15 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
 
 
 
 
 
4
  = V1.9.1 - 10.12.2011 =
5
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
6
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ = V1.9.2 - 17.01.2012 =
5
+ * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
6
+ * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
7
+ * Bugfix : Check first for valid images on unzip (only Mac OS zip-files)
8
+ * Bugfix : Increase z-index for twenty eleven theme
9
+ * Bugfix : Support non latin chars in tagcloud
10
+ * Bugfix : Allow other tinymce intance
11
+ * Bugfix : Better support for WPML translation
12
+
13
  = V1.9.1 - 10.12.2011 =
14
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
15
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
lib/image.php CHANGED
@@ -108,7 +108,7 @@ class nggImage{
108
 
109
  function get_href_link() {
110
  // create the a href link from the picture
111
- $this->href = "\n".'<a href="'.$this->imageURL.'" title="'.htmlspecialchars( stripslashes($this->description) ).'" '.$this->get_thumbcode($this->name).'>'."\n\t";
112
  $this->href .= '<img alt="'.$this->alttext.'" src="'.$this->imageURL.'"/>'."\n".'</a>'."\n";
113
 
114
  return $this->href;
@@ -116,7 +116,7 @@ class nggImage{
116
 
117
  function get_href_thumb_link() {
118
  // create the a href link with the thumbanil
119
- $this->href = "\n".'<a href="'.$this->imageURL.'" title="'.htmlspecialchars( stripslashes($this->description) ).'" '.$this->get_thumbcode($this->name).'>'."\n\t";
120
  $this->href .= '<img alt="'.$this->alttext.'" src="'.$this->thumbURL.'"/>'."\n".'</a>'."\n";
121
 
122
  return $this->href;
108
 
109
  function get_href_link() {
110
  // create the a href link from the picture
111
+ $this->href = "\n".'<a href="'.$this->imageURL.'" title="'.htmlspecialchars( stripslashes( nggGallery::i18n($this->description, 'pic_' . $this->pid . '_description') ) ).'" '.$this->get_thumbcode($this->name).'>'."\n\t";
112
  $this->href .= '<img alt="'.$this->alttext.'" src="'.$this->imageURL.'"/>'."\n".'</a>'."\n";
113
 
114
  return $this->href;
116
 
117
  function get_href_thumb_link() {
118
  // create the a href link with the thumbanil
119
+ $this->href = "\n".'<a href="'.$this->imageURL.'" title="'.htmlspecialchars( stripslashes( nggGallery::i18n($this->description, 'pic_' . $this->pid . '_description') ) ).'" '.$this->get_thumbcode($this->name).'>'."\n\t";
120
  $this->href .= '<img alt="'.$this->alttext.'" src="'.$this->thumbURL.'"/>'."\n".'</a>'."\n";
121
 
122
  return $this->href;
lib/post-thumbnail.php CHANGED
@@ -5,8 +5,8 @@
5
  *
6
  * @package NextGEN Gallery
7
  * @author Alex Rabe
8
- * @copyright 2010
9
- * @version 1.0.1
10
  * @access internal
11
  */
12
  class nggPostThumbnail {
@@ -86,43 +86,45 @@ class nggPostThumbnail {
86
  if (!$image)
87
  return $html;
88
 
89
- $img_src = false;
90
-
91
  $class = 'wp-post-image ngg-image-' . $image->pid . ' ';
92
 
93
- // look up for the post thumbnail size and use them if defined
94
- if ($size == 'post-thumbnail') {
95
- if ( is_array($_wp_additional_image_sizes) && isset($_wp_additional_image_sizes['post-thumbnail']) ) {
96
- $size = array();
97
- $size[0] = $_wp_additional_image_sizes['post-thumbnail']['width'];
98
- $size[1] = $_wp_additional_image_sizes['post-thumbnail']['height'];
99
- $size[2] = 'crop';
100
- }
101
- }
102
-
103
- if ( is_array($size) )
104
  $class .= isset($attr['class']) ? esc_attr($attr['class']) : '';
105
 
106
- // render a new image or show the thumbnail if we didn't get size parameters
107
- if ( is_array($size) ) {
108
-
109
- $width = absint( $size[0] );
110
- $height = absint( $size[1] );
111
- $mode = isset($size[2]) ? $size[2] : '';
 
 
 
 
 
 
 
 
 
 
112
 
113
  // check fo cached picture
114
- if ( $post->post_status == 'publish' )
115
- $img_src = $image->cached_singlepic_file( $width, $height, $mode );
116
 
117
- // if we didn't use a cached image then we take the on-the-fly mode
118
- if ($img_src == false)
119
- $img_src = trailingslashit( home_url() ) . 'index.php?callback=image&amp;pid=' . $image->pid . '&amp;width=' . $width . '&amp;height=' . $height . '&amp;mode=crop';
120
 
121
  } else {
122
  $img_src = $image->thumbURL;
123
  }
124
 
125
- $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($image->alttext) . '" title="' . esc_attr($image->title).'" class="'.$class.'" />';
 
 
 
126
 
127
  return $html;
128
  }
@@ -188,8 +190,9 @@ class nggPostThumbnail {
188
  // Use post thumbnail settings if defined
189
  $width = absint( $_wp_additional_image_sizes['post-thumbnail']['width'] );
190
  $height = absint( $_wp_additional_image_sizes['post-thumbnail']['height'] );
 
191
  // check fo cached picture
192
- $img_src = $image->cached_singlepic_file( $width, $height, 'crop' );
193
  }
194
 
195
  // if we didn't use a cached image then we take the on-the-fly mode
@@ -211,4 +214,4 @@ class nggPostThumbnail {
211
  }
212
 
213
  $nggPostThumbnail = new nggPostThumbnail();
214
- ?>
5
  *
6
  * @package NextGEN Gallery
7
  * @author Alex Rabe
8
+ * @copyright 2010-2012
9
+ * @version 1.0.2
10
  * @access internal
11
  */
12
  class nggPostThumbnail {
86
  if (!$image)
87
  return $html;
88
 
89
+ $img_src = false;
 
90
  $class = 'wp-post-image ngg-image-' . $image->pid . ' ';
91
 
92
+ if (is_array($size) || is_array($_wp_additional_image_sizes) && isset($_wp_additional_image_sizes[$size])) {
 
 
 
 
 
 
 
 
 
 
93
  $class .= isset($attr['class']) ? esc_attr($attr['class']) : '';
94
 
95
+ if( is_array($size)){
96
+ //the parameters is given as an array rather than a predfined image
97
+ $width = absint( $size[0] );
98
+ $height = absint( $size[1] );
99
+ if(isset($size[2]) && $size[2] === true) {
100
+ $mode = 'crop';
101
+ } else if(isset($size[2])){
102
+ $mode = $size[2];
103
+ } else {
104
+ $mode = '';
105
+ }
106
+ } else {
107
+ $width = absint( $_wp_additional_image_sizes[$size]['width'] );
108
+ $height = absint( $_wp_additional_image_sizes[$size]['height'] );
109
+ $mode = ($_wp_additional_image_sizes[$size]['crop']) ? 'crop' : '';
110
+ }
111
 
112
  // check fo cached picture
113
+ if ( $post->post_status == 'publish' )
114
+ $img_src = $image->cached_singlepic_file( $width, $height, $mode );
115
 
116
+ // if we didn't use a cached image then we take the on-the-fly mode
117
+ if ($img_src == false)
118
+ $img_src = trailingslashit( home_url() ) . 'index.php?callback=image&amp;pid=' . $image->pid . '&amp;width=' . $width . '&amp;height=' . $height . '&amp;mode=crop';
119
 
120
  } else {
121
  $img_src = $image->thumbURL;
122
  }
123
 
124
+ $alttext = isset($attr['alt']) ? $attr['alt'] : $image->alttext;
125
+ $titletext = isset($attr['title']) ? $attr['title'] : $image->title;
126
+
127
+ $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alttext) . '" title="' . esc_attr($titletext) .'" class="'.$class.'" />';
128
 
129
  return $html;
130
  }
190
  // Use post thumbnail settings if defined
191
  $width = absint( $_wp_additional_image_sizes['post-thumbnail']['width'] );
192
  $height = absint( $_wp_additional_image_sizes['post-thumbnail']['height'] );
193
+ $mode = $_wp_additional_image_sizes['post-thumbnail']['crop'] ? 'crop' : '';
194
  // check fo cached picture
195
+ $img_src = $image->cached_singlepic_file( $width, $height, $mode );
196
  }
197
 
198
  // if we didn't use a cached image then we take the on-the-fly mode
214
  }
215
 
216
  $nggPostThumbnail = new nggPostThumbnail();
217
+ ?>
lib/tags.php CHANGED
@@ -311,7 +311,10 @@ class nggTags {
311
  $new_slugarray = array_map('sanitize_title', $taglist);
312
  $sluglist = "'" . implode("', '", $new_slugarray) . "'";
313
 
314
- // first get all $term_ids with this tag
 
 
 
315
  $term_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug IN ($sluglist) ORDER BY term_id ASC "));
316
  $picids = get_objects_in_term($term_ids, 'ngg_tag');
317
 
@@ -377,4 +380,4 @@ if (!function_exists('nggtags_delete_empty_element')) {
377
  }
378
  }
379
  }
380
- ?>
311
  $new_slugarray = array_map('sanitize_title', $taglist);
312
  $sluglist = "'" . implode("', '", $new_slugarray) . "'";
313
 
314
+ //Treat % as a litteral in the database, for unicode support
315
+ $sluglist=str_replace("%","%%",$sluglist);
316
+
317
+ // first get all $term_ids with this tag
318
  $term_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug IN ($sluglist) ORDER BY term_id ASC "));
319
  $picids = get_objects_in_term($term_ids, 'ngg_tag');
320
 
380
  }
381
  }
382
  }
383
+ ?>
lib/xmlrpc.php CHANGED
@@ -4,7 +4,7 @@
4
  *
5
  * @package NextGEN Gallery
6
  * @author Alex Rabe
7
- * @copyright 2009-2011
8
  */
9
  class nggXMLRPC{
10
 
@@ -21,24 +21,48 @@ class nggXMLRPC{
21
 
22
  $methods['ngg.installed'] = array(&$this, 'nggInstalled');
23
  // Image methods
 
24
  $methods['ngg.getImages'] = array(&$this, 'getImages');
25
  $methods['ngg.uploadImage'] = array(&$this, 'uploadImage');
26
- $methods['ngg.deleteImage'] = array(&$this, 'deleteImage');
27
  $methods['ngg.editImage'] = array(&$this, 'editImage');
 
28
  // Gallery methods
 
29
  $methods['ngg.getGalleries'] = array(&$this, 'getGalleries');
30
  $methods['ngg.newGallery'] = array(&$this, 'newGallery');
31
  $methods['ngg.editGallery'] = array(&$this, 'editGallery');
32
  $methods['ngg.deleteGallery'] = array(&$this, 'deleteGallery');
33
  // Album methods
 
34
  $methods['ngg.getAlbums'] = array(&$this, 'getAlbums');
35
  $methods['ngg.newAlbum'] = array(&$this, 'newAlbum');
36
  $methods['ngg.editAlbum'] = array(&$this, 'editAlbum');
37
  $methods['ngg.deleteAlbum'] = array(&$this, 'deleteAlbum');
38
-
39
  return $methods;
40
  }
41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
  /**
43
  * Check if NextGEN Gallery is installed
44
  *
@@ -418,7 +442,7 @@ class nggXMLRPC{
418
  * - string new album name
419
  * - int id of preview image
420
  * - string description
421
- * - string serialized array of galleries
422
  * @return int with new album ID
423
  */
424
  function newAlbum($args) {
@@ -432,7 +456,7 @@ class nggXMLRPC{
432
  $name = $args[3];
433
  $preview = (int) $args[4];
434
  $description= $args[5];
435
- $galleries = $args[6];
436
  $id = false;
437
 
438
  if ( !$user = $this->login($username, $password) )
@@ -465,7 +489,7 @@ class nggXMLRPC{
465
  * - string album name
466
  * - int id of preview image
467
  * - string description
468
- * - string serialized array of galleries
469
  * @return true if success
470
  */
471
  function editAlbum($args) {
@@ -482,7 +506,7 @@ class nggXMLRPC{
482
  $name = $args[4];
483
  $preview = (int) $args[5];
484
  $description= $args[6];
485
- $galleries = $args[7];
486
 
487
  if ( !$user = $this->login($username, $password) )
488
  return $this->error;
@@ -494,7 +518,7 @@ class nggXMLRPC{
494
  return new IXR_Error( 401, __( 'Sorry, you must be able to manage albums' ) );
495
 
496
  if ( !empty( $name ) )
497
- $result = nggdb::update_album($id, $name, $preview, $description, $description, $galleries);
498
 
499
  if ( !$result )
500
  return new IXR_Error(500, __('Sorry, could not update the album'));
@@ -614,6 +638,41 @@ class nggXMLRPC{
614
 
615
  }
616
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
617
  /**
618
  * Method "ngg.getGalleries"
619
  * Return the list of all galleries
@@ -647,6 +706,41 @@ class nggXMLRPC{
647
 
648
  }
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  /**
651
  * Method "ngg.getImages"
652
  * Return the list of all images inside a gallery
@@ -693,6 +787,56 @@ class nggXMLRPC{
693
 
694
  }
695
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
696
  /**
697
  * Sanitize string or array of strings for database.
698
  *
4
  *
5
  * @package NextGEN Gallery
6
  * @author Alex Rabe
7
+ * @copyright 2009-2012
8
  */
9
  class nggXMLRPC{
10
 
21
 
22
  $methods['ngg.installed'] = array(&$this, 'nggInstalled');
23
  // Image methods
24
+ $methods['ngg.getImage'] = array(&$this, 'getImage');
25
  $methods['ngg.getImages'] = array(&$this, 'getImages');
26
  $methods['ngg.uploadImage'] = array(&$this, 'uploadImage');
 
27
  $methods['ngg.editImage'] = array(&$this, 'editImage');
28
+ $methods['ngg.deleteImage'] = array(&$this, 'deleteImage');
29
  // Gallery methods
30
+ $methods['ngg.getGallery'] = array(&$this, 'getGallery');
31
  $methods['ngg.getGalleries'] = array(&$this, 'getGalleries');
32
  $methods['ngg.newGallery'] = array(&$this, 'newGallery');
33
  $methods['ngg.editGallery'] = array(&$this, 'editGallery');
34
  $methods['ngg.deleteGallery'] = array(&$this, 'deleteGallery');
35
  // Album methods
36
+ $methods['ngg.getAlbum'] = array(&$this, 'getAlbum');
37
  $methods['ngg.getAlbums'] = array(&$this, 'getAlbums');
38
  $methods['ngg.newAlbum'] = array(&$this, 'newAlbum');
39
  $methods['ngg.editAlbum'] = array(&$this, 'editAlbum');
40
  $methods['ngg.deleteAlbum'] = array(&$this, 'deleteAlbum');
41
+
42
  return $methods;
43
  }
44
 
45
+ /**
46
+ * Check if it's an csv string, then serialize it.
47
+ *
48
+ * @since 1.9.2
49
+ * @param string $data
50
+ * @return serialized string
51
+ */
52
+ function is_serialized( $data ) {
53
+
54
+ // if it isn't a string, we don't serialize it.
55
+ if ( ! is_string( $data ) )
56
+ return false;
57
+
58
+ if ($data && !strpos( $data , '{')) {
59
+ $items = explode(',', $data);
60
+ return serialize($items);
61
+ }
62
+
63
+ return $data;
64
+ }
65
+
66
  /**
67
  * Check if NextGEN Gallery is installed
68
  *
442
  * - string new album name
443
  * - int id of preview image
444
  * - string description
445
+ * - string serialized array of galleries or a comma-separated string of gallery IDs
446
  * @return int with new album ID
447
  */
448
  function newAlbum($args) {
456
  $name = $args[3];
457
  $preview = (int) $args[4];
458
  $description= $args[5];
459
+ $galleries = $this->is_serialized($args[6]);
460
  $id = false;
461
 
462
  if ( !$user = $this->login($username, $password) )
489
  * - string album name
490
  * - int id of preview image
491
  * - string description
492
+ * - string serialized array of galleries or a comma-separated string of gallery IDs
493
  * @return true if success
494
  */
495
  function editAlbum($args) {
506
  $name = $args[4];
507
  $preview = (int) $args[5];
508
  $description= $args[6];
509
+ $galleries = $this->is_serialized($args[7]);
510
 
511
  if ( !$user = $this->login($username, $password) )
512
  return $this->error;
518
  return new IXR_Error( 401, __( 'Sorry, you must be able to manage albums' ) );
519
 
520
  if ( !empty( $name ) )
521
+ $result = nggdb::update_album($id, $name, $preview, $description, $galleries);
522
 
523
  if ( !$result )
524
  return new IXR_Error(500, __('Sorry, could not update the album'));
638
 
639
  }
640
 
641
+ /**
642
+ * Method "ngg.getAlbum"
643
+ * Return the specified album
644
+ *
645
+ * @since 1.9.2
646
+ *
647
+ * @param array $args Method parameters.
648
+ * - int blog_id
649
+ * - string username
650
+ * - string password
651
+ * - int album_id
652
+ * @return array with the album object
653
+ */
654
+ function getAlbum($args) {
655
+
656
+ global $nggdb;
657
+
658
+ $this->escape($args);
659
+ $blog_ID = (int) $args[0];
660
+ $username = $args[1];
661
+ $password = $args[2];
662
+ $id = (int) $args[3];
663
+
664
+ if ( !$user = $this->login($username, $password) )
665
+ return $this->error;
666
+
667
+ if( !current_user_can( 'NextGEN Edit album' ) )
668
+ return new IXR_Error( 401, __( 'Sorry, you must be able to manage albums' ) );
669
+
670
+ $album = $nggdb->find_album( $id );
671
+
672
+ return($album);
673
+
674
+ }
675
+
676
  /**
677
  * Method "ngg.getGalleries"
678
  * Return the list of all galleries
706
 
707
  }
708
 
709
+ /**
710
+ * Method "ngg.getGallery"
711
+ * Return the specified gallery
712
+ *
713
+ * @since 1.9.2
714
+ *
715
+ * @param array $args Method parameters.
716
+ * - int blog_id
717
+ * - string username
718
+ * - string password
719
+ * - int gallery_id
720
+ * @return array with the gallery object
721
+ */
722
+ function getGallery($args) {
723
+
724
+ global $nggdb;
725
+
726
+ $this->escape($args);
727
+ $blog_ID = (int) $args[0];
728
+ $username = $args[1];
729
+ $password = $args[2];
730
+ $gid = (int) $args[3];
731
+
732
+ if ( !$user = $this->login($username, $password) )
733
+ return $this->error;
734
+
735
+ if( !current_user_can( 'NextGEN Manage gallery' ) )
736
+ return new IXR_Error( 401, __( 'Sorry, you must be able to manage galleries' ) );
737
+
738
+ $gallery = $nggdb->find_gallery($gid);
739
+
740
+ return($gallery);
741
+
742
+ }
743
+
744
  /**
745
  * Method "ngg.getImages"
746
  * Return the list of all images inside a gallery
787
 
788
  }
789
 
790
+ /**
791
+ * Method "ngg.getImage"
792
+ * Return a single image inside a gallery
793
+ *
794
+ * @since 1.9.2
795
+ *
796
+ * @param array $args Method parameters.
797
+ * - int blog_id
798
+ * - string username
799
+ * - string password
800
+ * - int picture_id
801
+ * @return array with image properties
802
+ */
803
+ function getImage($args) {
804
+
805
+ global $nggdb;
806
+
807
+ require_once ( dirname ( dirname( __FILE__ ) ). '/admin/functions.php' ); // admin functions
808
+
809
+ $this->escape($args);
810
+ $blog_ID = (int) $args[0];
811
+ $username = $args[1];
812
+ $password = $args[2];
813
+ $pid = (int) $args[3];
814
+
815
+ if ( !$user = $this->login($username, $password) )
816
+ return $this->error;
817
+
818
+ // get picture
819
+ $image = $nggdb->find_image( $pid );
820
+
821
+ if ($image) {
822
+ $gid = $image->galleryid;
823
+
824
+ // Look for the gallery , could we find it ?
825
+ if ( !$gallery = nggdb::find_gallery( $gid ) )
826
+ return new IXR_Error(404, __('Could not find gallery ' . $gid ));
827
+
828
+ // Now check if you have the correct capability for this gallery
829
+ if ( !nggAdmin::can_manage_this_gallery($gallery->author) ) {
830
+ logIO('O', '(NGG) User does not have upload_files capability');
831
+ $this->error = new IXR_Error(401, __('You are not allowed to upload files to this gallery.'));
832
+ return $this->error;
833
+ }
834
+ }
835
+
836
+ return($image);
837
+
838
+ }
839
+
840
  /**
841
  * Sanitize string or array of strings for database.
842
  *
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 WordPress
6
  Author: Alex Rabe
7
- Version: 1.9.1
8
 
9
  Author URI: http://alexrabe.de/
10
 
@@ -34,7 +34,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
34
  if (!class_exists('nggLoader')) {
35
  class nggLoader {
36
 
37
- var $version = '1.9.1';
38
  var $dbversion = '1.8.0';
39
  var $minium_WP = '3.1';
40
  var $donators = 'http://nextgen.boelinger.com/donators.php';
@@ -402,7 +402,7 @@ class nggLoader {
402
 
403
  // activate modified Shutter reloaded if not use the Shutter plugin
404
  if ( ($this->options['thumbEffect'] == 'shutter') && !function_exists('srel_makeshutter') )
405
- wp_enqueue_style('shutter', NGGALLERY_URLPATH .'shutter/shutter-reloaded.css', false, '1.3.3', 'screen');
406
 
407
  }
408
 
4
  Plugin URI: http://alexrabe.de/?page_id=80
5
  Description: A NextGENeration Photo Gallery for WordPress
6
  Author: Alex Rabe
7
+ Version: 1.9.2
8
 
9
  Author URI: http://alexrabe.de/
10
 
34
  if (!class_exists('nggLoader')) {
35
  class nggLoader {
36
 
37
+ var $version = '1.9.2';
38
  var $dbversion = '1.8.0';
39
  var $minium_WP = '3.1';
40
  var $donators = 'http://nextgen.boelinger.com/donators.php';
402
 
403
  // activate modified Shutter reloaded if not use the Shutter plugin
404
  if ( ($this->options['thumbEffect'] == 'shutter') && !function_exists('srel_makeshutter') )
405
+ wp_enqueue_style('shutter', NGGALLERY_URLPATH .'shutter/shutter-reloaded.css', false, '1.3.4', 'screen');
406
 
407
  }
408
 
nggfunctions.php CHANGED
@@ -567,10 +567,10 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
567
  }
568
 
569
  // description can contain HTML tags
570
- $galleries[$key]->galdesc = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->galdesc) ) ) ;
571
 
572
  // i18n
573
- $galleries[$key]->title = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->title) ) ) ;
574
 
575
  // apply a filter on gallery object before the output
576
  $galleries[$key] = apply_filters('ngg_album_galleryobject', $galleries[$key]);
@@ -716,9 +716,9 @@ function nggCreateImageBrowser($picturelist, $template = '') {
716
  $picture->next_pid = $next_pid;
717
  $picture->number = $key + 1;
718
  $picture->total = $total;
719
- $picture->linktitle = htmlspecialchars( stripslashes($picture->description) );
720
- $picture->alttext = html_entity_decode( stripslashes($picture->alttext) );
721
- $picture->description = html_entity_decode( stripslashes($picture->description) );
722
  $picture->anchor = 'ngg-imagebrowser-' . $picture->galleryid . '-' . $current_page;
723
 
724
  // filter to add custom content for the output
567
  }
568
 
569
  // description can contain HTML tags
570
+ $galleries[$key]->galdesc = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->galdesc), 'gal_' . $galleries[$key]->gid . '_description') ) ;
571
 
572
  // i18n
573
+ $galleries[$key]->title = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->title), 'gal_' . $galleries[$key]->gid . '_title') ) ;
574
 
575
  // apply a filter on gallery object before the output
576
  $galleries[$key] = apply_filters('ngg_album_galleryobject', $galleries[$key]);
716
  $picture->next_pid = $next_pid;
717
  $picture->number = $key + 1;
718
  $picture->total = $total;
719
+ $picture->linktitle = ( empty($picture->description) ) ? ' ' : htmlspecialchars ( stripslashes(nggGallery::i18n($picture->description, 'pic_' . $picture->pid . '_description')) );
720
+ $picture->alttext = ( empty($picture->alttext) ) ? ' ' : html_entity_decode ( stripslashes(nggGallery::i18n($picture->alttext, 'pic_' . $picture->pid . '_alttext')) );
721
+ $picture->description = ( empty($picture->description) ) ? ' ' : html_entity_decode ( stripslashes(nggGallery::i18n($picture->description, 'pic_' . $picture->pid . '_description')) );
722
  $picture->anchor = 'ngg-imagebrowser-' . $picture->galleryid . '-' . $current_page;
723
 
724
  // filter to add custom content for the output
readme.txt CHANGED
@@ -43,7 +43,7 @@ Some of them are really good and well designed, but the gap I filled was a simpl
43
 
44
  == Credits ==
45
 
46
- Copyright 2007-2011 by Alex Rabe & NextGEN DEV-Team
47
 
48
  This program is free software; you can redistribute it and/or modify
49
  it under the terms of the GNU General Public License as published by
@@ -130,6 +130,15 @@ To show the most recent added mages : **[recent max=x ]**
130
 
131
  == Changelog ==
132
 
 
 
 
 
 
 
 
 
 
133
  = V1.9.1 - 10.12.2011 =
134
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
135
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
@@ -299,529 +308,6 @@ To show the most recent added mages : **[recent max=x ]**
299
  * Bugfix : Remove various PHP notices for a better world
300
  * Removed : Canonical link is now part of Wordpress 2.9
301
 
302
- = V1.4.3 - 16.11.2009 =
303
- * Bugfix : Urlencode XML file path for sildeshow
304
-
305
- = V1.4.2 - 16.11.2009 =
306
- * Changed : Load sildeshow XML not longer via relative path
307
- * Bugfix : No imagebrowser in carousel mode
308
- * Bugfix : JS Effect navigation based on wrong array structure
309
- * Bugfix : Remove whitespaces from meta import
310
- * Bugfix : Capability check for upgrade notice
311
- * Removed : Hide "more settings" for now, causes problems with IE and jQuery UI tabs
312
-
313
- = V1.4.1 - 10.11.2009 =
314
- * Bugfix : Capabilites could not be saved
315
- * Bugfix : Ajax pagination option not saved
316
- * Bugfix : echo nggSlideshowWidget() for compat reason
317
-
318
- = V1.4.0 - 08.11.2009 =
319
- * NEW : Automatic rotate images during upload or via manage gallery page (THX to Simone Fumagalli)
320
- * NEW : Include Bulkupdate for gallery overview, require PHP 5.2
321
- * NEW : XMLRPC support with 4 new methods : see xmlrpc.php for more information
322
- * NEW : Recent and random images can be taken from a specific gallery using the id=x parameter in the shortcode (THX to Prollius)
323
- * NEW : Recent images can be recent by exif date (instead of database id) by using the mode=recentdate parameter in the shortcode (THX to Prollius)
324
- * NEW : Introduce the WP_Object_cache and meta_data
325
- * NEW : Various new hooks and filters
326
- * Added : Better support for role manager plugin (THX to Mattias Buelens)
327
- * Added : New option to add hidden images. Needed to show all images in a modal window (Thickbox, Lightbox et.)
328
- * Added : New link parameter for the singlepic shortcode : [singlepic id=x w=x h=x link="http://google.com"]
329
- * Added : New template gallery-carousel
330
- * Added : New id parameter for recent and random shortcodes : [random max="7" template="filename" id="2"] takes only pictures from the gallery with id=2
331
- * Added : New mode parameter for recent shortcode : [recent max="7" template="filename" id="3" mode="date" /] where mode can be one of (id, date, sort). Recent pictures are delivered by addition to database (id), exif date (date) or user sort order (sort).
332
- * Added : Enable/Disable Ajax navigation via settings
333
- * Added : New filter hook 'ngg_render_template' to render templates with a other plugin
334
- * Changed : Added option to link an album with a page id
335
- * Changed : Support templates for child themes, use STYLESHEETPATH instead TEMPLATEPATH (THX to Prollius)
336
- * Changed : Rework of Media RSS Widget
337
- * Bugfix : Check capability to create a new page
338
- * Bugfix : Fix double call of filter name , changed to ngg_picturelist_object (THX to Prollius)
339
- * Bugfix : Check for a deleted gallery in a album
340
-
341
- = V1.3.6 - 20.09.2009 =
342
- * Changed : Just change the feed link
343
-
344
- = V1.3.5 - 17.07.2009 =
345
- * Bugfix : Fixed XSS issue for Page title
346
-
347
- = V1.3.4 - 07.07.2009 =
348
- * Added : New filter ngg_gallery_object and ngg_image_object
349
- * Bugfix : Fix double rendering of a gallery if two album shortcodes are used
350
- * Bugfix : Fix for custom field ngg_gal_sort
351
- * Bugfix : Changed capapbility check for upload
352
- * Bugfix : Check for correct version OR memory limit
353
-
354
- = V1.3.3 - 11.06.2009 =
355
- * Changed : Load Thickbox images via wp_footer()
356
- * Bugfix : Widget setting couldnot be saved
357
-
358
- = V1.3.2 - 10.06.2009 =
359
- * Changed : Resize maximum to 1280 x 1280 with nggshow (THX to onezero)
360
- * Bugfix : Bugfix for Multifile upload
361
- * Bugfix : Bugfix for sortorder under jQuery 1.3
362
- * Bugfix : Workaround for more albums per page, need more rework
363
- * Bugfix : AJAX reload didn't work if slideshow is shown by default
364
- * Bugfix : Redirect links didn't work if permalinks are deactivates
365
- * Bugfix : Add new gallery in manage-overview didn't use defaultpath
366
-
367
- = V1.3.1 - 07.06.2009 =
368
- * Bugfix : Fixed ZIP upload, wrong variable used
369
- * Bugfix : Check for array before foreach in album missing
370
-
371
- = V1.3.0 - 07.06.2009 =
372
- * NEW : Subalbum support
373
- * NEW : Search for images in the admin tab
374
- * NEW : Add new gallery also in manage tab
375
- * NEW : AJAX support for Imagebrowser and gallery navigation (THX to Anty)
376
- * NEW : Added zip upload via URL (THX to Juan Jose Galvez)
377
- * Added : jQuery Multiple File Upload Plugin v1.44
378
- * Added : SWFUpload V2.2.0
379
- * Changed : Remove extension for Alttext during first import
380
- * Changed : Meta tag added via wp_head hook (THX to Viper)
381
- * Bugfix : Correct various PHP notice messages
382
- * Bugfix : Typo fix in custom fields for ngg_gal_ImageBrowser
383
- * Bugfix : Avoid upload of images in gallery without correct capability
384
-
385
- = V1.2.1 - 22.03.2009 =
386
- * NEW : Support for IE8 Web Slices in widgets
387
- * NEW : Add filter ngg_image_object
388
- * Changed : Descending order in add gallery menu
389
- * Bugfix : Exclude option didnT work for multi pages
390
- * Bugfix : Check for correct capability in manage gallery
391
-
392
- = V1.2.0 - 09.03.2009 =
393
- * NEW : Support for image tag cloud with shortcode [tagcloud]
394
- * NEW : Adding shortcode [recent max="7" template="filename" /] & [random max="7" template="filename" /] to show the most recent/random pictures (THX to Bernhard)
395
- * NEW : Crop thumbnails manually (THX to Simone Fumagalli)
396
- * NEW : Support for i18n with polyglot or qtrans plugin (THX to Boris Glumpler)
397
- * NEW : Canonical meta link support
398
- * Added : SWFUpload V2.2.0 B5
399
- * Added : New memory limit check in upload screen
400
- * Bugfix : Language typo fixes
401
- * Bugfix : Admin Pagination fix
402
- * Bugfix : Typo fix in widgets
403
- * Bugfix : Init column script after document is ready
404
- * Bugfix : htmlspecialchars() instead htmlentities() for links in the a href title description
405
- * Bugfix : Upgrade routine didn't add sortorder to correct table (THX to Uwe)
406
- * Bugfix : Correct shotcode in media upload tab
407
-
408
- = V1.1.0 - 26.01.2009 =
409
- * NEW : Pagination for album page via custom fields ('ngg_paged_Galleries')
410
- * NEW : Support for fixed number of columns inside the gallery
411
- * NEW : Added pagination for galleries and images in admin section
412
- * NEW : New action hook after image is added to database, called 'ngg_added_new_image'
413
- * NEW : New template for caption below images, called via [nggallery id=x template=caption]
414
- * Added : SWFUpload V2.2.0 B4
415
- * Changed : Rework of Manage image tables
416
- * Changed : Move imagerotator.swf to wp-content/uploads
417
- * Changed : Added a URL field to setup the path to the Imagerotator
418
- * Changed : Add additional parameter to gallery object
419
- * Changed : Load donators list external
420
- * Bugfix : Style fixes for tables in IE7
421
- * Bugfix : All albums code couldn't use the slideshow, query is empty for 0
422
- * Bugfix : Htmlentities() for links in the a href title description
423
- * Bugfix : Clean up mode for singlepic
424
- * Bugfix : Typo in widget settings
425
-
426
- = V1.0.2 - 19.12.2008 =
427
- * Added : Option to enable/disable the MediaRSS Feed
428
- * Added : For flash under FF3/WIN we should use outline: none;
429
- * Added : Use sort order also for Media RSS
430
- * Changed : Descending order for TinyMCE Editor
431
- * Changed : Added screencolor flashvar as bgcolor for the flash slideshow
432
- * Changed : Remove link to gallery in sidebar widget
433
- * Bugfix : Check for empty gallery title and show name instead
434
- * Bugfix : Album id=all / Album id=0 didn't show content
435
- * Bugfix : Check for a empty description and alttext
436
- * Bugfix : Remove HTML tags from slideshow
437
- * Bugfix : Load SWFobject always when the imagerotator exist
438
- * Bugfix : Zip-Upload in existing gallery failed
439
- * Bugifx : Typo in functions.php (THX to David Horat)
440
-
441
- = V1.0.1 - 11.12.2008 =
442
- * Bugfix : Change upgrade routine, import_date_time could cause a memory problem
443
- * Bugfix : Help pages will not show up in non-english enviroment
444
- * Bugfix : Show gallery name if title is empty
445
-
446
- = V1.0.0 - 11.12.2008 =
447
- * NEW : Adding some rewrite rules for the Blog title for a better SEO (Will be continued...)
448
- * NEW : Added ImageMagick support (currently a bit experimental) (THX to Frederic de Ranter)
449
- * NEW : Automatic unistall via register_uninstall_hook()
450
- * NEW : Added a presort option to sort easier the images
451
- * NEW : Lookup for a nggallery.css in the theme folder
452
- * NEW : Added Date/Time field to database and import it from EXIF, new sort option
453
- * NEW : Multi Widgets to show links to Media RSS feeds (THX to Vincent Prat)
454
- * NEW : PicLens support for galleries (THX to Vincent Prat)
455
- * NEW : Copy/Move images between galleries (THX to Vincent Prat)
456
- * NEW : Media RSS feeds (either for galleries, albums or global) (THX to Vincent Prat)
457
- * NEW : Image tag management (THX to Vincent Prat)
458
- * NEW : Convert all shortcodes to WP shortcodes API
459
- * NEW : AJAX based thumbnail generator
460
- * NEW : Create output via template files, more flexible and support for multiple templates
461
- * NEW : Extended role system. Each gallery has now a author
462
- * 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).
463
- * Changed : Add swfupload 2.2.0. Support for Adobe Flash 10 upload
464
- * Changed : Update all Admin pages for Wordpress 2.7 Admin UI
465
- * Changed : New icon for TinyMCE and WP2.7 Menue from http://www.pinvoke.com/
466
- * Changed : Move update message to admin.php
467
- * Changed : Widgets are now core and doesn't need to be activate, rework as Multi Widgets
468
- * Changed : Improved the gallery management page.
469
- * Changed : Rename the filter 'ngg_create_gallery_thumbcode' to 'ngg_get_thumbcode'.
470
- * Changed : Convert tags to WP-Taxonomy tables, no more need for ngg_tags, ngg_pic2tags
471
- * Changed : Arrange manage fields in a new way
472
- * Changed : Support now SSL
473
- * Changed : Use JQuery UI instead of interface lib
474
- * Changed : Updated to swfobject 2.1
475
- * Changed : Rework of database queries and new central nggdb class
476
- * Bugfix : Changed CSS for singlepic padding to margin
477
- * Bugfix : Check for zero in Exif Focal Length
478
- * Bugfix : Round instead inval for square thumbnails
479
- * Removed : Do not longer check for myGallery folders
480
- * Removed : Use now PclZip from WP Core
481
- * Removed : Wordpress 2.1 - 2.3 files deleted
482
-
483
- = V0.99 - 27.09.2008 =
484
- * Changed : Included swfobject version 2.1
485
- * Bugfix : Recognize the zip better
486
- * Bugfix : Limit the length of the title in the media-upload
487
- * Bugfix : Round instead inval for square thumbnails
488
-
489
- = V0.98 - 15.07.2008 =
490
- * Bugfix : Removed all whitespaces at EOF
491
-
492
- = V0.97 - 10.07.2008 =
493
- * Changed : Get new path contstant from WP2.6
494
- * Changed : Minor updates for WP2.6
495
- * Changed : Added new filters (THX to Vincent Prat)
496
- * Removed : Revert singlepic wrapper, breaks validation
497
-
498
- = V0.96 - 18.05.2008 =
499
- * Changed : Use postbox for gallery settings
500
- * Added : New filter function to add custom columns
501
- * Bugfix : Fixed width for Thickbox in Manage gallery
502
- * Bugfix : fixed width for media upload select box
503
- * Bugfix : Remove <p> tag in singlepic regex
504
- * Bugfix : Correct format of shutter speed
505
- * Bugfix : Album name in Short code not useable
506
-
507
- = V0.95 - 25.04.2008 =
508
- * Bugfix : Correction in media-upload to fit with Wordpress 2.5.1
509
- * Bugfix : Attribute_escape all objects in media-upload
510
- * Bugfix : Correct sortorder for albums
511
- * Bugfix : Typo correction (THX to Momo-I)
512
-
513
- = V0.94 - 20.04.2008 =
514
- * Added : New filter option ngg_create_gallery_link
515
- * Changed : Reduce amount of DB queries in albums (Big THX to Alexandr Kindras)
516
- * Changed : Revert wpautop priority change. Doesn't good for other plugins
517
-
518
- = V0.93 - 12.04.2008 =
519
- * Added : Select Full-Size or Singlepic in Media Upload
520
- * Added : Check for minimum 8 MB Memory
521
- * Changed : Priority from wpautop must be before gallery
522
- * Bugfix : Added Screencolor to Widgets
523
- * Bugfix : Clean CSS class in setup.php
524
- * Bugfix : Change PHP short tag (Thx to Archedition)
525
- * Bugfix : Remove tab.png from CSS (Thx to Frisco)
526
- * Bugfix : Remove newline and encode quotes in Media-Upload (THX to Trip Mellinger)
527
-
528
- = V0.92 - 30.03.2008 =
529
- * Changed : Higher priority for filter in WP2.5 final
530
- * Changed : Do not increase memory_limit with ini_set
531
- * Added : Read EXIF field ImageDescription
532
-
533
- = V0.91 - 24.03.2008 =
534
- * Changed : Resample mode back to 3
535
- * Changed : Add DIV "ngg-singlepic-wrapper" for SingelPic (THX to Travel-Junkie)
536
- * Changed : Increase Tweakfactor for Memory Check
537
- * Bugfix : Use admin.css only on NextGEN pages (THX tp Oliver)
538
- * Bugfix : Updates widgets (V1.21) for ImageRotator 3.15
539
- * Bugfix : Change order of rewrite rules for WP 2.5
540
- * Bugfix : Include Dashboard CSS also for page "nextgen-gallery"
541
-
542
- = V0.90 - 18.03.2008 =
543
- * NEW : Sort order for images
544
- * NEW : Updated style for Wp 2.5
545
- * NEW : Media upload tab integration for WP 2.5
546
- * Added : Change wp shortcode filter
547
- * Added : TinyMCE V3 Button for WordPress 2.5
548
- * Added : Singlepic center class
549
- * Changed : New default parameter for ImageRotator 3.15
550
- * Changed : By default enable metadata import
551
- * Changed : Moved disable/enable flash setting to add gallery
552
- * Changed : wpdb->escape gallerytag in nggfunctions
553
- * Changed : Sort files after scan folder
554
- * Changed : Check for filename during upload
555
- * Changed : Remove jQuery plugin for navigation
556
- * Changed : Remove myGallery import
557
- * Changed : Resample mode default set to 5, causes problems at PHP 4.4.8 /PHP 5.2.4
558
- * Bugfix : nggextractXML missing stripslashes
559
- * Bugfix : P tags not closed in manage.php
560
- * Bugfix : Remove " from singlepic class
561
- * Bugfix : Rewrite rule for ImageBrowser added
562
-
563
- = V0.83 - 14.02.2008 =
564
- * Changed : New Interfaces.js from WP Core 2.5, for sortable bug under IE7
565
- * Changed : Update to jQuery V1.2.2, deregister older version from WP
566
- * Changed : Add ini_set 128MB for memory-limit
567
- * Bugfix : SWFUpload Cookie Post_Params are overwritten , no upload possible
568
- * Bugfix : WPMU options are not saved after installation
569
- * Bugfix : Remove Flush rewrite rules during install
570
-
571
- = V0.82 - 09.02.2008 =
572
- * Bugfix : add_filter (searchnggallerytags) not proper included for some other plugins
573
-
574
- = V0.81 - 04.02.2008 =
575
- * Changed : Use stristr first to reduce CPU cycles (THX to Alakhnor)
576
- * Changed : Flush Rewrites rules after option update
577
- * Changed : Rework for folder check under Safe-Mode
578
- * Bugfix : Check for array in get_option() (THX to Alessandro)
579
- * Bugfix : Add Cookie to SWFUpload, show Error code included
580
- * Bugfix : galShowOrder = Sildeshow at first didn't work
581
- * Bugfix : Remove reference from ngg_getOnlyImages
582
-
583
- = V0.80 - 02.02.2008 =
584
- * NEW : SWFUpload integrated : Show upload progress and select multiple files in the file browser dialog.
585
- * NEW : Progress bar for resize, watermark and thumbnail operation
586
- * NEW : Import Meta data from images
587
- * NEW : Show Meta data information
588
- * NEW : Cache option for SinglePic
589
- * NEW : Permalink support
590
- * NEW : Custom fields support - Change the settings for each post/page
591
- * Changed : Up to 10 Widgets, exclude galleries from random/recent images.
592
- * Changed : Refactor permission check for Safe-Mode Check and mkdir/chmod
593
- * Changed : Admin CSS in new folder/file for better structure
594
- * Changed : Clean up folder structure
595
- * Changed : Clean up code in manage.php, functions.php
596
- * Changed : Moved several functions into nggAdmin Class (functions.php)
597
- * Changed : Update to jQuery V1.1.4 (v1.2.1 causes problems with interface.js)
598
- * Changed : Hide used galleries in album admin page
599
- * Changed : Remove float in singlepic code and added class ngg-left , ngg-right (THX to Nathan Sylvain)
600
- * Changed : Edit style setting (added new class .desc , THX to Sebastian)
601
- * Changed : Check for galleryfolder instead name (THX to Luke Poland)
602
- * Changed : Delete images per default
603
- * Changed : Change CSS (ngg-album-compact) , remove width & height setting from code
604
- * Bugfix : Fixed static front page problem
605
- * Bugfix : Missing stripslashes & html_entity_decode
606
- * Bugfix : Change Album CSS (THX to Thomas-DK)
607
- * Bugfix : Watermark for GIF not correct supported
608
- * Bugfix : Missing wp_nonce at setup page
609
- * Bugfix : Add DIV in Slideshow link (for Safari & Opera)
610
- * Added : Screencolor flashvar for JW Image Rotator 3.13 or higher
611
- * Added : Set WP-CHARSET / COLLATE during installation
612
- * Added : Updated to Pclzip.lib.php v2.6
613
- * Added : CSS ID field for gallery & images
614
- * WPMU : New site admin page (wpmu.php)
615
- * WPMU : Integrated quota check
616
- * WPMU : No update check
617
- * WPMU : Remove edit style (THX to Kristin)
618
- * WPMU : Remove uninstall button
619
- * WPMU : Remove server settings
620
- * WPMU : Gallery path set to blog.dir
621
- * Added : Support for WPMU
622
-
623
- = V0.74 - 01.12.2007 =
624
- * NEW : Added meta reader class, first step to integrated meta data import
625
-
626
- = V0.73 - 20.10.2007 =
627
- * Added : Support for Shutter Reloaded
628
- * Update to jQuery Tabs 2.7.4
629
- * Changed : Remove $_SERVER['REQUEST_URI'] for IIS compatibility
630
- * Bugfix : Option Sildeshow didn't jump to overview
631
-
632
- = V0.72 - 13.09.2007 =
633
- * Added : Missing overflow:hidden in ngg-album.css
634
- * Added : New experimental stylesheet hovereffect.css
635
- * Changed : Better check for memory limit in zip-files
636
- * Bugfix : Missing stripslashes for alttext (THX to Lawrence)
637
- * Bugfix : Navigation didn't highlight page 1 (THX to Brot)
638
- * Bugfix : Albums automatic minimize if more than 4 galleries
639
- * Bugfix : Missing check_admin_referer in style (THX again to Christopher)
640
-
641
- = V0.71 - 07.09.2007 =
642
- * Added : Add defer="defer" to Slideshow to avoid IE crash (THX to Simbo)
643
- * Bugfix : Bugfix for slideshow to show all pictures
644
- * Bugfix : Wrong check_admin_referer in albums (THX to Christopher)
645
- * Bugfix : No exclude check in counter and widgets (THX to Christopher)
646
- * Bugfix : Check for existing role (THX to Lost in Network)
647
- * Bugfix : Label in roles are wrong (THX to Joern)
648
-
649
- = V0.70 - 06.09.2007 =
650
- * NEW : Add role manager page and capabilities
651
- * NEW : Show gallery with [tags=list of tags]
652
- * NEW : Show album with [albumtags=list of tags]
653
- * NEW : Tag system for all images
654
- * NEW : Option for append related images
655
- * NEW : Option to show description below thumbnail
656
- * NEW : Option to show ImageBrowser instead JS effect
657
- * Added : Add Full size link to thickbox
658
- * Added : Check for page/postid in tag processing
659
- * Added : Sildeshow widget can now contain all images
660
- * Added : Minimize/Maximize option for albums
661
- * Added : Deregister jQuery V1.1.2 for WP2.2 (to use V1.1.3.1)
662
- * Added : Integrate wp_nonce_field at all admin pages
663
- * Changed : Update to Thickbox 3.1 + mods for NextGEN gallery
664
- * Changed : Moved "clear:both" into class "ngg-clear" (THX to Gero)
665
- * Changed : Switched from jQuery Interface to jQuery Tabs from Klaus Hartl
666
- * Remove : Remove option for singlepic link
667
- * Remove : Remove options for imagebrowser
668
- * Bugfix : Most Recent image in Widget are wrong
669
- * Bugfix : More XHTML valid , htmlspecialchars() after add_query_arg()
670
- * Bugfix : Sanitize file name before upload
671
- * Bugfix : Sanitize folder name (THX to Tom Fowler)
672
- * Bugfix : Show title/alt in jQuery plugin (THX to Gregory Green)
673
- * Bugfix : i18n support for Gallery tab
674
- * Bugfix : Reduce memory-needs for plugin
675
- * Bugfix : Typo/spelling correction
676
- * Bugfix : Removed myGallery author from contribute list
677
-
678
- = V0.64 - 31.07.2007 =
679
- * Bugfix : Remove arrows in image browser text
680
- * Bugfix : Include nggadmintab.php with dirname
681
- * Bugfix : Zip-Upload under Mac > look for basename
682
-
683
- = V0.63 - 10.07.2007 =
684
- * NEW : You can now upload a zip file into a existing gallery
685
- * Added : Remove subfolder in Zip-files
686
- * Added : Show required memory for thumbnail creation
687
- * Added : Updated to jQuery.multifile 1.22
688
- * Added : Install-Upgrade for WordPress 2.3
689
- * Bugfix : Supress unlink error message for thumbs
690
- * Bugfix : Support upload of zip files from MAC
691
- * Bugfix : Add Stripslash for image description
692
- * Bugfix : Use for Singlepic not rel="Gallery name"
693
- * Bugfix : Moved RSS/Snoopy includes into function
694
-
695
- = V0.62 - 06.07.2007 =
696
- * NEW : Import for myGallery
697
- * Added : Updated to jQuery 1.1.3.1
698
- * Bugfix : Check for memory_limit setting, otherwise pass the test
699
- * Bugfix : Thumbcode not insert for nggDisplayRandomImages and nggDisplayRecentImages
700
-
701
- = V0.61 - 29.06.2007 =
702
- * Added : Forgot the file jquery.nextgen.pack.js and jquery.nextgen.js
703
-
704
- = V0.60 - 27.06.2007 =
705
- * NEW : Select a image from the Upload Tab
706
- * NEW : Tag [imagebrowser=id] for a Inline Gallery Browser
707
- * NEW : Show gallery without Subpages
708
- * NEW : Manage gallery : Function "Add a new page"
709
- * NEW : Manage gallery : Show/Hide thumbnails
710
- * Added : Slideshow option : Watermark / Background music
711
- * Added : Check for memory limit
712
- * Added : Show actual memory usage in overview
713
- * Added : Include function check in widget
714
- * Added : Latest Sidebar widget from KeViN
715
- * Added : Check for capability during installation
716
- * Changed : Remove P Tag around gallery tags ( THX to the work from John Godley )
717
- * Bugfix : Delete picture, check for pid
718
- * Bugfix : admin/settings.php line #172: typos corrected (this=these,maxium=maximum). (THX to Helene D.)
719
- * Bugfix : admin/settings.php line #311: missing </td> added. (THX to Helene D.)
720
-
721
- = V0.52 - 31.05.2007 =
722
- * Changed : Create better thubmnails in square mode (THX to Kees de Bruin)
723
- * Changed : Again , fixed ratio create better thumbnails (Also for widescreen photos)
724
- * Removed : Option "Resize image before cropping" removed and included in Create square thumbnail
725
- * Bugfix : Scan folder for new picture didn't set exclude = 0
726
- * Bugfix : If no option is checked in thumbnails, resize failed (THK to Joern Kretzschmar)
727
-
728
- = V0.51 - 28.05.2007 =
729
- * Bugfix : Thumbnail permission not set correct
730
- * Bugfix : Folder permission check wrong
731
- * Bugfix : Remove echo in album (THX to Lazy)
732
-
733
- = V0.50 - 28.05.2007 =
734
- * NEW : Select multiple files for upload (THX to Diego A., http://www.fyneworks.com)
735
- * NEW : Sidebar widget contain now Slideshow, recent images and random images
736
- * Added : New Option for Imagerotator 3.8 (Slow zoom effect)
737
- * Added : Option for CDATA wrapper (not working proper)
738
- * Added : Option for Thickbox Loading Image
739
- * Added : CSS file for dKret2 (THK to Joern)
740
- * Added : Better file permission check
741
- * Changed : Fixed ratio create better thumbnails in portrait mode
742
- * Changed : All jQuery scripts are now in "No Conflict" mode
743
- * Changed : Script loading now via wp_enqueue_script
744
- * Changed : Add constant values for folder/file permission
745
- * Changed : Use description in <A href title>
746
- * Bugfix : Remove wrong DIV tag in slideshow
747
- * Bugfix : Tag [Slideshow=id,width,height] didn't work proper
748
- * Bugfix : Name conflict in Album script (serialize) (THX to Die-Andis)
749
- * Bugfix : Changed check for CSS activation
750
- * Bugfix : Changed check for safe-mode (Don't ask)
751
-
752
- = V0.43 - 20.05.2007 =
753
- * Changed : Rename Thumbnail class to avoid php name collision
754
- * Bugfix : Missing translation flag in setup
755
- * Bugfix : Changed check for safe-mode
756
- * Bugfix : Changed check for Zip-File
757
-
758
- = V0.42 - 17.05.2007 =
759
- * Bugfix : Float function for singlepic not integrated, sorry !
760
- * Bugfix : Remove clear:both in widget
761
-
762
- = V0.41 - 17.05.2007 =
763
- * NEW : Sidebar widget from KeViN
764
- * Update : Better album management for more galleries
765
- * Update : Thickbox v3 integrated
766
- * Added : Float selection for singlepic
767
- * Added : CSS class for widget
768
- * Added : CSS file for K2 theme
769
- * Added : German translation (THX to Lazy)
770
- * Added : Better check for safe-mode
771
- * Added : CSS Class for single-pic : class="ngg-singlepic"
772
- * Added : Option to resize image before cropping it (Setting reset of prior versions needed! Setup -> Reset Settings)
773
- * Changed : Image quality by default 85% (THX to ArizonaGroovejet)
774
- * Bugfix : Update wrong file when select other style
775
- * Bugfix : Fixed Permalink in album (THX to Helene D.)
776
- * Bugfix : Scan folder in empty gallery
777
- * Bugfix : Swfobjects only added with Thickbox effect
778
- * Bugfix : Umlauts are now handled correctly
779
-
780
- = V0.40 - 29.04.2007 =
781
- * NEW : TinyMCE Button integration
782
- * Removed : CSS Style : remove width/height in album
783
-
784
- = V0.39 - 28.04.2007 =
785
- * Added : Set ORDER BY for gallery
786
- * Bugfix : check now for Exclude != 1
787
- * Bugfix : DB Query in function wrong
788
- * Bugfix : DB exlude = DEFAULT '0'
789
- * Bugfix : Scan folder in empty gallery
790
-
791
- = V0.38 - 28.04.2007 =
792
- * Bugfix : One time more remove get_settings :-)
793
- * Bugfix : $_GET in Manage gallery
794
- * Bugfix : exclude option
795
-
796
- = V0.37 - 28.04.2007 =
797
- * Bugfix : $_GET in Manage gallery
798
- * Bugfix : update DB installation routine
799
-
800
- = V0.36 - 26.04.2007 =
801
- * Bugfix : Stupid PHP beginner failure in album management
802
-
803
- = V0.35 - 26.04.2007 =
804
- * Rework : Folder name can be flexible
805
- * New option : Fullsize pic for Singlepic mode
806
- * New option : Select show order
807
- * Added : Check for WP2.1
808
- * Added : Check for permission for default folder
809
- * Bugfix : Remove get_settings
810
- * Bugfix : Correction for Safe-Mode ON
811
- * Bugfix : Set Default '0' for table album.sortorder
812
- * Bugfix : Update sort order
813
-
814
- = V0.34 - 24.04.2007 =
815
- * Added : Add fix ration setting
816
- * Added : Add language file file
817
- * Bugfix : Change link in Album to get_bloginfo('wpurl')
818
- * Bugfix : Album CSS file not loaded
819
-
820
- = V0.33 - 23.04.2007 =
821
- * NEW : Overview Page
822
- * NEW : Core function
823
- * NEW : Slideshow
824
-
825
  == Upgrade Notice ==
826
 
827
  = 1.5.5 =
43
 
44
  == Credits ==
45
 
46
+ Copyright 2007-2012 by Alex Rabe & NextGEN DEV-Team
47
 
48
  This program is free software; you can redistribute it and/or modify
49
  it under the terms of the GNU General Public License as published by
130
 
131
  == Changelog ==
132
 
133
+ = V1.9.2 - 17.01.2012 =
134
+ * NEW : Added more XMLRPC commands (THX to Vladimir Vinogradsky)
135
+ * Changed : Rework Post-thumbnail function (THX to Kristian Edlund)
136
+ * Bugfix : Check first for valid images on unzip (only Mac OS zip-files)
137
+ * Bugfix : Increase z-index for twenty eleven theme
138
+ * Bugfix : Support non latin chars in tagcloud
139
+ * Bugfix : Allow other tinymce intance
140
+ * Bugfix : Better support for WPML translation
141
+
142
  = V1.9.1 - 10.12.2011 =
143
  * Bugfix : Security hardness for untrusted filenames/meta data (THX to Brian St. Pierre)
144
  * Bugfix : Fixed security vulnerability (TXH to Jon Cave)
308
  * Bugfix : Remove various PHP notices for a better world
309
  * Removed : Canonical link is now part of Wordpress 2.9
310
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  == Upgrade Notice ==
312
 
313
  = 1.5.5 =
shutter/shutter-reloaded.css CHANGED
@@ -51,7 +51,7 @@ div#shShutter, div#shDisplay {
51
 
52
  div#shShutter {
53
  height: 100%;
54
- z-index: 1000;
55
  background-color: #000000;
56
  opacity: 0.8;
57
  filter:alpha(opacity=80);
@@ -60,7 +60,7 @@ div#shShutter {
60
  div#shDisplay {
61
  display: block;
62
  background-color: transparent;
63
- z-index: 1002;
64
  }
65
 
66
  div#shDisplay img#shTopImg {
@@ -87,7 +87,7 @@ div#shWaitBar {
87
  cursor: default;
88
  opacity: 0.999;
89
  filter: alpha(opacity=100);
90
- z-index: 1001;
91
  margin-top: 160px;
92
  color: #ae0a0a;
93
  text-align: center;
51
 
52
  div#shShutter {
53
  height: 100%;
54
+ z-index: 10000;
55
  background-color: #000000;
56
  opacity: 0.8;
57
  filter:alpha(opacity=80);
60
  div#shDisplay {
61
  display: block;
62
  background-color: transparent;
63
+ z-index: 10002;
64
  }
65
 
66
  div#shDisplay img#shTopImg {
87
  cursor: default;
88
  opacity: 0.999;
89
  filter: alpha(opacity=100);
90
+ z-index: 10001;
91
  margin-top: 160px;
92
  color: #ae0a0a;
93
  text-align: center;