NextGEN Gallery – WordPress Gallery Plugin - Version 0.71

Version Description

Download this release

Release Info

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

Code changes from version 0.70 to 0.71

admin/about.php CHANGED
@@ -41,6 +41,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
41
  <input type="hidden" name="item_name" value="WordPress Plugins www.alexrabe.boelinger.com"/>
42
  <input type="hidden" name="no_shipping" value="1"/><input type="hidden" name="return" value="http://alexrabe.boelinger.com/" />
43
  <input type="hidden" name="cancel_return" value="http://alexrabe.boelinger.com/"/>
 
44
  <input type="hidden" name="currency_code" value="USD"/>
45
  <input type="hidden" name="tax" value="0"/>
46
  <input type="hidden" name="bn" value="PP-DonationsBF"/>
@@ -95,7 +96,7 @@ function ngg_list_support() {
95
  "Claudia (German documentation)" => "http://www.blog-werkstatt.de/",
96
  "Robert (German documentation)" => "http://www.curlyrob.de/",
97
  "Pierpaolo Mannone (Italian Translation)" => "http://www.interscambiocasa.com/",
98
- "Mattias Tengblad (Swedish Translation)" => "http://www.eyesx.com/",
99
  "M&uuml;fit Kiper (Swedish Translation)" => "http://www.kiper.se/",
100
  "Ghettomaster" => "http://www.ghettoworld.de/",
101
  "Joe Pharis" => "http://www.southernstylecruisers.com/",
@@ -115,7 +116,8 @@ function ngg_list_support() {
115
  "Hans Kiesouw" => "http://www.digitalvagabonding.com/",
116
  "Laki (Slovak Translation)" => "http://www.laki.sk/",
117
  "Thomas Bradley" => "http://www.tobeon.co.uk/wordpress/",
118
- "Frederic Deghetto" => ""
 
119
  );
120
 
121
 
41
  <input type="hidden" name="item_name" value="WordPress Plugins www.alexrabe.boelinger.com"/>
42
  <input type="hidden" name="no_shipping" value="1"/><input type="hidden" name="return" value="http://alexrabe.boelinger.com/" />
43
  <input type="hidden" name="cancel_return" value="http://alexrabe.boelinger.com/"/>
44
+ <input type="hidden" name="lc" value="US" />
45
  <input type="hidden" name="currency_code" value="USD"/>
46
  <input type="hidden" name="tax" value="0"/>
47
  <input type="hidden" name="bn" value="PP-DonationsBF"/>
96
  "Claudia (German documentation)" => "http://www.blog-werkstatt.de/",
97
  "Robert (German documentation)" => "http://www.curlyrob.de/",
98
  "Pierpaolo Mannone (Italian Translation)" => "http://www.interscambiocasa.com/",
99
+ "Mattias Tengblad (Swedish Translation)" => "http://wp-support.se/",
100
  "M&uuml;fit Kiper (Swedish Translation)" => "http://www.kiper.se/",
101
  "Ghettomaster" => "http://www.ghettoworld.de/",
102
  "Joe Pharis" => "http://www.southernstylecruisers.com/",
116
  "Hans Kiesouw" => "http://www.digitalvagabonding.com/",
117
  "Laki (Slovak Translation)" => "http://www.laki.sk/",
118
  "Thomas Bradley" => "http://www.tobeon.co.uk/wordpress/",
119
+ "Frederic Deghetto" => "",
120
+ "Christopher Weddell" => ""
121
  );
122
 
123
 
admin/album.php CHANGED
@@ -38,7 +38,7 @@ function nggallery_admin_manage_album() {
38
  }
39
 
40
  if ($_POST['delete']){
41
- check_admin_referer('ngg_addroles');
42
  $act_album = attribute_escape($_POST['act_album']);
43
  $result = $wpdb->query("DELETE FROM $wpdb->nggalbum WHERE id = '$act_album' ");
44
  if ($result) $messagetext = '<font color="green">'.__('Album deleted','nggallery').'</font>';
38
  }
39
 
