NextGEN Gallery – WordPress Gallery Plugin - Version 0.43

Version Description

Download this release

Release Info

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

Code changes from version 0.42 to 0.43

admin/about.php CHANGED
@@ -83,7 +83,8 @@ function ngg_list_support() {
83
  "Milemann" => "",
84
  "Lazy (German Translation)" => "http://www.lazychris.de/",
85
  "Lise (French Translation)" => "http://liseweb.fr/",
86
- "Anja (Dutch Translation)" => "www.werkgroepen.net/wordpress"
 
87
  );
88
 
89
 
83
  "Milemann" => "",
84
  "Lazy (German Translation)" => "http://www.lazychris.de/",
85
  "Lise (French Translation)" => "http://liseweb.fr/",
86
+ "Anja (Dutch Translation)" => "http://www.werkgroepen.net/wordpress",
87
+ "Wojciech Owczarek (Polish Translation)" => "http://www.owczi.net"
88
  );
89
 
90
 
admin/addgallery.php CHANGED
@@ -307,7 +307,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
307
  foreach($pictures as $picture) {
308
 
309
  //TODO: Check for file permission
310
- $thumb = new Thumbnail($gallery_absfolder."/".$picture, TRUE);
311
  // echo $thumb->errmsg;
312
  // skip if file is not there
313
  if (!$thumb->error) {
@@ -332,7 +332,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
332
  foreach($pictures as $picture) {
333
 
334
  //TODO: Check for file permission
335
- $thumb = new Thumbnail($gallery_absfolder."/".$picture, TRUE);
336
  // echo $thumb->errmsg;
337
  // skip if file is not there
338
  if (!$thumb->error) {
@@ -366,7 +366,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
366
  if (is_array($pictures)) {
367
  foreach($pictures as $picture) {
368
 
369
- $thumb = new Thumbnail($gallery_absfolder."/".utf8_decode($picture), TRUE);
370
 
371
  // echo $thumb->errmsg;
372
  // skip if file is not there
@@ -409,7 +409,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
409
  $filename = $_FILES['zipfile']['name'];
410
 
411
  // check if file is a zip file
412
- if ( $_FILES['zipfile']['type'] != "application/x-zip-compressed" ) {
413
  @unlink($temp_zipfile); // del temp file
414
  return '<font color="red">'.__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type'].'</font>';
415
  }
307
  foreach($pictures as $picture) {
308
 
309
  //TODO: Check for file permission
310
+ $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
311
  // echo $thumb->errmsg;
312
  // skip if file is not there
313
  if (!$thumb->error) {
332
  foreach($pictures as $picture) {
333
 
334
  //TODO: Check for file permission
335
+ $thumb = new ngg_Thumbnail($gallery_absfolder."/".$picture, TRUE);
336
  // echo $thumb->errmsg;
337
  // skip if file is not there
338
  if (!$thumb->error) {
366
  if (is_array($pictures)) {
367
  foreach($pictures as $picture) {
368
 
369
+ $thumb = new ngg_Thumbnail($gallery_absfolder."/".utf8_decode($picture), TRUE);
370
 
371
  // echo $thumb->errmsg;
372
  // skip if file is not there
409
  $filename = $_FILES['zipfile']['name'];
410
 
411
  // check if file is a zip file
412
+ if (!eregi('zip', $_FILES['zipfile']['type'])) {
413
  @unlink($temp_zipfile); // del temp file
414
  return '<font color="red">'.__('Uploaded file was no or a faulty zip file ! The server recognize : ','nggallery').$_FILES['zipfile']['type'].'</font>';
415
  }
admin/setup.php CHANGED
@@ -31,7 +31,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
31
  <h2><?php _e('Reset options', 'nggallery') ;?></h2>
32
  <form name="resetsettings" method="post">
33
  <p><?php _e('Reset all options/settings to the default installation.', 'nggallery') ;?></p>
34
- <div align="center"><input type="submit" class="button" name="resetdefault" value="<?php _e('Reset settings') ;?>" onclick="javascript:check=confirm('<?php _e('Reset all options to default settings ?\n\nChoose [Cancel] to Stop, [OK] to proceed.\n','nggallery'); ?>');if(check==false) return false;" /></div>
35
  </form>
36
  </div>
37
  <div class="wrap">
@@ -42,7 +42,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
42
  <p ><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
43
  <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggallery; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
44
  <div align="center">
45
- <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
46
  </div>
47
  </form>
48
  </div>
31
  <h2><?php _e('Reset options', 'nggallery') ;?></h2>
32
  <form name="resetsettings" method="post">
33
  <p><?php _e('Reset all options/settings to the default installation.', 'nggallery') ;?></p>
34
+ <div align="center"><input type="submit" class="button" name="resetdefault" value="<?php _e('Reset settings', 'nggallery') ;?>" onclick="javascript:check=confirm('<?php _e('Reset all options to default settings ?\n\nChoose [Cancel] to Stop, [OK] to proceed.\n','nggallery'); ?>');if(check==false) return false;" /></div>
35
  </form>
36
  </div>
37
  <div class="wrap">
42
  <p ><font color="red"><strong><?php _e('WARNING:', 'nggallery') ;?></strong><br />
43
  <?php _e('Once uninstalled, this cannot be undone. You should use a Database Backup plugin of WordPress to backup all the tables first. NextGEN gallery is stored in the tables', 'nggallery') ;?> <strong><?php echo $wpdb->nggpictures; ?></strong>, <strong><?php echo $wpdb->nggallery; ?></strong> <?php _e('and', 'nggallery') ;?> <strong><?php echo $wpdb->nggalbum; ?></strong>.</font></p>
44
  <div align="center">
45
+ <input type="submit" name="uninstall" class="button delete" value="<?php _e('Uninstall plugin', 'nggallery') ?>" onclick="javascript:check=confirm('<?php _e('You are about to Uninstall this plugin from WordPress.\nThis action is not reversible.\n\nChoose [Cancel] to Stop, [OK] to Uninstall.\n','nggallery'); ?>');if(check==false) return false;"/>
46
  </div>
47
  </form>
48
  </div>
changelog.txt CHANGED
@@ -1,6 +1,12 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
 
 
4
  V0.42 - 17.05.2007
5
  - Bugfix : Float function for singlepic not integrated, sorry !
6
  - Bugfix : Remove clear:both in widget
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ V0.43 - 20.05.2007
5
+ - Changed : Rename Thumbnail class to avoid php name collision
6
+ - Bugfix : Missing translation flag in setup
7
+ - Bugfix : Changed check for safe-mode
8
+ - Bugfix : Changed check for Zip-File
9
+
10
  V0.42 - 17.05.2007
11
  - Bugfix : Float function for singlepic not integrated, sorry !
12
  - Bugfix : Remove clear:both in widget
lib/thumbnail.inc.php CHANGED
@@ -13,7 +13,7 @@
13
  * PHP class for dynamically resizing, cropping, and rotating images for thumbnail purposes and either displaying them on-the-fly or saving them.
14
  *
15
  */
16
- class Thumbnail {
17
  /**
18
  * Error message to display, if any
19
  *
@@ -119,7 +119,7 @@ class Thumbnail {
119
  * @param string $fileName
120
  * @return Thumbnail
121
  */
122
- function Thumbnail($fileName,$no_ErrorImage = false) {
123
  //make sure the GD library is installed
124
  if(!function_exists("gd_info")) {
125
  echo 'You do not have the GD Library installed. This class requires the GD library to function properly.' . "\n";
13
  * PHP class for dynamically resizing, cropping, and rotating images for thumbnail purposes and either displaying them on-the-fly or saving them.
14
  *
15
  */
16
+ class ngg_Thumbnail {
17
  /**
18
  * Error message to display, if any
19
  *
119
  * @param string $fileName
120
  * @return Thumbnail
121
  */
122
+ function ngg_Thumbnail($fileName,$no_ErrorImage = false) {
123
  //make sure the GD library is installed
124
  if(!function_exists("gd_info")) {
125
  echo 'You do not have the GD Library installed. This class requires the GD library to function properly.' . "\n";
nggallery.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: NextGEN Gallery
4
  Plugin URI: http://alexrabe.boelinger.com/?page_id=80
5
  Description: A NextGENeration Photo gallery for the WEB2.0(beta).
6
  Author: NextGEN DEV-Team
7
- Version: 0.41a
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
@@ -42,7 +42,7 @@ global $wpdb, $wp_version;
42
  if (version_compare($wp_version, '2.1', '>=')) {
43
 
44
  // Version and path to check version
45
- define('NGGVERSION', "0.41");
46
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
47
 
48
  // define URL
@@ -58,8 +58,8 @@ define('NGGALLERY_IREXIST', file_exists(NGGALLERY_ABSPATH.'imagerotator.swf'));
58
  // get value for safe mode
59
  if ((gettype(ini_get('safe_mode')) == 'string')) {
60
  // if sever did in in a other way
61
- if (ini_get('safe_mode') == 'off') define('SAFE_MODE', FALSE);
62
- else define('SAFE_MODE', TRUE);
63
  } else
64
  define('SAFE_MODE', ini_get('safe_mode'));
65
 
4
  Plugin URI: http://alexrabe.boelinger.com/?page_id=80
5
  Description: A NextGENeration Photo gallery for the WEB2.0(beta).
6
  Author: NextGEN DEV-Team
7
+ Version: 0.43a
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
42
  if (version_compare($wp_version, '2.1', '>=')) {
43
 
44
  // Version and path to check version
45
+ define('NGGVERSION', "0.43");
46
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
47
 
48
  // define URL
58
  // get value for safe mode
59
  if ((gettype(ini_get('safe_mode')) == 'string')) {
60
  // if sever did in in a other way
61
+ if (ini_get('safe_mode') == 'on') define('SAFE_MODE', TRUE);
62
+ else define('SAFE_MODE', ini_get('safe_mode'));
63
  } else
64
  define('SAFE_MODE', ini_get('safe_mode'));
65
 
nggshow.php CHANGED
@@ -21,7 +21,7 @@ $filenname = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid =
21
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
22
  $filepath = WINABSPATH . "/" . $gallerypath ."/" . $filenname;
23
 
24
- $thumb = new Thumbnail($filepath);
25
  if ( isset($_GET['height']) and isset($_GET['width']))
26
  $thumb->resize($_GET['width'],$_GET['height']);
27
  if ($mode == 'watermark') {
21
  $gallerypath = $wpdb->get_var("SELECT path FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
22
  $filepath = WINABSPATH . "/" . $gallerypath ."/" . $filenname;
23
 
24
+ $thumb = new ngg_Thumbnail($filepath);
25
  if ( isset($_GET['height']) and isset($_GET['width']))
26
  $thumb->resize($_GET['width'],$_GET['height']);
27
  if ($mode == 'watermark') {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://alexrabe.boelinger.com/?page_id=80
4
  Tags: flash, slideshow, images, gallery, media, admin, post
5
  Requires at least: 2.1.3
6
  Tested up to: 2.2
7
- Stable tag: 0.42
8
 
9
  NextGEN Gallery is a Image Gallery plugin for WordPress.
10
 
4
  Tags: flash, slideshow, images, gallery, media, admin, post
5
  Requires at least: 2.1.3
6
  Tested up to: 2.2
7
+ Stable tag: 0.43
8
 
9
  NextGEN Gallery is a Image Gallery plugin for WordPress.
10