Version Description
- 23.03.2010 =
- Bugfix : PHP4 compat issue for Add gallery & options page
- Bugfix : Gallery widget can now have a empty title
- Bugfix : Adding correct stripslash for gallery title
Download this release
Release Info
Developer | alexrabe |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
- admin/addgallery.php +1 -1
- admin/manage.php +2 -2
- admin/settings.php +1 -1
- changelog.txt +5 -0
- lib/image.php +1 -1
- lib/ngg-db.php +6 -0
- nggallery.php +2 -2
- nggfunctions.php +2 -2
- readme.txt +8 -3
- widgets/media-rss-widget.php +2 -3
- widgets/widgets.php +2 -3
admin/addgallery.php
CHANGED
@@ -237,7 +237,7 @@ class nggAddGallery {
|
|
237 |
foreach($tabs as $tab_key => $tab_name) {
|
238 |
echo "\n\t<div id='$tab_key'>\n";
|
239 |
// Looks for the internal class function, otherwise enable a hook for plugins
|
240 |
-
if ( method_exists(
|
241 |
call_user_func( array( &$this , "tab_$tab_key") );
|
242 |
else
|
243 |
do_action( 'ngg_tab_content_' . $tab_key );
|
237 |
foreach($tabs as $tab_key => $tab_name) {
|
238 |
echo "\n\t<div id='$tab_key'>\n";
|
239 |
// Looks for the internal class function, otherwise enable a hook for plugins
|
240 |
+
if ( method_exists( $this, "tab_$tab_key" ))
|
241 |
call_user_func( array( &$this , "tab_$tab_key") );
|
242 |
else
|
243 |
do_action( 'ngg_tab_content_' . $tab_key );
|
admin/manage.php
CHANGED
@@ -362,11 +362,11 @@ class nggManageGallery {
|
|
362 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery options' )) {
|
363 |
|
364 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery title' ))
|
365 |
-
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET title= '%s' WHERE gid = %d", $_POST['title'], $this->gid) );
|
366 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery path' ))
|
367 |
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET path= '%s' WHERE gid = %d", untrailingslashit ( str_replace('\\', '/', trim( stripslashes($_POST['path']) )) ), $this->gid ) );
|
368 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery description' ))
|
369 |
-
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET galdesc= '%s' WHERE gid = %d", $_POST['gallerydesc'], $this->gid) );
|
370 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery page id' ))
|
371 |
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET pageid= '%d' WHERE gid = %d", (int) $_POST['pageid'], $this->gid) );
|
372 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery preview pic' ))
|
362 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery options' )) {
|
363 |
|
364 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery title' ))
|
365 |
+
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET title= '%s' WHERE gid = %d", esc_attr($_POST['title']), $this->gid) );
|
366 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery path' ))
|
367 |
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET path= '%s' WHERE gid = %d", untrailingslashit ( str_replace('\\', '/', trim( stripslashes($_POST['path']) )) ), $this->gid ) );
|
368 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery description' ))
|
369 |
+
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET galdesc= '%s' WHERE gid = %d", esc_attr( $_POST['gallerydesc'] ), $this->gid) );
|
370 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery page id' ))
|
371 |
$wpdb->query( $wpdb->prepare ("UPDATE $wpdb->nggallery SET pageid= '%d' WHERE gid = %d", (int) $_POST['pageid'], $this->gid) );
|
372 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery preview pic' ))
|
admin/settings.php
CHANGED
@@ -177,7 +177,7 @@ class nggOptions {
|
|
177 |
foreach($tabs as $tab_key => $tab_name) {
|
178 |
echo "\n\t<div id='$tab_key'>\n";
|
179 |
// Looks for the internal class function, otherwise enable a hook for plugins
|
180 |
-
if ( method_exists(
|
181 |
call_user_func( array( &$this , "tab_$tab_key") );
|
182 |
else
|
183 |
do_action( 'ngg_tab_content_' . $tab_key );
|
177 |
foreach($tabs as $tab_key => $tab_name) {
|
178 |
echo "\n\t<div id='$tab_key'>\n";
|
179 |
// Looks for the internal class function, otherwise enable a hook for plugins
|
180 |
+
if ( method_exists( $this, "tab_$tab_key" ))
|
181 |
call_user_func( array( &$this , "tab_$tab_key") );
|
182 |
else
|
183 |
do_action( 'ngg_tab_content_' . $tab_key );
|
changelog.txt
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
|
|
|
|
|
|
|
|
|
|
4 |
= V1.5.0 - 18.03.2010 =
|
5 |
* NEW : Support for Post thumbnail feature
|
6 |
* NEW : Backup and Recover function for images (THX to Simone Fumagalli)
|
1 |
NextGEN Gallery
|
2 |
by Alex Rabe & NextGEN DEV Team
|
3 |
|
4 |
+
= V1.5.1 - 23.03.2010 =
|
5 |
+
* Bugfix : PHP4 compat issue for Add gallery & options page
|
6 |
+
* Bugfix : Gallery widget can now have a empty title
|
7 |
+
* Bugfix : Adding correct stripslash for gallery title
|
8 |
+
|
9 |
= V1.5.0 - 18.03.2010 =
|
10 |
* NEW : Support for Post thumbnail feature
|
11 |
* NEW : Backup and Recover function for images (THX to Simone Fumagalli)
|
lib/image.php
CHANGED
@@ -59,7 +59,7 @@ class nggImage{
|
|
59 |
// Finish initialisation
|
60 |
$this->name = $gallery->name;
|
61 |
$this->path = $gallery->path;
|
62 |
-
$this->title = $gallery->title;
|
63 |
$this->pageid = $gallery->pageid;
|
64 |
$this->previewpic = $gallery->previewpic;
|
65 |
|
59 |
// Finish initialisation
|
60 |
$this->name = $gallery->name;
|
61 |
$this->path = $gallery->path;
|
62 |
+
$this->title = stripslashes($gallery->title);
|
63 |
$this->pageid = $gallery->pageid;
|
64 |
$this->previewpic = $gallery->previewpic;
|
65 |
|
lib/ngg-db.php
CHANGED
@@ -140,6 +140,8 @@ class nggdb {
|
|
140 |
$galleriesID[] = $key;
|
141 |
// init the counter values
|
142 |
$this->galleries[$key]->counter = 0;
|
|
|
|
|
143 |
wp_cache_add($key, $this->galleries[$key], 'ngg_gallery');
|
144 |
}
|
145 |
|
@@ -183,6 +185,10 @@ class nggdb {
|
|
183 |
|
184 |
// Build the object from the query result
|
185 |
if ($gallery) {
|
|
|
|
|
|
|
|
|
186 |
$gallery->abspath = WINABSPATH . $gallery->path;
|
187 |
//TODO:Possible failure , $id could be a number or name
|
188 |
wp_cache_add($id, $gallery, 'ngg_gallery');
|
140 |
$galleriesID[] = $key;
|
141 |
// init the counter values
|
142 |
$this->galleries[$key]->counter = 0;
|
143 |
+
$this->galleries[$key]->title = stripslashes($this->galleries[$key]->title);
|
144 |
+
$this->galleries[$key]->galdesc = stripslashes($this->galleries[$key]->galdesc);
|
145 |
wp_cache_add($key, $this->galleries[$key], 'ngg_gallery');
|
146 |
}
|
147 |
|
185 |
|
186 |
// Build the object from the query result
|
187 |
if ($gallery) {
|
188 |
+
// it was a bad idea to use a object, stripslashes_deep() could not used here, learn from it
|
189 |
+
$gallery->title = stripslashes($gallery->title);
|
190 |
+
$gallery->galdesc = stripslashes($gallery->galdesc);
|
191 |
+
|
192 |
$gallery->abspath = WINABSPATH . $gallery->path;
|
193 |
//TODO:Possible failure , $id could be a number or name
|
194 |
wp_cache_add($id, $gallery, 'ngg_gallery');
|
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 the Web 2.0.
|
6 |
Author: Alex Rabe
|
7 |
-
Version: 1.5.
|
8 |
|
9 |
Author URI: http://alexrabe.de/
|
10 |
|
@@ -44,7 +44,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
44 |
if (!class_exists('nggLoader')) {
|
45 |
class nggLoader {
|
46 |
|
47 |
-
var $version = '1.5.
|
48 |
var $dbversion = '1.5.0';
|
49 |
var $minium_WP = '2.9';
|
50 |
var $minium_WPMU = '2.9';
|
4 |
Plugin URI: http://alexrabe.de/?page_id=80
|
5 |
Description: A NextGENeration Photo gallery for the Web 2.0.
|
6 |
Author: Alex Rabe
|
7 |
+
Version: 1.5.1
|
8 |
|
9 |
Author URI: http://alexrabe.de/
|
10 |
|
44 |
if (!class_exists('nggLoader')) {
|
45 |
class nggLoader {
|
46 |
|
47 |
+
var $version = '1.5.1';
|
48 |
var $dbversion = '1.5.0';
|
49 |
var $minium_WP = '2.9';
|
50 |
var $minium_WPMU = '2.9';
|
nggfunctions.php
CHANGED
@@ -156,7 +156,7 @@ function nggShowGallery( $galleryID, $template = '', $images = false ) {
|
|
156 |
*/
|
157 |
function nggCreateGallery($picturelist, $galleryID = false, $template = '', $images = false) {
|
158 |
global $nggRewrite;
|
159 |
-
|
160 |
$ngg_options = nggGallery::get_option('ngg_options');
|
161 |
|
162 |
//the shortcode parameter will override global settings, TODO: rewrite this to a class
|
@@ -489,7 +489,7 @@ function nggCreateAlbum( $galleriesID, $template = 'extend', $album = 0) {
|
|
489 |
$galleries[$key]->galdesc = html_entity_decode ( stripslashes($galleries[$key]->galdesc) ) ;
|
490 |
|
491 |
// i18n
|
492 |
-
$galleries[$key]->title = html_entity_decode ( nggGallery::i18n($galleries[$key]->title) ) ;
|
493 |
|
494 |
// apply a filter on gallery object before the output
|
495 |
$galleries[$key] = apply_filters('ngg_album_galleryobject', $galleries[$key]);
|
156 |
*/
|
157 |
function nggCreateGallery($picturelist, $galleryID = false, $template = '', $images = false) {
|
158 |
global $nggRewrite;
|
159 |
+
|
160 |
$ngg_options = nggGallery::get_option('ngg_options');
|
161 |
|
162 |
//the shortcode parameter will override global settings, TODO: rewrite this to a class
|
489 |
$galleries[$key]->galdesc = html_entity_decode ( stripslashes($galleries[$key]->galdesc) ) ;
|
490 |
|
491 |
// i18n
|
492 |
+
$galleries[$key]->title = html_entity_decode ( nggGallery::i18n( stripslashes($galleries[$key]->title) ) ) ;
|
493 |
|
494 |
// apply a filter on gallery object before the output
|
495 |
$galleries[$key] = apply_filters('ngg_album_galleryobject', $galleries[$key]);
|
readme.txt
CHANGED
@@ -37,7 +37,7 @@ Important Links:
|
|
37 |
* TinyMCE : Button integration for easy adding the gallery tags
|
38 |
* Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
|
39 |
* Language support : Translated in more than 30 languages
|
40 |
-
*
|
41 |
* Upload tab integration : You have access to all pictures via the upload tab
|
42 |
* Tag support for images : Append related images to your post, create a image tag-cloud
|
43 |
* Meta data support : Import EXIF, IPTC or XMP meta data
|
@@ -88,6 +88,8 @@ For commercial use please look at the Jeroen's homepage : http://www.longtailvid
|
|
88 |
|
89 |
That's it ... Have fun
|
90 |
|
|
|
|
|
91 |
== Screenshots ==
|
92 |
|
93 |
1. Screenshot Admin Area
|
@@ -99,8 +101,6 @@ That's it ... Have fun
|
|
99 |
|
100 |
== Frequently Asked Questions ==
|
101 |
|
102 |
-
**Read as startup :** http://dpotter.net/Technical/index.php/2008/03/04/nextgen-gallery-review-introduction/
|
103 |
-
|
104 |
When writing a page/post, you can use the follow tags:
|
105 |
|
106 |
For a slideshow : **[slideshow id=x w=width h=height]**
|
@@ -141,6 +141,11 @@ To show the most recent added mages : **[recent max=x ]**
|
|
141 |
|
142 |
== Changelog ==
|
143 |
|
|
|
|
|
|
|
|
|
|
|
144 |
= V1.5.0 - 18.03.2010 =
|
145 |
* NEW : Support for Post thumbnail feature
|
146 |
* NEW : Backup and Recover function for images (THX to Simone Fumagalli)
|
37 |
* TinyMCE : Button integration for easy adding the gallery tags
|
38 |
* Sidebar Widget : Show a slideshow, random or recent picture at your sidebar
|
39 |
* Language support : Translated in more than 30 languages
|
40 |
+
* Translation downloader : Download with one click the new translation file
|
41 |
* Upload tab integration : You have access to all pictures via the upload tab
|
42 |
* Tag support for images : Append related images to your post, create a image tag-cloud
|
43 |
* Meta data support : Import EXIF, IPTC or XMP meta data
|
88 |
|
89 |
That's it ... Have fun
|
90 |
|
91 |
+
http://www.youtube.com/watch?v=Le_ZsNSuIvM
|
92 |
+
|
93 |
== Screenshots ==
|
94 |
|
95 |
1. Screenshot Admin Area
|
101 |
|
102 |
== Frequently Asked Questions ==
|
103 |
|
|
|
|
|
104 |
When writing a page/post, you can use the follow tags:
|
105 |
|
106 |
For a slideshow : **[slideshow id=x w=width h=height]**
|
141 |
|
142 |
== Changelog ==
|
143 |
|
144 |
+
= V1.5.1 - 23.03.2010 =
|
145 |
+
* Bugfix : PHP4 compat issue for Add gallery & options page
|
146 |
+
* Bugfix : Gallery widget can now have a empty title
|
147 |
+
* Bugfix : Adding correct stripslash for gallery title
|
148 |
+
|
149 |
= V1.5.0 - 18.03.2010 =
|
150 |
* NEW : Support for Post thumbnail feature
|
151 |
* NEW : Backup and Recover function for images (THX to Simone Fumagalli)
|
widgets/media-rss-widget.php
CHANGED
@@ -22,11 +22,10 @@ class nggMediaRssWidget extends WP_Widget {
|
|
22 |
|
23 |
function widget( $args, $instance ) {
|
24 |
extract( $args );
|
25 |
-
|
26 |
-
global $ngg_mrssw_plugin;
|
27 |
$ngg_options = nggGallery::get_option('ngg_options');
|
28 |
|
29 |
-
|
30 |
|
31 |
$show_global_mrss = $instance['show_global_mrss'];
|
32 |
$show_icon = $instance['show_icon'];
|
22 |
|
23 |
function widget( $args, $instance ) {
|
24 |
extract( $args );
|
25 |
+
|
|
|
26 |
$ngg_options = nggGallery::get_option('ngg_options');
|
27 |
|
28 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
|
29 |
|
30 |
$show_global_mrss = $instance['show_global_mrss'];
|
31 |
$show_icon = $instance['show_icon'];
|
widgets/widgets.php
CHANGED
@@ -30,7 +30,7 @@ class nggSlideshowWidget extends WP_Widget {
|
|
30 |
if ( NGGALLERY_IREXIST == false )
|
31 |
return;
|
32 |
|
33 |
-
$title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Slideshow', 'nggallery') : $instance['title']);
|
34 |
|
35 |
$out = $this->render_slideshow($instance['galleryid'] , $instance['width'] , $instance['height']);
|
36 |
|
@@ -258,8 +258,7 @@ class nggWidget extends WP_Widget {
|
|
258 |
function widget( $args, $instance ) {
|
259 |
extract( $args );
|
260 |
|
261 |
-
|
262 |
-
$title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Gallery', 'nggallery') : $instance['title']);
|
263 |
|
264 |
global $wpdb;
|
265 |
|
30 |
if ( NGGALLERY_IREXIST == false )
|
31 |
return;
|
32 |
|
33 |
+
$title = apply_filters('widget_title', empty( $instance['title'] ) ? __('Slideshow', 'nggallery') : $instance['title'], $instance, $this->id_base);
|
34 |
|
35 |
$out = $this->render_slideshow($instance['galleryid'] , $instance['width'] , $instance['height']);
|
36 |
|
258 |
function widget( $args, $instance ) {
|
259 |
extract( $args );
|
260 |
|
261 |
+
$title = apply_filters('widget_title', empty($instance['title']) ? ' ' : $instance['title'], $instance, $this->id_base);
|
|
|
262 |
|
263 |
global $wpdb;
|
264 |
|