40
  if ($_POST['delete']){
41
+ check_admin_referer('ngg_album');
42
  $act_album = attribute_escape($_POST['act_album']);
43
  $result = $wpdb->query("DELETE FROM $wpdb->nggalbum WHERE id = '$act_album' ");
44
  if ($result) $messagetext = '<font color="green">'.__('Album deleted','nggallery').'</font>';
admin/roles.php CHANGED
@@ -31,7 +31,7 @@ if ( isset($_POST['update_cap']) ) {
31
  <table class="optiontable">
32
  <tr valign="top">
33
  <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>
34
- <td><label for="tinymce"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>
35
  </tr>
36
  <tr valign="top">
37
  <th scope="row"><?php _e('Use TinyMCE Button / Upload tab', 'nggallery') ;?>:</th>
@@ -96,6 +96,11 @@ function ngg_set_capability($lowest_role, $capability){
96
  $add_capability = true;
97
 
98
  $the_role = get_role($role);
 
 
 
 
 
99
  $add_capability ? $the_role->add_cap($capability) : $the_role->remove_cap($capability) ;
100
  }
101
 
31
  <table class="optiontable">
32
  <tr valign="top">
33
  <th scope="row"><?php _e('Main NextGEN Gallery overview', 'nggallery') ;?>:</th>
34
+ <td><label for="general"><select name="general" id="general"><?php wp_dropdown_roles( ngg_get_role('NextGEN Gallery overview') ); ?></select></label></td>
35
  </tr>
36
  <tr valign="top">
37
  <th scope="row"><?php _e('Use TinyMCE Button / Upload tab', 'nggallery') ;?>:</th>
96
  $add_capability = true;
97
 
98
  $the_role = get_role($role);
99
+
100
+ // If you rename the roles, the please use the role manager plugin
101
+ if ( empty($the_role) )
102
+ continue;
103
+
104
  $add_capability ? $the_role->add_cap($capability) : $the_role->remove_cap($capability) ;
105
  }
106
 
changelog.txt CHANGED
@@ -1,7 +1,15 @@
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
- V0.70
 
 
 
 
 
 
 
 
5
  - NEW : Add role manager page and capabilities
6
  - NEW : Show gallery with [tags=list of tags]
7
  - NEW : Show album with [albumtags=list of tags]
1
  NextGEN Gallery
2
  by Alex Rabe & NextGEN DEV Team
3
 
4
+ V0.71 - 07.09.2007
5
+ - Added : Add defer="defer" to Slideshow to avoid IE crash (THX to Simbo)
6
+ - Bugfix : Bugfix for slideshow to show all pictures
7
+ - Bugfix : Wrong check_admin_referer in albums (THX to Christopher)
8
+ - Bugfix : No exclude check in counter and widgets (THX to Christopher)
9
+ - Bugfix : Check for existing role (THX to Lost in Network)
10
+ - Bugfix : Label in roles are wrong (THX to Joern)
11
+
12
+ V0.70 - 06.09.2007
13
  - NEW : Add role manager page and capabilities
14
  - NEW : Show gallery with [tags=list of tags]
15
  - NEW : Show album with [albumtags=list of tags]
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.70
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
@@ -50,7 +50,7 @@ define('NGGFILE_PERMISSION', 0666);
50
  // ################################################################
51
 
52
  // Version and path to check version
53
- define('NGGVERSION', "0.70");
54
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
55
 
56
  // define URL
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.71
8
 
9
  Author URI: http://alexrabe.boelinger.com/
10
 
50
  // ################################################################
51
 
52
  // Version and path to check version
53
+ define('NGGVERSION', "0.71");
54
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
55
 
56
  // define URL
nggextractXML.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  /*
4
  +----------------------------------------------------------------+
5
- + imageRotartor-XML V1.10
6
  + by Alex Rabe
7
  + required for NextGEN Gallery
8
  +----------------------------------------------------------------+
@@ -17,26 +17,25 @@ function get_out_now() { exit; }
17
  add_action('shutdown', 'get_out_now', -1);
18
 
19
  global $wpdb;
20
- $ngg_options = get_option('ngg_options');
 
 
21
 
22
  // get the gallery id
23
  $galleryID = (int) attribute_escape($_GET['gid']);
24
 
25
  // get the pictures
26
  if ($galleryID == 0) {
27
- $thepictures = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE exclude != 1 ORDER BY $ngg_options[galSort] $ngg_options[galSortDir]");
28
  } else {
29
- $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
30
- $thepictures = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY $ngg_options[galSort] $ngg_options[galSortDir]");
31
  }
32
- // set gallery url
33
- $folder_url = get_option ('siteurl')."/".$act_gallery->path."/";
34
 
35
  // Create XML output
36
  header("content-type:text/xml;charset=utf-8");
37
 
38
  echo "<playlist version='1' xmlns='http://xspf.org/ns/0/'>\n";
39
- echo " <title>".$act_gallery->name."</title>\n";
40
  echo " <trackList>\n";
41
 
42
  if (is_array ($thepictures)){
@@ -48,7 +47,7 @@ if (is_array ($thepictures)){
48
  echo " <title>".$picture->alttext."</title>\n";
49
  else
50
  echo " <title>".$picture->filename."</title>\n";
51
- echo " <location>".$folder_url.$picture->filename."</location>\n";
52
  echo " </track>\n";
53
  }
54
  }
2
 
3
  /*
4
  +----------------------------------------------------------------+
5
+ + imageRotartor-XML V1.20
6
  + by Alex Rabe
7
  + required for NextGEN Gallery
8
  +----------------------------------------------------------------+
17
  add_action('shutdown', 'get_out_now', -1);
18
 
19
  global $wpdb;
20
+
21
+ $ngg_options = get_option ('ngg_options');
22
+ $siteurl = get_option ('siteurl');
23
 
24
  // get the gallery id
25
  $galleryID = (int) attribute_escape($_GET['gid']);
26
 
27
  // get the pictures
28
  if ($galleryID == 0) {
29
+ $thepictures = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE tt.exclude != 1 ORDER BY tt.$ngg_options[galSort] $ngg_options[galSortDir] ");
30
  } else {
31
+ $thepictures = $wpdb->get_results("SELECT t.*, tt.* FROM $wpdb->nggallery AS t INNER JOIN $wpdb->nggpictures AS tt ON t.gid = tt.galleryid WHERE t.gid = '$galleryID' AND tt.exclude != 1 ORDER BY tt.$ngg_options[galSort] $ngg_options[galSortDir] ");
 
32
  }
 
 
33
 
34
  // Create XML output
35
  header("content-type:text/xml;charset=utf-8");
36
 
37
  echo "<playlist version='1' xmlns='http://xspf.org/ns/0/'>\n";
38
+ echo " <title>".$thepictures[0]->name."</title>\n";
39
  echo " <trackList>\n";
40
 
41
  if (is_array ($thepictures)){
47
  echo " <title>".$picture->alttext."</title>\n";
48
  else
49
  echo " <title>".$picture->filename."</title>\n";
50
+ echo " <location>".$siteurl."/".$picture->path."/".$picture->filename."</location>\n";
51
  echo " </track>\n";
52
  }
53
  }
nggfunctions.php CHANGED
@@ -135,7 +135,7 @@ function nggShowSlideshow($galleryID,$irWidth,$irHeight) {
135
 
136
  $replace = "\n".'<div class="slideshow" id="ngg_slideshow'.$galleryID.'">';
137
  $replace .= '<p>The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..</p></div>';
138
- $replace .= "\n\t".'<script type="text/javascript">';
139
  if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'<!--';
140
  if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'//<![CDATA[';
141
  $replace .= "\n\t\t".'var so = new SWFObject("'.NGGALLERY_URLPATH.'imagerotator.swf", "ngg_slideshow'.$galleryID.'", "'.$irWidth.'", "'.$irHeight.'", "7", "#'.$ngg_options[irBackcolor].'");';
@@ -415,7 +415,7 @@ function nggCreateAlbum($galleryID,$mode = "extend",$albumID = 0) {
415
  }
416
 
417
  if ($gallerycontent) {
418
- $counter = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID'");
419
  if ($mode == "compact") {
420
  if ($gallerycontent->previewpic != 0)
421
  $insertpic = '<img class="Thumb" width="91" height="68" alt="'.$gallerycontent->title.'" src="'.nggallery::get_thumbnail_url($gallerycontent->previewpic).'"/>';
135
 
136
  $replace = "\n".'<div class="slideshow" id="ngg_slideshow'.$galleryID.'">';
137
  $replace .= '<p>The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..</p></div>';
138
+ $replace .= "\n\t".'<script type="text/javascript" defer="defer">';
139
  if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'<!--';
140
  if ($ngg_options['irXHTMLvalid']) $replace .= "\n\t".'//<![CDATA[';
141
  $replace .= "\n\t\t".'var so = new SWFObject("'.NGGALLERY_URLPATH.'imagerotator.swf", "ngg_slideshow'.$galleryID.'", "'.$irWidth.'", "'.$irHeight.'", "7", "#'.$ngg_options[irBackcolor].'");';
415
  }
416
 
417
  if ($gallerycontent) {
418
+ $counter = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1");
419
  if ($mode == "compact") {
420
  if ($gallerycontent->previewpic != 0)
421
  $insertpic = '<img class="Thumb" width="91" height="68" alt="'.$gallerycontent->title.'" src="'.nggallery::get_thumbnail_url($gallerycontent->previewpic).'"/>';
nggwidget.php CHANGED
@@ -69,7 +69,7 @@ function nggSlideshowWidget($galleryID,$irWidth,$irHeight) {
69
 
70
  $replace .= "\n".'<div class="ngg-widget-slideshow" id="ngg_widget_slideshow'.$galleryID.'">';
71
  $replace .= '<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see the slideshow.</div>';
72
- $replace .= "\n\t".'<script type="text/javascript">';
73
  $replace .= "\n\t".'<!--';
74
  $replace .= "\n\t".'//<![CDATA[';
75
  $replace .= "\n\t\t".'var so = new SWFObject("'.NGGALLERY_URLPATH.'imagerotator.swf", "ngg_slideshow'.$galleryID.'", "'.$irWidth.'", "'.$irHeight.'", "7", "#'.$ngg_options[irBackcolor].'");';
@@ -187,14 +187,14 @@ function nggDisplayImagesWidget($thumb,$number,$sizeX,$sizeY,$mode,$imgtype) {
187
  // get the effect code
188
  $thumbcode = nggallery::get_thumbcode("sidebar_".$imgtype);
189
 
190
- $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures");
191
  if ($count < $number)
192
  $number = $count;
193
 
194
  if ($imgtype == "random")
195
- $imageList = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures ORDER by rand() limit $number");
196
  else
197
- $imageList = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures ORDER by pid DESC limit 0,$number");
198
 
199
  if (is_array($imageList)){
200
  foreach($imageList as $image) {
69
 
70
  $replace .= "\n".'<div class="ngg-widget-slideshow" id="ngg_widget_slideshow'.$galleryID.'">';
71
  $replace .= '<a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see the slideshow.</div>';
72
+ $replace .= "\n\t".'<script type="text/javascript" defer="defer">';
73
  $replace .= "\n\t".'<!--';
74
  $replace .= "\n\t".'//<![CDATA[';
75
  $replace .= "\n\t\t".'var so = new SWFObject("'.NGGALLERY_URLPATH.'imagerotator.swf", "ngg_slideshow'.$galleryID.'", "'.$irWidth.'", "'.$irHeight.'", "7", "#'.$ngg_options[irBackcolor].'");';
187
  // get the effect code
188
  $thumbcode = nggallery::get_thumbcode("sidebar_".$imgtype);
189
 
190
+ $count = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE exclude != 1 ");
191
  if ($count < $number)
192
  $number = $count;
193
 
194
  if ($imgtype == "random")
195
+ $imageList = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE exclude != 1 ORDER by rand() limit $number");
196
  else
197
+ $imageList = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE exclude != 1 ORDER by pid DESC limit 0,$number");
198
 
199
  if (is_array($imageList)){
200
  foreach($imageList as $image) {
readme.txt CHANGED
@@ -24,6 +24,7 @@ Features:
24
  * Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
25
  * Language support : Translated in more than 15 languages
26
  * Upload tab integration : You have access to all pictures via the upload tab
 
27
 
28
  For support around this plugin please visit http://alexrabe.boelinger.com/forums/
29
 
24
  * Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
25
  * Language support : Translated in more than 15 languages
26
  * Upload tab integration : You have access to all pictures via the upload tab
27
+ * Tag support for images : Append related images to your post
28
 
29
  For support around this plugin please visit http://alexrabe.boelinger.com/forums/
30