NextGEN Gallery – WordPress Gallery Plugin - Version 0.42

Version Description

Download this release

Release Info

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

Code changes from version 0.41 to 0.42

Files changed (5) hide show
  1. admin/about.php +2 -1
  2. changelog.txt +4 -0
  3. nggfunctions.php +20 -4
  4. nggwidget.php +5 -5
  5. readme.txt +1 -1
admin/about.php CHANGED
@@ -82,7 +82,8 @@ function ngg_list_support() {
82
  "Sabine (Haselina)" => "http://www.haselina.de/",
83
  "Milemann" => "",
84
  "Lazy (German Translation)" => "http://www.lazychris.de/",
85
- "Lise Tauber (French Translation)" => "http://liseweb.fr/"
 
86
  );
87
 
88
 
82
  "Sabine (Haselina)" => "http://www.haselina.de/",
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
 
changelog.txt CHANGED
@@ -1,6 +1,10 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
 
 
 
 
4
  V0.41 - 17.05.2007
5
  - NEW : Sidebar widget from KeViN
6
  - Update : Better album management for more galleries
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
7
+
8
  V0.41 - 17.05.2007
9
  - NEW : Sidebar widget from KeViN
10
  - Update : Better album management for more galleries
nggfunctions.php CHANGED
@@ -4,7 +4,7 @@ function searchnggallerytags($content) {
4
 
5
  global $wpdb;
6
 
7
- $search = "/\[singlepic=(\d+)(|,\d+|,)(|,\d+|,)(|,watermark|,web20|,)\]/i";
8
 
9
  if (preg_match_all($search, $content, $matches)) {
10
 
@@ -14,7 +14,7 @@ function searchnggallerytags($content) {
14
  $result = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$v0' ");
15
  if($result){
16
  $search = $matches[0][$key];
17
- $replace= nggSinglePicture($v0,$matches[2][$key],$matches[3][$key],$matches[4][$key]);
18
  $content= str_replace ($search, $replace, $content);
19
  }
20
  }
@@ -299,12 +299,13 @@ function nggCreateGalleryDiv($galleryID,$mode = "extend") {
299
  }
300
 
301
  /**********************************************************/
302
- function nggSinglePicture($imageID,$width=250,$height=250,$mode="") {
303
 
304
  global $wpdb;
305
  $ngg_options = get_option('ngg_options');
306
 
307
  // remove the comma
 
308
  $mode = ltrim($mode,',');
309
  $width = ltrim($width,',');
310
  $height = ltrim($height,',');
@@ -328,7 +329,22 @@ function nggSinglePicture($imageID,$width=250,$height=250,$mode="") {
328
  $link = '<a href="'.$folder_url.$picture->filename.'" title="'.$picture->alttext.'" '.$thumbcode.' >';
329
  }
330
 
331
- $content = $link . '<img class="ngg-singlepic" src="'.NGGALLERY_URLPATH.'nggshow.php?pid='.$imageID.'&amp;width='.$width.'&amp;height='.$height.'&amp;mode='.$mode.'" alt="'.$picture->alttext.'" title="'.$picture->alttext.'" />';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
 
333
  if ($ngg_options[imgSinglePicLink]) $content .= '</a>';
334
 
4
 
5
  global $wpdb;
6
 
7
+ $search = "/\[singlepic=(\d+)(|,\d+|,)(|,\d+|,)(|,watermark|,web20|,)(|,right|,left|,)\]/i";
8
 
9
  if (preg_match_all($search, $content, $matches)) {
10
 
14
  $result = $wpdb->get_var("SELECT filename FROM $wpdb->nggpictures WHERE pid = '$v0' ");
15
  if($result){
16
  $search = $matches[0][$key];
17
+ $replace= nggSinglePicture($v0,$matches[2][$key],$matches[3][$key],$matches[4][$key],$matches[5][$key]);
18
  $content= str_replace ($search, $replace, $content);
19
  }
20
  }
299
  }
300
 
301
  /**********************************************************/
302
+ function nggSinglePicture($imageID,$width=250,$height=250,$mode="",$float="") {
303
 
304
  global $wpdb;
305
  $ngg_options = get_option('ngg_options');
306
 
307
  // remove the comma
308
+ $float = ltrim($float,',');
309
  $mode = ltrim($mode,',');
310
  $width = ltrim($width,',');
311
  $height = ltrim($height,',');
329
  $link = '<a href="'.$folder_url.$picture->filename.'" title="'.$picture->alttext.'" '.$thumbcode.' >';
330
  }
331
 
332
+ // add float to img
333
+ if (!empty($float)) {
334
+ switch ($float) {
335
+
336
+ case 'left': $float=' style="float:left;" ';
337
+ break;
338
+
339
+ case 'right': $float=' style="float:right;" ';
340
+ break;
341
+
342
+ default: $float='';
343
+ break;
344
+ }
345
+ }
346
+
347
+ $content = $link . '<img class="ngg-singlepic" src="'.NGGALLERY_URLPATH.'nggshow.php?pid='.$imageID.'&amp;width='.$width.'&amp;height='.$height.'&amp;mode='.$mode.'" alt="'.$picture->alttext.'" title="'.$picture->alttext.'"'.$float.' />';
348
 
349
  if ($ngg_options[imgSinglePicLink]) $content .= '</a>';
350
 
nggwidget.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: NextGEN Gallery Widget
4
  Description: Adds a sidebar widget to see random images in your NextGEN Gallery!
5
  Author: KeViN
6
- Version: 0.9b
7
  Author URI: http://www.kev.hu
8
  Plugin URI: http://www.kev.hu
9
 
@@ -130,9 +130,9 @@ function widget_nextgenimage_init() {
130
  $url_parts = parse_url(get_bloginfo('home'));
131
 
132
  // Null parameters check
133
- if ( ($number == '') ) $number = 1;
134
- if ( ($sizeX == '') ) $sizeX = 190;
135
- if ( ($sizeY == '') ) $sizeY = 190;
136
  // if ( ($border == '') ) $border = 0;
137
  // if ( ($bordercolor == '') ) $bordercolor = "#dadada";
138
  // if ( ($margin == '') ) $margin = 5;
@@ -165,7 +165,7 @@ function widget_nextgenimage_init() {
165
  }
166
 
167
  echo '</ul></div>'."\n";
168
- echo '<div style="clear:both;"></div>'."\n";
169
  echo $after_widget;
170
  }
171
  }
3
  Plugin Name: NextGEN Gallery Widget
4
  Description: Adds a sidebar widget to see random images in your NextGEN Gallery!
5
  Author: KeViN
6
+ Version: 0.91b
7
  Author URI: http://www.kev.hu
8
  Plugin URI: http://www.kev.hu
9
 
130
  $url_parts = parse_url(get_bloginfo('home'));
131
 
132
  // Null parameters check
133
+ if ( ($number == '') ) $number = 2;
134
+ if ( ($sizeX == '') ) $sizeX = 100;
135
+ if ( ($sizeY == '') ) $sizeY = 75;
136
  // if ( ($border == '') ) $border = 0;
137
  // if ( ($bordercolor == '') ) $bordercolor = "#dadada";
138
  // if ( ($margin == '') ) $margin = 5;
165
  }
166
 
167
  echo '</ul></div>'."\n";
168
+ // echo '<div style="clear:both;"></div>'."\n";
169
  echo $after_widget;
170
  }
171
  }
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.41
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.42
8
 
9
  NextGEN Gallery is a Image Gallery plugin for WordPress.
10