Version Description
- 08.12.2015 =
- Changed: "Flush image cache" now removes images from the database w/o a gallery
- Changed: "Show Meta" popup: parse date_format through date_i18n()
- Changed: Made Add Gallery/Images notifications a link to the gallery
- Changed: No longer cache displayed galleries as transients
- Changed: Updated widgets to use PHP5 parent::_construct() over $this->WPWidget()
- Fixed: C_NextGen_Metadata->get_EXIF() was bugged with imagebrowser-exif template
- Fixed: Cornerstone/X compatibility
- Fixed: Recovering images was 'generating' from backup instead of copying
- Fixed: Setting post thumbnail more than once on a page/post
- Fixed: Permanently hide display types from ATP without an active POPE module
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 2.1.7 |
Comparing to | |
See all releases |
Code changes from version 2.1.2 to 2.1.7
- .hg_archival.txt +2 -2
- .hgsubstate +1 -1
- .hgtags +5 -0
- changelog.txt +12 -0
- nggallery.php +7 -3
- pope/lib/class.component_registry.php +4 -3
- products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php +5 -0
- products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js +1 -1
- products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.min.js +1 -1
- products/photocrati_nextgen/modules/cache/package.module.cache.php +3 -0
- products/photocrati_nextgen/modules/i18n/lang/nggallery.po +3 -3
- products/photocrati_nextgen/modules/mediarss/module.mediarss.php +0 -57
- products/photocrati_nextgen/modules/mediarss/package.module.mediarss.php +0 -134
- products/photocrati_nextgen/modules/mediarss/templates/mediarss_feed.php +0 -34
- products/photocrati_nextgen/modules/mediarss/templates/playlist_feed.php +0 -25
- products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php +2 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.js +6 -4
- products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.min.js +1 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/static/styles.css +4 -0
- products/photocrati_nextgen/modules/nextgen_addgallery_page/static/styles.min.css +1 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_folder.php +11 -3
- products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php +12 -6
- products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php +11 -1
- products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php +18 -1
- products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php +17 -0
- products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php +0 -6
- products/photocrati_nextgen/modules/nextgen_basic_templates/package.module.nextgen_basic_templates.php +1 -5
- products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +18 -10
- products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php +13 -9
- products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php +2 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/manage.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/showmeta.php +2 -0
- products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php +2 -2
- products/photocrati_nextgen/modules/ngglegacy/lib/post-thumbnail.php +1 -1
- products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php +20 -0
- products/photocrati_nextgen/modules/widget/package.module.widget.php +3 -3
- products/photocrati_nextgen/product.photocrati_nextgen.php +0 -1
- readme.txt +16 -4
.hg_archival.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
repo: 2b82bc45fbe039c6f4c9f0c667e9cd1ee4d84cbb
|
2 |
-
node:
|
3 |
branch: default
|
4 |
-
tag: 2.1.
|
1 |
repo: 2b82bc45fbe039c6f4c9f0c667e9cd1ee4d84cbb
|
2 |
+
node: b4a06dc685b9d98ae0a082932ef4822be530c429
|
3 |
branch: default
|
4 |
+
tag: 2.1.7
|
.hgsubstate
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
1 |
+
a67d026aa1d495eb6c653faa84450a198d8ab18b pope
|
.hgtags
CHANGED
@@ -307,3 +307,8 @@ cbe47e4cefc75558b857c50d3efcbc8ce27a5636 2.1.2
|
|
307 |
2fca6018f85c86f32518b4e601fba84823127dfb 2.1.2
|
308 |
2fca6018f85c86f32518b4e601fba84823127dfb 2.1.2
|
309 |
0000000000000000000000000000000000000000 2.1.2
|
|
|
|
|
|
|
|
|
|
307 |
2fca6018f85c86f32518b4e601fba84823127dfb 2.1.2
|
308 |
2fca6018f85c86f32518b4e601fba84823127dfb 2.1.2
|
309 |
0000000000000000000000000000000000000000 2.1.2
|
310 |
+
0000000000000000000000000000000000000000 2.1.2
|
311 |
+
ca2225de1b2aff836e1fe9d7ff3a0f42820524ce 2.1.2
|
312 |
+
e60b028280448eca1c164dd54111623c2edc9997 2.1.3
|
313 |
+
97ec028ec655b132d0426ccb7f14423123ed2f49 2.1.4
|
314 |
+
9c6f1b018b1503530debfbb579e6917ec9bd4cac 2.1.6
|
changelog.txt
CHANGED
@@ -1,6 +1,18 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Photocrati Media
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V2.1.2 - 07.20.2015 =
|
5 |
* NEW: Ability to import from Media Library
|
6 |
* NEW: Added filter 'ngg_datamapper_table_name'
|
1 |
NextGEN Gallery
|
2 |
by Photocrati Media
|
3 |
|
4 |
+
= V2.1.7 - 08.12.2015 =
|
5 |
+
* Changed: "Flush image cache" now removes images from the database w/o a gallery
|
6 |
+
* Changed: "Show Meta" popup: parse date_format through date_i18n()
|
7 |
+
* Changed: Made Add Gallery/Images notifications a link to the gallery
|
8 |
+
* Changed: No longer cache displayed galleries as transients
|
9 |
+
* Changed: Updated widgets to use PHP5 parent::__construct() over $this->WP_Widget()
|
10 |
+
* Fixed: C_NextGen_Metadata->get_EXIF() was bugged with imagebrowser-exif template
|
11 |
+
* Fixed: Cornerstone/X compatibility
|
12 |
+
* Fixed: Recovering images was 'generating' from backup instead of copying
|
13 |
+
* Fixed: Setting post thumbnail more than once on a page/post
|
14 |
+
* Fixed: Permanently hide display types from ATP without an active POPE module
|
15 |
+
|
16 |
= V2.1.2 - 07.20.2015 =
|
17 |
* NEW: Ability to import from Media Library
|
18 |
* NEW: Added filter 'ngg_datamapper_table_name'
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery by Photocrati
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 12 million downloads.
|
7 |
-
* Version: 2.1.
|
8 |
* Author: Photocrati Media
|
9 |
* Plugin URI: http://www.nextgen-gallery.com
|
10 |
* Author URI: http://www.photocrati.com
|
@@ -370,7 +370,11 @@ class C_NextGEN_Bootstrap
|
|
370 |
function disable_frontend_logic($enabled, $module_id)
|
371 |
{
|
372 |
if (is_admin())
|
373 |
-
|
|
|
|
|
|
|
|
|
374 |
return $enabled;
|
375 |
}
|
376 |
|
@@ -583,7 +587,7 @@ class C_NextGEN_Bootstrap
|
|
583 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
584 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
585 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
586 |
-
define('NGG_PLUGIN_VERSION', '2.1.
|
587 |
|
588 |
if (!defined('NGG_HIDE_STRICT_ERRORS')) {
|
589 |
define('NGG_HIDE_STRICT_ERRORS', TRUE);
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery by Photocrati
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 12 million downloads.
|
7 |
+
* Version: 2.1.7
|
8 |
* Author: Photocrati Media
|
9 |
* Plugin URI: http://www.nextgen-gallery.com
|
10 |
* Author URI: http://www.photocrati.com
|
370 |
function disable_frontend_logic($enabled, $module_id)
|
371 |
{
|
372 |
if (is_admin())
|
373 |
+
{
|
374 |
+
$settings = C_NextGen_Settings::get_instance();
|
375 |
+
if (!$settings->get('always_enable_frontend_logic'))
|
376 |
+
$enabled = FALSE;
|
377 |
+
}
|
378 |
return $enabled;
|
379 |
}
|
380 |
|
587 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
588 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
589 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
590 |
+
define('NGG_PLUGIN_VERSION', '2.1.7');
|
591 |
|
592 |
if (!defined('NGG_HIDE_STRICT_ERRORS')) {
|
593 |
define('NGG_HIDE_STRICT_ERRORS', TRUE);
|
pope/lib/class.component_registry.php
CHANGED
@@ -101,7 +101,7 @@ class C_Component_Registry
|
|
101 |
$this->mark_as_searched_path($path);
|
102 |
}
|
103 |
|
104 |
-
if ($load_all) $this->load_all_modules();
|
105 |
}
|
106 |
|
107 |
|
@@ -183,7 +183,7 @@ class C_Component_Registry
|
|
183 |
return $retval;
|
184 |
}
|
185 |
|
186 |
-
function load_all_modules($type =
|
187 |
{
|
188 |
$modules = $this->get_known_module_list();
|
189 |
$ret = true;
|
@@ -191,7 +191,8 @@ class C_Component_Registry
|
|
191 |
foreach ($modules as $module_id)
|
192 |
{
|
193 |
if ($type == null || $this->get_module_meta($module_id, 'type') == $type) {
|
194 |
-
$
|
|
|
195 |
}
|
196 |
}
|
197 |
|
101 |
$this->mark_as_searched_path($path);
|
102 |
}
|
103 |
|
104 |
+
if ($load_all) $this->load_all_modules(NULL, $path);
|
105 |
}
|
106 |
|
107 |
|
183 |
return $retval;
|
184 |
}
|
185 |
|
186 |
+
function load_all_modules($type=NULL, $dir=NULL)
|
187 |
{
|
188 |
$modules = $this->get_known_module_list();
|
189 |
$ret = true;
|
191 |
foreach ($modules as $module_id)
|
192 |
{
|
193 |
if ($type == null || $this->get_module_meta($module_id, 'type') == $type) {
|
194 |
+
if ($dir == NULL || strpos($this->get_module_dir($module_id), $dir) !== FALSE)
|
195 |
+
$ret = $this->load_module($module_id) && $ret;
|
196 |
}
|
197 |
}
|
198 |
|
products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php
CHANGED
@@ -531,10 +531,15 @@ class Mixin_Attach_To_Post_Display_Tab extends Mixin
|
|
531 |
$all_tags->id = 'All';
|
532 |
array_unshift($tags, $all_tags);
|
533 |
$display_types = array();
|
|
|
534 |
foreach ($display_type_mapper->find_all() as $display_type) {
|
535 |
if (isset($display_type->hidden_from_ui) && $display_type->hidden_from_ui) {
|
536 |
continue;
|
537 |
}
|
|
|
|
|
|
|
|
|
538 |
$display_types[] = $display_type;
|
539 |
}
|
540 |
usort($display_types, array($this->object, '_display_type_list_sort'));
|
531 |
$all_tags->id = 'All';
|
532 |
array_unshift($tags, $all_tags);
|
533 |
$display_types = array();
|
534 |
+
$registry = C_Component_Registry::get_instance();
|
535 |
foreach ($display_type_mapper->find_all() as $display_type) {
|
536 |
if (isset($display_type->hidden_from_ui) && $display_type->hidden_from_ui) {
|
537 |
continue;
|
538 |
}
|
539 |
+
$available = $registry->is_module_loaded($display_type->name);
|
540 |
+
if (!apply_filters('ngg_atp_show_display_type', $available, $display_type)) {
|
541 |
+
continue;
|
542 |
+
}
|
543 |
$display_types[] = $display_type;
|
544 |
}
|
545 |
usort($display_types, array($this->object, '_display_type_list_sort'));
|
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.js
CHANGED
@@ -85,7 +85,7 @@
|
|
85 |
},
|
86 |
|
87 |
wm_close_event: function(e) {
|
88 |
-
if (e.target._id == 'ngg_attach_to_post_dialog') {
|
89 |
// Restore scrolling for the main content window when the attach to post interface is closed
|
90 |
jQuery('html,body').css('overflow', 'auto');
|
91 |
tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);
|
85 |
},
|
86 |
|
87 |
wm_close_event: function(e) {
|
88 |
+
if (e && e.target && e.target._id && e.target._id == 'ngg_attach_to_post_dialog') {
|
89 |
// Restore scrolling for the main content window when the attach to post interface is closed
|
90 |
jQuery('html,body').css('overflow', 'auto');
|
91 |
tinyMCE.activeEditor.selection.select(tinyMCE.activeEditor.dom.select('p')[0]);
|
products/photocrati_nextgen/modules/attach_to_post/static/ngg_attach_to_post_tinymce_plugin.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(7(
|
1 |
+
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(7(H){1g.4=\'1V-1Q-1P\';n.1W(\'1t.m\',{v:\'1d B D 1m 1a\'});f.1s(\'f.k.9\',{H:H,1z:7(){s{1A:\'B D\',1y:\'1x 1v\',1w:\'V://U.1B.T\',1C:\'V://U.1F-1D.T\',1u:\'0.1\'}},1l:7(2,X){3 g=i;2.c.R=2.c.E;2.c.E=7(S,W){3 w=2.c.R(S,W);w.11(\'1i\',g.K);s w};2.1n(\'m\',i.C,{2:2,14:2.k.9});2.1r(\'9\',{v:\'m.v\',1q:\'m\',1p:X+\'/1I.1J\'});2.12.22+=",Q";2.12.20="Q";2.11(\'1Z\',7(e){5(e.8.23==\'24\'){5(g.Y(e.8).29(\'28\')>=0){2.M.27.25(e);3 4=e.8.26.1X(/\\d+$/);5(4)4=4.1O();3 1N=f.1M(g,{2:2,14:2.k.9,4:4});g.C(4)}}})},Y:7(l){3 A=l.13(\'L\')?l.13(\'L\'):l.1T;5(A){s A}1S{s""}},K:7(e){5(e&&e.8&&e.8.N&&e.8.N==\'1c\'){a(\'1f,15\').t(\'u\',\'1e\');n.F.J.O(n.F.M.O(\'p\')[0]);n.F.J.21(0)}},C:7(4){3 G=1H;5(1j(4)!=\'1Y\'){G+="&4="+i.4}3 6=1g;1K(6.z!=1o&&6.z!=6){6=6.z}6=a(6);3 q=6.1b();3 r=6.Z();3 j=1R;3 o=18;3 16=1U;3 19=18;3 b=q-(q*0.17);3 h=r-(r*0.17);5(b<16){b=q-10}5(h<19){h=r-10}5(j>b){j=b}5(o>h){o=h}i.2.c.E({1E:G,4:\'1c\',1b:j,Z:o,v:"B D - 1d 1h 1a"});a(\'1f,15\').t(\'u\',\'I\');a(\'#P\').t(\'u-y\',\'1e\');a(\'#P\').t(\'u-x\',\'I\')}});f.1G.1k(\'9\',f.k.9)})(2a.1L);',62,135,'||editor|var|id|if|win|function|target|NextGEN_AttachToPost|jQuery|maxWidth|windowManager|||tinymce|self|maxHeight|this|popupWidth|plugins|node|ngg_attach_to_post|tinyMCE|popupHeight||winWidth|winHeight|return|css|overflow|title|modal|||parent|class_name|NextGEN|render_attach_to_post_interface|Gallery|open|activeEditor|attach_to_post_url|siteurl|hidden|selection|wm_close_event|class|dom|_id|select|ngg_attach_to_post_dialog_ifr|shortcode|nggOldOpen|one|com|www|http|two|plugin_url|get_class_name|height||on|settings|getAttribute|plugin|body|minWidth|05|600|minHeight|Post|width|ngg_attach_to_post_dialog|Attach|auto|html|window|To|close|typeof|add|init|to|addCommand|null|image|cmd|addButton|create|en|version|Media|authorurl|Photocrati|author|getInfo|longname|photocrati|infourl|gallery|url|nextgen|PluginManager|nextgen_gallery_attach_to_post_url|atp_button|png|while|wp_site_url|extend|obj|pop|page|post|1200|else|className|800|wordpress|addI18n|match|undefined|mouseup|custom_elements|collapse|extended_valid_elements|tagName|IMG|cancel|src|events|ngg_displayed_gallery|indexOf|photocrati_ajax'.split('|'),0,{}))
|
products/photocrati_nextgen/modules/cache/package.module.cache.php
CHANGED
@@ -56,11 +56,14 @@ class Mixin_Cache extends Mixin
|
|
56 |
*/
|
57 |
public function flush_galleries($galleries = array())
|
58 |
{
|
|
|
59 |
if (empty($galleries)) {
|
60 |
$galleries = C_Gallery_Mapper::get_instance()->find_all();
|
61 |
}
|
62 |
foreach ($galleries as $gallery) {
|
63 |
C_Gallery_Storage::get_instance()->flush_cache($gallery);
|
64 |
}
|
|
|
|
|
65 |
}
|
66 |
}
|
56 |
*/
|
57 |
public function flush_galleries($galleries = array())
|
58 |
{
|
59 |
+
global $wpdb;
|
60 |
if (empty($galleries)) {
|
61 |
$galleries = C_Gallery_Mapper::get_instance()->find_all();
|
62 |
}
|
63 |
foreach ($galleries as $gallery) {
|
64 |
C_Gallery_Storage::get_instance()->flush_cache($gallery);
|
65 |
}
|
66 |
+
// Remove images still in the DB whose gallery no longer exists
|
67 |
+
$wpdb->query("DELETE FROM `{$wpdb->nggpictures}` WHERE `galleryid` NOT IN (SELECT `gid` FROM `{$wpdb->nggallery}`)");
|
68 |
}
|
69 |
}
|
products/photocrati_nextgen/modules/i18n/lang/nggallery.po
CHANGED
@@ -422,7 +422,7 @@ msgstr ""
|
|
422 |
|
423 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_folder.php:56
|
424 |
#, php-format
|
425 |
-
msgid "Done! Successfully imported %s images"
|
426 |
msgstr ""
|
427 |
|
428 |
#: products/photocrati_nextgen/modules/attach_to_post/templates/attach_to_post.php:12
|
@@ -457,11 +457,11 @@ msgstr ""
|
|
457 |
|
458 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:164
|
459 |
#, php-format
|
460 |
-
msgid "%s images were uploaded successfully"
|
461 |
msgstr ""
|
462 |
|
463 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:167
|
464 |
-
msgid "1 image was uploaded successfully"
|
465 |
msgstr ""
|
466 |
|
467 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:170
|
422 |
|
423 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_folder.php:56
|
424 |
#, php-format
|
425 |
+
msgid "Done! Successfully imported %s images. <a href=\"%s\" target=\"_blank\">Manage gallery</a>"
|
426 |
msgstr ""
|
427 |
|
428 |
#: products/photocrati_nextgen/modules/attach_to_post/templates/attach_to_post.php:12
|
457 |
|
458 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:164
|
459 |
#, php-format
|
460 |
+
msgid "%s images were uploaded successfully. <a href=\"%s\" target=\"_blank\">Manage gallery</a>"
|
461 |
msgstr ""
|
462 |
|
463 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:167
|
464 |
+
msgid "1 image was uploaded successfully. <a href=\"%s\" target=\"_blank\">Manage gallery</a>"
|
465 |
msgstr ""
|
466 |
|
467 |
#: products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php:170
|
products/photocrati_nextgen/modules/mediarss/module.mediarss.php
DELETED
@@ -1,57 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/***
|
3 |
-
{
|
4 |
-
Module: photocrati-mediarss,
|
5 |
-
Depends: { photocrati-router, photocrati-nextgen_gallery_display }
|
6 |
-
}
|
7 |
-
***/
|
8 |
-
class M_MediaRss extends C_Base_Module
|
9 |
-
{
|
10 |
-
function define()
|
11 |
-
{
|
12 |
-
parent::define(
|
13 |
-
'photocrati-mediarss',
|
14 |
-
'MediaRss',
|
15 |
-
'Generates MediaRSS feeds of image collections',
|
16 |
-
'0.4',
|
17 |
-
'http://www.nextgen-gallery.com',
|
18 |
-
'Photocrati Media',
|
19 |
-
'http://www.photocrati.com'
|
20 |
-
);
|
21 |
-
}
|
22 |
-
|
23 |
-
function _register_utilities()
|
24 |
-
{
|
25 |
-
$this->get_registry()->add_utility(
|
26 |
-
'I_MediaRSS_Controller', 'C_MediaRSS_Controller'
|
27 |
-
);
|
28 |
-
}
|
29 |
-
|
30 |
-
function _register_hooks()
|
31 |
-
{
|
32 |
-
add_action('ngg_routes', array(&$this, 'define_routes'));
|
33 |
-
}
|
34 |
-
|
35 |
-
function define_routes($router)
|
36 |
-
{
|
37 |
-
$app = $router->create_app('/nextgen-mediarss');
|
38 |
-
$app->route(
|
39 |
-
'/',
|
40 |
-
array(
|
41 |
-
'controller' => 'I_MediaRSS_Controller',
|
42 |
-
'action' => 'index',
|
43 |
-
'context' => FALSE
|
44 |
-
)
|
45 |
-
);
|
46 |
-
}
|
47 |
-
|
48 |
-
function get_type_list()
|
49 |
-
{
|
50 |
-
return array(
|
51 |
-
'C_Mediarss_Controller' => 'class.mediarss_controller.php'
|
52 |
-
);
|
53 |
-
}
|
54 |
-
|
55 |
-
}
|
56 |
-
|
57 |
-
new M_MediaRss();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/mediarss/package.module.mediarss.php
DELETED
@@ -1,134 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Mixin_MediaRSS_Controller extends Mixin
|
3 |
-
{
|
4 |
-
/**
|
5 |
-
* Renders a MediaRSS feed
|
6 |
-
*/
|
7 |
-
public function index_action()
|
8 |
-
{
|
9 |
-
$this->object->set_content_type('xml');
|
10 |
-
if ($this->object->param('source')) {
|
11 |
-
$method = 'render_' . $this->object->param('source');
|
12 |
-
if ($this->object->has_method($method)) {
|
13 |
-
$this->object->{$method}();
|
14 |
-
}
|
15 |
-
} else {
|
16 |
-
$this->object->http_error('No source specified');
|
17 |
-
}
|
18 |
-
}
|
19 |
-
public function render_latest_images()
|
20 |
-
{
|
21 |
-
$this->object->set_param('params', json_encode(array('source' => 'recent')));
|
22 |
-
$this->object->render_displayed_gallery();
|
23 |
-
}
|
24 |
-
/**
|
25 |
-
* Renders a feed for a displayed gallery
|
26 |
-
*/
|
27 |
-
public function render_displayed_gallery()
|
28 |
-
{
|
29 |
-
$displayed_gallery = NULL;
|
30 |
-
$mapper = C_Displayed_Gallery_Mapper::get_instance();
|
31 |
-
$template = $this->object->param('template');
|
32 |
-
if (!in_array($template, array('mediarss_feed', 'playlist_feed'))) {
|
33 |
-
$template = 'mediarss_feed';
|
34 |
-
}
|
35 |
-
$template = 'photocrati-mediarss#' . $template;
|
36 |
-
// Find the displayed gallery by it's database id
|
37 |
-
if ($id = $this->object->param('id')) {
|
38 |
-
$displayed_gallery = $mapper->find($id, TRUE);
|
39 |
-
} elseif ($transient_id = $this->object->param('transient_id')) {
|
40 |
-
// retrieve by transient id
|
41 |
-
$factory = C_Component_Factory::get_instance();
|
42 |
-
$displayed_gallery = $factory->create('displayed_gallery', NULL, $mapper);
|
43 |
-
$displayed_gallery->apply_transient($transient_id);
|
44 |
-
} elseif ($params = $this->object->param('params')) {
|
45 |
-
// Create the displayed gallery based on the URL parameters
|
46 |
-
$factory = C_Component_Factory::get_instance();
|
47 |
-
$displayed_gallery = $factory->create('displayed_gallery', json_decode($params), $mapper);
|
48 |
-
}
|
49 |
-
// Assuming we have a displayed gallery, display it!
|
50 |
-
if ($displayed_gallery) {
|
51 |
-
$storage = C_Gallery_Storage::get_instance();
|
52 |
-
$this->render_view($template, array('storage' => $storage, 'images' => $displayed_gallery->get_included_entities(), 'feed_title' => $this->object->_get_feed_title($displayed_gallery), 'feed_description' => $this->object->_get_feed_description($displayed_gallery), 'feed_link' => $this->object->_get_feed_link($displayed_gallery), 'generator' => $this->object->_get_feed_generator($displayed_gallery), 'copyright' => $this->object->_get_feed_copyright($displayed_gallery)));
|
53 |
-
} else {
|
54 |
-
$this->object->http_error('Invalid ID', 404);
|
55 |
-
}
|
56 |
-
}
|
57 |
-
/**
|
58 |
-
* Gets the name of the feed generator
|
59 |
-
* @param C_Displayed_Gallery $displayed_gallery
|
60 |
-
* @return string
|
61 |
-
*/
|
62 |
-
public function _get_feed_generator($displayed_gallery)
|
63 |
-
{
|
64 |
-
return 'NextGEN Gallery [http://nextgen-gallery.com]';
|
65 |
-
}
|
66 |
-
/**
|
67 |
-
* Gets the copyright for the feed
|
68 |
-
*/
|
69 |
-
public function _get_feed_copyright($displayed_gallery)
|
70 |
-
{
|
71 |
-
$base_url = $this->object->get_base_url();
|
72 |
-
$blog_name = get_option('blogname');
|
73 |
-
return "Copyright (C) {$blog_name} ({$base_url})";
|
74 |
-
}
|
75 |
-
/**
|
76 |
-
* Gets the Site URL
|
77 |
-
* @return string
|
78 |
-
*/
|
79 |
-
public function get_base_url()
|
80 |
-
{
|
81 |
-
$router = C_Router::get_instance();
|
82 |
-
return $router->get_base_url('home');
|
83 |
-
}
|
84 |
-
/**
|
85 |
-
* Gets a description for the feed
|
86 |
-
* @param C_Displayed_Gallery $displayed_gallery
|
87 |
-
* @return string
|
88 |
-
*/
|
89 |
-
public function _get_feed_description($displayed_gallery)
|
90 |
-
{
|
91 |
-
return '';
|
92 |
-
}
|
93 |
-
/**
|
94 |
-
* Gets a link for the feed
|
95 |
-
* @param C_Displayed_Gallery $displayed_gallery
|
96 |
-
* @return string
|
97 |
-
*/
|
98 |
-
public function _get_feed_link($displayed_gallery)
|
99 |
-
{
|
100 |
-
return $this->object->get_base_url();
|
101 |
-
}
|
102 |
-
/**
|
103 |
-
* Gets a title for the feed
|
104 |
-
* @param C_Displayed_Gallery $displayed_gallery
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
public function _get_feed_title($displayed_gallery)
|
108 |
-
{
|
109 |
-
// Get gallery titles
|
110 |
-
$gallery_titles = array();
|
111 |
-
foreach ($displayed_gallery->get_galleries() as $gallery) {
|
112 |
-
$gallery_titles[] = $gallery->title;
|
113 |
-
}
|
114 |
-
return 'Images from: ' . implode(', ', $gallery_titles);
|
115 |
-
}
|
116 |
-
}
|
117 |
-
class C_MediaRSS_Controller extends C_MVC_Controller
|
118 |
-
{
|
119 |
-
static $_instances = array();
|
120 |
-
public function define($context = FALSE)
|
121 |
-
{
|
122 |
-
parent::define($context);
|
123 |
-
$this->add_mixin('Mixin_MediaRSS_Controller');
|
124 |
-
$this->implement('I_MediaRSS_Controller');
|
125 |
-
}
|
126 |
-
static function get_instance($context = FALSE)
|
127 |
-
{
|
128 |
-
if (!isset(self::$_instances[$context])) {
|
129 |
-
$klass = get_class();
|
130 |
-
self::$_instances[$context] = new $klass($context);
|
131 |
-
}
|
132 |
-
return self::$_instances[$context];
|
133 |
-
}
|
134 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/mediarss/templates/mediarss_feed.php
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
<?php echo('<?xml version="1.0" encoding="UTF-8"?>');?>
|
2 |
-
<rss version='2.0' xmlns:media='http://search.yahoo.com/mrss/'>
|
3 |
-
<channel>
|
4 |
-
<generator><![CDATA[<?php esc_html_e($generator)?>]]></generator>
|
5 |
-
<title><?php esc_html_e($feed_title) ?></title>
|
6 |
-
<description><?php esc_html_e($feed_description) ?></description>
|
7 |
-
<link><![CDATA[<?php echo nextgen_esc_url($feed_link)?>]]></link>
|
8 |
-
<?php foreach($images as $image): ?>
|
9 |
-
<?php
|
10 |
-
$image_url = $storage->get_image_url($image, 'full', TRUE);
|
11 |
-
$thumb_url = $storage->get_thumb_url($image, TRUE);
|
12 |
-
$thumb_size = $storage->get_thumb_dimensions($image);
|
13 |
-
$width = $thumb_size['width'];
|
14 |
-
$height = $thumb_size['height'];
|
15 |
-
?>
|
16 |
-
<item>
|
17 |
-
<title><![CDATA[<?php esc_html_e($image->alttext)?>]]></title>
|
18 |
-
<description><![CDATA[<?php esc_html_e($image->description)?>]]></description>
|
19 |
-
<link><![CDATA[<?php echo nextgen_esc_url($image_url)?>]]></link>
|
20 |
-
<guid>image-id:<?php esc_html_e($image->id_field)?></guid>
|
21 |
-
<media:content url="<?php echo nextgen_esc_url($image_url)?>" medium="image" />
|
22 |
-
<media:title><![CDATA[<?php esc_html_e($image->alttext)?>]]></media:title>
|
23 |
-
<?php if (isset($description)): ?>
|
24 |
-
<media:description><![CDDATA[<?php esc_html_e($image->description)?>]]></media:description>
|
25 |
-
<?php endif ?>
|
26 |
-
<media:thumbnail width="<?php esc_attr_e($width)?>" height="<?php esc_attr_e($height)?>" url="<?php echo nextgen_esc_url($thumb_url) ?>"/>
|
27 |
-
<?php if (isset($tagnames)): ?>
|
28 |
-
<media:keywords><![CDATA[<?php esc_html_e($tagnames)?>]]></media:keywords>
|
29 |
-
<?php endif ?>
|
30 |
-
<media:copyright><![CDATA[<?php esc_html_e($copyright)?>]]></media:copyright>
|
31 |
-
</item>
|
32 |
-
<?php endforeach ?>
|
33 |
-
</channel>
|
34 |
-
</rss>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/mediarss/templates/playlist_feed.php
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
|
2 |
-
<trackList>
|
3 |
-
<?php foreach($images as $image): ?>
|
4 |
-
<?php
|
5 |
-
$image_url = $storage->get_image_url($image, 'full', TRUE);
|
6 |
-
$thumb_url = $storage->get_thumb_url($image, TRUE);
|
7 |
-
$thumb_size = $storage->get_thumb_dimensions($image);
|
8 |
-
$width = $thumb_size['width'];
|
9 |
-
$height = $thumb_size['height'];
|
10 |
-
|
11 |
-
$image_title = $image->description;
|
12 |
-
|
13 |
-
if ($image_title == null)
|
14 |
-
$image_title = $image->alttext;
|
15 |
-
|
16 |
-
if (strlen($image_title) >= 25)
|
17 |
-
$image_title = substr_replace($image_title, '...', 15, -10);
|
18 |
-
?>
|
19 |
-
<track>
|
20 |
-
<title><![CDATA[<?php echo strip_tags($image_title); ?>]]></title>
|
21 |
-
<location><![CDATA[<?php echo nextgen_esc_url($image_url)?>]]></location>
|
22 |
-
</track>
|
23 |
-
<?php endforeach ?>
|
24 |
-
</trackList>
|
25 |
-
</playlist>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php
CHANGED
@@ -28,7 +28,8 @@ class A_Import_Media_Library_Form extends Mixin
|
|
28 |
wp_enqueue_media();
|
29 |
wp_enqueue_script('nextgen_media_library_import-js');
|
30 |
wp_enqueue_style('nextgen_media_library_import-css');
|
31 |
-
$
|
|
|
32 |
foreach (C_WordPress_Security_Manager::get_instance()->get_request_token('nextgen_upload_image')->get_request_list() as $name => $value) {
|
33 |
$i18n_array['sectoken'][$name] = $value;
|
34 |
}
|
28 |
wp_enqueue_media();
|
29 |
wp_enqueue_script('nextgen_media_library_import-js');
|
30 |
wp_enqueue_style('nextgen_media_library_import-css');
|
31 |
+
$url = admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid={gid}';
|
32 |
+
$i18n_array = array('admin_url' => admin_url(), 'title' => __('Import Images into NextGen Gallery', 'nggallery'), 'import_multiple' => __('Import %s images', 'nggallery'), 'import_singular' => __('Import 1 image', 'nggallery'), 'imported_multiple' => sprintf(__('{count} images were uploaded successfully. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url), 'imported_singular' => sprintf(__('1 image was uploaded successfully. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url), 'imported_none' => __('0 images were uploaded', 'nggallery'), 'progress_title' => __('Importing gallery', 'nggallery'), 'in_progress' => __('In Progress...', 'nggallery'), 'gritter_title' => __('Upload complete', 'nggallery'), 'gritter_error' => __('An unexpected error occured. This is most likely due to a server misconfiguration. Check your PHP error log or ask your hosting provider for assistance.', 'nggallery'));
|
33 |
foreach (C_WordPress_Security_Manager::get_instance()->get_request_token('nextgen_upload_image')->get_request_list() as $name => $value) {
|
34 |
$i18n_array['sectoken'][$name] = $value;
|
35 |
}
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.js
CHANGED
@@ -71,13 +71,15 @@
|
|
71 |
ngg_importml.selectors.ml_btn_import.attr('disabled', false);
|
72 |
ngg_importml.selectors.ml_btn_select.attr('disabled', false);
|
73 |
|
74 |
-
|
75 |
-
delete ngg_importml.methods.import.params.gallery_name;
|
76 |
-
|
77 |
-
var msg = ngg_importml_i18n.imported_multiple.replace('%s', ngg_importml.methods.import.import_count);
|
78 |
if (ngg_importml.methods.import.import_count == 1) {
|
79 |
msg = ngg_importml_i18n.imported_singular;
|
80 |
}
|
|
|
|
|
|
|
|
|
|
|
81 |
|
82 |
$.gritter.add({
|
83 |
title: ngg_importml_i18n.gritter_title,
|
71 |
ngg_importml.selectors.ml_btn_import.attr('disabled', false);
|
72 |
ngg_importml.selectors.ml_btn_select.attr('disabled', false);
|
73 |
|
74 |
+
var msg = ngg_importml_i18n.imported_multiple;
|
|
|
|
|
|
|
75 |
if (ngg_importml.methods.import.import_count == 1) {
|
76 |
msg = ngg_importml_i18n.imported_singular;
|
77 |
}
|
78 |
+
msg = msg.replace('{gid}', ngg_importml.methods.import.params.gallery_id);
|
79 |
+
msg = msg.replace('{count}', ngg_importml.methods.import.import_count);
|
80 |
+
|
81 |
+
delete ngg_importml.methods.import.params.gallery_id;
|
82 |
+
delete ngg_importml.methods.import.params.gallery_name;
|
83 |
|
84 |
$.gritter.add({
|
85 |
title: ngg_importml_i18n.gritter_title,
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/media-library-import.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5($){
|
1 |
+
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(5($){q 2={G:1y,b:[],3:{a:$(\'#F-D-S-t-6\'),j:$(\'#F-D-15-1h\'),l:$(\'#F-D-T-17\'),8:$(\'#F-D-T-1u\')},E:5(){H.4.E();H.4.Q()},4:{E:5(){2.r=O.16.12.1v.2=O.16.12({1i:k,w:7.w,1d:{L:7.1l}})},N:5(C){C=(C+\'\').1t();1s 1n(C).e(/!/g,\'%21\').e(/\'/g,\'%27\').e(/\\(/g,\'%28\').e(/\\)/g,\'%29\').e(/\\*/g,\'%1m\').e(/%20/g,\'+\')},6:{x:0,9:{1o:\'1p\'},13:5(){2.3.a.y(\'z\',k);2.3.j.y(\'z\',k);2.4.6.9.h=2.4.N(2.3.l.n());2.4.6.9.8=2.4.N(2.3.8.n());1q.1r(7.X).1w(5(J){2.4.6.9[J]=7.X[J]});2.W=$.1c({w:7.1b,1e:k,1k:7.1f});$(2).M(\'u\')},11:5(){2.W.1g(1j);2.3.a.y(\'z\',V);2.3.j.y(\'z\',V);q d=7.1a;c(2.4.6.x==1){d=7.1x}d=d.e(\'{1G}\',2.4.6.9.h);d=d.e(\'{25}\',2.4.6.x);U 2.4.6.9.h;U 2.4.6.9.8;$.Z.Y({w:7.24,L:d,P:k});2.4.6.x=0;2.r.M(\'26\');2.b=[];2.3.a.m()},u:5(){q 9=2.4.6.9;9.2a=[2.b.2c()];$.1T(2b.1X,9,5(f){c(1Y f.K==\'1W\'){2.4.6.x++;c(2.3.l.1V(\'v[I="\'+f.h+\'"]\').i==0){2.4.6.9.h=f.h;q v=$(\'<v/>\').y(\'I\',f.h).14(f.8);2.3.l.1U(v);2.3.l.n(f.h);v.1Z(\'S\',k);2.3.8.n(\'\').m()}}A{$.Z.Y({w:7.1z,L:f.K,P:k})}c(2.b.i==0){2.4.6.11()}A{$(2).M(\'u\')}},\'23\')}},Q:5(){$(2).p(\'u\',5(){2.4.6.u()});2.r.p(\'15\',5(){2.b=[];2.G=2.r.1S().1Q(\'1F\');2.G.1R(5(t){t=t.1E();2.b.1D(t.17)});q d=7.1A.e(\'%s\',2.b.i);c(2.b.i==1){d=7.1B}2.3.a.14(d);2.3.a.o()});2.3.j.p(\'18\',5(B){B.R();2.r.1C()});2.3.a.p(\'18\',5(B){B.R();2.4.6.13()});2.3.l.p(\'1H\',5(){c(1I(H.I)==0){2.3.8.o().10();c(2.3.8.n().i==0){2.3.a.m();2.3.j.m()}}A{2.3.8.m(1O,5(){2.3.l.10();2.3.j.o();c(2.b.i>0){2.3.a.o()}})}});2.3.8.p(\'1P\',5(){c(2.3.8.n().i>0){2.3.8.1N(\'K\');2.3.j.o();c(2.b.i>0){2.3.a.o()}}A{2.3.a.m();2.3.j.m()}})}}};$(1M).1J(5(){19.2=2;2.E();19.1K.1L()})})(22);',62,137,'||ngg_importml|selectors|methods|function|import|ngg_importml_i18n|gallery_name|params|ml_btn_import|import_ids|if|msg|replace|data||gallery_id|length|ml_btn_select|true|gallery_select|fadeOut|val|fadeIn|on|var|ml_dialog||image|send_ajax|option|title|import_count|attr|disabled|else|event|str|importML|initialize|ngg|ml_data|this|value|key|error|text|trigger|urlencode|top|sticky|set_events|preventDefault|selected|gallery|delete|false|progress_bar|sectoken|add|gritter|focus|done|media|start|html|select|wp|id|click|window|imported_multiple|progress_title|nggProgressBar|button|infinite|in_progress|close|opener|multiple|100|starting_value|button_text|2A|encodeURIComponent|action|import_media_library|Object|keys|return|toString|name|frames|forEach|imported_singular|null|gritter_error|import_multiple|import_singular|open|push|toJSON|selection|gid|change|parseInt|ready|Frame_Event_Publisher|broadcast|document|removeClass|400|keyup|get|map|state|post|append|find|undefined|url|typeof|prop|||jQuery|json|gritter_title|count|reset||||attachment_ids|photocrati_ajax|pop'.split('|'),0,{}))
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/styles.css
CHANGED
@@ -41,4 +41,8 @@
|
|
41 |
.plupload_droptext {
|
42 |
font-size: 16px;
|
43 |
color: silver;
|
|
|
|
|
|
|
|
|
44 |
}
|
41 |
.plupload_droptext {
|
42 |
font-size: 16px;
|
43 |
color: silver;
|
44 |
+
}
|
45 |
+
|
46 |
+
#gritter-notice-wrapper a {
|
47 |
+
color: #00b9eb;
|
48 |
}
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/static/styles.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#gallery_selection{background-color:#fff;padding:7px}#gallery_selection label{font-weight:600;position:relative;top:-1px}#gallery_selection .plupload_buttons a{margin-right:4px}#gallery_name{width:auto;min-width:200px}#gallery_name.error{border:solid 1px red}#upload_images_content{padding:0}#upload_images_content .plupload_container{padding:0}.plupload_header{display:none}.plupload_buttons{display:inline}.plupload_droptext{font-size:16px;color:silver}
|
1 |
+
#gallery_selection{background-color:#fff;padding:7px}#gallery_selection label{font-weight:600;position:relative;top:-1px}#gallery_selection .plupload_buttons a{margin-right:4px}#gallery_name{width:auto;min-width:200px}#gallery_name.error{border:solid 1px red}#upload_images_content{padding:0}#upload_images_content .plupload_container{padding:0}.plupload_header{display:none}.plupload_buttons{display:inline}.plupload_droptext{font-size:16px;color:silver}#gritter-notice-wrapper a{color:#00b9eb}
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_folder.php
CHANGED
@@ -55,12 +55,20 @@
|
|
55 |
if (typeof(response) != 'object') response = JSON.parse(response);
|
56 |
if (typeof(response.error) == 'string') {
|
57 |
progress_bar.set(response.error);
|
|
|
58 |
}
|
59 |
else {
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
-
progress_bar.close(2000);
|
64 |
});
|
65 |
})
|
66 |
});
|
55 |
if (typeof(response) != 'object') response = JSON.parse(response);
|
56 |
if (typeof(response.error) == 'string') {
|
57 |
progress_bar.set(response.error);
|
58 |
+
progress_bar.close(4000);
|
59 |
}
|
60 |
else {
|
61 |
+
<?php $url = admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid={gid}'; ?>
|
62 |
+
var message = '<?php echo sprintf(__('Done! Successfully imported {count} images. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url); ?>';
|
63 |
+
message = message.replace('{count}', response.image_ids.length);
|
64 |
+
message = message.replace('{gid}', response.gallery_id);
|
65 |
+
progress_bar.close(100);
|
66 |
+
$.gritter.add({
|
67 |
+
title: '<?php _e("Upload complete", 'nggallery'); ?>',
|
68 |
+
text: message,
|
69 |
+
sticky: true
|
70 |
+
});
|
71 |
}
|
|
|
72 |
});
|
73 |
})
|
74 |
});
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php
CHANGED
@@ -164,13 +164,19 @@
|
|
164 |
|
165 |
// Determine appropriate message to display
|
166 |
var upload_count = window.uploaded_image_ids.length;
|
167 |
-
var msg =
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
else if (upload_count == 0) {
|
173 |
msg = "<?php _e('0 images were uploaded', 'nggallery'); ?>";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
|
176 |
// Display message/notification
|
164 |
|
165 |
// Determine appropriate message to display
|
166 |
var upload_count = window.uploaded_image_ids.length;
|
167 |
+
var msg = '';
|
168 |
+
|
169 |
+
<?php $url = admin_url() . 'admin.php?page=nggallery-manage-gallery&mode=edit&gid={gid}'; ?>
|
170 |
+
|
171 |
+
if (upload_count == 0) {
|
|
|
172 |
msg = "<?php _e('0 images were uploaded', 'nggallery'); ?>";
|
173 |
+
} else {
|
174 |
+
msg = '<?php printf(__('{count} images were uploaded successfully. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url); ?>';
|
175 |
+
if (upload_count == 1) {
|
176 |
+
msg = '<?php printf(__('1 image was uploaded successfully. <a href="%s" target="_blank">Manage gallery</a>', 'nggallery'), $url); ?>';
|
177 |
+
}
|
178 |
+
msg = msg.replace('{gid}', $gallery_id.val());
|
179 |
+
msg = msg.replace('{count}', upload_count);
|
180 |
}
|
181 |
|
182 |
// Display message/notification
|
products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php
CHANGED
@@ -710,6 +710,14 @@ class Mixin_NextGen_Admin_Page_Instance_Methods extends Mixin
|
|
710 |
{
|
711 |
return 'photocrati-nextgen_admin#nextgen_admin_page';
|
712 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
713 |
public function show_save_button()
|
714 |
{
|
715 |
return TRUE;
|
@@ -755,7 +763,9 @@ class Mixin_NextGen_Admin_Page_Instance_Methods extends Mixin
|
|
755 |
}
|
756 |
}
|
757 |
// Render the view
|
758 |
-
$
|
|
|
|
|
759 |
} else {
|
760 |
$this->render_view('photocrati-nextgen_admin#not_authorized', array('name' => $this->object->name, 'title' => $this->object->get_page_title()));
|
761 |
}
|
710 |
{
|
711 |
return 'photocrati-nextgen_admin#nextgen_admin_page';
|
712 |
}
|
713 |
+
/**
|
714 |
+
* Returns a list of parameters to include when rendering the view
|
715 |
+
* @return array
|
716 |
+
*/
|
717 |
+
public function get_index_params()
|
718 |
+
{
|
719 |
+
return array();
|
720 |
+
}
|
721 |
public function show_save_button()
|
722 |
{
|
723 |
return TRUE;
|
763 |
}
|
764 |
}
|
765 |
// Render the view
|
766 |
+
$index_params = array('page_heading' => $this->object->get_page_heading(), 'tabs' => $tabs, 'errors' => $errors, 'success' => $success, 'form_header' => $token->get_form_html(), 'show_save_button' => $this->object->show_save_button(), 'model' => $this->object->has_method('get_model') ? $this->get_model() : NULL);
|
767 |
+
$index_params = array_merge($index_params, $this->object->get_index_params());
|
768 |
+
$this->render_partial($this->object->index_template(), $index_params);
|
769 |
} else {
|
770 |
$this->render_view('photocrati-nextgen_admin#not_authorized', array('name' => $this->object->name, 'title' => $this->object->get_page_title()));
|
771 |
}
|
products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php
CHANGED
@@ -112,7 +112,24 @@ class M_NextGen_Basic_Album extends C_Base_Module
|
|
112 |
C_NextGen_Shortcode_Manager::add('album', array(&$this, 'ngglegacy_shortcode'));
|
113 |
C_NextGen_Shortcode_Manager::add('nggalbum', array(&$this, 'ngglegacy_shortcode'));
|
114 |
}
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
/**
|
118 |
* Gets a value from the parameter array, and if not available, uses the default value
|
112 |
C_NextGen_Shortcode_Manager::add('album', array(&$this, 'ngglegacy_shortcode'));
|
113 |
C_NextGen_Shortcode_Manager::add('nggalbum', array(&$this, 'ngglegacy_shortcode'));
|
114 |
}
|
115 |
+
|
116 |
+
add_filter('ngg_atp_show_display_type', array($this, 'atp_show_basic_albums'), 10, 2);
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* ATP filters display types by not displaying those whose name attribute isn't an active POPE module. This
|
121 |
+
* is a workaround/hack to compensate for basic albums sharing a module.
|
122 |
+
*
|
123 |
+
* @param bool $available
|
124 |
+
* @param C_Display_Type $display_type
|
125 |
+
* @return bool
|
126 |
+
*/
|
127 |
+
function atp_show_basic_albums($available, $display_type)
|
128 |
+
{
|
129 |
+
if (in_array($display_type->name, array(NGG_BASIC_COMPACT_ALBUM, NGG_BASIC_EXTENDED_ALBUM)))
|
130 |
+
$available = TRUE;
|
131 |
+
return $available;
|
132 |
+
}
|
133 |
|
134 |
/**
|
135 |
* Gets a value from the parameter array, and if not available, uses the default value
|
products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php
CHANGED
@@ -143,6 +143,8 @@ class M_NextGen_Basic_Gallery extends C_Base_Module
|
|
143 |
}
|
144 |
|
145 |
add_action('ngg_routes', array(&$this, 'define_routes'));
|
|
|
|
|
146 |
}
|
147 |
|
148 |
function define_routes($router)
|
@@ -156,6 +158,21 @@ class M_NextGen_Basic_Gallery extends C_Base_Module
|
|
156 |
$router->rewrite("{*}{$slug}{*}/page/{\\d}{*}", "{1}{$slug}{2}/nggpage--{3}{4}");
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
/**
|
160 |
* Gets a value from the parameter array, and if not available, uses the default value
|
161 |
*
|
143 |
}
|
144 |
|
145 |
add_action('ngg_routes', array(&$this, 'define_routes'));
|
146 |
+
|
147 |
+
add_filter('ngg_atp_show_display_type', array($this, 'atp_show_basic_galleries'), 10, 2);
|
148 |
}
|
149 |
|
150 |
function define_routes($router)
|
158 |
$router->rewrite("{*}{$slug}{*}/page/{\\d}{*}", "{1}{$slug}{2}/nggpage--{3}{4}");
|
159 |
}
|
160 |
|
161 |
+
/**
|
162 |
+
* ATP filters display types by not displaying those whose name attribute isn't an active POPE module. This
|
163 |
+
* is a workaround/hack to compensate for basic slideshow & thumbnails sharing a module.
|
164 |
+
*
|
165 |
+
* @param bool $available
|
166 |
+
* @param C_Display_Type $display_type
|
167 |
+
* @return bool
|
168 |
+
*/
|
169 |
+
function atp_show_basic_galleries($available, $display_type)
|
170 |
+
{
|
171 |
+
if (in_array($display_type->name, array(NGG_BASIC_THUMBNAILS, NGG_BASIC_SLIDESHOW)))
|
172 |
+
$available = TRUE;
|
173 |
+
return $available;
|
174 |
+
}
|
175 |
+
|
176 |
/**
|
177 |
* Gets a value from the parameter array, and if not available, uses the default value
|
178 |
*
|
products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php
CHANGED
@@ -422,11 +422,6 @@ class A_NextGen_Basic_Thumbnails_Controller extends Mixin
|
|
422 |
{
|
423 |
$display_settings = $displayed_gallery->display_settings;
|
424 |
$gallery_id = $displayed_gallery->id();
|
425 |
-
$transient_id = $displayed_gallery->transient_id;
|
426 |
-
// We must use the transient_id to identify the gallery
|
427 |
-
if ($display_settings['ajax_pagination']) {
|
428 |
-
$gallery_id = $transient_id;
|
429 |
-
}
|
430 |
if (!$display_settings['disable_pagination']) {
|
431 |
$current_page = (int) $this->param('nggpage', $gallery_id, 1);
|
432 |
} else {
|
@@ -517,7 +512,6 @@ class A_NextGen_Basic_Thumbnails_Controller extends Mixin
|
|
517 |
$params['storage'] =& $storage;
|
518 |
$params['images'] =& $images;
|
519 |
$params['displayed_gallery_id'] = $gallery_id;
|
520 |
-
$params['transient_id'] = $displayed_gallery->transient_id;
|
521 |
$params['current_page'] = $current_page;
|
522 |
$params['effect_code'] = $effect_code;
|
523 |
$params['pagination'] = $pagination;
|
422 |
{
|
423 |
$display_settings = $displayed_gallery->display_settings;
|
424 |
$gallery_id = $displayed_gallery->id();
|
|
|
|
|
|
|
|
|
|
|
425 |
if (!$display_settings['disable_pagination']) {
|
426 |
$current_page = (int) $this->param('nggpage', $gallery_id, 1);
|
427 |
} else {
|
512 |
$params['storage'] =& $storage;
|
513 |
$params['images'] =& $images;
|
514 |
$params['displayed_gallery_id'] = $gallery_id;
|
|
|
515 |
$params['current_page'] = $current_page;
|
516 |
$params['effect_code'] = $effect_code;
|
517 |
$params['pagination'] = $pagination;
|
products/photocrati_nextgen/modules/nextgen_basic_templates/package.module.nextgen_basic_templates.php
CHANGED
@@ -74,6 +74,7 @@ class A_NextGen_Basic_Template_Form extends Mixin
|
|
74 |
$gallery_map = C_Gallery_Mapper::get_instance();
|
75 |
$image_key = $image_map->get_primary_key_column();
|
76 |
$gallery_key = $gallery_map->get_primary_key_column();
|
|
|
77 |
$pid = $this->object->param('pid');
|
78 |
// because picture_list implements ArrayAccess any array-specific actions must be taken on
|
79 |
// $picture_list->container or they won't do anything
|
@@ -119,11 +120,6 @@ class A_NextGen_Basic_Template_Form extends Mixin
|
|
119 |
$gallery->title = stripslashes($orig_gallery->title);
|
120 |
$gallery->description = html_entity_decode(stripslashes($orig_gallery->galdesc));
|
121 |
$gallery->pageid = $orig_gallery->pageid;
|
122 |
-
if (!empty($displayed_gallery->display_settings['ajax_pagination'])) {
|
123 |
-
$gallery_id = $displayed_gallery->transient_id;
|
124 |
-
} else {
|
125 |
-
$gallery_id = $displayed_gallery->id();
|
126 |
-
}
|
127 |
$gallery->anchor = 'ngg-gallery-' . $gallery_id . '-' . $current_page;
|
128 |
$gallery->displayed_gallery =& $displayed_gallery;
|
129 |
$gallery->columns = @intval($displayed_gallery->display_settings['number_of_columns']);
|
74 |
$gallery_map = C_Gallery_Mapper::get_instance();
|
75 |
$image_key = $image_map->get_primary_key_column();
|
76 |
$gallery_key = $gallery_map->get_primary_key_column();
|
77 |
+
$gallery_id = $displayed_gallery->id();
|
78 |
$pid = $this->object->param('pid');
|
79 |
// because picture_list implements ArrayAccess any array-specific actions must be taken on
|
80 |
// $picture_list->container or they won't do anything
|
120 |
$gallery->title = stripslashes($orig_gallery->title);
|
121 |
$gallery->description = html_entity_decode(stripslashes($orig_gallery->galdesc));
|
122 |
$gallery->pageid = $orig_gallery->pageid;
|
|
|
|
|
|
|
|
|
|
|
123 |
$gallery->anchor = 'ngg-gallery-' . $gallery_id . '-' . $current_page;
|
124 |
$gallery->displayed_gallery =& $displayed_gallery;
|
125 |
$gallery->columns = @intval($displayed_gallery->display_settings['number_of_columns']);
|
products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php
CHANGED
@@ -2514,8 +2514,8 @@ class C_NextGen_Metadata extends C_Component
|
|
2514 |
}
|
2515 |
if (!is_array($this->exif_array)) {
|
2516 |
$meta = array();
|
2517 |
-
|
2518 |
-
|
2519 |
if (!empty($exif['FNumber'])) {
|
2520 |
$meta['aperture'] = 'F ' . round($this->exif_frac2dec($exif['FNumber']), 2);
|
2521 |
}
|
@@ -3330,14 +3330,19 @@ class Mixin_NggLegacy_GalleryStorage_Driver extends Mixin
|
|
3330 |
public function delete_gallery($gallery)
|
3331 |
{
|
3332 |
$retval = FALSE;
|
3333 |
-
if ($
|
3334 |
-
|
3335 |
-
$
|
3336 |
-
|
3337 |
-
|
3338 |
-
|
3339 |
-
|
|
|
|
|
|
|
|
|
3340 |
}
|
|
|
3341 |
}
|
3342 |
return $retval;
|
3343 |
}
|
@@ -3610,8 +3615,11 @@ class Mixin_NggLegacy_GalleryStorage_Driver extends Mixin
|
|
3610 |
if (is_writable($full_abspath) && is_writable(dirname($full_abspath))) {
|
3611 |
// Copy the backup
|
3612 |
if (@copy($backup_abspath, $full_abspath)) {
|
3613 |
-
// Re-create
|
3614 |
foreach ($this->object->get_image_sizes($image) as $named_size) {
|
|
|
|
|
|
|
3615 |
$this->object->generate_image_clone($backup_abspath, $this->object->get_image_abspath($image, $named_size), $this->object->get_image_size_params($image, $named_size));
|
3616 |
}
|
3617 |
// Reimport all metadata
|
2514 |
}
|
2515 |
if (!is_array($this->exif_array)) {
|
2516 |
$meta = array();
|
2517 |
+
if (isset($this->exif_data['EXIF'])) {
|
2518 |
+
$exif = $this->exif_data['EXIF'];
|
2519 |
if (!empty($exif['FNumber'])) {
|
2520 |
$meta['aperture'] = 'F ' . round($this->exif_frac2dec($exif['FNumber']), 2);
|
2521 |
}
|
3330 |
public function delete_gallery($gallery)
|
3331 |
{
|
3332 |
$retval = FALSE;
|
3333 |
+
if ($abspath = $this->object->get_gallery_abspath($gallery)) {
|
3334 |
+
// delete the directory and everything in it
|
3335 |
+
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($abspath), RecursiveIteratorIterator::CHILD_FIRST);
|
3336 |
+
foreach ($iterator as $file) {
|
3337 |
+
if (in_array($file->getBasename(), array('.', '..'))) {
|
3338 |
+
continue;
|
3339 |
+
} elseif ($file->isDir()) {
|
3340 |
+
rmdir($file->getPathname());
|
3341 |
+
} elseif ($file->isFile() || $file->isLink()) {
|
3342 |
+
unlink($file->getPathname());
|
3343 |
+
}
|
3344 |
}
|
3345 |
+
$retval = @rmdir($abspath);
|
3346 |
}
|
3347 |
return $retval;
|
3348 |
}
|
3615 |
if (is_writable($full_abspath) && is_writable(dirname($full_abspath))) {
|
3616 |
// Copy the backup
|
3617 |
if (@copy($backup_abspath, $full_abspath)) {
|
3618 |
+
// Re-create non-fullsize image sizes
|
3619 |
foreach ($this->object->get_image_sizes($image) as $named_size) {
|
3620 |
+
if ($named_size == 'full') {
|
3621 |
+
continue;
|
3622 |
+
}
|
3623 |
$this->object->generate_image_clone($backup_abspath, $this->object->get_image_abspath($image, $named_size), $this->object->get_image_size_params($image, $named_size));
|
3624 |
}
|
3625 |
// Reimport all metadata
|
products/photocrati_nextgen/modules/nextgen_gallery_display/package.module.nextgen_gallery_display.php
CHANGED
@@ -1535,8 +1535,6 @@ class Mixin_Displayed_Gallery_Renderer extends Mixin
|
|
1535 |
// Validate the displayed gallery
|
1536 |
if ($displayed_gallery) {
|
1537 |
if ($displayed_gallery->validate()) {
|
1538 |
-
// Set a temporary id
|
1539 |
-
$displayed_gallery->id($displayed_gallery->to_transient());
|
1540 |
// Display!
|
1541 |
return $this->object->render($displayed_gallery, TRUE, $mode);
|
1542 |
} else {
|
@@ -1583,10 +1581,16 @@ class Mixin_Displayed_Gallery_Renderer extends Mixin
|
|
1583 |
if ($mode == null) {
|
1584 |
$mode = 'normal';
|
1585 |
}
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1590 |
}
|
1591 |
// Get the display type controller
|
1592 |
$controller = $this->get_registry()->get_utility('I_Display_Type_Controller', $displayed_gallery->display_type);
|
@@ -1602,6 +1606,8 @@ class Mixin_Displayed_Gallery_Renderer extends Mixin
|
|
1602 |
$lookup = FALSE;
|
1603 |
} elseif ($controller->is_cachable() === FALSE) {
|
1604 |
$lookup = FALSE;
|
|
|
|
|
1605 |
}
|
1606 |
// Enqueue any necessary static resources
|
1607 |
if (!defined('NGG_SKIP_LOAD_SCRIPTS') || !NGG_SKIP_LOAD_SCRIPTS) {
|
@@ -1628,9 +1634,7 @@ class Mixin_Displayed_Gallery_Renderer extends Mixin
|
|
1628 |
}
|
1629 |
// Try getting the rendered HTML from the cache
|
1630 |
$key = C_Photocrati_Transient_Manager::create_key('displayed_gallery_rendering', $key_params);
|
1631 |
-
|
1632 |
-
$html = C_Photocrati_Transient_Manager::fetch($key, FALSE);
|
1633 |
-
}
|
1634 |
// Output debug messages
|
1635 |
if ($html) {
|
1636 |
$retval .= $this->debug_msg('HIT!');
|
1535 |
// Validate the displayed gallery
|
1536 |
if ($displayed_gallery) {
|
1537 |
if ($displayed_gallery->validate()) {
|
|
|
|
|
1538 |
// Display!
|
1539 |
return $this->object->render($displayed_gallery, TRUE, $mode);
|
1540 |
} else {
|
1581 |
if ($mode == null) {
|
1582 |
$mode = 'normal';
|
1583 |
}
|
1584 |
+
if (apply_filters('ngg_cache_displayed_galleries', FALSE)) {
|
1585 |
+
// Save the displayed gallery as a transient if it hasn't already. Allows for ajax operations
|
1586 |
+
// to add or modify the gallery without losing a retrievable ID
|
1587 |
+
if (!$displayed_gallery->apply_transient()) {
|
1588 |
+
$displayed_gallery->to_transient();
|
1589 |
+
}
|
1590 |
+
} else {
|
1591 |
+
if (is_null($displayed_gallery->id())) {
|
1592 |
+
$displayed_gallery->id(md5(json_encode($displayed_gallery->get_entity())));
|
1593 |
+
}
|
1594 |
}
|
1595 |
// Get the display type controller
|
1596 |
$controller = $this->get_registry()->get_utility('I_Display_Type_Controller', $displayed_gallery->display_type);
|
1606 |
$lookup = FALSE;
|
1607 |
} elseif ($controller->is_cachable() === FALSE) {
|
1608 |
$lookup = FALSE;
|
1609 |
+
} elseif (!NGG_RENDERING_CACHE_ENABLED) {
|
1610 |
+
$lookup = FALSE;
|
1611 |
}
|
1612 |
// Enqueue any necessary static resources
|
1613 |
if (!defined('NGG_SKIP_LOAD_SCRIPTS') || !NGG_SKIP_LOAD_SCRIPTS) {
|
1634 |
}
|
1635 |
// Try getting the rendered HTML from the cache
|
1636 |
$key = C_Photocrati_Transient_Manager::create_key('displayed_gallery_rendering', $key_params);
|
1637 |
+
$html = C_Photocrati_Transient_Manager::fetch($key, FALSE);
|
|
|
|
|
1638 |
// Output debug messages
|
1639 |
if ($html) {
|
1640 |
$retval .= $this->debug_msg('HIT!');
|
products/photocrati_nextgen/modules/nextgen_settings/module.nextgen_settings.php
CHANGED
@@ -17,7 +17,7 @@ class M_NextGen_Settings extends C_Base_Module
|
|
17 |
'photocrati-nextgen_settings',
|
18 |
'NextGEN Gallery Settings',
|
19 |
'Provides central management for NextGEN Gallery settings',
|
20 |
-
'0.
|
21 |
'http://www.nextgen-gallery.com',
|
22 |
'Photocrati Media',
|
23 |
'http://www.photocrati.com'
|
@@ -129,6 +129,7 @@ class C_NextGen_Settings_Installer
|
|
129 |
// CSS Style
|
130 |
'activateCSS' => 1, // activate the CSS file
|
131 |
'CSSfile' => 'nggallery.css', // set default css filename
|
|
|
132 |
);
|
133 |
}
|
134 |
|
17 |
'photocrati-nextgen_settings',
|
18 |
'NextGEN Gallery Settings',
|
19 |
'Provides central management for NextGEN Gallery settings',
|
20 |
+
'0.9',
|
21 |
'http://www.nextgen-gallery.com',
|
22 |
'Photocrati Media',
|
23 |
'http://www.photocrati.com'
|
129 |
// CSS Style
|
130 |
'activateCSS' => 1, // activate the CSS file
|
131 |
'CSSfile' => 'nggallery.css', // set default css filename
|
132 |
+
'always_enable_frontend_logic' => FALSE
|
133 |
);
|
134 |
}
|
135 |
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage.php
CHANGED
@@ -787,7 +787,7 @@ class nggManageGallery {
|
|
787 |
check_admin_referer('ngg_updategallery');
|
788 |
|
789 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery options' ) && !isset ($_GET['s']) ) {
|
790 |
-
$tags = array('<a>', '<abbr>', '<acronym>', '<address>', '<b>', '<base>', '<basefont>', '<big>', '<blockquote>', '<br>', '<br/>', '<caption>', '<center>', '<cite>', '<code>', '<col>', '<colgroup>', '<dd>', '<del>', '<dfn>', '<dir>', '<div>', '<dl>', '<dt>', '<em>', '<fieldset>', '<font>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<hr>', '<i>', '<ins>', '<label>', '<legend>', '<li>', '<menu>', '<noframes>', '<noscript>', '<ol>', '<optgroup>', '<option>', '<p>', '<pre>', '<q>', '<s>', '<samp>', '<select>', '<small>', '<span>', '<strike>', '<strong>', '<sub>', '<sup>', '<table>', '<tbody>', '<td>', '<tfoot>', '<th>', '<thead>', '<tr>', '<tt>', '<u>', '<ul>');
|
791 |
$fields = array('title', 'galdesc');
|
792 |
|
793 |
// Sanitize fields
|
787 |
check_admin_referer('ngg_updategallery');
|
788 |
|
789 |
if ( nggGallery::current_user_can( 'NextGEN Edit gallery options' ) && !isset ($_GET['s']) ) {
|
790 |
+
$tags = array('<a>', '<abbr>', '<acronym>', '<address>', '<b>', '<base>', '<basefont>', '<big>', '<blockquote>', '<br>', '<br/>', '<caption>', '<center>', '<cite>', '<code>', '<col>', '<colgroup>', '<dd>', '<del>', '<dfn>', '<dir>', '<div>', '<dl>', '<dt>', '<em>', '<fieldset>', '<font>', '<h1>', '<h2>', '<h3>', '<h4>', '<h5>', '<h6>', '<hr>', '<i>', '<img>', '<ins>', '<label>', '<legend>', '<li>', '<menu>', '<noframes>', '<noscript>', '<ol>', '<optgroup>', '<option>', '<p>', '<pre>', '<q>', '<s>', '<samp>', '<select>', '<small>', '<span>', '<strike>', '<strong>', '<sub>', '<sup>', '<table>', '<tbody>', '<td>', '<tfoot>', '<th>', '<thead>', '<tr>', '<tt>', '<u>', '<ul>');
|
791 |
$fields = array('title', 'galdesc');
|
792 |
|
793 |
// Sanitize fields
|
products/photocrati_nextgen/modules/ngglegacy/admin/showmeta.php
CHANGED
@@ -69,6 +69,8 @@ $class = '';
|
|
69 |
if (in_array($key, array('created_timestamp', 'timestamp')) && is_numeric($value)) {
|
70 |
$value = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $value);
|
71 |
}
|
|
|
|
|
72 |
$class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
|
73 |
echo '<tr '.$class.'>
|
74 |
<td style="width:230px">' . esc_html ( $meta->i18n_name($key) ) . '</td>
|
69 |
if (in_array($key, array('created_timestamp', 'timestamp')) && is_numeric($value)) {
|
70 |
$value = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $value);
|
71 |
}
|
72 |
+
if ($key == 'created_date')
|
73 |
+
$value = date_i18n(get_option('date_format'), strtotime($value));
|
74 |
$class = ( $class == 'class="alternate"' ) ? '' : 'class="alternate"';
|
75 |
echo '<tr '.$class.'>
|
76 |
<td style="width:230px">' . esc_html ( $meta->i18n_name($key) ) . '</td>
|
products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php
CHANGED
@@ -644,7 +644,7 @@ class nggdb
|
|
644 |
* @deprecated
|
645 |
* @return
|
646 |
*/
|
647 |
-
static function find_last_images($page = 0, $limit = 30, $exclude = true, $galleryId = 0, $orderby = "
|
648 |
// Determine ordering
|
649 |
$order_field = $orderby;
|
650 |
$order_direction = 'DESC';
|
@@ -674,7 +674,7 @@ class nggdb
|
|
674 |
if ($offset && $limit) $mapper->limit($limit, $offset);
|
675 |
|
676 |
// Add exclusion clause
|
677 |
-
if ($exclude) $mapper->where(array("exclude =
|
678 |
|
679 |
// Add gallery clause
|
680 |
if ($galleryId) $mapper->where(array("galleryid = %d"), $galleryId);
|
644 |
* @deprecated
|
645 |
* @return
|
646 |
*/
|
647 |
+
static function find_last_images($page = 0, $limit = 30, $exclude = true, $galleryId = 0, $orderby = "pid") {
|
648 |
// Determine ordering
|
649 |
$order_field = $orderby;
|
650 |
$order_direction = 'DESC';
|
674 |
if ($offset && $limit) $mapper->limit($limit, $offset);
|
675 |
|
676 |
// Add exclusion clause
|
677 |
+
if ($exclude) $mapper->where(array("exclude = 0"));
|
678 |
|
679 |
// Add gallery clause
|
680 |
if ($galleryId) $mapper->where(array("galleryid = %d"), $galleryId);
|
products/photocrati_nextgen/modules/ngglegacy/lib/post-thumbnail.php
CHANGED
@@ -51,7 +51,7 @@ class nggPostThumbnail {
|
|
51 |
|
52 |
if (version_compare($wp_version, '3.5', '>=') && $thumbnail_id <= 0)
|
53 |
{
|
54 |
-
$iframe_src = get_upload_iframe_src('image');
|
55 |
$iframe_src = remove_query_arg('TB_iframe', $iframe_src);
|
56 |
$iframe_src = add_query_arg('tab', 'nextgen', $iframe_src);
|
57 |
$iframe_src = add_query_arg('chromeless', '1', $iframe_src);
|
51 |
|
52 |
if (version_compare($wp_version, '3.5', '>=') && $thumbnail_id <= 0)
|
53 |
{
|
54 |
+
$iframe_src = get_upload_iframe_src('image', $post_id);
|
55 |
$iframe_src = remove_query_arg('TB_iframe', $iframe_src);
|
56 |
$iframe_src = add_query_arg('tab', 'nextgen', $iframe_src);
|
57 |
$iframe_src = add_query_arg('chromeless', '1', $iframe_src);
|
products/photocrati_nextgen/modules/third_party_compat/module.third_party_compat.php
CHANGED
@@ -76,6 +76,13 @@ class M_Third_Party_Compat extends C_Base_Module
|
|
76 |
define('NGG_DISABLE_RESOURCE_MANAGER', TRUE);
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
// Genesis Tabs creates a new query / do_shortcode loop which requires these be set
|
80 |
if (class_exists('Genesis_Tabs'))
|
81 |
{
|
@@ -113,6 +120,7 @@ class M_Third_Party_Compat extends C_Base_Module
|
|
113 |
add_filter('run_ngg_resource_manager', array($this, 'check_wpecommerce_download'));
|
114 |
add_filter('run_ngg_resource_manager', array($this, 'check_mafs_download'));
|
115 |
add_filter('run_ngg_resource_manager', array($this, 'check_wps_download'));
|
|
|
116 |
|
117 |
// WPML fix
|
118 |
if (class_exists('SitePress')) {
|
@@ -125,6 +133,18 @@ class M_Third_Party_Compat extends C_Base_Module
|
|
125 |
add_action('the_post', array(&$this, 'add_ngg_pro_page_parameter'));
|
126 |
}
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
/**
|
129 |
* Determine if the requested URL is a WP-Photo-Seller download and adjust the resource manager
|
130 |
*
|
76 |
define('NGG_DISABLE_RESOURCE_MANAGER', TRUE);
|
77 |
}
|
78 |
|
79 |
+
// Cornerstone's page builder requires a 'clean slate' of css/js that our resource manager interefers with
|
80 |
+
if (class_exists('Cornerstone'))
|
81 |
+
{
|
82 |
+
if (!defined('NGG_DISABLE_FILTER_THE_CONTENT')) define('NGG_DISABLE_FILTER_THE_CONTENT', TRUE);
|
83 |
+
if (!defined('NGG_DISABLE_RESOURCE_MANAGER')) define('NGG_DISABLE_RESOURCE_MANAGER', TRUE);
|
84 |
+
}
|
85 |
+
|
86 |
// Genesis Tabs creates a new query / do_shortcode loop which requires these be set
|
87 |
if (class_exists('Genesis_Tabs'))
|
88 |
{
|
120 |
add_filter('run_ngg_resource_manager', array($this, 'check_wpecommerce_download'));
|
121 |
add_filter('run_ngg_resource_manager', array($this, 'check_mafs_download'));
|
122 |
add_filter('run_ngg_resource_manager', array($this, 'check_wps_download'));
|
123 |
+
add_filter('ngg_atp_show_display_type', array($this, 'atp_check_pro_albums'), 10, 2);
|
124 |
|
125 |
// WPML fix
|
126 |
if (class_exists('SitePress')) {
|
133 |
add_action('the_post', array(&$this, 'add_ngg_pro_page_parameter'));
|
134 |
}
|
135 |
|
136 |
+
function atp_check_pro_albums($available, $display_type)
|
137 |
+
{
|
138 |
+
if (!defined('NGG_PRO_ALBUMS'))
|
139 |
+
return $available;
|
140 |
+
|
141 |
+
if (in_array($display_type->name, array(NGG_PRO_LIST_ALBUM, NGG_PRO_GRID_ALBUM))
|
142 |
+
&& $this->get_registry()->is_module_loaded(NGG_PRO_ALBUMS))
|
143 |
+
$available = TRUE;
|
144 |
+
|
145 |
+
return $available;
|
146 |
+
}
|
147 |
+
|
148 |
/**
|
149 |
* Determine if the requested URL is a WP-Photo-Seller download and adjust the resource manager
|
150 |
*
|
products/photocrati_nextgen/modules/widget/package.module.widget.php
CHANGED
@@ -59,7 +59,7 @@ class C_Widget_Gallery extends WP_Widget
|
|
59 |
public function __construct()
|
60 |
{
|
61 |
$widget_ops = array('classname' => 'ngg_images', 'description' => __('Add recent or random images from the galleries', 'nggallery'));
|
62 |
-
|
63 |
}
|
64 |
public function form($instance)
|
65 |
{
|
@@ -159,7 +159,7 @@ class C_Widget_MediaRSS extends WP_Widget
|
|
159 |
public function __construct()
|
160 |
{
|
161 |
$widget_ops = array('classname' => 'ngg_mrssw', 'description' => __('Widget that displays Media RSS links for NextGEN Gallery.', 'nggallery'));
|
162 |
-
|
163 |
}
|
164 |
public function form($instance)
|
165 |
{
|
@@ -215,7 +215,7 @@ class C_Widget_Slideshow extends WP_Widget
|
|
215 |
public function __construct()
|
216 |
{
|
217 |
$widget_ops = array('classname' => 'widget_slideshow', 'description' => __('Show a NextGEN Gallery Slideshow', 'nggallery'));
|
218 |
-
|
219 |
}
|
220 |
public function form($instance)
|
221 |
{
|
59 |
public function __construct()
|
60 |
{
|
61 |
$widget_ops = array('classname' => 'ngg_images', 'description' => __('Add recent or random images from the galleries', 'nggallery'));
|
62 |
+
parent::__construct('ngg-images', __('NextGEN Widget', 'nggallery'), $widget_ops);
|
63 |
}
|
64 |
public function form($instance)
|
65 |
{
|
159 |
public function __construct()
|
160 |
{
|
161 |
$widget_ops = array('classname' => 'ngg_mrssw', 'description' => __('Widget that displays Media RSS links for NextGEN Gallery.', 'nggallery'));
|
162 |
+
parent::__construct('ngg-mrssw', __('NextGEN Media RSS', 'nggallery'), $widget_ops);
|
163 |
}
|
164 |
public function form($instance)
|
165 |
{
|
215 |
public function __construct()
|
216 |
{
|
217 |
$widget_ops = array('classname' => 'widget_slideshow', 'description' => __('Show a NextGEN Gallery Slideshow', 'nggallery'));
|
218 |
+
parent::__construct('slideshow', __('NextGEN Slideshow', 'nggallery'), $widget_ops);
|
219 |
}
|
220 |
public function form($instance)
|
221 |
{
|
products/photocrati_nextgen/product.photocrati_nextgen.php
CHANGED
@@ -37,7 +37,6 @@ class P_Photocrati_NextGen extends C_Base_Product
|
|
37 |
|
38 |
// Front-end only
|
39 |
'photocrati-dynamic_stylesheet' => 'frontend',
|
40 |
-
'photocrati-mediarss' => 'frontend',
|
41 |
|
42 |
// Backend-only
|
43 |
'photocrati-nextgen_pro_upgrade' => 'backend',
|
37 |
|
38 |
// Front-end only
|
39 |
'photocrati-dynamic_stylesheet' => 'frontend',
|
|
|
40 |
|
41 |
// Backend-only
|
42 |
'photocrati-nextgen_pro_upgrade' => 'backend',
|
readme.txt
CHANGED
@@ -2,17 +2,17 @@
|
|
2 |
Contributors: photocrati
|
3 |
Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
|
4 |
Requires at least: 3.6.1
|
5 |
-
Tested up to: 4.
|
6 |
-
Stable tag: 2.1.
|
7 |
License: GPLv2
|
8 |
|
9 |
-
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
= WordPress Gallery Plugin =
|
14 |
|
15 |
-
NextGEN Gallery is the most popular **WordPress gallery plugin**, and one of the most popular WordPress plugins of all time, with over
|
16 |
|
17 |
It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (slideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.
|
18 |
|
@@ -199,6 +199,18 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
199 |
|
200 |
== Changelog ==
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
= V2.1.2 - 07.20.2015 =
|
203 |
* NEW: Ability to import from Media Library
|
204 |
* NEW: Added filter 'ngg_datamapper_table_name'
|
2 |
Contributors: photocrati
|
3 |
Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
|
4 |
Requires at least: 3.6.1
|
5 |
+
Tested up to: 4.3.0
|
6 |
+
Stable tag: 2.1.7
|
7 |
License: GPLv2
|
8 |
|
9 |
+
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 13 million downloads.
|
10 |
|
11 |
== Description ==
|
12 |
|
13 |
= WordPress Gallery Plugin =
|
14 |
|
15 |
+
NextGEN Gallery is the most popular **WordPress gallery plugin**, and one of the most popular WordPress plugins of all time, with over 13 million downloads.
|
16 |
|
17 |
It provides a powerful engine for uploading and managing galleries of images, with the ability to batch upload, import meta data, add/delete/rearrange/sort images, edit thumbnails, group galleries into albums, and more. It also provides two front-end display styles (slideshows and thumbnail galleries), both of which come with a wide array of options for controlling size, style, timing, transitions, controls, lightbox effects, and more.
|
18 |
|
199 |
|
200 |
== Changelog ==
|
201 |
|
202 |
+
= V2.1.7 - 08.12.2015 =
|
203 |
+
* Changed: "Flush image cache" now removes images from the database w/o a gallery
|
204 |
+
* Changed: "Show Meta" popup: parse date_format through date_i18n()
|
205 |
+
* Changed: Made Add Gallery/Images notifications a link to the gallery
|
206 |
+
* Changed: No longer cache displayed galleries as transients
|
207 |
+
* Changed: Updated widgets to use PHP5 parent::__construct() over $this->WP_Widget()
|
208 |
+
* Fixed: C_NextGen_Metadata->get_EXIF() was bugged with imagebrowser-exif template
|
209 |
+
* Fixed: Cornerstone/X compatibility
|
210 |
+
* Fixed: Recovering images was 'generating' from backup instead of copying
|
211 |
+
* Fixed: Setting post thumbnail more than once on a page/post
|
212 |
+
* Fixed: Permanently hide display types from ATP without an active POPE module
|
213 |
+
|
214 |
= V2.1.2 - 07.20.2015 =
|
215 |
* NEW: Ability to import from Media Library
|
216 |
* NEW: Added filter 'ngg_datamapper_table_name'
|