NextGEN Gallery – WordPress Gallery Plugin - Version 0.39

Version Description

Download this release

Release Info

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

Code changes from version 0.38 to 0.39

Files changed (6) hide show
  1. changelog.txt +28 -21
  2. nggallery.php +2 -2
  3. nggbutton.php +106 -0
  4. nggextractXML.php +1 -1
  5. nggfunctions.php +3 -3
  6. ngginstall.php +1 -1
changelog.txt CHANGED
@@ -1,38 +1,45 @@
1
  NextGEN Gallery
2
  by Alex Rabe
3
 
4
- V0.38 -
5
- - One time more remove get_settings :-)
6
- - Another Bugfix for $_GET in Manage gallery
7
- - Bugfix for exclude option
 
 
 
 
 
 
 
8
 
9
  V0.37 - 28.04.2007
10
- - Bugfix for $_GET in Manage gallery
11
- - Bugfix in installation routine
12
 
13
  V0.36 - 26.04.2007
14
- - Stupid PHP beginner failure in album management
15
 
16
  V0.35 - 26.04.2007
17
- - Remove get_settings
18
- - Folder name can be flexible
19
- - Correction for Safe-Mode ON
20
  - New option : Fullsize pic for Singlepic mode
21
  - New option : Select show order
22
- - Add Check for WP2.1
23
- - Bugfix for sort order
24
- - Check for permission for default folder
25
- - Set Default '0' for table album.sortorder
 
 
26
 
27
  V0.34 - 24.04.2007
28
- - Bugfix for Album
29
- - Add fix ration setting
30
- - Change link in Album to get_bloginfo('wpurl')
31
- - Add language file file
32
 
33
  V0.33 - 23.04.2007
34
- - Overview Page
35
- - Core function
36
- - Slideshow
37
 
38
 
1
  NextGEN Gallery
2
  by Alex Rabe
3
 
4
+ V0.39 - 28.04.2007
5
+ - Added : Set ORDER BY for gallery
6
+ - Bugfix : check now for Exclude != 1
7
+ - Bugfix : DB Query in function wrong
8
+ - Bugfix : DB exlude = DEFAULT '0'
9
+ - Bugfix : Scan folder in empty gallery
10
+
11
+ V0.38 - 28.04.2007
12
+ - Bugfix : One time more remove get_settings :-)
13
+ - Bugfix : $_GET in Manage gallery
14
+ - Bugfix : exclude option
15
 
16
  V0.37 - 28.04.2007
17
+ - Bugfix : $_GET in Manage gallery
18
+ - Bugfix : update DB installation routine
19
 
20
  V0.36 - 26.04.2007
21
+ - Bugfix : Stupid PHP beginner failure in album management
22
 
23
  V0.35 - 26.04.2007
24
+ - Rework : Folder name can be flexible
 
 
25
  - New option : Fullsize pic for Singlepic mode
26
  - New option : Select show order
27
+ - Added : Check for WP2.1
28
+ - Added : Check for permission for default folder
29
+ - Bugfix : Remove get_settings
30
+ - Bugfix : Correction for Safe-Mode ON
31
+ - Bugfix : Set Default '0' for table album.sortorder
32
+ - Bugfix : Update sort order
33
 
34
  V0.34 - 24.04.2007
35
+ - Added : Add fix ration setting
36
+ - Added : Add language file file
37
+ - Bugfix : Change link in Album to get_bloginfo('wpurl')
38
+ - Bugfix : Album CSS file not loaded
39
 
40
  V0.33 - 23.04.2007
41
+ - NEW : Overview Page
42
+ - NEW : Core function
43
+ - NEW : Slideshow
44
 
45
 
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). At the moment only poor Web1.0 :-(
6
  Author: Alex Rabe
7
- Version: 0.38a
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.38");
46
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
47
 
48
  // define URL
4
  Plugin URI: http://alexrabe.boelinger.com/?page_id=80
5
  Description: A NextGENeration Photo gallery for the WEB2.0(beta). At the moment only poor Web1.0 :-(
6
  Author: Alex Rabe
7
+ Version: 0.39a
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.39");
46
  define('NGGURL', "http://nextgen.boelinger.com/version.php");
47
 
48
  // define URL
nggbutton.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $wpconfig = realpath("../../../wp-config.php");
4
+
5
+ if (!file_exists($wpconfig)) {
6
+ echo "Could not found wp-config.php. Error in path :\n\n".$wpconfig ;
7
+ die;
8
+ }// stop when wp-config is not there
9
+
10
+ require_once($wpconfig);
11
+ require_once(ABSPATH.'/wp-admin/admin.php');
12
+
13
+ global $wpdb;
14
+ $ngg_options = get_option('ngg_options');
15
+
16
+ ?>
17
+
18
+ <html xmlns="http://www.w3.org/1999/xhtml">
19
+ <head>
20
+ <title>{$lang_insert_link_title}</title>
21
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
22
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
23
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
24
+ <script language="javascript" type="text/javascript" src="<?php echo get_option('siteurl') ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
25
+ <script language="javascript" type="text/javascript" src="<?php echo NGGALLERY_URLPATH ?>js/tinymce.js"></script>
26
+ <base target="_self" />
27
+ </head>
28
+ <body id="link" onload="tinyMCEPopup.executeOnLoad('init();');document.body.style.display='';document.getElementById('gallerytag').focus();" style="display: none">
29
+ <!-- <form onsubmit="insertLink();return false;" action="#"> -->
30
+ <form name="NextGEN" action="#">
31
+ <div class="tabs">
32
+ <ul>
33
+ <li id="gallery_tab" class="current"><span><a href="javascript:mcTabs.displayTab('gallery_tab','gallery_panel');" onmousedown="return false;"><?php _e("Gallery", 'nggallery'); ?></a></span></li>
34
+ <li id="album_tab"><span><a href="javascript:mcTabs.displayTab('album_tab','album_panel');" onmousedown="return false;"><?php _e("Album", 'nggallery'); ?></a></span></li>
35
+ <li id="singlepic_tab"><span><a href="javascript:mcTabs.displayTab('singlepic_tab','singlepic_panel');" onmousedown="return false;"><?php _e("Picture", 'nggallery'); ?></a></span></li>
36
+ </ul>
37
+ </div>
38
+
39
+ <div class="panel_wrapper">
40
+ <!-- gallery panel -->
41
+ <div id="gallery_panel" class="panel current">
42
+ <br />
43
+ <table border="0" cellpadding="4" cellspacing="0">
44
+ <tr>
45
+ <td nowrap="nowrap"><label for="target"><?php _e("Select gallery", 'nggallery'); ?></label></td>
46
+ <td><select id="gallerytag" name="gallerytag" style="width: 200px">
47
+ <option value="_self">gallery</option>
48
+ <option value="_blank">text 1</option>
49
+ </select></td>
50
+ </tr>
51
+ <tr>
52
+ <td nowrap="nowrap"><label for="linktitle"><?php _e("TEXT ABC", 'nggallery'); ?></label></td>
53
+ <td><input id="linktitle" name="linktitle" type="text" value="" style="width: 200px" /></td>
54
+ </tr>
55
+ <tr id="styleSelectRow">
56
+ <td><label for="styleSelect"><?php _e("TEXT ABC", 'nggallery'); ?></label></td>
57
+ <td>
58
+ <select id="styleSelect" name="styleSelect">
59
+ <option value="" selected="selected"><?php __("TEXT ABC", 'nggallery'); ?></option>
60
+ </select></td>
61
+ </tr>
62
+ </table>
63
+ </div>
64
+ <!-- gallery panel -->
65
+
66
+ <!-- album panel -->
67
+ <div id="album_panel" class="panel">
68
+ <br />
69
+ <table border="0" cellpadding="4" cellspacing="0">
70
+ <tr>
71
+ <td nowrap="nowrap"><label for="target2"><?php _e("Select album", 'nggallery'); ?></label></td>
72
+ <td><select id="target2" name="target2" style="width: 200px">
73
+ <option value="zweirt">album</option>
74
+ </select></td>
75
+ </tr>
76
+ </table>
77
+ </div>
78
+ <!-- album panel -->
79
+
80
+ <!-- single pic panel -->
81
+ <div id="singlepic_panel" class="panel">
82
+ <br />
83
+ <table border="0" cellpadding="4" cellspacing="0">
84
+ <tr>
85
+ <td nowrap="nowrap"><label for="target3"><?php _e("Select picture", 'nggallery'); ?></label></td>
86
+ <td><select id="target3" name="target3" style="width: 200px">
87
+ <option value="start">singlepic</option>
88
+ </select></td>
89
+ </tr>
90
+ </table>
91
+ </div>
92
+ <!-- single pic panel -->
93
+ </div>
94
+
95
+ <div class="mceActionPanel">
96
+ <div style="float: left">
97
+ <input type="button" id="cancel" name="cancel" value="<?php _e("Cancel", 'nggallery'); ?>" onclick="tinyMCEPopup.close();" />
98
+ </div>
99
+
100
+ <div style="float: right">
101
+ <input type="submit" id="insert" name="insert" value="<?php _e("Insert", 'nggallery'); ?>" onclick="insertNGGLink();" />
102
+ </div>
103
+ </div>
104
+ </form>
105
+ </body>
106
+ </html>
nggextractXML.php CHANGED
@@ -24,7 +24,7 @@ $ngg_options = get_option('ngg_options');
24
 
25
  // get gallery values
26
  $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
27
- $thepictures = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude = 0 ORDER BY '$ngg_options[galSort]' ASC");
28
 
29
  // set gallery url
30
  $folder_url = get_option ('siteurl')."/".$act_gallery->path."/";
24
 
25
  // get gallery values
26
  $act_gallery = $wpdb->get_row("SELECT * FROM $wpdb->nggallery WHERE gid = '$galleryID' ");
27
+ $thepictures = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY '$ngg_options[galSort]' ASC");
28
 
29
  // set gallery url
30
  $folder_url = get_option ('siteurl')."/".$act_gallery->path."/";
nggfunctions.php CHANGED
@@ -164,10 +164,10 @@ function nggShowGallery($galleryID) {
164
  else $page = 1;
165
  $start = $offset = ( $page - 1 ) * $maxElement;
166
 
167
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude = 0 ORDER BY $ngg_options[galSort] ASC LIMIT $start, $maxElement ");
168
- $total = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude = 0 ");
169
  } else {
170
- $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND alttext = 0 ORDER BY $ngg_options[galSort] ASC ");
171
  }
172
 
173
  if (is_array($picturelist)) {
164
  else $page = 1;
165
  $start = $offset = ( $page - 1 ) * $maxElement;
166
 
167
+ $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY $ngg_options[galSort] ASC LIMIT $start, $maxElement ");
168
+ $total = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ");
169
  } else {
170
+ $picturelist = $wpdb->get_results("SELECT * FROM $wpdb->nggpictures WHERE galleryid = '$galleryID' AND exclude != 1 ORDER BY $ngg_options[galSort] ASC ");
171
  }
172
 
173
  if (is_array($picturelist)) {
ngginstall.php CHANGED
@@ -22,7 +22,7 @@ function nggallery_install () {
22
  filename VARCHAR(255) NOT NULL ,
23
  description MEDIUMTEXT NULL ,
24
  alttext MEDIUMTEXT NULL ,
25
- exclude TINYINT NULL ,
26
  PRIMARY KEY pid (pid)
27
  );";
28
 
22
  filename VARCHAR(255) NOT NULL ,
23
  description MEDIUMTEXT NULL ,
24
  alttext MEDIUMTEXT NULL ,
25
+ exclude TINYINT NULL DEFAULT '0' ,
26
  PRIMARY KEY pid (pid)
27
  );";
28