Version Description
- 07.26.2016 =
- NEW: Add a "Default" template option to override ATP settings when a global setting is used
- NEW: Added "generic" error reporting back during image upload.
- NEW: Added notice for deprecating PHP 5.2
- NEW: Option to display child gallery and album descriptions when viewing albums
- Changed: ATP preview images are smaller with tighter margins to show more images
- Changed: Content of Upgrade to Pro page
- Changed: New NextGEN Overview page
- Changed: Replicate gallery name sanitation of NG legacy for gallery paths
- Fixed: Resolved all found PHP warnings/notices/deprecations and strict errors
- Fixed: Compatibility on Windows servers with network mounted document roots
- Fixed: Ensure EXIF meta data is loaded from the appropriate exif_data array instead of exif_array
- Fixed: Gallery Settings toggle not functioning
- Fixed: Uploading breaking when thumbnail or image resizing fails due to lack of specific format support for image libraries
- Fixed: Warning generated in nggallery.php checking useMediaRSS option
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 2.1.49 |
Comparing to | |
See all releases |
Code changes from version 2.1.46 to 2.1.49
- changelog.txt +16 -0
- nggallery.php +2 -2
- pope/lib/class.extensibleobject.php +2 -2
- products/photocrati_nextgen/modules/ajax/module.ajax.php +3 -2
- products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php +1 -1
- products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php +5 -5
- products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post.css +29 -7
- products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post.min.css +1 -1
- products/photocrati_nextgen/modules/attach_to_post/templates/display_tab.php +3 -3
- products/photocrati_nextgen/modules/attach_to_post/templates/display_tab_js.php +11 -10
- products/photocrati_nextgen/modules/fs/module.fs.php +1 -1
- products/photocrati_nextgen/modules/fs/package.module.fs.php +4 -0
- products/photocrati_nextgen/modules/mvc/module.mvc.php +1 -1
- products/photocrati_nextgen/modules/mvc/package.module.mvc.php +8 -13
- products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php +1 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php +17 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_media_library.php +1 -1
- products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php +21 -1
- products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php +23 -5
- products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php +30 -3
- products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php +3 -1
- products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php +117 -6
- products/photocrati_nextgen/modules/nextgen_basic_album/templates/descriptions.php +3 -0
- products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/package.module.nextgen_basic_imagebrowser.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_singlepic/package.module.nextgen_basic_singlepic.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php +1 -1
- products/photocrati_nextgen/modules/nextgen_basic_templates/package.module.nextgen_basic_templates.php +2 -0
- products/photocrati_nextgen/modules/nextgen_basic_templates/templates/nextgen_basic_templates_settings_template.php +1 -1
- products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php +1 -1
- products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +51 -17
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php +1 -1
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/package.module.nextgen_pro_upgrade.php +16 -10
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/button.png +0 -0
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/proupgrade.gif +0 -0
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/style.css +9 -33
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/style.min.css +1 -1
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/index.php +0 -59
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/plus.php +20 -16
- products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/pro.php +11 -11
- products/photocrati_nextgen/modules/ngglegacy/admin/admin.php +2 -3
- products/photocrati_nextgen/modules/ngglegacy/admin/css/nggadmin.css +18 -1
- products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php +20 -17
- products/photocrati_nextgen/modules/ngglegacy/admin/overview.php +289 -241
- products/photocrati_nextgen/modules/ngglegacy/lib/meta.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/lib/tags.php +3 -3
- products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/nggallery.php +1 -1
- products/photocrati_nextgen/modules/ngglegacy/static/overview.css +51 -0
- products/photocrati_nextgen/modules/ngglegacy/static/overview.js +25 -0
- products/photocrati_nextgen/modules/ngglegacy/static/overview.min.css +1 -0
- products/photocrati_nextgen/modules/ngglegacy/static/overview.min.js +1 -0
- readme.txt +18 -2
changelog.txt
CHANGED
@@ -1,6 +1,22 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V2.1.46 - 06.23.2016 =
|
5 |
* Fixed: Remove inner nextgen-gallery folder due to build issue
|
6 |
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V2.1.49 - 07.26.2016 =
|
5 |
+
* NEW: Add a "Default" template option to override ATP settings when a global setting is used
|
6 |
+
* NEW: Added "generic" error reporting back during image upload.
|
7 |
+
* NEW: Added notice for deprecating PHP 5.2
|
8 |
+
* NEW: Option to display child gallery and album descriptions when viewing albums
|
9 |
+
* Changed: ATP preview images are smaller with tighter margins to show more images
|
10 |
+
* Changed: Content of Upgrade to Pro page
|
11 |
+
* Changed: New NextGEN Overview page
|
12 |
+
* Changed: Replicate gallery name sanitation of NG legacy for gallery paths
|
13 |
+
* Fixed: Resolved all found PHP warnings/notices/deprecations and strict errors
|
14 |
+
* Fixed: Compatibility on Windows servers with network mounted document roots
|
15 |
+
* Fixed: Ensure EXIF meta data is loaded from the appropriate exif_data array instead of exif_array
|
16 |
+
* Fixed: Gallery Settings toggle not functioning
|
17 |
+
* Fixed: Uploading breaking when thumbnail or image resizing fails due to lack of specific format support for image libraries
|
18 |
+
* Fixed: Warning generated in nggallery.php checking useMediaRSS option
|
19 |
+
|
20 |
= V2.1.46 - 06.23.2016 =
|
21 |
* Fixed: Remove inner nextgen-gallery folder due to build issue
|
22 |
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 15 million downloads.
|
7 |
-
* Version: 2.1.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -595,7 +595,7 @@ class C_NextGEN_Bootstrap
|
|
595 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
596 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
597 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
598 |
-
define('NGG_PLUGIN_VERSION', '2.1.
|
599 |
|
600 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
601 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 15 million downloads.
|
7 |
+
* Version: 2.1.49
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
595 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
|
596 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
597 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
598 |
+
define('NGG_PLUGIN_VERSION', '2.1.49');
|
599 |
|
600 |
if (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG)
|
601 |
define('NGG_SCRIPT_VERSION', (string)mt_rand(0, mt_getrandmax()));
|
pope/lib/class.extensibleobject.php
CHANGED
@@ -389,7 +389,7 @@ class ExtensibleObject extends PopeHelpers
|
|
389 |
* @param string $property
|
390 |
* @return mixed
|
391 |
*/
|
392 |
-
function
|
393 |
{
|
394 |
$retval = NULL;
|
395 |
|
@@ -440,7 +440,7 @@ class ExtensibleObject extends PopeHelpers
|
|
440 |
* @param mixed $value
|
441 |
* @return mixed
|
442 |
*/
|
443 |
-
function
|
444 |
{
|
445 |
$retval = NULL;
|
446 |
|
389 |
* @param string $property
|
390 |
* @return mixed
|
391 |
*/
|
392 |
+
function __get($property)
|
393 |
{
|
394 |
$retval = NULL;
|
395 |
|
440 |
* @param mixed $value
|
441 |
* @return mixed
|
442 |
*/
|
443 |
+
function __set($property, $value)
|
444 |
{
|
445 |
$retval = NULL;
|
446 |
|
products/photocrati_nextgen/modules/ajax/module.ajax.php
CHANGED
@@ -16,7 +16,7 @@ class M_Ajax extends C_Base_Module
|
|
16 |
'photocrati-ajax',
|
17 |
'AJAX',
|
18 |
'Provides AJAX functionality',
|
19 |
-
'0.
|
20 |
'https://www.imagely.com',
|
21 |
'Photocrati Media',
|
22 |
'https://www.imagely.com'
|
@@ -55,7 +55,8 @@ class M_Ajax extends C_Base_Module
|
|
55 |
if (isset($_REQUEST[NGG_AJAX_SLUG])) {
|
56 |
$controller = C_Ajax_Controller::get_instance();
|
57 |
$controller->index_action();
|
58 |
-
|
|
|
59 |
}
|
60 |
}
|
61 |
|
16 |
'photocrati-ajax',
|
17 |
'AJAX',
|
18 |
'Provides AJAX functionality',
|
19 |
+
'0.9',
|
20 |
'https://www.imagely.com',
|
21 |
'Photocrati Media',
|
22 |
'https://www.imagely.com'
|
55 |
if (isset($_REQUEST[NGG_AJAX_SLUG])) {
|
56 |
$controller = C_Ajax_Controller::get_instance();
|
57 |
$controller->index_action();
|
58 |
+
// E_Clean_Exit may cause a warning to be appended to our response, spoiling any JSON sent
|
59 |
+
exit;
|
60 |
}
|
61 |
}
|
62 |
|
products/photocrati_nextgen/modules/attach_to_post/module.attach_to_post.php
CHANGED
@@ -24,7 +24,7 @@ class M_Attach_To_Post extends C_Base_Module
|
|
24 |
'photocrati-attach_to_post',
|
25 |
'Attach To Post',
|
26 |
'Provides the "Attach to Post" interface for displaying galleries and albums',
|
27 |
-
'0.
|
28 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
29 |
'Photocrati Media',
|
30 |
'https://www.imagely.com',
|
24 |
'photocrati-attach_to_post',
|
25 |
'Attach To Post',
|
26 |
'Provides the "Attach to Post" interface for displaying galleries and albums',
|
27 |
+
'0.12',
|
28 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
29 |
'Photocrati Media',
|
30 |
'https://www.imagely.com',
|
products/photocrati_nextgen/modules/attach_to_post/package.module.attach_to_post.php
CHANGED
@@ -145,8 +145,6 @@ class A_Attach_To_Post_Ajax extends Mixin
|
|
145 |
// Get the thumbnail
|
146 |
$entity->thumb_url = $storage->get_image_url($image, 'thumb', TRUE);
|
147 |
$entity->thumb_html = $storage->get_image_html($image, 'thumb');
|
148 |
-
$entity->max_width = $settings->thumbwidth;
|
149 |
-
$entity->max_height = $settings->thumbheight;
|
150 |
}
|
151 |
} else {
|
152 |
$response['error'] = __('Missing parameters', 'nggallery');
|
@@ -223,7 +221,7 @@ class C_Attach_Controller extends C_NextGen_Admin_Page_Controller
|
|
223 |
}
|
224 |
return self::$_instances[$context];
|
225 |
}
|
226 |
-
public function define($context)
|
227 |
{
|
228 |
if (!is_array($context)) {
|
229 |
$context = array($context);
|
@@ -316,6 +314,7 @@ class Mixin_Attach_To_Post extends Mixin
|
|
316 |
$this->object->mark_script('jquery-ui-sortable');
|
317 |
$this->object->mark_script('jquery-ui-tooltip');
|
318 |
$this->object->mark_script('ngg_tabs');
|
|
|
319 |
// Ensure select2
|
320 |
wp_enqueue_style('ngg_select2');
|
321 |
wp_enqueue_script('ngg_select2');
|
@@ -372,7 +371,8 @@ class Mixin_Attach_To_Post extends Mixin
|
|
372 |
$image_mapper = C_Image_Mapper::get_instance();
|
373 |
// Get the first entity from the displayed gallery. We will use this
|
374 |
// for a preview pic
|
375 |
-
$
|
|
|
376 |
$image = FALSE;
|
377 |
if ($entity) {
|
378 |
// This is an album or gallery
|
@@ -478,7 +478,7 @@ class Mixin_Attach_To_Post extends Mixin
|
|
478 |
*/
|
479 |
public function _render_display_tab()
|
480 |
{
|
481 |
-
return $this->object->render_partial('photocrati-attach_to_post#display_tab', array('messages' => array(), 'tabs' => $this->object->_get_display_tabs()), TRUE);
|
482 |
}
|
483 |
/**
|
484 |
* Renders the tab used primarily for Gallery and Image creation
|
145 |
// Get the thumbnail
|
146 |
$entity->thumb_url = $storage->get_image_url($image, 'thumb', TRUE);
|
147 |
$entity->thumb_html = $storage->get_image_html($image, 'thumb');
|
|
|
|
|
148 |
}
|
149 |
} else {
|
150 |
$response['error'] = __('Missing parameters', 'nggallery');
|
221 |
}
|
222 |
return self::$_instances[$context];
|
223 |
}
|
224 |
+
public function define($context = FALSE)
|
225 |
{
|
226 |
if (!is_array($context)) {
|
227 |
$context = array($context);
|
314 |
$this->object->mark_script('jquery-ui-sortable');
|
315 |
$this->object->mark_script('jquery-ui-tooltip');
|
316 |
$this->object->mark_script('ngg_tabs');
|
317 |
+
wp_enqueue_style('buttons');
|
318 |
// Ensure select2
|
319 |
wp_enqueue_style('ngg_select2');
|
320 |
wp_enqueue_script('ngg_select2');
|
371 |
$image_mapper = C_Image_Mapper::get_instance();
|
372 |
// Get the first entity from the displayed gallery. We will use this
|
373 |
// for a preview pic
|
374 |
+
$results = $this->object->_displayed_gallery->get_included_entities(1);
|
375 |
+
$entity = array_pop($results);
|
376 |
$image = FALSE;
|
377 |
if ($entity) {
|
378 |
// This is an album or gallery
|
478 |
*/
|
479 |
public function _render_display_tab()
|
480 |
{
|
481 |
+
return $this->object->render_partial('photocrati-attach_to_post#display_tab', array('messages' => array(), 'displayed_gallery' => $this->object->_displayed_gallery, 'tabs' => $this->object->_get_display_tabs()), TRUE);
|
482 |
}
|
483 |
/**
|
484 |
* Renders the tab used primarily for Gallery and Image creation
|
products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post.css
CHANGED
@@ -98,6 +98,10 @@ iframe {
|
|
98 |
}
|
99 |
|
100 |
/** Display Tab **/
|
|
|
|
|
|
|
|
|
101 |
#preview_tab_content .previewed_entity {
|
102 |
width: 100%;
|
103 |
border-bottom: solid 1px #E0E0D6;
|
@@ -139,19 +143,27 @@ iframe {
|
|
139 |
float: left;
|
140 |
}
|
141 |
|
142 |
-
#preview_tab_content .
|
143 |
background-color: white;
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
border: solid 1px black;
|
149 |
display: block;
|
150 |
vertical-align: middle;
|
151 |
text-align: center;
|
152 |
position: relative;
|
153 |
}
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
#preview_tab_content .image_container img {
|
156 |
border: 0px;
|
157 |
}
|
@@ -171,17 +183,27 @@ iframe {
|
|
171 |
}
|
172 |
|
173 |
#preview_tab_content #entity_list .exclude_container {
|
|
|
174 |
display: block;
|
175 |
text-align: center;
|
176 |
margin: 0 auto;
|
177 |
color: black;
|
178 |
font-weight: normal;
|
|
|
|
|
|
|
179 |
position: absolute;
|
180 |
-
bottom:
|
181 |
left: 0px;
|
182 |
width: 100%;
|
183 |
}
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
#preview_tab_content .header_row {
|
186 |
margin-bottom: 5px;
|
187 |
}
|
98 |
}
|
99 |
|
100 |
/** Display Tab **/
|
101 |
+
#preview_tab_content {
|
102 |
+
padding: 0.8em 1em;
|
103 |
+
}
|
104 |
+
|
105 |
#preview_tab_content .previewed_entity {
|
106 |
width: 100%;
|
107 |
border-bottom: solid 1px #E0E0D6;
|
143 |
float: left;
|
144 |
}
|
145 |
|
146 |
+
#preview_tab_content .preview_item {
|
147 |
background-color: white;
|
148 |
+
width: 100px;
|
149 |
+
padding: 6px 6px 1.4em 6px;
|
150 |
+
margin: 4px;
|
151 |
+
border: solid 1px #333;
|
|
|
152 |
display: block;
|
153 |
vertical-align: middle;
|
154 |
text-align: center;
|
155 |
position: relative;
|
156 |
}
|
157 |
|
158 |
+
#preview_tab_content .image_container {
|
159 |
+
background-repeat: no-repeat;
|
160 |
+
background-position: center;
|
161 |
+
background-size: cover;
|
162 |
+
display: block;
|
163 |
+
width: 100%;
|
164 |
+
height: 75px;
|
165 |
+
}
|
166 |
+
|
167 |
#preview_tab_content .image_container img {
|
168 |
border: 0px;
|
169 |
}
|
183 |
}
|
184 |
|
185 |
#preview_tab_content #entity_list .exclude_container {
|
186 |
+
background: white;
|
187 |
display: block;
|
188 |
text-align: center;
|
189 |
margin: 0 auto;
|
190 |
color: black;
|
191 |
font-weight: normal;
|
192 |
+
height: 1.4em;
|
193 |
+
line-height: 1.1em;
|
194 |
+
font-size: 0.8em;
|
195 |
position: absolute;
|
196 |
+
bottom: 0.2em;
|
197 |
left: 0px;
|
198 |
width: 100%;
|
199 |
}
|
200 |
|
201 |
+
#preview_tab_content #entity_list .exclude_container input {
|
202 |
+
vertical-align: middle;
|
203 |
+
line-height: 1.2em;
|
204 |
+
margin: 0 0.5em;
|
205 |
+
}
|
206 |
+
|
207 |
#preview_tab_content .header_row {
|
208 |
margin-bottom: 5px;
|
209 |
}
|
products/photocrati_nextgen/modules/attach_to_post/static/attach_to_post.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
html,body{width:100%;min-height:100%;padding:0;margin:0;font-size:13px}body{position:absolute;visibility:hidden;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0);opacity:0;height:100%}.entity_errors{color:red}.entity_errors ul{margin-left:30px}.entity_errors ul li{list-style-type:disc}.ui-helper-reset{font-size:13px}#attach_to_post_tabs{border:0;background:none;min-height:100%;overflow:hidden}#attach_to_post_tabs div.main_menu_tab{overflow:hidden}.ui-tabs-panel{min-height:100%}.ui-widget-header{border:0;border-bottom:1px solid #dfdfdf;background:none}iframe{width:100%;min-height:100%;border:0;padding:0;margin:0;background:transparent}#displayed_gallery_source{width:400px}#source_configuration td{vertical-align:top}#source_configuration .chzn-choices input[type=text]{height:auto !important}#slug_configuration #slug_label{width:52px}#slug_configuration #slug_column input[type=text]{width:498px}.display_type_preview{float:left;width:25%}.display_type_preview .image_container{width:100%;vertical-align:middle;text-align:center;font-size:12px;font-weight:600}.display_type_preview .image_container p{display:inline-block}#preview_tab_content .previewed_entity{width:100%;border-bottom:solid 1px #e0e0d6;background-color:#fafaf0}#preview_tab_content .previewed_entity .container{padding-top:15px}#preview_tab_content .previewed_entity.header{background-color:#f0f0e6;padding-bottom:5px;padding-top:5px}#preview_tab_content .header label{font-size:12px;color:#649664;font-weight:600}#preview_tab_content .ui-sortable-helper{background:none}#preview_tab_content ul{list-style-type:none;display:block;border:solid 2px #e0e0d6;padding:0;position:relative}#preview_tab_content .inclusion_checkbox{margin-right:7px;display:block;float:left}#preview_tab_content .
|
1 |
+
html,body{width:100%;min-height:100%;padding:0;margin:0;font-size:13px}body{position:absolute;visibility:hidden;-ms-filter:"alpha(opacity=0)";filter:alpha(opacity=0);opacity:0;height:100%}.entity_errors{color:red}.entity_errors ul{margin-left:30px}.entity_errors ul li{list-style-type:disc}.ui-helper-reset{font-size:13px}#attach_to_post_tabs{border:0;background:none;min-height:100%;overflow:hidden}#attach_to_post_tabs div.main_menu_tab{overflow:hidden}.ui-tabs-panel{min-height:100%}.ui-widget-header{border:0;border-bottom:1px solid #dfdfdf;background:none}iframe{width:100%;min-height:100%;border:0;padding:0;margin:0;background:transparent}#displayed_gallery_source{width:400px}#source_configuration td{vertical-align:top}#source_configuration .chzn-choices input[type=text]{height:auto !important}#slug_configuration #slug_label{width:52px}#slug_configuration #slug_column input[type=text]{width:498px}.display_type_preview{float:left;width:25%}.display_type_preview .image_container{width:100%;vertical-align:middle;text-align:center;font-size:12px;font-weight:600}.display_type_preview .image_container p{display:inline-block}#preview_tab_content{padding:.8em 1em}#preview_tab_content .previewed_entity{width:100%;border-bottom:solid 1px #e0e0d6;background-color:#fafaf0}#preview_tab_content .previewed_entity .container{padding-top:15px}#preview_tab_content .previewed_entity.header{background-color:#f0f0e6;padding-bottom:5px;padding-top:5px}#preview_tab_content .header label{font-size:12px;color:#649664;font-weight:600}#preview_tab_content .ui-sortable-helper{background:none}#preview_tab_content ul{list-style-type:none;display:block;border:solid 2px #e0e0d6;padding:0;position:relative}#preview_tab_content .inclusion_checkbox{margin-right:7px;display:block;float:left}#preview_tab_content .preview_item{background-color:white;width:100px;padding:6px 6px 1.4em 6px;margin:4px;border:solid 1px #333;display:block;vertical-align:middle;text-align:center;position:relative}#preview_tab_content .image_container{background-repeat:no-repeat;background-position:center;background-size:cover;display:block;width:100%;height:75px}#preview_tab_content .image_container img{border:0}#preview_tab_content #entity_list li{float:left}#preview_tab_content #entity_list .ui-state-default{background:none;border:0}#preview_tab_content .placeholder{background-color:#e0ddc1;position:relative}#preview_tab_content #entity_list .exclude_container{background:white;display:block;text-align:center;margin:0 auto;color:black;font-weight:normal;height:1.4em;line-height:1.1em;font-size:.8em;position:absolute;bottom:.2em;left:0;width:100%}#preview_tab_content #entity_list .exclude_container input{vertical-align:middle;line-height:1.2em;margin:0 .5em}#preview_tab_content .header_row{margin-bottom:5px}#preview_tab_content .header_row strong{width:70px;display:inline-block}#preview_tab_content .header_row .separator{display:inline-block;margin:0 5px}#preview_tab_content .header_row .selected{font-weight:bold}#preview_tab_content #entity_list li.clear{float:none;clear:both}.clear{clear:both;float:none}table{font-size:13px}#display_settings_form table tr td:first-child{vertical-align:top;text-align:right;padding-right:7px;width:180px}#display_settings_form table td{text-align:left}#display_settings_form table textarea{height:60px}#display_settings_form textarea,#display_settings_form input[type=text],#display_settings_form input[type=number],#display_settings_form select{width:157px}#display_settings_form .ngg_slideshow_gallery_width,#display_settings_form .ngg_slideshow_gallery_height,#display_settings_form .ngg_thumbnail_dimension_width,#display_settings_form .ngg_thumbnail_dimension_height{width:65px !important}#display_settings_form .nextgen_settings_colorpicker{width:85px !important;text-align:center}.ui-tabs{visibility:visible;position:relative}.ui-tabs .ui-tabs-hide{display:block !important;visibility:hidden;position:absolute;top:-5000px}.ui-tabs .main_menu_tab{overflow:visible}.ui-tabs .ui-tabs-nav li.ui-tabs-active a,.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-tabs-loading a{cursor:pointer}.select2-result-label{white-space:nowrap}.select2-results{font-family:'segoe ui',Arial,sans-serif;font-size:13px}.refresh_button{float:right}
|
products/photocrati_nextgen/modules/attach_to_post/templates/display_tab.php
CHANGED
@@ -6,6 +6,6 @@
|
|
6 |
<?php echo $tab ?>
|
7 |
<?php endforeach ?>
|
8 |
</div>
|
9 |
-
<p>
|
10 |
-
<input type="button" id="save_displayed_gallery" value="<?php _e('Save', 'nggallery'); ?>"/>
|
11 |
-
</p>
|
6 |
<?php echo $tab ?>
|
7 |
<?php endforeach ?>
|
8 |
</div>
|
9 |
+
<p class="wp-core-ui">
|
10 |
+
<input type="button" class="button button-primary button-large" id="save_displayed_gallery" value="<?php if ($displayed_gallery->id()) { _e('Save Changes', 'nggallery'); } else { _e('Insert Displayed Gallery', 'nggallery'); } ?>"/>
|
11 |
+
</p>
|
products/photocrati_nextgen/modules/attach_to_post/templates/display_tab_js.php
CHANGED
@@ -1193,6 +1193,7 @@ jQuery(function($){
|
|
1193 |
_.each(this.options, function(value, key){
|
1194 |
this[key] = value;
|
1195 |
}, this);
|
|
|
1196 |
this.model.on('change', this.render, this);
|
1197 |
if (this.model.get('sortorder') == 0) {
|
1198 |
this.model.set('sortorder', -1, {silent: true});
|
@@ -1208,27 +1209,27 @@ jQuery(function($){
|
|
1208 |
|
1209 |
render: function(){
|
1210 |
this.$el.empty();
|
|
|
1211 |
var image_container = $('<div/>').addClass('image_container');
|
1212 |
var alt_text = this.model.alttext().replace(/\\&/g, '&').replace(/\\'/g, "'");
|
1213 |
-
var timestamp =
|
1214 |
image_container.attr({
|
1215 |
title: alt_text,
|
1216 |
style: "background-image: url('"+this.model.get('thumb_url')+"?timestamp"+timestamp+"')"
|
1217 |
-
}).css({
|
1218 |
-
width: this.model.get('max_width'),
|
1219 |
-
height: this.model.get('max_height'),
|
1220 |
-
'max-width': this.model.get('max_width'),
|
1221 |
-
'max-height': this.model.get('max_height')
|
1222 |
});
|
1223 |
|
1224 |
-
this.$el.append(
|
|
|
|
|
1225 |
|
1226 |
// Add exclude checkbox
|
1227 |
var exclude_container = $('<div/>').addClass('exclude_container');
|
1228 |
-
|
|
|
1229 |
var exclude_checkbox = new this.ExcludeCheckbox({model: this.model});
|
1230 |
-
|
1231 |
-
|
|
|
1232 |
return this;
|
1233 |
},
|
1234 |
|
1193 |
_.each(this.options, function(value, key){
|
1194 |
this[key] = value;
|
1195 |
}, this);
|
1196 |
+
this.initTime = new Date().getTime();
|
1197 |
this.model.on('change', this.render, this);
|
1198 |
if (this.model.get('sortorder') == 0) {
|
1199 |
this.model.set('sortorder', -1, {silent: true});
|
1209 |
|
1210 |
render: function(){
|
1211 |
this.$el.empty();
|
1212 |
+
var preview_item = $('<div/>').addClass('preview_item');
|
1213 |
var image_container = $('<div/>').addClass('image_container');
|
1214 |
var alt_text = this.model.alttext().replace(/\\&/g, '&').replace(/\\'/g, "'");
|
1215 |
+
var timestamp = this.initTime;
|
1216 |
image_container.attr({
|
1217 |
title: alt_text,
|
1218 |
style: "background-image: url('"+this.model.get('thumb_url')+"?timestamp"+timestamp+"')"
|
|
|
|
|
|
|
|
|
|
|
1219 |
});
|
1220 |
|
1221 |
+
this.$el.append(preview_item).addClass('ui-state-default');
|
1222 |
+
|
1223 |
+
preview_item.append(image_container);
|
1224 |
|
1225 |
// Add exclude checkbox
|
1226 |
var exclude_container = $('<div/>').addClass('exclude_container');
|
1227 |
+
var exclude_label = $('<label/>');
|
1228 |
+
exclude_label.append('<?php _e('Exclude?', 'nggallery'); ?>');
|
1229 |
var exclude_checkbox = new this.ExcludeCheckbox({model: this.model});
|
1230 |
+
exclude_label.append(exclude_checkbox.render().el);
|
1231 |
+
exclude_container.append(exclude_label);
|
1232 |
+
preview_item.append(exclude_container);
|
1233 |
return this;
|
1234 |
},
|
1235 |
|
products/photocrati_nextgen/modules/fs/module.fs.php
CHANGED
@@ -12,7 +12,7 @@ class M_Fs extends C_Base_Module
|
|
12 |
'photocrati-fs',
|
13 |
'Filesystem',
|
14 |
'Provides a filesystem abstraction layer for Pope modules',
|
15 |
-
'0.
|
16 |
'https://www.imagely.com',
|
17 |
'Photocrati Media',
|
18 |
'https://www.imagely.com'
|
12 |
'photocrati-fs',
|
13 |
'Filesystem',
|
14 |
'Provides a filesystem abstraction layer for Pope modules',
|
15 |
+
'0.5',
|
16 |
'https://www.imagely.com',
|
17 |
'Photocrati Media',
|
18 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/fs/package.module.fs.php
CHANGED
@@ -274,6 +274,10 @@ class Mixin_Fs_Instance_Methods extends Mixin
|
|
274 |
if (strpos($retval, $this->get_document_root()) !== 0 && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
275 |
$retval = DIRECTORY_SEPARATOR . trim($retval, '/\\');
|
276 |
}
|
|
|
|
|
|
|
|
|
277 |
return $retval;
|
278 |
}
|
279 |
public function _flatten_array($obj, &$arr)
|
274 |
if (strpos($retval, $this->get_document_root()) !== 0 && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
|
275 |
$retval = DIRECTORY_SEPARATOR . trim($retval, '/\\');
|
276 |
}
|
277 |
+
// Check for and adjust Windows UNC paths (\\server\share\) for network mounted sites
|
278 |
+
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && substr($this->get_document_root(), 0, 2) === '\\\\') {
|
279 |
+
$retval = '\\\\' . $retval;
|
280 |
+
}
|
281 |
return $retval;
|
282 |
}
|
283 |
public function _flatten_array($obj, &$arr)
|
products/photocrati_nextgen/modules/mvc/module.mvc.php
CHANGED
@@ -20,7 +20,7 @@ class M_MVC extends C_Base_Module
|
|
20 |
"photocrati-mvc",
|
21 |
"MVC Framework",
|
22 |
"Provides an MVC architecture for the plugin to use",
|
23 |
-
"0.
|
24 |
"https://www.imagely.com",
|
25 |
"Photocrati Media",
|
26 |
"https://www.imagely.com"
|
20 |
"photocrati-mvc",
|
21 |
"MVC Framework",
|
22 |
"Provides an MVC architecture for the plugin to use",
|
23 |
+
"0.7",
|
24 |
"https://www.imagely.com",
|
25 |
"Photocrati Media",
|
26 |
"https://www.imagely.com"
|
products/photocrati_nextgen/modules/mvc/package.module.mvc.php
CHANGED
@@ -441,23 +441,18 @@ class C_MVC_View extends C_Component
|
|
441 |
public $_engine = '';
|
442 |
public $_params = array();
|
443 |
public $_queue = array();
|
444 |
-
public function
|
445 |
{
|
446 |
-
parent::define($context);
|
447 |
-
$this->implement('I_MVC_View');
|
448 |
-
$this->add_mixin('Mixin_Mvc_View_Instance_Methods');
|
449 |
-
}
|
450 |
-
/**
|
451 |
-
* Initialize the view with some parameters
|
452 |
-
* @param array $params
|
453 |
-
* @param context $context
|
454 |
-
*/
|
455 |
-
public function initialize($template, $params = array(), $engine = 'php', $context = FALSE)
|
456 |
-
{
|
457 |
-
parent::initialize($context);
|
458 |
$this->_template = $template;
|
459 |
$this->_params = (array) $params;
|
460 |
$this->_engine = $engine;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
}
|
462 |
}
|
463 |
class Mixin_Mvc_View_Instance_Methods extends Mixin
|
441 |
public $_engine = '';
|
442 |
public $_params = array();
|
443 |
public $_queue = array();
|
444 |
+
public function __construct($template, $params = array(), $engine = 'php', $context = FALSE)
|
445 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
$this->_template = $template;
|
447 |
$this->_params = (array) $params;
|
448 |
$this->_engine = $engine;
|
449 |
+
parent::__construct();
|
450 |
+
}
|
451 |
+
public function define($context = FALSE)
|
452 |
+
{
|
453 |
+
parent::define($context);
|
454 |
+
$this->implement('I_MVC_View');
|
455 |
+
$this->add_mixin('Mixin_Mvc_View_Instance_Methods');
|
456 |
}
|
457 |
}
|
458 |
class Mixin_Mvc_View_Instance_Methods extends Mixin
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/module.nextgen_addgallery_page.php
CHANGED
@@ -15,7 +15,7 @@ class M_NextGen_AddGallery_Page extends C_Base_Module
|
|
15 |
'photocrati-nextgen_addgallery_page',
|
16 |
'NextGEN Add Gallery Page',
|
17 |
'Provides admin page for adding a gallery and uploading images',
|
18 |
-
'0.
|
19 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
15 |
'photocrati-nextgen_addgallery_page',
|
16 |
'NextGEN Add Gallery Page',
|
17 |
'Provides admin page for adding a gallery and uploading images',
|
18 |
+
'0.7',
|
19 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/package.module.nextgen_addgallery_page.php
CHANGED
@@ -99,6 +99,7 @@ class A_NextGen_AddGallery_Ajax extends Mixin
|
|
99 |
// Upload the image to the gallery
|
100 |
if (!$error) {
|
101 |
$retval['gallery_id'] = $gallery_id;
|
|
|
102 |
$storage = C_Gallery_Storage::get_instance();
|
103 |
try {
|
104 |
if ($storage->is_zip()) {
|
@@ -109,6 +110,21 @@ class A_NextGen_AddGallery_Ajax extends Mixin
|
|
109 |
}
|
110 |
} elseif ($image = $storage->upload_image($gallery_id)) {
|
111 |
$retval['image_ids'] = array($image->id());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
} else {
|
113 |
$retval['error'] = __('Image generation failed', 'nggallery');
|
114 |
$error = TRUE;
|
@@ -336,7 +352,7 @@ class A_Upload_Images_Form extends Mixin
|
|
336 |
}
|
337 |
public function get_i18n_strings()
|
338 |
{
|
339 |
-
return array('no_image_uploaded' => __('No images were uploaded successfully.', 'nggallery'), 'one_image_uploaded' => __('1 image was uploaded successfully.', 'nggallery'), 'x_images_uploaded' => __('{count} images were uploaded successfully.', '
|
340 |
}
|
341 |
/**
|
342 |
* Plupload stores its i18n JS *mostly* as "en.js" or "ar.js" - but some as zh_CN.js so we must check both if the
|
99 |
// Upload the image to the gallery
|
100 |
if (!$error) {
|
101 |
$retval['gallery_id'] = $gallery_id;
|
102 |
+
$settings = C_NextGen_Settings::get_instance();
|
103 |
$storage = C_Gallery_Storage::get_instance();
|
104 |
try {
|
105 |
if ($storage->is_zip()) {
|
110 |
}
|
111 |
} elseif ($image = $storage->upload_image($gallery_id)) {
|
112 |
$retval['image_ids'] = array($image->id());
|
113 |
+
$retval['image_errors'] = array();
|
114 |
+
// check if image was resized correctly
|
115 |
+
if ($settings->imgAutoResize) {
|
116 |
+
$image_path = $storage->get_full_abspath($image);
|
117 |
+
$image_thumb = new C_NggLegacy_Thumbnail($image_path, true);
|
118 |
+
if ($image_thumb->error) {
|
119 |
+
$retval['image_errors'][] = array('id' => $image->id(), 'error' => sprintf(__('Automatic image resizing failed [%1$s].', 'nggallery'), $image_thumb->errmsg));
|
120 |
+
$image_thumb = null;
|
121 |
+
}
|
122 |
+
}
|
123 |
+
// check if thumb was generated correctly
|
124 |
+
$thumb_path = $storage->get_thumb_abspath($image);
|
125 |
+
if (!file_exists($thumb_path)) {
|
126 |
+
$retval['image_errors'][] = array('id' => $image->id(), 'error' => __('Thumbnail generation failed.', 'nggallery'));
|
127 |
+
}
|
128 |
} else {
|
129 |
$retval['error'] = __('Image generation failed', 'nggallery');
|
130 |
$error = TRUE;
|
352 |
}
|
353 |
public function get_i18n_strings()
|
354 |
{
|
355 |
+
return array('no_image_uploaded' => __('No images were uploaded successfully.', 'nggallery'), 'one_image_uploaded' => __('1 image was uploaded successfully.', 'nggallery'), 'x_images_uploaded' => __('{count} images were uploaded successfully.', 'nggallery'), 'image_errors' => __('The following errors occured:', 'nggallery'), 'manage_gallery' => __('Manage gallery', 'nggallery'));
|
356 |
}
|
357 |
/**
|
358 |
* Plupload stores its i18n JS *mostly* as "en.js" or "ar.js" - but some as zh_CN.js so we must check both if the
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/import_media_library.php
CHANGED
@@ -13,4 +13,4 @@
|
|
13 |
<button id='ngg-importML-select-opener'
|
14 |
class='button-primary hidden'><?php echo $i18n['select-opener']; ?></button>
|
15 |
<button id='ngg-importML-selected-image-import'
|
16 |
-
class='button-primary hidden'
|
13 |
<button id='ngg-importML-select-opener'
|
14 |
class='button-primary hidden'><?php echo $i18n['select-opener']; ?></button>
|
15 |
<button id='ngg-importML-selected-image-import'
|
16 |
+
class='button-primary hidden'></button>
|
products/photocrati_nextgen/modules/nextgen_addgallery_page/templates/upload_images.php
CHANGED
@@ -72,6 +72,7 @@
|
|
72 |
var $gallery_name = $('#gallery_name').show();
|
73 |
var $gallery_selection = $('#gallery_selection').detach();
|
74 |
window.uploaded_image_ids = [];
|
|
|
75 |
|
76 |
plupload.addFileFilter('xss_protection', function(enabled, file, cb){
|
77 |
var retval = true;
|
@@ -164,6 +165,7 @@
|
|
164 |
|
165 |
// Determine appropriate message to display
|
166 |
var upload_count = window.uploaded_image_ids.length;
|
|
|
167 |
var msg = '';
|
168 |
var gallery_url = '<?php echo admin_url("/admin.php?page=nggallery-manage-gallery&mode=edit&gid=")?>' + $gallery_id.val();
|
169 |
|
@@ -173,6 +175,16 @@
|
|
173 |
else {
|
174 |
msg = upload_count == 1 ? NggUploadImages_i18n.one_image_uploaded : NggUploadImages_i18n.x_images_uploaded;
|
175 |
msg = msg.replace('{count}', upload_count);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
|
177 |
// If we're outside of the IGW, we will then display a link to manage the gallery
|
178 |
if ($('#iframely').length == 0) {
|
@@ -236,7 +248,15 @@
|
|
236 |
else {
|
237 |
window.uploaded_image_ids = window.uploaded_image_ids.concat(response.image_ids);
|
238 |
up.settings.url = window.set_plupload_url(response.gallery_id, $gallery_name.val());
|
239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
240 |
// If we created a new gallery, ensure it's now in the drop-down list, and select it
|
241 |
if ($gallery_id.find('option[value="'+response.gallery_id+'"]').length == 0) {
|
242 |
var option = $('<option/>').attr('value', response.gallery_id).html(response.gallery_name);
|
72 |
var $gallery_name = $('#gallery_name').show();
|
73 |
var $gallery_selection = $('#gallery_selection').detach();
|
74 |
window.uploaded_image_ids = [];
|
75 |
+
window.uploaded_image_errors = [];
|
76 |
|
77 |
plupload.addFileFilter('xss_protection', function(enabled, file, cb){
|
78 |
var retval = true;
|
165 |
|
166 |
// Determine appropriate message to display
|
167 |
var upload_count = window.uploaded_image_ids.length;
|
168 |
+
var errors = window.uploaded_image_errors;
|
169 |
var msg = '';
|
170 |
var gallery_url = '<?php echo admin_url("/admin.php?page=nggallery-manage-gallery&mode=edit&gid=")?>' + $gallery_id.val();
|
171 |
|
175 |
else {
|
176 |
msg = upload_count == 1 ? NggUploadImages_i18n.one_image_uploaded : NggUploadImages_i18n.x_images_uploaded;
|
177 |
msg = msg.replace('{count}', upload_count);
|
178 |
+
|
179 |
+
if (errors.length > 0) {
|
180 |
+
msg = msg + '<br/>' + NggUploadImages_i18n.image_errors;
|
181 |
+
|
182 |
+
for (var i = 0; i < errors.length; i++) {
|
183 |
+
msg = msg + '<br/>' + errors[i];
|
184 |
+
}
|
185 |
+
|
186 |
+
msg = msg + '<br/>';
|
187 |
+
}
|
188 |
|
189 |
// If we're outside of the IGW, we will then display a link to manage the gallery
|
190 |
if ($('#iframely').length == 0) {
|
248 |
else {
|
249 |
window.uploaded_image_ids = window.uploaded_image_ids.concat(response.image_ids);
|
250 |
up.settings.url = window.set_plupload_url(response.gallery_id, $gallery_name.val());
|
251 |
+
|
252 |
+
if (response.image_errors) {
|
253 |
+
for (var i = 0; i < response.image_errors.length; i++) {
|
254 |
+
var errMsg = response.image_errors[i].error;
|
255 |
+
if (window.uploaded_image_errors.indexOf(errMsg) == -1)
|
256 |
+
window.uploaded_image_errors.push(errMsg);
|
257 |
+
}
|
258 |
+
}
|
259 |
+
|
260 |
// If we created a new gallery, ensure it's now in the drop-down list, and select it
|
261 |
if ($gallery_id.find('option[value="'+response.gallery_id+'"]').length == 0) {
|
262 |
var option = $('<option/>').attr('value', response.gallery_id).html(response.gallery_name);
|
products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php
CHANGED
@@ -19,7 +19,7 @@ class M_NextGen_Admin extends C_Base_Module
|
|
19 |
'photocrati-nextgen_admin',
|
20 |
'NextGEN Administration',
|
21 |
'Provides a framework for adding Administration pages',
|
22 |
-
'0.
|
23 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
24 |
'Photocrati Media',
|
25 |
'https://www.imagely.com'
|
@@ -93,19 +93,34 @@ class M_NextGen_Admin extends C_Base_Module
|
|
93 |
function _register_hooks()
|
94 |
{
|
95 |
// Register scripts
|
96 |
-
add_action('init', array(
|
97 |
|
98 |
// Provides menu options for managing NextGEN Settings
|
99 |
-
add_action('admin_menu', array(
|
100 |
|
101 |
// Define routes
|
102 |
-
add_action('ngg_routes', array(
|
103 |
|
104 |
// Provides admin notices
|
105 |
$notices = C_Admin_Notification_Manager::get_instance();
|
106 |
add_action('init', array($notices, 'serve_ajax_request'));
|
107 |
add_action('admin_footer', array($notices, 'enqueue_scripts'));
|
108 |
add_action('all_admin_notices', array($notices, 'render'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
function define_routes($router)
|
@@ -219,7 +234,10 @@ class C_NextGen_Admin_Installer
|
|
219 |
$cleanup = FALSE;
|
220 |
foreach ($modules as $module) {
|
221 |
if (strpos($module, $module_name) !== FALSE) {
|
222 |
-
|
|
|
|
|
|
|
223 |
$cleanup = TRUE;
|
224 |
}
|
225 |
break;
|
19 |
'photocrati-nextgen_admin',
|
20 |
'NextGEN Administration',
|
21 |
'Provides a framework for adding Administration pages',
|
22 |
+
'0.10',
|
23 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
24 |
'Photocrati Media',
|
25 |
'https://www.imagely.com'
|
93 |
function _register_hooks()
|
94 |
{
|
95 |
// Register scripts
|
96 |
+
add_action('init', array($this, 'register_scripts'), 9);
|
97 |
|
98 |
// Provides menu options for managing NextGEN Settings
|
99 |
+
add_action('admin_menu', array($this, 'add_menu_pages'), 999);
|
100 |
|
101 |
// Define routes
|
102 |
+
add_action('ngg_routes', array($this, 'define_routes'));
|
103 |
|
104 |
// Provides admin notices
|
105 |
$notices = C_Admin_Notification_Manager::get_instance();
|
106 |
add_action('init', array($notices, 'serve_ajax_request'));
|
107 |
add_action('admin_footer', array($notices, 'enqueue_scripts'));
|
108 |
add_action('all_admin_notices', array($notices, 'render'));
|
109 |
+
|
110 |
+
$php_id = 0;
|
111 |
+
|
112 |
+
if (defined('PHP_VERSION_ID')) {
|
113 |
+
$php_id = PHP_VERSION_ID;
|
114 |
+
}
|
115 |
+
else {
|
116 |
+
$version = explode('.', PHP_VERSION);
|
117 |
+
|
118 |
+
$php_id = ($version[0] * 10000 + $version[1] * 100 + $version[2]);
|
119 |
+
}
|
120 |
+
|
121 |
+
if ($php_id < 50300) {
|
122 |
+
$notices->add("ngg_php52_deprecation", array("message" => __('PHP 5.2 will be deprecated in a future version of NextGEN. Please upgrade your PHP installation to 5.3 or above.', 'nggallery')));
|
123 |
+
}
|
124 |
}
|
125 |
|
126 |
function define_routes($router)
|
234 |
$cleanup = FALSE;
|
235 |
foreach ($modules as $module) {
|
236 |
if (strpos($module, $module_name) !== FALSE) {
|
237 |
+
// Leave $module as-is: inside version_compare() will warn about passing items by reference
|
238 |
+
$module = explode('|', $module);
|
239 |
+
$val = array_pop($module);
|
240 |
+
if (version_compare($val, '0.3') == -1) {
|
241 |
$cleanup = TRUE;
|
242 |
}
|
243 |
break;
|
products/photocrati_nextgen/modules/nextgen_admin/package.module.nextgen_admin.php
CHANGED
@@ -62,6 +62,28 @@ class A_NextGen_Admin_Default_Pages extends Mixin
|
|
62 |
return $this->call_parent('setup');
|
63 |
}
|
64 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
class C_Admin_Notification_Manager
|
66 |
{
|
67 |
public $_notifications = array();
|
@@ -144,8 +166,13 @@ class C_Admin_Notification_Manager
|
|
144 |
public function get_handler_instance($name)
|
145 |
{
|
146 |
$retval = NULL;
|
147 |
-
if (isset($this->_notifications[$name])
|
148 |
-
|
|
|
|
|
|
|
|
|
|
|
149 |
$retval = call_user_func(array($handler, 'get_instance'), $name);
|
150 |
}
|
151 |
}
|
@@ -211,7 +238,7 @@ class C_Form extends C_MVC_Controller
|
|
211 |
* Defines the form
|
212 |
* @param string $context
|
213 |
*/
|
214 |
-
public function define($context)
|
215 |
{
|
216 |
parent::define($context);
|
217 |
$this->add_mixin('Mixin_Form_Instance_Methods');
|
62 |
return $this->call_parent('setup');
|
63 |
}
|
64 |
}
|
65 |
+
class C_Admin_Notification_Wrapper
|
66 |
+
{
|
67 |
+
public $_name;
|
68 |
+
public $_data;
|
69 |
+
public function __construct($name, $data)
|
70 |
+
{
|
71 |
+
$this->_name = $name;
|
72 |
+
$this->_data = $data;
|
73 |
+
}
|
74 |
+
public function is_renderable()
|
75 |
+
{
|
76 |
+
return true;
|
77 |
+
}
|
78 |
+
public function is_dismissable()
|
79 |
+
{
|
80 |
+
return true;
|
81 |
+
}
|
82 |
+
public function render()
|
83 |
+
{
|
84 |
+
return $this->_data['message'];
|
85 |
+
}
|
86 |
+
}
|
87 |
class C_Admin_Notification_Manager
|
88 |
{
|
89 |
public $_notifications = array();
|
166 |
public function get_handler_instance($name)
|
167 |
{
|
168 |
$retval = NULL;
|
169 |
+
if (isset($this->_notifications[$name])) {
|
170 |
+
$handler = $this->_notifications[$name];
|
171 |
+
if (is_object($handler)) {
|
172 |
+
$retval = $handler;
|
173 |
+
} elseif (is_array($handler)) {
|
174 |
+
$retval = new C_Admin_Notification_Wrapper($name, $handler);
|
175 |
+
} elseif (class_exists($handler)) {
|
176 |
$retval = call_user_func(array($handler, 'get_instance'), $name);
|
177 |
}
|
178 |
}
|
238 |
* Defines the form
|
239 |
* @param string $context
|
240 |
*/
|
241 |
+
public function define($context = FALSE)
|
242 |
{
|
243 |
parent::define($context);
|
244 |
$this->add_mixin('Mixin_Form_Instance_Methods');
|
products/photocrati_nextgen/modules/nextgen_basic_album/module.nextgen_basic_album.php
CHANGED
@@ -18,7 +18,7 @@ class M_NextGen_Basic_Album extends C_Base_Module
|
|
18 |
'photocrati-nextgen_basic_album',
|
19 |
'NextGEN Basic Album',
|
20 |
"Provides support for NextGEN's Basic Album",
|
21 |
-
'0.
|
22 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
23 |
'Photocrati Media',
|
24 |
'https://www.imagely.com'
|
@@ -73,6 +73,7 @@ class M_NextGen_Basic_Album extends C_Base_Module
|
|
73 |
);
|
74 |
|
75 |
$this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Breadcrumbs');
|
|
|
76 |
}
|
77 |
|
78 |
|
@@ -166,6 +167,7 @@ class M_NextGen_Basic_Album extends C_Base_Module
|
|
166 |
{
|
167 |
return array(
|
168 |
'A_NextGen_Album_Breadcrumbs' => 'adapter.nextgen_album_breadcrumbs.php',
|
|
|
169 |
'A_Nextgen_Basic_Album' => 'adapter.nextgen_basic_album.php',
|
170 |
'A_Nextgen_Basic_Album_Controller' => 'adapter.nextgen_basic_album_controller.php',
|
171 |
'A_Nextgen_Basic_Album_Mapper' => 'adapter.nextgen_basic_album_mapper.php',
|
18 |
'photocrati-nextgen_basic_album',
|
19 |
'NextGEN Basic Album',
|
20 |
"Provides support for NextGEN's Basic Album",
|
21 |
+
'0.12',
|
22 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
23 |
'Photocrati Media',
|
24 |
'https://www.imagely.com'
|
73 |
);
|
74 |
|
75 |
$this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Breadcrumbs');
|
76 |
+
$this->get_registry()->add_adapter('I_MVC_View', 'A_NextGen_Album_Descriptions');
|
77 |
}
|
78 |
|
79 |
|
167 |
{
|
168 |
return array(
|
169 |
'A_NextGen_Album_Breadcrumbs' => 'adapter.nextgen_album_breadcrumbs.php',
|
170 |
+
'A_NextGen_Album_Descriptions' => 'adapter.nextgen_album_descriptions.php',
|
171 |
'A_Nextgen_Basic_Album' => 'adapter.nextgen_basic_album.php',
|
172 |
'A_Nextgen_Basic_Album_Controller' => 'adapter.nextgen_basic_album_controller.php',
|
173 |
'A_Nextgen_Basic_Album_Mapper' => 'adapter.nextgen_basic_album_mapper.php',
|
products/photocrati_nextgen/modules/nextgen_basic_album/package.module.nextgen_basic_album.php
CHANGED
@@ -47,7 +47,11 @@ class A_NextGen_Album_Breadcrumbs extends Mixin
|
|
47 |
$ds = $displayed_gallery->display_settings;
|
48 |
if (!empty($entities) && !empty($ds['template']) && $this->are_breadcrumbs_enabled($ds)) {
|
49 |
if ($gallery_id) {
|
50 |
-
|
|
|
|
|
|
|
|
|
51 |
} elseif (!empty($ds['original_album_id'])) {
|
52 |
$ids = $ds['original_album_id'];
|
53 |
} else {
|
@@ -96,6 +100,9 @@ class A_NextGen_Album_Breadcrumbs extends Mixin
|
|
96 |
if (is_array($gallery_id)) {
|
97 |
$gallery_id = array_shift($gallery_id);
|
98 |
}
|
|
|
|
|
|
|
99 |
foreach ($entities as $ndx => $entity) {
|
100 |
$tmpid = (isset($entity->albumdesc) ? 'a' : '') . $entity->{$entity->id_field};
|
101 |
$this->breadcrumb_cache[$tmpid] = $entity;
|
@@ -175,6 +182,85 @@ class A_NextGen_Album_Breadcrumbs extends Mixin
|
|
175 |
return $view->render(TRUE);
|
176 |
}
|
177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
/**
|
179 |
* Provides validation for NextGen Basic Albums
|
180 |
*/
|
@@ -224,7 +310,9 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
|
|
224 |
// Try finding the gallery by slug first. If nothing is found, we assume that
|
225 |
// the user passed in a gallery id instead
|
226 |
$mapper = C_Gallery_Mapper::get_instance();
|
227 |
-
$
|
|
|
|
|
228 |
if ($result) {
|
229 |
$gallery = $result->{$result->id_field};
|
230 |
}
|
@@ -233,14 +321,17 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
|
|
233 |
if (!empty($display_settings['gallery_display_template'])) {
|
234 |
$gallery_params['template'] = $display_settings['gallery_display_template'];
|
235 |
}
|
236 |
-
add_filter('ngg_displayed_gallery_rendering', array($this, '
|
|
|
237 |
$output = $renderer->display_images($gallery_params, $return);
|
238 |
remove_filter('ngg_displayed_gallery_rendering', array($this, 'add_breadcrumbs_to_legacy_templates'));
|
|
|
239 |
return $output;
|
240 |
} else {
|
241 |
if ($album = $this->param('album')) {
|
242 |
$mapper = C_Album_Mapper::get_instance();
|
243 |
-
$result =
|
|
|
244 |
$album_sub = $result ? $result->{$result->id_field} : null;
|
245 |
if ($album_sub != null) {
|
246 |
$album = $album_sub;
|
@@ -262,7 +353,7 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
|
|
262 |
// If there are entities to be displayed
|
263 |
if ($entities) {
|
264 |
$pagination_result = $this->object->create_pagination($current_page, $displayed_gallery->get_entity_count(), $display_settings['galleries_per_page'], urldecode($this->object->param('ajax_pagination_referrer')));
|
265 |
-
if (!empty($display_settings['template'])) {
|
266 |
// Add additional parameters
|
267 |
$this->object->remove_param('ajax_pagination_referrer');
|
268 |
$display_settings['current_page'] = $current_page;
|
@@ -270,12 +361,18 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
|
|
270 |
$display_settings['pagination_prev'] = $pagination_result['prev'];
|
271 |
$display_settings['pagination_next'] = $pagination_result['next'];
|
272 |
$display_settings['pagination'] = $pagination_result['output'];
|
|
|
273 |
$this->object->add_mixin('A_NextGen_Album_Breadcrumbs');
|
|
|
274 |
$breadcrumbs = $this->object->render_legacy_template_breadcrumbs($displayed_gallery, $entities);
|
|
|
275 |
// Render legacy template
|
276 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
277 |
$display_settings = $this->prepare_legacy_album_params($displayed_gallery->get_entity(), $display_settings);
|
278 |
$retval = $this->object->legacy_render($display_settings['template'], $display_settings, $return, 'album');
|
|
|
|
|
|
|
279 |
if (!empty($breadcrumbs)) {
|
280 |
$retval = $breadcrumbs . $retval;
|
281 |
}
|
@@ -317,6 +414,15 @@ class A_NextGen_Basic_Album_Controller extends Mixin_NextGen_Basic_Pagination
|
|
317 |
}
|
318 |
return $html;
|
319 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
/**
|
321 |
* Gets the parent album for the entity being displayed
|
322 |
* @param int $entity_id
|
@@ -441,6 +547,7 @@ class A_NextGen_Basic_Album_Mapper extends Mixin
|
|
441 |
$this->object->_set_default_value($entity, 'settings', 'galleries_per_page', $settings->galPagedGalleries);
|
442 |
$this->object->_set_default_value($entity, 'settings', 'enable_breadcrumbs', 1);
|
443 |
$this->object->_set_default_value($entity, 'settings', 'disable_pagination', 0);
|
|
|
444 |
$this->object->_set_default_value($entity, 'settings', 'template', '');
|
445 |
// Thumbnail dimensions -- only used by extended albums
|
446 |
if ($entity->name == NGG_BASIC_EXTENDED_ALBUM) {
|
@@ -530,7 +637,7 @@ class Mixin_NextGen_Basic_Album_Form extends Mixin_Display_Type_Form
|
|
530 |
{
|
531 |
public function _get_field_names()
|
532 |
{
|
533 |
-
return array('nextgen_basic_album_gallery_display_type', 'nextgen_basic_album_galleries_per_page', 'nextgen_basic_album_enable_breadcrumbs', 'nextgen_basic_templates_template');
|
534 |
}
|
535 |
/**
|
536 |
* Renders the Gallery Display Type field
|
@@ -553,6 +660,10 @@ class Mixin_NextGen_Basic_Album_Form extends Mixin_Display_Type_Form
|
|
553 |
{
|
554 |
return $this->_render_radio_field($display_type, 'enable_breadcrumbs', __('Enable breadcrumbs', 'nggallery'), isset($display_type->settings['enable_breadcrumbs']) ? $display_type->settings['enable_breadcrumbs'] : FALSE);
|
555 |
}
|
|
|
|
|
|
|
|
|
556 |
}
|
557 |
class A_NextGen_Basic_Extended_Album_Form extends Mixin_NextGen_Basic_Album_Form
|
558 |
{
|
47 |
$ds = $displayed_gallery->display_settings;
|
48 |
if (!empty($entities) && !empty($ds['template']) && $this->are_breadcrumbs_enabled($ds)) {
|
49 |
if ($gallery_id) {
|
50 |
+
if (is_array($gallery_id)) {
|
51 |
+
$ids = $gallery_id;
|
52 |
+
} else {
|
53 |
+
$ids = array($gallery_id);
|
54 |
+
}
|
55 |
} elseif (!empty($ds['original_album_id'])) {
|
56 |
$ids = $ds['original_album_id'];
|
57 |
} else {
|
100 |
if (is_array($gallery_id)) {
|
101 |
$gallery_id = array_shift($gallery_id);
|
102 |
}
|
103 |
+
if (is_array($gallery_id)) {
|
104 |
+
$gallery_id = $gallery_id[0];
|
105 |
+
}
|
106 |
foreach ($entities as $ndx => $entity) {
|
107 |
$tmpid = (isset($entity->albumdesc) ? 'a' : '') . $entity->{$entity->id_field};
|
108 |
$this->breadcrumb_cache[$tmpid] = $entity;
|
182 |
return $view->render(TRUE);
|
183 |
}
|
184 |
}
|
185 |
+
class A_NextGen_Album_Descriptions extends Mixin
|
186 |
+
{
|
187 |
+
// When viewing a child gallery the album controller's add_description_to_legacy_templates() method will be
|
188 |
+
// called for the gallery and then again for the root album; we only want to run once
|
189 |
+
public static $_description_added_once = FALSE;
|
190 |
+
public function are_descriptions_enabled($display_settings)
|
191 |
+
{
|
192 |
+
$retval = FALSE;
|
193 |
+
if (isset($display_settings['enable_descriptions']) && $display_settings['enable_descriptions']) {
|
194 |
+
$retval = TRUE;
|
195 |
+
} elseif (isset($display_settings['original_settings']) && $this->are_descriptions_enabled($display_settings['original_settings'])) {
|
196 |
+
$retval = TRUE;
|
197 |
+
}
|
198 |
+
return $retval;
|
199 |
+
}
|
200 |
+
public function render_object()
|
201 |
+
{
|
202 |
+
$root_element = $this->call_parent('render_object');
|
203 |
+
if ($displayed_gallery = $this->object->get_param('displayed_gallery')) {
|
204 |
+
$ds = $displayed_gallery->display_settings;
|
205 |
+
if ($this->are_descriptions_enabled($ds)) {
|
206 |
+
$description = $this->object->generate_description($displayed_gallery);
|
207 |
+
foreach ($root_element->find('nextgen_gallery.gallery_container', TRUE) as $container) {
|
208 |
+
// Determine where (to be compatible with breadcrumbs) in the container to insert
|
209 |
+
$pos = 0;
|
210 |
+
foreach ($container->_list as $ndx => $item) {
|
211 |
+
if (is_string($item)) {
|
212 |
+
$pos = $ndx;
|
213 |
+
} else {
|
214 |
+
break;
|
215 |
+
}
|
216 |
+
}
|
217 |
+
$container->insert($description, $pos);
|
218 |
+
}
|
219 |
+
}
|
220 |
+
}
|
221 |
+
return $root_element;
|
222 |
+
}
|
223 |
+
public function render_legacy_template_description($displayed_gallery)
|
224 |
+
{
|
225 |
+
if (!empty($displayed_gallery->display_settings['template']) && $this->are_descriptions_enabled($displayed_gallery->display_settings)) {
|
226 |
+
return $this->object->generate_description($displayed_gallery);
|
227 |
+
} else {
|
228 |
+
return '';
|
229 |
+
}
|
230 |
+
}
|
231 |
+
public function generate_description($displayed_gallery)
|
232 |
+
{
|
233 |
+
if (self::$_description_added_once) {
|
234 |
+
return '';
|
235 |
+
}
|
236 |
+
self::$_description_added_once = TRUE;
|
237 |
+
$description = $this->get_description($displayed_gallery);
|
238 |
+
$view = new C_MVC_View('photocrati-nextgen_basic_album#descriptions', array('description' => $description));
|
239 |
+
return $view->render(TRUE);
|
240 |
+
}
|
241 |
+
public function get_description($displayed_gallery)
|
242 |
+
{
|
243 |
+
$description = '';
|
244 |
+
// Important: do not array_shift() $displayed_gallery->container_ids as it will affect breadcrumbs
|
245 |
+
$container_ids = $displayed_gallery->container_ids;
|
246 |
+
if ($displayed_gallery->source == 'galleries') {
|
247 |
+
$gallery_id = array_shift($container_ids);
|
248 |
+
$gallery = C_Gallery_Mapper::get_instance()->find($gallery_id);
|
249 |
+
if ($gallery && !empty($gallery->galdesc)) {
|
250 |
+
$description = $gallery->galdesc;
|
251 |
+
}
|
252 |
+
} else {
|
253 |
+
if ($displayed_gallery->source == 'albums') {
|
254 |
+
$album_id = array_shift($container_ids);
|
255 |
+
$album = C_Album_Mapper::get_instance()->find($album_id);
|
256 |
+
if ($album && !empty($album->albumdesc)) {
|
257 |
+
$description = $album->albumdesc;
|
258 |
+
}
|
259 |
+
}
|
260 |
+
}
|
261 |
+
return $description;
|
262 |
+
}
|
263 |
+
}
|
264 |
/**
|
265 |
* Provides validation for NextGen Basic Albums
|
266 |
*/
|
310 |
// Try finding the gallery by slug first. If nothing is found, we assume that
|
311 |
// the user passed in a gallery id instead
|
312 |
$mapper = C_Gallery_Mapper::get_instance();
|
313 |
+
$tmp = $mapper->select()->where(array('slug = %s', $gallery))->limit(1)->run_query();
|
314 |
+
$result = reset($tmp);
|
315 |
+
unset($tmp);
|
316 |
if ($result) {
|
317 |
$gallery = $result->{$result->id_field};
|
318 |
}
|
321 |
if (!empty($display_settings['gallery_display_template'])) {
|
322 |
$gallery_params['template'] = $display_settings['gallery_display_template'];
|
323 |
}
|
324 |
+
add_filter('ngg_displayed_gallery_rendering', array($this, 'add_description_to_legacy_templates'), 8, 2);
|
325 |
+
add_filter('ngg_displayed_gallery_rendering', array($this, 'add_breadcrumbs_to_legacy_templates'), 9, 2);
|
326 |
$output = $renderer->display_images($gallery_params, $return);
|
327 |
remove_filter('ngg_displayed_gallery_rendering', array($this, 'add_breadcrumbs_to_legacy_templates'));
|
328 |
+
remove_filter('ngg_displayed_gallery_rendering', array($this, 'add_description_to_legacy_templates'));
|
329 |
return $output;
|
330 |
} else {
|
331 |
if ($album = $this->param('album')) {
|
332 |
$mapper = C_Album_Mapper::get_instance();
|
333 |
+
$result = $mapper->select()->where(array('slug = %s', $album))->limit(1)->run_query();
|
334 |
+
$result = array_pop($result);
|
335 |
$album_sub = $result ? $result->{$result->id_field} : null;
|
336 |
if ($album_sub != null) {
|
337 |
$album = $album_sub;
|
353 |
// If there are entities to be displayed
|
354 |
if ($entities) {
|
355 |
$pagination_result = $this->object->create_pagination($current_page, $displayed_gallery->get_entity_count(), $display_settings['galleries_per_page'], urldecode($this->object->param('ajax_pagination_referrer')));
|
356 |
+
if (!empty($display_settings['template']) && $display_settings['template'] != 'default') {
|
357 |
// Add additional parameters
|
358 |
$this->object->remove_param('ajax_pagination_referrer');
|
359 |
$display_settings['current_page'] = $current_page;
|
361 |
$display_settings['pagination_prev'] = $pagination_result['prev'];
|
362 |
$display_settings['pagination_next'] = $pagination_result['next'];
|
363 |
$display_settings['pagination'] = $pagination_result['output'];
|
364 |
+
// Legacy templates lack a good way of injecting content at the right time
|
365 |
$this->object->add_mixin('A_NextGen_Album_Breadcrumbs');
|
366 |
+
$this->object->add_mixin('A_NextGen_Album_Descriptions');
|
367 |
$breadcrumbs = $this->object->render_legacy_template_breadcrumbs($displayed_gallery, $entities);
|
368 |
+
$description = $this->object->render_legacy_template_description($displayed_gallery);
|
369 |
// Render legacy template
|
370 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
371 |
$display_settings = $this->prepare_legacy_album_params($displayed_gallery->get_entity(), $display_settings);
|
372 |
$retval = $this->object->legacy_render($display_settings['template'], $display_settings, $return, 'album');
|
373 |
+
if (!empty($description)) {
|
374 |
+
$retval = $description . $retval;
|
375 |
+
}
|
376 |
if (!empty($breadcrumbs)) {
|
377 |
$retval = $breadcrumbs . $retval;
|
378 |
}
|
414 |
}
|
415 |
return $html;
|
416 |
}
|
417 |
+
public function add_description_to_legacy_templates($html, $displayed_gallery)
|
418 |
+
{
|
419 |
+
$this->object->add_mixin('A_NextGen_Album_Descriptions');
|
420 |
+
$description = $this->object->render_legacy_template_description($displayed_gallery);
|
421 |
+
if (!empty($description)) {
|
422 |
+
$html = $description . $html;
|
423 |
+
}
|
424 |
+
return $html;
|
425 |
+
}
|
426 |
/**
|
427 |
* Gets the parent album for the entity being displayed
|
428 |
* @param int $entity_id
|
547 |
$this->object->_set_default_value($entity, 'settings', 'galleries_per_page', $settings->galPagedGalleries);
|
548 |
$this->object->_set_default_value($entity, 'settings', 'enable_breadcrumbs', 1);
|
549 |
$this->object->_set_default_value($entity, 'settings', 'disable_pagination', 0);
|
550 |
+
$this->object->_set_default_value($entity, 'settings', 'enable_descriptions', 0);
|
551 |
$this->object->_set_default_value($entity, 'settings', 'template', '');
|
552 |
// Thumbnail dimensions -- only used by extended albums
|
553 |
if ($entity->name == NGG_BASIC_EXTENDED_ALBUM) {
|
637 |
{
|
638 |
public function _get_field_names()
|
639 |
{
|
640 |
+
return array('nextgen_basic_album_gallery_display_type', 'nextgen_basic_album_galleries_per_page', 'nextgen_basic_album_enable_breadcrumbs', 'nextgen_basic_templates_template', 'nextgen_basic_album_enable_descriptions');
|
641 |
}
|
642 |
/**
|
643 |
* Renders the Gallery Display Type field
|
660 |
{
|
661 |
return $this->_render_radio_field($display_type, 'enable_breadcrumbs', __('Enable breadcrumbs', 'nggallery'), isset($display_type->settings['enable_breadcrumbs']) ? $display_type->settings['enable_breadcrumbs'] : FALSE);
|
662 |
}
|
663 |
+
public function _render_nextgen_basic_album_enable_descriptions_field($display_type)
|
664 |
+
{
|
665 |
+
return $this->_render_radio_field($display_type, 'enable_descriptions', __('Display descriptions', 'nggallery'), $display_type->settings['enable_descriptions']);
|
666 |
+
}
|
667 |
}
|
668 |
class A_NextGen_Basic_Extended_Album_Form extends Mixin_NextGen_Basic_Album_Form
|
669 |
{
|
products/photocrati_nextgen/modules/nextgen_basic_album/templates/descriptions.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php if (!empty($description)) { ?>
|
2 |
+
<p><?php echo $description; ?></p>
|
3 |
+
<?php } ?>
|
products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php
CHANGED
@@ -25,7 +25,7 @@ class M_NextGen_Basic_Gallery extends C_Base_Module
|
|
25 |
'photocrati-nextgen_basic_gallery',
|
26 |
'NextGEN Basic Gallery',
|
27 |
"Provides NextGEN Gallery's basic thumbnail/slideshow integrated gallery",
|
28 |
-
'0.
|
29 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
30 |
'Photocrati Media',
|
31 |
'https://www.imagely.com'
|
25 |
'photocrati-nextgen_basic_gallery',
|
26 |
'NextGEN Basic Gallery',
|
27 |
"Provides NextGEN Gallery's basic thumbnail/slideshow integrated gallery",
|
28 |
+
'0.14',
|
29 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
30 |
'Photocrati Media',
|
31 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_basic_gallery/package.module.nextgen_basic_gallery.php
CHANGED
@@ -501,7 +501,7 @@ class A_NextGen_Basic_Thumbnails_Controller extends Mixin
|
|
501 |
$effect_code = $this->object->get_effect_code($displayed_gallery);
|
502 |
}
|
503 |
// The render functions require different processing
|
504 |
-
if (!empty($display_settings['template'])) {
|
505 |
$this->object->add_mixin('A_NextGen_Basic_Template_Form');
|
506 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
507 |
$params = $this->object->prepare_legacy_parameters($images, $displayed_gallery, array('next' => empty($pagination_next) ? FALSE : $pagination_next, 'prev' => empty($pagination_prev) ? FALSE : $pagination_prev, 'pagination' => $pagination, 'slideshow_link' => $slideshow_link, 'effect_code' => $effect_code));
|
501 |
$effect_code = $this->object->get_effect_code($displayed_gallery);
|
502 |
}
|
503 |
// The render functions require different processing
|
504 |
+
if (!empty($display_settings['template']) && $display_settings['template'] != 'default') {
|
505 |
$this->object->add_mixin('A_NextGen_Basic_Template_Form');
|
506 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
507 |
$params = $this->object->prepare_legacy_parameters($images, $displayed_gallery, array('next' => empty($pagination_next) ? FALSE : $pagination_next, 'prev' => empty($pagination_prev) ? FALSE : $pagination_prev, 'pagination' => $pagination, 'slideshow_link' => $slideshow_link, 'effect_code' => $effect_code));
|
products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/module.nextgen_basic_imagebrowser.php
CHANGED
@@ -19,7 +19,7 @@ class M_NextGen_Basic_ImageBrowser extends C_Base_Module
|
|
19 |
'photocrati-nextgen_basic_imagebrowser',
|
20 |
'NextGEN Basic ImageBrowser',
|
21 |
'Provides the NextGEN Basic ImageBrowser Display Type',
|
22 |
-
'0.
|
23 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
24 |
'Photocrati Media',
|
25 |
'https://www.imagely.com'
|
19 |
'photocrati-nextgen_basic_imagebrowser',
|
20 |
'NextGEN Basic ImageBrowser',
|
21 |
'Provides the NextGEN Basic ImageBrowser Display Type',
|
22 |
+
'0.11',
|
23 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
24 |
'Photocrati Media',
|
25 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_basic_imagebrowser/package.module.nextgen_basic_imagebrowser.php
CHANGED
@@ -113,7 +113,7 @@ class A_NextGen_Basic_ImageBrowser_Controller extends Mixin
|
|
113 |
if (!empty($_POST['ajax_referrer'])) {
|
114 |
$displayed_gallery->display_settings['ngg_triggers_display'] = 'never';
|
115 |
}
|
116 |
-
if (!empty($display_settings['template'])) {
|
117 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
118 |
$picture->href_link = $picture->get_href_link();
|
119 |
$picture->previous_image_link = $prev_image_link;
|
113 |
if (!empty($_POST['ajax_referrer'])) {
|
114 |
$displayed_gallery->display_settings['ngg_triggers_display'] = 'never';
|
115 |
}
|
116 |
+
if (!empty($display_settings['template']) && $display_settings['template'] != 'default') {
|
117 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
118 |
$picture->href_link = $picture->get_href_link();
|
119 |
$picture->previous_image_link = $prev_image_link;
|
products/photocrati_nextgen/modules/nextgen_basic_singlepic/module.nextgen_basic_singlepic.php
CHANGED
@@ -17,7 +17,7 @@ class M_NextGen_Basic_Singlepic extends C_Base_Module
|
|
17 |
NGG_BASIC_SINGLEPIC,
|
18 |
'NextGen Basic Singlepic',
|
19 |
'Provides a singlepic gallery for NextGEN Gallery',
|
20 |
-
'0.
|
21 |
'https://www.imagely.com',
|
22 |
'Photocrati Media',
|
23 |
'https://www.imagely.com'
|
17 |
NGG_BASIC_SINGLEPIC,
|
18 |
'NextGen Basic Singlepic',
|
19 |
'Provides a singlepic gallery for NextGEN Gallery',
|
20 |
+
'0.12',
|
21 |
'https://www.imagely.com',
|
22 |
'Photocrati Media',
|
23 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_basic_singlepic/package.module.nextgen_basic_singlepic.php
CHANGED
@@ -90,7 +90,7 @@ class A_NextGen_Basic_Singlepic_Controller extends Mixin
|
|
90 |
$size = $dynthumbs->get_size_name($params);
|
91 |
}
|
92 |
$thumbnail_url = $storage->get_image_url($image, $size);
|
93 |
-
if (!empty($display_settings['template'])) {
|
94 |
$this->object->add_mixin('A_NextGen_Basic_Template_Form');
|
95 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
96 |
$params = $this->object->prepare_legacy_parameters(array($image), $displayed_gallery, array('single_image' => TRUE));
|
90 |
$size = $dynthumbs->get_size_name($params);
|
91 |
}
|
92 |
$thumbnail_url = $storage->get_image_url($image, $size);
|
93 |
+
if (!empty($display_settings['template']) && $display_settings['template'] != 'default') {
|
94 |
$this->object->add_mixin('A_NextGen_Basic_Template_Form');
|
95 |
$this->object->add_mixin('Mixin_NextGen_Basic_Templates');
|
96 |
$params = $this->object->prepare_legacy_parameters(array($image), $displayed_gallery, array('single_image' => TRUE));
|
products/photocrati_nextgen/modules/nextgen_basic_templates/module.nextgen_basic_templates.php
CHANGED
@@ -15,7 +15,7 @@ class M_NextGen_Basic_Templates extends C_Base_Module
|
|
15 |
'photocrati-nextgen_basic_templates',
|
16 |
'NextGen Basic Templates',
|
17 |
'Provides a NextGen-Legacy compatible thumbnail gallery for NextGEN Gallery',
|
18 |
-
'0.
|
19 |
'https://www.imagely.com',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
15 |
'photocrati-nextgen_basic_templates',
|
16 |
'NextGen Basic Templates',
|
17 |
'Provides a NextGen-Legacy compatible thumbnail gallery for NextGEN Gallery',
|
18 |
+
'0.6',
|
19 |
'https://www.imagely.com',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_basic_templates/package.module.nextgen_basic_templates.php
CHANGED
@@ -37,6 +37,8 @@ class A_NextGen_Basic_Template_Form extends Mixin
|
|
37 |
if (!isset($templates[$display_type->settings['template']])) {
|
38 |
$templates[$display_type->settings['template']] = $display_type->settings['template'];
|
39 |
}
|
|
|
|
|
40 |
return $this->object->render_partial('photocrati-nextgen_basic_templates#nextgen_basic_templates_settings_template', array('display_type_name' => $display_type->name, 'template_label' => __('Template', 'nggallery'), 'template_text' => __('Use a legacy template when rendering (not recommended).', 'nggallery'), 'chosen_file' => $display_type->settings['template'], 'templates' => $templates), True);
|
41 |
}
|
42 |
/**
|
37 |
if (!isset($templates[$display_type->settings['template']])) {
|
38 |
$templates[$display_type->settings['template']] = $display_type->settings['template'];
|
39 |
}
|
40 |
+
// add <default> template that acts the same way as having no template specified
|
41 |
+
$templates['default'] = __('Default', 'nggallery');
|
42 |
return $this->object->render_partial('photocrati-nextgen_basic_templates#nextgen_basic_templates_settings_template', array('display_type_name' => $display_type->name, 'template_label' => __('Template', 'nggallery'), 'template_text' => __('Use a legacy template when rendering (not recommended).', 'nggallery'), 'chosen_file' => $display_type->settings['template'], 'templates' => $templates), True);
|
43 |
}
|
44 |
/**
|
products/photocrati_nextgen/modules/nextgen_basic_templates/templates/nextgen_basic_templates_settings_template.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
<select name='<?php echo esc_attr($display_type_name); ?>[template]'
|
12 |
id='<?php echo esc_attr($display_type_name); ?>_template>'
|
13 |
class='ngg_thumbnail_template ngg_settings_template'>
|
14 |
-
<option></option>
|
15 |
<?php foreach ($templates as $file => $label): ?>
|
16 |
<?php if ($file && $label): ?>
|
17 |
<option value="<?php echo esc_attr($file) ?>" <?php selected($chosen_file, $file, TRUE); ?>><?php esc_html_e($label); ?></option>
|
11 |
<select name='<?php echo esc_attr($display_type_name); ?>[template]'
|
12 |
id='<?php echo esc_attr($display_type_name); ?>_template>'
|
13 |
class='ngg_thumbnail_template ngg_settings_template'>
|
14 |
+
<option></option>
|
15 |
<?php foreach ($templates as $file => $label): ?>
|
16 |
<?php if ($file && $label): ?>
|
17 |
<option value="<?php echo esc_attr($file) ?>" <?php selected($chosen_file, $file, TRUE); ?>><?php esc_html_e($label); ?></option>
|
products/photocrati_nextgen/modules/nextgen_data/module.nextgen_data.php
CHANGED
@@ -15,7 +15,7 @@ class M_NextGen_Data extends C_Base_Module
|
|
15 |
'photocrati-nextgen-data',
|
16 |
'NextGEN Data Tier',
|
17 |
"Provides a data tier for NextGEN gallery based on the DataMapper module",
|
18 |
-
'0.
|
19 |
'https://www.imagely.com',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
15 |
'photocrati-nextgen-data',
|
16 |
'NextGEN Data Tier',
|
17 |
"Provides a data tier for NextGEN gallery based on the DataMapper module",
|
18 |
+
'0.11',
|
19 |
'https://www.imagely.com',
|
20 |
'Photocrati Media',
|
21 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php
CHANGED
@@ -268,7 +268,7 @@ class C_Gallery extends C_DataMapper_Model
|
|
268 |
* Defines the interfaces and methods (through extensions and hooks)
|
269 |
* that this class provides
|
270 |
*/
|
271 |
-
public function define($properties, $mapper = FALSE, $context = FALSE)
|
272 |
{
|
273 |
parent::define($mapper, $properties, $context);
|
274 |
$this->add_mixin('Mixin_NextGen_Gallery_Validation');
|
@@ -519,11 +519,11 @@ class C_GalleryStorage_Base extends C_Component
|
|
519 |
class C_Gallery_Storage extends C_GalleryStorage_Base
|
520 |
{
|
521 |
public static $_instances = array();
|
522 |
-
public function define($
|
523 |
{
|
524 |
parent::define($context);
|
525 |
$this->add_mixin('Mixin_GalleryStorage');
|
526 |
-
$this->wrap('I_GalleryStorage_Driver', array(&$this, '_get_driver'),
|
527 |
$this->implement('I_Gallery_Storage');
|
528 |
}
|
529 |
static function get_instance($context = False)
|
@@ -538,13 +538,11 @@ class C_Gallery_Storage extends C_GalleryStorage_Base
|
|
538 |
* @param array $args
|
539 |
* @return mixed
|
540 |
*/
|
541 |
-
public function _get_driver($
|
542 |
{
|
543 |
-
$object_name = $args[0];
|
544 |
-
$context = $args[1];
|
545 |
$factory_method = $this->_get_driver_factory_method($context);
|
546 |
$factory = C_Component_Factory::get_instance();
|
547 |
-
return $factory->create($factory_method,
|
548 |
}
|
549 |
}
|
550 |
class E_UploadException extends E_NggErrorException
|
@@ -1679,6 +1677,10 @@ class Mixin_GalleryStorage_Driver_Base extends Mixin
|
|
1679 |
}
|
1680 |
if (is_null($thumbnail)) {
|
1681 |
$thumbnail = new C_NggLegacy_Thumbnail($destpath, true);
|
|
|
|
|
|
|
|
|
1682 |
} else {
|
1683 |
$thumbnail->fileName = $destpath;
|
1684 |
}
|
@@ -1738,7 +1740,7 @@ class Mixin_GalleryStorage_Driver_Base extends Mixin
|
|
1738 |
class C_GalleryStorage_Driver_Base extends C_GalleryStorage_Base
|
1739 |
{
|
1740 |
public static $_instances = array();
|
1741 |
-
public function define($context)
|
1742 |
{
|
1743 |
parent::define($context);
|
1744 |
$this->add_mixin('Mixin_GalleryStorage_Driver_Base');
|
@@ -3022,7 +3024,7 @@ class Mixin_NggLegacy_GalleryStorage_Driver extends Mixin
|
|
3022 |
} elseif (isset($gallery->slug)) {
|
3023 |
$fs = C_Fs::get_instance();
|
3024 |
$basepath = C_NextGen_Settings::get_instance()->gallerypath;
|
3025 |
-
$retval = $fs->join_paths($basepath, $gallery->slug);
|
3026 |
}
|
3027 |
}
|
3028 |
$root_type = defined('NGG_GALLERY_ROOT_TYPE') ? NGG_GALLERY_ROOT_TYPE : 'site';
|
@@ -3922,19 +3924,35 @@ class C_NggLegacy_Thumbnail
|
|
3922 |
}
|
3923 |
//initialize resources if no errors
|
3924 |
if ($this->error == false) {
|
|
|
3925 |
switch ($this->format) {
|
3926 |
case 'GIF':
|
3927 |
-
|
|
|
|
|
|
|
|
|
3928 |
break;
|
3929 |
case 'JPG':
|
3930 |
-
|
|
|
|
|
|
|
|
|
3931 |
break;
|
3932 |
case 'PNG':
|
3933 |
-
|
|
|
|
|
|
|
|
|
3934 |
break;
|
3935 |
}
|
3936 |
if (!$this->oldImage) {
|
3937 |
-
$
|
|
|
|
|
|
|
3938 |
$this->error = true;
|
3939 |
} else {
|
3940 |
$size = GetImageSize($this->fileName);
|
@@ -4504,7 +4522,7 @@ class C_NggLegacy_Thumbnail
|
|
4504 |
// attempt adding a new word until the width is too large; then start a new line and start again
|
4505 |
foreach ($words as $word) {
|
4506 |
// sanitize the text being input; imagettftext() can be sensitive
|
4507 |
-
$TextSize = $this->ImageTTFBBoxDimensions($wmSize, 0, $wmFontPath, $line . preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), mb_convert_encoding($word, 'HTML-ENTITIES', 'UTF-8')));
|
4508 |
if ($watermark_image_width == 0) {
|
4509 |
$watermark_image_width = $TextSize['width'];
|
4510 |
}
|
@@ -4520,7 +4538,7 @@ class C_NggLegacy_Thumbnail
|
|
4520 |
}
|
4521 |
$lines[] = trim($line);
|
4522 |
// use this string to determine our largest possible line height
|
4523 |
-
$line_dimensions = $this->ImageTTFBBoxDimensions($wmSize, 0, $wmFontPath, 'MXQJALYmxqjabdfghjklpqry019`@$^&*(,!132');
|
4524 |
$line_height = $line_dimensions['height'] * 1.05;
|
4525 |
// Create an image to apply our text to
|
4526 |
$this->workingImage = ImageCreateTrueColor($watermark_image_width, count($lines) * $line_height);
|
@@ -4534,12 +4552,28 @@ class C_NggLegacy_Thumbnail
|
|
4534 |
// Put text on the image, line-by-line
|
4535 |
$y_pos = $wmSize;
|
4536 |
foreach ($lines as $line) {
|
4537 |
-
imagettftext($this->workingImage, $wmSize, 0, 0, $y_pos, $TextColor, $wmFontPath, $line);
|
4538 |
$y_pos += $line_height;
|
4539 |
}
|
4540 |
$this->watermarkImgPath = $this->workingImage;
|
4541 |
return;
|
4542 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4543 |
/**
|
4544 |
* Calculates the width & height dimensions of ImageTTFBBox().
|
4545 |
*
|
@@ -4552,7 +4586,7 @@ class C_NggLegacy_Thumbnail
|
|
4552 |
*/
|
4553 |
public function ImageTTFBBoxDimensions($wmSize, $fontAngle, $wmFontPath, $text)
|
4554 |
{
|
4555 |
-
$box = @ImageTTFBBox($wmSize, $fontAngle, $wmFontPath, $text)
|
4556 |
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
4557 |
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
4558 |
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
268 |
* Defines the interfaces and methods (through extensions and hooks)
|
269 |
* that this class provides
|
270 |
*/
|
271 |
+
public function define($properties = array(), $mapper = FALSE, $context = FALSE)
|
272 |
{
|
273 |
parent::define($mapper, $properties, $context);
|
274 |
$this->add_mixin('Mixin_NextGen_Gallery_Validation');
|
519 |
class C_Gallery_Storage extends C_GalleryStorage_Base
|
520 |
{
|
521 |
public static $_instances = array();
|
522 |
+
public function define($context = FALSE)
|
523 |
{
|
524 |
parent::define($context);
|
525 |
$this->add_mixin('Mixin_GalleryStorage');
|
526 |
+
$this->wrap('I_GalleryStorage_Driver', array(&$this, '_get_driver'), $context);
|
527 |
$this->implement('I_Gallery_Storage');
|
528 |
}
|
529 |
static function get_instance($context = False)
|
538 |
* @param array $args
|
539 |
* @return mixed
|
540 |
*/
|
541 |
+
public function _get_driver($context)
|
542 |
{
|
|
|
|
|
543 |
$factory_method = $this->_get_driver_factory_method($context);
|
544 |
$factory = C_Component_Factory::get_instance();
|
545 |
+
return $factory->create($factory_method, FALSE, $context);
|
546 |
}
|
547 |
}
|
548 |
class E_UploadException extends E_NggErrorException
|
1677 |
}
|
1678 |
if (is_null($thumbnail)) {
|
1679 |
$thumbnail = new C_NggLegacy_Thumbnail($destpath, true);
|
1680 |
+
if ($thumbnail->error) {
|
1681 |
+
$thumbnail = null;
|
1682 |
+
return null;
|
1683 |
+
}
|
1684 |
} else {
|
1685 |
$thumbnail->fileName = $destpath;
|
1686 |
}
|
1740 |
class C_GalleryStorage_Driver_Base extends C_GalleryStorage_Base
|
1741 |
{
|
1742 |
public static $_instances = array();
|
1743 |
+
public function define($context = FALSE)
|
1744 |
{
|
1745 |
parent::define($context);
|
1746 |
$this->add_mixin('Mixin_GalleryStorage_Driver_Base');
|
3024 |
} elseif (isset($gallery->slug)) {
|
3025 |
$fs = C_Fs::get_instance();
|
3026 |
$basepath = C_NextGen_Settings::get_instance()->gallerypath;
|
3027 |
+
$retval = $fs->join_paths($basepath, sanitize_file_name(sanitize_title($gallery->slug)));
|
3028 |
}
|
3029 |
}
|
3030 |
$root_type = defined('NGG_GALLERY_ROOT_TYPE') ? NGG_GALLERY_ROOT_TYPE : 'site';
|
3924 |
}
|
3925 |
//initialize resources if no errors
|
3926 |
if ($this->error == false) {
|
3927 |
+
$img_err = null;
|
3928 |
switch ($this->format) {
|
3929 |
case 'GIF':
|
3930 |
+
if (function_exists('ImageCreateFromGif')) {
|
3931 |
+
$this->oldImage = @ImageCreateFromGif($this->fileName);
|
3932 |
+
} else {
|
3933 |
+
$img_err = __('Support for GIF format is missing.', 'nggallery');
|
3934 |
+
}
|
3935 |
break;
|
3936 |
case 'JPG':
|
3937 |
+
if (function_exists('ImageCreateFromJpeg')) {
|
3938 |
+
$this->oldImage = @ImageCreateFromJpeg($this->fileName);
|
3939 |
+
} else {
|
3940 |
+
$img_err = __('Support for JPEG format is missing.', 'nggallery');
|
3941 |
+
}
|
3942 |
break;
|
3943 |
case 'PNG':
|
3944 |
+
if (function_exists('ImageCreateFromPng')) {
|
3945 |
+
$this->oldImage = @ImageCreateFromPng($this->fileName);
|
3946 |
+
} else {
|
3947 |
+
$img_err = __('Support for PNG format is missing.', 'nggallery');
|
3948 |
+
}
|
3949 |
break;
|
3950 |
}
|
3951 |
if (!$this->oldImage) {
|
3952 |
+
if ($img_err == null) {
|
3953 |
+
$img_err = __('Check memory limit', 'nggallery');
|
3954 |
+
}
|
3955 |
+
$this->errmsg = sprintf(__('Create Image failed. %1$s', 'nggallery'), $img_err);
|
3956 |
$this->error = true;
|
3957 |
} else {
|
3958 |
$size = GetImageSize($this->fileName);
|
4522 |
// attempt adding a new word until the width is too large; then start a new line and start again
|
4523 |
foreach ($words as $word) {
|
4524 |
// sanitize the text being input; imagettftext() can be sensitive
|
4525 |
+
$TextSize = $this->ImageTTFBBoxDimensions($wmSize, 0, $this->correct_gd_unc_path($wmFontPath), $line . preg_replace('~^(&([a-zA-Z0-9]);)~', htmlentities('${1}'), mb_convert_encoding($word, 'HTML-ENTITIES', 'UTF-8')));
|
4526 |
if ($watermark_image_width == 0) {
|
4527 |
$watermark_image_width = $TextSize['width'];
|
4528 |
}
|
4538 |
}
|
4539 |
$lines[] = trim($line);
|
4540 |
// use this string to determine our largest possible line height
|
4541 |
+
$line_dimensions = $this->ImageTTFBBoxDimensions($wmSize, 0, $this->correct_gd_unc_path($wmFontPath), 'MXQJALYmxqjabdfghjklpqry019`@$^&*(,!132');
|
4542 |
$line_height = $line_dimensions['height'] * 1.05;
|
4543 |
// Create an image to apply our text to
|
4544 |
$this->workingImage = ImageCreateTrueColor($watermark_image_width, count($lines) * $line_height);
|
4552 |
// Put text on the image, line-by-line
|
4553 |
$y_pos = $wmSize;
|
4554 |
foreach ($lines as $line) {
|
4555 |
+
imagettftext($this->workingImage, $wmSize, 0, 0, $y_pos, $TextColor, $this->correct_gd_unc_path($wmFontPath), $line);
|
4556 |
$y_pos += $line_height;
|
4557 |
}
|
4558 |
$this->watermarkImgPath = $this->workingImage;
|
4559 |
return;
|
4560 |
}
|
4561 |
+
/**
|
4562 |
+
* Returns a path that can be used with imagettftext() and ImageTTFBBox()
|
4563 |
+
*
|
4564 |
+
* imagettftext() and ImageTTFBBox() cannot load resources from Windows UNC paths
|
4565 |
+
* and require they be mangled to be like //server\filename instead of \\server\filename
|
4566 |
+
* @param string $path Absolute file path
|
4567 |
+
* @return string $path Mangled absolute file path
|
4568 |
+
*/
|
4569 |
+
public function correct_gd_unc_path($path)
|
4570 |
+
{
|
4571 |
+
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && substr($path, 0, 2) === '\\\\') {
|
4572 |
+
$path = ltrim($path, '\\\\');
|
4573 |
+
$path = '//' . $path;
|
4574 |
+
}
|
4575 |
+
return $path;
|
4576 |
+
}
|
4577 |
/**
|
4578 |
* Calculates the width & height dimensions of ImageTTFBBox().
|
4579 |
*
|
4586 |
*/
|
4587 |
public function ImageTTFBBoxDimensions($wmSize, $fontAngle, $wmFontPath, $text)
|
4588 |
{
|
4589 |
+
$box = @ImageTTFBBox($wmSize, $fontAngle, $this->correct_gd_unc_path($wmFontPath), $text);
|
4590 |
$max_x = max(array($box[0], $box[2], $box[4], $box[6]));
|
4591 |
$max_y = max(array($box[1], $box[3], $box[5], $box[7]));
|
4592 |
$min_x = min(array($box[0], $box[2], $box[4], $box[6]));
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/module.nextgen_pro_upgrade.php
CHANGED
@@ -14,7 +14,7 @@ class M_NextGen_Pro_Upgrade extends C_Base_Module
|
|
14 |
'photocrati-nextgen_pro_upgrade',
|
15 |
'NextGEN Pro Page',
|
16 |
'NextGEN Gallery Pro Upgrade Page',
|
17 |
-
'0.
|
18 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
19 |
'Photocrati Media',
|
20 |
'https://www.imagely.com'
|
14 |
'photocrati-nextgen_pro_upgrade',
|
15 |
'NextGEN Pro Page',
|
16 |
'NextGEN Gallery Pro Upgrade Page',
|
17 |
+
'0.5',
|
18 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
19 |
'Photocrati Media',
|
20 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/package.module.nextgen_pro_upgrade.php
CHANGED
@@ -28,12 +28,25 @@ class A_NextGen_Pro_Upgrade_Controller extends Mixin
|
|
28 |
}
|
29 |
public function get_page_title()
|
30 |
{
|
31 |
-
return 'Upgrade to Pro';
|
32 |
}
|
33 |
public function get_required_permission()
|
34 |
{
|
35 |
return 'NextGEN Change options';
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
public function index_action()
|
38 |
{
|
39 |
$this->object->enqueue_backend_resources();
|
@@ -41,19 +54,12 @@ class A_NextGen_Pro_Upgrade_Controller extends Mixin
|
|
41 |
if ($html = C_Photocrati_Transient_Manager::fetch($key, FALSE)) {
|
42 |
echo $html;
|
43 |
} else {
|
44 |
-
// Get page content
|
45 |
$template = 'photocrati-nextgen_pro_upgrade#plus';
|
46 |
if (defined('NGG_PLUS_PLUGIN_BASENAME')) {
|
47 |
$template = 'photocrati-nextgen_pro_upgrade#pro';
|
48 |
}
|
49 |
-
$
|
50 |
-
$headline = 'Upgrade to NextGEN Plus or NextGEN Pro';
|
51 |
-
if (defined('NGG_PLUS_PLUGIN_BASENAME')) {
|
52 |
-
$description = 'NextGEN Pro now offers ecommerce! Extend NextGEN Gallery and NextGEN Plus with a complete solution for selling prints and digital downloads, including unlimited pricelists, PayPal and Stripe integration, and more.';
|
53 |
-
$headline = 'Upgrade to NextGEN Pro with Ecommerce';
|
54 |
-
}
|
55 |
-
$params = array('description' => $description, 'headline' => $headline);
|
56 |
-
$html = $this->render_view($template, $params, TRUE);
|
57 |
// Cache it
|
58 |
C_Photocrati_Transient_Manager::update($key, $html);
|
59 |
// Render it
|
28 |
}
|
29 |
public function get_page_title()
|
30 |
{
|
31 |
+
return __('Upgrade to Pro', 'nggallery');
|
32 |
}
|
33 |
public function get_required_permission()
|
34 |
{
|
35 |
return 'NextGEN Change options';
|
36 |
}
|
37 |
+
public function get_i18n_strings()
|
38 |
+
{
|
39 |
+
$i18n = new stdClass();
|
40 |
+
$i18n->plus_title = __('Upgrade to NextGEN Plus or Pro!', 'nggallery');
|
41 |
+
$i18n->pro_title = __('Upgrade to NextGEN Pro!', 'nggallery');
|
42 |
+
$i18n->plus_desc_first = __('Introducing the most powerful gallery system ever made for WordPress.', 'nggallery');
|
43 |
+
$i18n->plus_desc_second = __('Take your galleries to the next level with the Plus and Pro extensions for NextGEN Gallery. ', 'nggallery');
|
44 |
+
$i18n->pro_desc = __('NextGEN Pro now offers proofing and ecommerce! Extend NextGEN Gallery and NextGEN Plus with a complete solution for providing client galleries and for selling prints and digital downloads. Includes unlimited pricelists, PayPal and Stripe integration, and more.', 'nggallery');
|
45 |
+
$i18n->plus_button = __('Learn More About NextGEN Plus', 'nggallery');
|
46 |
+
$i18n->pro_button = __('Learn More About NextGEN Pro', 'nggallery');
|
47 |
+
$i18n->click = __('CLICK TO LEARN MORE:', 'nggallery');
|
48 |
+
return $i18n;
|
49 |
+
}
|
50 |
public function index_action()
|
51 |
{
|
52 |
$this->object->enqueue_backend_resources();
|
54 |
if ($html = C_Photocrati_Transient_Manager::fetch($key, FALSE)) {
|
55 |
echo $html;
|
56 |
} else {
|
57 |
+
// Get template and page content
|
58 |
$template = 'photocrati-nextgen_pro_upgrade#plus';
|
59 |
if (defined('NGG_PLUS_PLUGIN_BASENAME')) {
|
60 |
$template = 'photocrati-nextgen_pro_upgrade#pro';
|
61 |
}
|
62 |
+
$html = $this->render_view($template, array('i18n' => $this->get_i18n_strings()), TRUE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
// Cache it
|
64 |
C_Photocrati_Transient_Manager::update($key, $html);
|
65 |
// Render it
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/button.png
DELETED
Binary file
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/proupgrade.gif
DELETED
Binary file
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/style.css
CHANGED
@@ -1,44 +1,20 @@
|
|
1 |
-
#nextgen_pro_upgrade_page {
|
2 |
-
|
3 |
-
text-align: center;
|
4 |
}
|
5 |
|
6 |
-
#nextgen_pro_upgrade_page
|
7 |
-
font-size: 2.5em;
|
8 |
-
line-height: 1.01em;
|
9 |
-
margin-bottom: 40px;
|
10 |
text-align: center;
|
11 |
-
|
12 |
-
}
|
13 |
-
|
14 |
-
#nextgen_pro_upgrade_page hr {
|
15 |
-
width: 25%;
|
16 |
}
|
17 |
|
18 |
-
#nextgen_pro_upgrade_page
|
19 |
-
|
20 |
-
|
21 |
-
width: 65%;
|
22 |
-
margin: 0 auto;
|
23 |
-
margin-top: 2em;
|
24 |
-
margin-bottom: 2em;
|
25 |
}
|
26 |
|
27 |
-
#nextgen_pro_upgrade_page a {
|
28 |
-
font-size:
|
29 |
height: 2.8em;
|
30 |
line-height: 1.6em;
|
31 |
padding: .5em 1em .5em 1em;
|
32 |
-
min-width: 300px;
|
33 |
-
}
|
34 |
-
|
35 |
-
#nextgen_pro_upgrade_first_link {
|
36 |
-
margin-right: .5em;
|
37 |
-
}
|
38 |
-
|
39 |
-
@media only screen and (max-width: 655px) {
|
40 |
-
#nextgen_pro_upgrade_first_link {
|
41 |
-
margin-right: 0;
|
42 |
-
margin-bottom: 1em;
|
43 |
-
}
|
44 |
}
|
1 |
+
#nextgen_pro_upgrade_page.wrap.about-wrap {
|
2 |
+
margin: 60px auto;
|
|
|
3 |
}
|
4 |
|
5 |
+
#nextgen_pro_upgrade_page .centered {
|
|
|
|
|
|
|
6 |
text-align: center;
|
7 |
+
margin: 1em;
|
|
|
|
|
|
|
|
|
8 |
}
|
9 |
|
10 |
+
#nextgen_pro_upgrade_page img {
|
11 |
+
width: 600px;
|
12 |
+
max-width: 100%;
|
|
|
|
|
|
|
|
|
13 |
}
|
14 |
|
15 |
+
#nextgen_pro_upgrade_page a.button-primary {
|
16 |
+
font-size: .8em;
|
17 |
height: 2.8em;
|
18 |
line-height: 1.6em;
|
19 |
padding: .5em 1em .5em 1em;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
}
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/static/style.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#nextgen_pro_upgrade_page{
|
1 |
+
#nextgen_pro_upgrade_page.wrap.about-wrap{margin:60px auto}#nextgen_pro_upgrade_page .centered{text-align:center;margin:1em}#nextgen_pro_upgrade_page img{width:600px;max-width:100%}#nextgen_pro_upgrade_page a.button-primary{font-size:.8em;height:2.8em;line-height:1.6em;padding:.5em 1em .5em 1em}
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/index.php
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
<div id='nextgen_pro_upgrade_page'>
|
2 |
-
<h1>Upgrade to NextGen Pro</h1>
|
3 |
-
|
4 |
-
<div id='first'>
|
5 |
-
<div class='section'>
|
6 |
-
<h2>Add Beautiful, Mobile-Friendly<br/>Displays to NextGEN Gallery</h2>
|
7 |
-
<ul>
|
8 |
-
<li>Enjoy 6 gorgeous new gallery display types, our new</li>
|
9 |
-
<li>full screen and responsive Pro Lightbox, commenting,</li>
|
10 |
-
<li>social sharing, deep linking to individual images</li>
|
11 |
-
<li>within galleries, and premium one-on-one support</li>
|
12 |
-
<li>for both NextGEN Gallery and NextGEN Pro.</li>
|
13 |
-
</ul>
|
14 |
-
|
15 |
-
<a href='https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/' target='_blank'>
|
16 |
-
<img src='<?php print $btn_url; ?>' alt='Learn More' title='Learn More'/>
|
17 |
-
</a>
|
18 |
-
</div>
|
19 |
-
|
20 |
-
<div id='image_wrapper'>
|
21 |
-
<img src='<?php print $img_url; ?>' alt='' title=''/>
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
|
25 |
-
<div id='second'>
|
26 |
-
<div class='section'>
|
27 |
-
<h3>6 New Gallery Displays!</h3>
|
28 |
-
<ul>
|
29 |
-
<li>Pro Masonry Galleries</li>
|
30 |
-
<li>Pro Filmstrip Galleries</li>
|
31 |
-
<li>Pro Filmbox Galleries</li>
|
32 |
-
<li>Pro Thumbnail Galleries</li>
|
33 |
-
<li>Pro Slideshow Galleries</li>
|
34 |
-
<li>Pro Blogstyle Galleries</li>
|
35 |
-
<li>All responsive!</li>
|
36 |
-
</ul>
|
37 |
-
</div>
|
38 |
-
|
39 |
-
<div class='section'>
|
40 |
-
<h3>Pro Lightbox</h3>
|
41 |
-
<ul>
|
42 |
-
<li>Fullscreen and Responsive</li>
|
43 |
-
<li>Social Sharing for Images</li>
|
44 |
-
<li>Commenting for Images</li>
|
45 |
-
<li>Deep Linking for Images</li>
|
46 |
-
<li>Swipe Support for Mobile</li>
|
47 |
-
</ul>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<div class='section'>
|
51 |
-
<h3>Premium Support</h3>
|
52 |
-
<ul>
|
53 |
-
<li>One-on-One Email Support</li>
|
54 |
-
<li>From the NextGEN Team for Both</li>
|
55 |
-
<li>NextGEN Gallery and NextGEN Pro</li>
|
56 |
-
</ul>
|
57 |
-
</div>
|
58 |
-
</div>
|
59 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/plus.php
CHANGED
@@ -1,17 +1,21 @@
|
|
1 |
-
<div id='nextgen_pro_upgrade_page' class=
|
2 |
-
<h1><?php
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
<
|
7 |
-
<
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
</div>
|
1 |
+
<div id='nextgen_pro_upgrade_page' class="wrap about-wrap">
|
2 |
+
<h1 class="centered"><?php esc_html_e($i18n->plus_title); ?></h1>
|
3 |
+
<p class="about-text centered"><?php esc_html_e($i18n->plus_desc_first); ?><br>
|
4 |
+
<?php esc_html_e($i18n->plus_desc_second); ?>
|
5 |
+
</p>
|
6 |
+
<h3 class="about-text centered"><?php esc_html_e($i18n->click); ?></h3>
|
7 |
+
<div class="feature-section two-col">
|
8 |
+
<div class="col">
|
9 |
+
<a href="https://www.imagely.com/wordpress-gallery-plugin/nextgen-plus/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/nextgen-plus-ngg.jpg"></a>
|
10 |
+
<p class="about-text centered">
|
11 |
+
<a href='https://www.imagely.com/wordpress-gallery-plugin/nextgen-plus/' target='_blank' class="button-primary"><?php esc_html_e($i18n->plus_button); ?></a>
|
12 |
+
</p>
|
13 |
+
</div>
|
14 |
+
<div class="col">
|
15 |
+
<a href="https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/nextgen-pro-ngg.jpg"></a>
|
16 |
+
<p class="about-text centered">
|
17 |
+
<a href='https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/' target='_blank' class="button-primary"><?php esc_html_e($i18n->pro_button); ?></a>
|
18 |
+
</p>
|
19 |
+
</div>
|
20 |
+
</div>
|
21 |
</div>
|
products/photocrati_nextgen/modules/nextgen_pro_upgrade/templates/pro.php
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
-
<div id='nextgen_pro_upgrade_page' class=
|
2 |
-
<h1><?php
|
3 |
-
|
4 |
-
<
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
<
|
9 |
-
|
10 |
-
</
|
11 |
-
|
12 |
</div>
|
|
1 |
+
<div id='nextgen_pro_upgrade_page' class="wrap about-wrap">
|
2 |
+
<h1 class="centered"><?php esc_html_e($i18n->pro_title); ?></h1>
|
3 |
+
<p class="about-text centered"><?php esc_html_e($i18n->pro_desc); ?></p>
|
4 |
+
<h3 class="about-text centered"><?php esc_html_e($i18n->click); ?></h3>
|
5 |
+
<p class="about-text centered">
|
6 |
+
<a href="https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/nextgen-pro-ngg.jpg"></a>
|
7 |
+
</p>
|
8 |
+
<p class="about-text centered">
|
9 |
+
<a href='https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/' target='_blank' class="button-primary"><?php esc_html_e($i18n->pro_button); ?></a>
|
10 |
+
</p>
|
|
|
11 |
</div>
|
12 |
+
|
products/photocrati_nextgen/modules/ngglegacy/admin/admin.php
CHANGED
@@ -284,8 +284,7 @@ class nggAdminPanel{
|
|
284 |
|
285 |
switch ($_GET['page']) {
|
286 |
case NGGFOLDER :
|
287 |
-
wp_enqueue_script( '
|
288 |
-
add_thickbox();
|
289 |
break;
|
290 |
case "nggallery-manage-gallery" :
|
291 |
wp_enqueue_script( 'postbox' );
|
@@ -342,7 +341,7 @@ class nggAdminPanel{
|
|
342 |
|
343 |
switch ($_GET['page']) {
|
344 |
case NGGFOLDER :
|
345 |
-
|
346 |
case "nggallery-about" :
|
347 |
wp_enqueue_style( 'nggadmin' );
|
348 |
//TODO:Remove after WP 3.3 release
|
284 |
|
285 |
switch ($_GET['page']) {
|
286 |
case NGGFOLDER :
|
287 |
+
wp_enqueue_script( 'ngg_overview', $router->get_static_url('photocrati-nextgen-legacy#overview.js'), array('jquery'), NGG_SCRIPT_VERSION);
|
|
|
288 |
break;
|
289 |
case "nggallery-manage-gallery" :
|
290 |
wp_enqueue_script( 'postbox' );
|
341 |
|
342 |
switch ($_GET['page']) {
|
343 |
case NGGFOLDER :
|
344 |
+
wp_add_inline_style( 'nggadmin', file_get_contents(C_Fs::get_instance()->find_static_abspath('photocrati-nextgen-legacy#overview.css') ) );
|
345 |
case "nggallery-about" :
|
346 |
wp_enqueue_style( 'nggadmin' );
|
347 |
//TODO:Remove after WP 3.3 release
|
products/photocrati_nextgen/modules/ngglegacy/admin/css/nggadmin.css
CHANGED
@@ -29,6 +29,19 @@
|
|
29 |
width:24px;
|
30 |
}
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
.warning {
|
33 |
color: #9F6000;
|
34 |
background-color: #FEEFB3;
|
@@ -536,4 +549,8 @@ DIV that shows the image as you drag it
|
|
536 |
#ngg-manage-images-items-per-page {
|
537 |
float: right;
|
538 |
margin-right: 5px;
|
539 |
-
}
|
|
|
|
|
|
|
|
29 |
width:24px;
|
30 |
}
|
31 |
|
32 |
+
#gallerydiv h3 {
|
33 |
+
margin-left: 10px;
|
34 |
+
}
|
35 |
+
|
36 |
+
#gallerydiv span.toggle-indicator {
|
37 |
+
font-size: 2em;
|
38 |
+
line-height: 2em;
|
39 |
+
}
|
40 |
+
|
41 |
+
#gallerydiv span.toggle-indicator:hover {
|
42 |
+
cursor: pointer;
|
43 |
+
}
|
44 |
+
|
45 |
.warning {
|
46 |
color: #9F6000;
|
47 |
background-color: #FEEFB3;
|
549 |
#ngg-manage-images-items-per-page {
|
550 |
float: right;
|
551 |
margin-right: 5px;
|
552 |
+
}
|
553 |
+
|
554 |
+
#adminmenu .wp-submenu a[href*=ngg_pro_upgrade] {
|
555 |
+
color: #76a934;
|
556 |
+
}
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage-images.php
CHANGED
@@ -12,18 +12,24 @@ function nggallery_picturelist($controller) {
|
|
12 |
|
13 |
$wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images');
|
14 |
|
15 |
-
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
// fetch the imagelist
|
18 |
$picturelist = $ngg->manage_page->search_result;
|
|
|
19 |
|
20 |
// we didn't set a gallery or a pagination
|
21 |
-
$act_gid
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
} else {
|
26 |
-
|
27 |
// GET variables
|
28 |
$act_gid = $ngg->manage_page->gid;
|
29 |
|
@@ -42,13 +48,6 @@ function nggallery_picturelist($controller) {
|
|
42 |
return;
|
43 |
}
|
44 |
|
45 |
-
// look for pagination
|
46 |
-
$_GET['paged'] = isset($_GET['paged']) && ($_GET['paged'] > 0) ? absint($_GET['paged']) : 1;
|
47 |
-
$items_per_page = (!empty($_GET['items']) ? $_GET['items'] : apply_filters('ngg_manage_images_items_per_page', 50));
|
48 |
-
if ($items_per_page == 'all')
|
49 |
-
$items_per_page = PHP_INT_MAX;
|
50 |
-
else
|
51 |
-
$items_per_page = (int)$items_per_page;
|
52 |
$start = ( $_GET['paged'] - 1 ) * $items_per_page;
|
53 |
|
54 |
// get picture values
|
@@ -333,8 +332,12 @@ jQuery(document).ready( function($) {
|
|
333 |
<div id="poststuff" class="meta-box-sortables">
|
334 |
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
335 |
<div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?>" >
|
336 |
-
|
337 |
-
|
|
|
|
|
|
|
|
|
338 |
<div class="inside">
|
339 |
<?php $controller->render_gallery_fields(); ?>
|
340 |
|
12 |
|
13 |
$wp_list_table = new _NGG_Images_List_Table('nggallery-manage-images');
|
14 |
|
15 |
+
// look for pagination
|
16 |
+
$_GET['paged'] = isset($_GET['paged']) && ($_GET['paged'] > 0) ? absint($_GET['paged']) : 1;
|
17 |
+
$items_per_page = (!empty($_GET['items']) ? $_GET['items'] : apply_filters('ngg_manage_images_items_per_page', 50));
|
18 |
+
if ($items_per_page == 'all')
|
19 |
+
$items_per_page = PHP_INT_MAX;
|
20 |
+
else
|
21 |
+
$items_per_page = (int)$items_per_page;
|
22 |
+
|
23 |
+
if ($is_search)
|
24 |
+
{
|
25 |
// fetch the imagelist
|
26 |
$picturelist = $ngg->manage_page->search_result;
|
27 |
+
$total_number_of_images = count($picturelist);
|
28 |
|
29 |
// we didn't set a gallery or a pagination
|
30 |
+
$act_gid = 0;
|
31 |
+
}
|
32 |
+
else {
|
|
|
|
|
|
|
33 |
// GET variables
|
34 |
$act_gid = $ngg->manage_page->gid;
|
35 |
|
48 |
return;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
$start = ( $_GET['paged'] - 1 ) * $items_per_page;
|
52 |
|
53 |
// get picture values
|
332 |
<div id="poststuff" class="meta-box-sortables">
|
333 |
<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
|
334 |
<div id="gallerydiv" class="postbox <?php echo postbox_classes('gallerydiv', 'ngg-manage-gallery'); ?>" >
|
335 |
+
<div class="handlediv" title="<?php esc_attr_e( 'Click to toggle' ); ?>">
|
336 |
+
<span class="toggle-indicator"></span>
|
337 |
+
</div>
|
338 |
+
<h3>
|
339 |
+
<span> <?php _e('Gallery settings', 'nggallery'); ?></span>
|
340 |
+
</h3>
|
341 |
<div class="inside">
|
342 |
<?php $controller->render_gallery_fields(); ?>
|
343 |
|
products/photocrati_nextgen/modules/ngglegacy/admin/overview.php
CHANGED
@@ -2,262 +2,69 @@
|
|
2 |
|
3 |
if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
|
4 |
|
5 |
-
/**
|
6 |
-
* nggallery_admin_overview()
|
7 |
-
*
|
8 |
-
* Add the admin overview the dashboard style
|
9 |
-
* @return mixed content
|
10 |
-
*/
|
11 |
-
function nggallery_admin_overview()
|
12 |
-
{
|
13 |
-
?>
|
14 |
-
<div class="wrap ngg-wrap">
|
15 |
-
<?php screen_icon('nextgen-gallery'); ?>
|
16 |
-
<h2><?php _e('NextGEN Gallery Overview', 'nggallery'); ?></h2>
|
17 |
-
<div id="dashboard-widgets-container" class="ngg-overview">
|
18 |
-
<div id="dashboard-widgets" class="metabox-holder">
|
19 |
-
<div id="post-body">
|
20 |
-
<div id="dashboard-widgets-main-content">
|
21 |
-
<div class="postbox-container" id="main-container" style="width:75%;">
|
22 |
-
<?php do_meta_boxes('ngg_overview', 'left', ''); ?>
|
23 |
-
</div>
|
24 |
-
<div class="postbox-container" id="side-container" style="width:24%;">
|
25 |
-
<?php do_meta_boxes('ngg_overview', 'right', ''); ?>
|
26 |
-
</div>
|
27 |
-
</div>
|
28 |
-
</div>
|
29 |
-
</div>
|
30 |
-
</div>
|
31 |
-
</div>
|
32 |
-
<script type="text/javascript">
|
33 |
-
jQuery(document).ready(function($) {
|
34 |
-
postboxes.add_postbox_toggles('ngg-overview');
|
35 |
-
});
|
36 |
-
</script>
|
37 |
-
<?php
|
38 |
-
}
|
39 |
-
|
40 |
class C_NGG_Admin_Overview
|
41 |
{
|
42 |
-
public function __construct()
|
43 |
-
{
|
44 |
-
/**
|
45 |
-
* Load the meta boxes
|
46 |
-
*
|
47 |
-
*/
|
48 |
-
add_meta_box(
|
49 |
-
'dashboard_right_now',
|
50 |
-
__('Welcome to NextGEN Gallery !', 'nggallery'),
|
51 |
-
array($this, 'overview_metabox'),
|
52 |
-
'ngg_overview',
|
53 |
-
'left',
|
54 |
-
'core'
|
55 |
-
);
|
56 |
-
|
57 |
-
add_meta_box(
|
58 |
-
'ngg_meta_box',
|
59 |
-
__('Do you like this Plugin?', 'nggallery'),
|
60 |
-
array($this, 'sharing_metabox'),
|
61 |
-
'ngg_overview',
|
62 |
-
'right',
|
63 |
-
'core'
|
64 |
-
);
|
65 |
-
|
66 |
-
add_meta_box(
|
67 |
-
'ngg_about_meta_box',
|
68 |
-
__('About', 'nggallery'),
|
69 |
-
array($this, 'about_metabox'),
|
70 |
-
'ngg_overview',
|
71 |
-
'left',
|
72 |
-
'core'
|
73 |
-
);
|
74 |
-
|
75 |
-
if (!is_multisite() || is_super_admin())
|
76 |
-
{
|
77 |
-
add_meta_box(
|
78 |
-
'ngg_server',
|
79 |
-
__('Server Settings', 'nggallery'),
|
80 |
-
array($this, 'server_metabox'),
|
81 |
-
'ngg_overview',
|
82 |
-
'right',
|
83 |
-
'core'
|
84 |
-
);
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
public function sharing_metabox()
|
89 |
-
{
|
90 |
-
echo '<p>';
|
91 |
-
echo sprintf(__('This plugin is primarily developed, maintained, supported and documented by <a href="%s" target="_blank">Imagely</a> with a lot of love & effort. Any kind of contribution would be highly appreciated. Thanks!', 'nggallery'), 'https://www.imagely.com/');
|
92 |
-
echo '</p><ul>';
|
93 |
-
|
94 |
-
$url = 'http://wordpress.org/plugins/nextgen-gallery/' ;
|
95 |
-
echo "<li style='padding-left: 38px; background:transparent url(" . NGGALLERY_URLPATH . "admin/images/icon-rating.png ) no-repeat scroll center left; background-position: 16px 50%; text-decoration: none;'><a href='{$url}' target='_blank'>";
|
96 |
-
_e('Please click "Works" on WordPress.org', 'nggallery');
|
97 |
-
echo "</a></li>";
|
98 |
-
|
99 |
-
$url = 'http://wordpress.org/plugins/nextgen-gallery/' ;
|
100 |
-
echo "<li style='padding-left: 38px; background:transparent url(" . NGGALLERY_URLPATH . "admin/images/icon-rating.png ) no-repeat scroll center left; background-position: 16px 50%; text-decoration: none;'><a href='{$url}' target='_blank'>";
|
101 |
-
_e('Give it a good rating on WordPress.org', 'nggallery');
|
102 |
-
echo "</a></li>";
|
103 |
-
|
104 |
-
$url = 'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/';
|
105 |
-
echo "<li style='padding-left: 38px; background:transparent url(" . NGGALLERY_URLPATH . "admin/images/nextgen.png ) no-repeat scroll center left; background-position: 16px 50%; text-decoration: none;'><a href='{$url}' target='_blank'>";
|
106 |
-
_e("Visit the plugin homepage", 'nggallery');
|
107 |
-
echo "</a></li>";
|
108 |
-
|
109 |
-
$url = 'https://www.imagely.com/languages/';
|
110 |
-
echo "<li style='padding-left: 38px; background:transparent url(" . NGGALLERY_URLPATH . "admin/images/icon-translate.png ) no-repeat scroll center left; background-position: 16px 50%; text-decoration: none;'><a href='{$url}' target='_blank'>";
|
111 |
-
_e("Help translating it", 'nggallery');
|
112 |
-
echo "</a></li>";
|
113 |
-
|
114 |
-
echo '</ul>';
|
115 |
-
|
116 |
-
echo '
|
117 |
-
<div class="social" style="text-align:center;margin:15px 0 10px 0;"><span class="social" style="margin-right:5px;"><a target="_blank" href="http://twitter.com/NextGENGallery"><img title="Follow NextGEN on Twitter" alt="Twitter" src="' . NGGALLERY_URLPATH . 'admin/images/twitter.png"></a></span><span class="social" style="margin-right:5px;"><a target="_blank" href="http://www.facebook.com/NextGENGallery"><img title="Like NextGEN on Facebook" alt="Facebook" src="' . NGGALLERY_URLPATH . 'admin/images/facebook.png"></a></span><span class="social"><a target="_blank" href="http://plus.google.com/101643895780935290171"><img title="Add NextGEN to your circles" alt="GooglePlus" src="' . NGGALLERY_URLPATH . 'admin/images/googleplus.png"></a></span></div>';
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Show a summary of the used images
|
122 |
-
*
|
123 |
-
* @return void
|
124 |
-
*/
|
125 |
-
public function overview_metabox()
|
126 |
-
{
|
127 |
-
global $wpdb;
|
128 |
-
$images = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures") );
|
129 |
-
$galleries = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery") );
|
130 |
-
$albums = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum") );
|
131 |
-
?>
|
132 |
-
<style type='text/css'>
|
133 |
-
#ngg_overview_right_now p {
|
134 |
-
padding: 0 0 6px 10px;
|
135 |
-
margin: 0;
|
136 |
-
}
|
137 |
-
#ngg_overview_right_now table {
|
138 |
-
margin-left: 10px;
|
139 |
-
}
|
140 |
-
#ngg_overview_right_now td {
|
141 |
-
padding: 4px;
|
142 |
-
}
|
143 |
-
#ngg_overview_right_now td:first-child {
|
144 |
-
font-size: 16px;
|
145 |
-
}
|
146 |
-
</style>
|
147 |
-
<div class="table table_content" id='ngg_overview_right_now'>
|
148 |
-
<p><?php _e('At a Glance', 'nggallery'); ?></p>
|
149 |
-
<table>
|
150 |
-
<tbody>
|
151 |
-
<tr class="first">
|
152 |
-
<td class="first b"><a href="admin.php?page=ngg_addgallery"><?php echo $images; ?></a></td>
|
153 |
-
<td class="t"><a href="admin.php?page=ngg_addgallery"><?php echo _n( 'Image', 'Images', $images, 'nggallery' ); ?></a></td>
|
154 |
-
<td class="b"></td>
|
155 |
-
<td class="last"></td>
|
156 |
-
</tr>
|
157 |
-
<tr>
|
158 |
-
<td class="first b"><a href="admin.php?page=nggallery-manage-gallery"><?php echo $galleries; ?></a></td>
|
159 |
-
<td class="t"><a href="admin.php?page=nggallery-manage-gallery"><?php echo _n( 'Gallery', 'Galleries', $galleries, 'nggallery' ); ?></a></td>
|
160 |
-
<td class="b"></td>
|
161 |
-
<td class="last"></td>
|
162 |
-
</tr>
|
163 |
-
<tr>
|
164 |
-
<td class="first b"><a href="admin.php?page=nggallery-manage-album"><?php echo $albums; ?></a></td>
|
165 |
-
<td class="t"><a href="admin.php?page=nggallery-manage-album"><?php echo _n( 'Album', 'Albums', $albums, 'nggallery' ); ?></a></td>
|
166 |
-
<td class="b"></td>
|
167 |
-
<td class="last"></td>
|
168 |
-
</tr>
|
169 |
-
</tbody>
|
170 |
-
</table>
|
171 |
-
</div>
|
172 |
-
<div class="versions" style="padding-top:14px">
|
173 |
-
<br class="clear" />
|
174 |
-
</div>
|
175 |
-
<?php
|
176 |
-
if (is_multisite())
|
177 |
-
$this->dashboard_quota();
|
178 |
-
}
|
179 |
-
|
180 |
-
public function about_metabox()
|
181 |
-
{
|
182 |
-
?>
|
183 |
-
<div id="poststuff">
|
184 |
-
<p><?php _e("NextGEN Gallery is one of the most popular WordPress plugins of all time with over 15 million downloads.", 'nggallery'); _e("It is developed and supported by Imagely. We'd like to offer a special thanks to Alex Rabe, who first developed the plugin and maintained it through 2011.", 'nggallery'); ?></p>
|
185 |
-
<p><?php _e("<strong>NEED HELP?</strong> If you need help or assistance please visit the <a href='http://wordpress.org/support/plugin/nextgen-gallery'>NextGEN Gallery forums on WordPress.org</a>. Please note that we actively monitor and participate in the forums, but given that NextGEN Gallery is a free product, we don't guarantee replies to support queries.", 'nggallery'); ?></p>
|
186 |
-
<p><?php _e("<strong>EXTENDING NEXTGEN?</strong> There are many third party plugins that add displays and functionality for NextGEN Gallery. See our <a href='http://www.nextgen-gallery.com/nextgen-gallery-extension-plugins/'>Complete List of NextGEN Extension Plugins</a>.", 'nggallery'); ?></p>
|
187 |
-
</div>
|
188 |
-
<?php
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Show the server settings in a dashboard widget
|
193 |
-
*
|
194 |
-
* @return void
|
195 |
-
*/
|
196 |
-
public function server_metabox()
|
197 |
-
{
|
198 |
-
?>
|
199 |
-
<div id="dashboard_server_settings" class="dashboard-widget-holder wp_dashboard_empty">
|
200 |
-
<div class="ngg-dashboard-widget">
|
201 |
-
<div class="dashboard-widget-content">
|
202 |
-
<ul class="settings">
|
203 |
-
<?php $this->server_info(); ?>
|
204 |
-
</ul>
|
205 |
-
<p><strong><?php _e('Graphic Library', 'nggallery'); ?></strong></p>
|
206 |
-
<ul class="settings">
|
207 |
-
<?php $this->gd_info(); ?>
|
208 |
-
</ul>
|
209 |
-
</div>
|
210 |
-
</div>
|
211 |
-
</div>
|
212 |
-
<?php
|
213 |
-
}
|
214 |
|
215 |
/**
|
216 |
-
*
|
217 |
* @author GamerZ (http://www.lesterchan.net)
|
218 |
*
|
219 |
* @return void
|
220 |
*/
|
|
|
221 |
public function server_info()
|
222 |
{
|
223 |
global $wpdb, $ngg;
|
|
|
224 |
// Get MYSQL Version
|
225 |
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
|
|
|
226 |
// GET SQL Mode
|
227 |
$mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'");
|
228 |
if (is_array($mysqlinfo)) $sql_mode = $mysqlinfo[0]->Value;
|
229 |
if (empty($sql_mode)) $sql_mode = __('Not set', 'nggallery');
|
|
|
230 |
// Get PHP Safe Mode
|
231 |
if(ini_get('safe_mode')) $safe_mode = __('On', 'nggallery');
|
232 |
else $safe_mode = __('Off', 'nggallery');
|
|
|
233 |
// Get PHP allow_url_fopen
|
234 |
if(ini_get('allow_url_fopen')) $allow_url_fopen = __('On', 'nggallery');
|
235 |
else $allow_url_fopen = __('Off', 'nggallery');
|
|
|
236 |
// Get PHP Max Upload Size
|
237 |
-
if (function_exists('wp_max_upload_size')) $upload_max = strval(round(
|
238 |
else if(ini_get('upload_max_filesize')) $upload_max = ini_get('upload_max_filesize');
|
239 |
else $upload_max = __('N/A', 'nggallery');
|
|
|
240 |
// Get PHP Output buffer Size
|
241 |
if(ini_get('pcre.backtrack_limit')) $backtrack_limit = ini_get('pcre.backtrack_limit');
|
242 |
else $backtrack_limit = __('N/A', 'nggallery');
|
|
|
243 |
// Get PHP Max Post Size
|
244 |
if(ini_get('post_max_size')) $post_max = ini_get('post_max_size');
|
245 |
else $post_max = __('N/A', 'nggallery');
|
|
|
246 |
// Get PHP Max execution time
|
247 |
if(ini_get('max_execution_time')) $max_execute = ini_get('max_execution_time');
|
248 |
else $max_execute = __('N/A', 'nggallery');
|
|
|
249 |
// Get PHP Memory Limit
|
250 |
if(ini_get('memory_limit')) $memory_limit = $ngg->memory_limit;
|
251 |
else $memory_limit = __('N/A', 'nggallery');
|
|
|
252 |
// Get actual memory_get_usage
|
253 |
if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'nggallery');
|
254 |
else $memory_usage = __('N/A', 'nggallery');
|
|
|
255 |
// required for EXIF read
|
256 |
-
if (is_callable('exif_read_data')) $exif = __('Yes', 'nggallery'). " (
|
257 |
else $exif = __('No', 'nggallery');
|
|
|
258 |
// required for meta data
|
259 |
if (is_callable('iptcparse')) $iptc = __('Yes', 'nggallery');
|
260 |
else $iptc = __('No', 'nggallery');
|
|
|
261 |
// required for meta data
|
262 |
if (is_callable('xml_parser_create')) $xml = __('Yes', 'nggallery');
|
263 |
else $xml = __('No', 'nggallery');
|
@@ -293,11 +100,11 @@ class C_NGG_Admin_Overview
|
|
293 |
{
|
294 |
$info = gd_info();
|
295 |
$keys = array_keys($info);
|
296 |
-
for($i=0; $i<count($keys); $i++) {
|
297 |
-
if(is_bool($info[$keys[$i]]))
|
298 |
-
echo "<li> " . $keys[$i] ." : <span>" . ($info[$keys[$i]] ? __('Yes', 'nggallery') : __('No', 'nggallery')) . "</span></li>\n";
|
299 |
else
|
300 |
-
echo "<li> " . $keys[$i] ." : <span>" . $info[$keys[$i]] . "</span></li>\n";
|
301 |
}
|
302 |
}
|
303 |
else {
|
@@ -308,10 +115,10 @@ class C_NGG_Admin_Overview
|
|
308 |
// Display File upload quota on dashboard
|
309 |
function dashboard_quota()
|
310 |
{
|
311 |
-
if (
|
312 |
return;
|
313 |
|
314 |
-
if (
|
315 |
return;
|
316 |
|
317 |
$settings = C_NextGen_Settings::get_instance();
|
@@ -319,37 +126,278 @@ class C_NGG_Admin_Overview
|
|
319 |
$dir = $fs->join_paths($fs->get_document_root('content'), $settings->gallerypath);
|
320 |
|
321 |
$quota = get_space_allowed();
|
322 |
-
$used = get_dirsize(
|
323 |
|
324 |
-
if (
|
325 |
$percentused = '100';
|
326 |
else
|
327 |
-
$percentused = (
|
328 |
-
|
329 |
-
$
|
330 |
-
$
|
|
|
331 |
|
332 |
?>
|
333 |
-
<p
|
334 |
-
<
|
335 |
-
<
|
336 |
-
|
337 |
-
|
338 |
-
<td class="t posts"><?php _e( 'Space Allowed' ); ?></td>
|
339 |
-
</tr>
|
340 |
-
</table>
|
341 |
-
</div>
|
342 |
-
<div class="table table_discussion musubtable">
|
343 |
-
<table>
|
344 |
-
<tr class="first">
|
345 |
-
<td class="b b-comments"><?php printf( __( '<a href="%1$s" title="Manage Uploads" class="musublink">%2$sMB (%3$s%%)</a>' ), nextgen_esc_url( admin_url( 'admin.php?page=nggallery-manage-gallery' ) ), $used, $percentused ); ?></td>
|
346 |
-
<td class="last t comments <?php echo $used_color;?>"><?php _e( 'Space Used' );?></td>
|
347 |
-
</tr>
|
348 |
-
</table>
|
349 |
-
</div>
|
350 |
-
<br class="clear" />
|
351 |
<?php
|
352 |
}
|
|
|
353 |
}
|
354 |
|
355 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You are not allowed to call this page directly.'); }
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
class C_NGG_Admin_Overview
|
6 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
+
* Shows important server configuration details.
|
10 |
* @author GamerZ (http://www.lesterchan.net)
|
11 |
*
|
12 |
* @return void
|
13 |
*/
|
14 |
+
|
15 |
public function server_info()
|
16 |
{
|
17 |
global $wpdb, $ngg;
|
18 |
+
|
19 |
// Get MYSQL Version
|
20 |
$sqlversion = $wpdb->get_var("SELECT VERSION() AS version");
|
21 |
+
|
22 |
// GET SQL Mode
|
23 |
$mysqlinfo = $wpdb->get_results("SHOW VARIABLES LIKE 'sql_mode'");
|
24 |
if (is_array($mysqlinfo)) $sql_mode = $mysqlinfo[0]->Value;
|
25 |
if (empty($sql_mode)) $sql_mode = __('Not set', 'nggallery');
|
26 |
+
|
27 |
// Get PHP Safe Mode
|
28 |
if(ini_get('safe_mode')) $safe_mode = __('On', 'nggallery');
|
29 |
else $safe_mode = __('Off', 'nggallery');
|
30 |
+
|
31 |
// Get PHP allow_url_fopen
|
32 |
if(ini_get('allow_url_fopen')) $allow_url_fopen = __('On', 'nggallery');
|
33 |
else $allow_url_fopen = __('Off', 'nggallery');
|
34 |
+
|
35 |
// Get PHP Max Upload Size
|
36 |
+
if (function_exists('wp_max_upload_size')) $upload_max = strval(round((int) wp_max_upload_size() / (1024 * 1024))) . 'M';
|
37 |
else if(ini_get('upload_max_filesize')) $upload_max = ini_get('upload_max_filesize');
|
38 |
else $upload_max = __('N/A', 'nggallery');
|
39 |
+
|
40 |
// Get PHP Output buffer Size
|
41 |
if(ini_get('pcre.backtrack_limit')) $backtrack_limit = ini_get('pcre.backtrack_limit');
|
42 |
else $backtrack_limit = __('N/A', 'nggallery');
|
43 |
+
|
44 |
// Get PHP Max Post Size
|
45 |
if(ini_get('post_max_size')) $post_max = ini_get('post_max_size');
|
46 |
else $post_max = __('N/A', 'nggallery');
|
47 |
+
|
48 |
// Get PHP Max execution time
|
49 |
if(ini_get('max_execution_time')) $max_execute = ini_get('max_execution_time');
|
50 |
else $max_execute = __('N/A', 'nggallery');
|
51 |
+
|
52 |
// Get PHP Memory Limit
|
53 |
if(ini_get('memory_limit')) $memory_limit = $ngg->memory_limit;
|
54 |
else $memory_limit = __('N/A', 'nggallery');
|
55 |
+
|
56 |
// Get actual memory_get_usage
|
57 |
if (function_exists('memory_get_usage')) $memory_usage = round(memory_get_usage() / 1024 / 1024, 2) . __(' MByte', 'nggallery');
|
58 |
else $memory_usage = __('N/A', 'nggallery');
|
59 |
+
|
60 |
// required for EXIF read
|
61 |
+
if (is_callable('exif_read_data')) $exif = __('Yes', 'nggallery'). " (V" . substr(phpversion('exif'),0,4) . ")" ;
|
62 |
else $exif = __('No', 'nggallery');
|
63 |
+
|
64 |
// required for meta data
|
65 |
if (is_callable('iptcparse')) $iptc = __('Yes', 'nggallery');
|
66 |
else $iptc = __('No', 'nggallery');
|
67 |
+
|
68 |
// required for meta data
|
69 |
if (is_callable('xml_parser_create')) $xml = __('Yes', 'nggallery');
|
70 |
else $xml = __('No', 'nggallery');
|
100 |
{
|
101 |
$info = gd_info();
|
102 |
$keys = array_keys($info);
|
103 |
+
for ($i = 0; $i < count($keys); $i++) {
|
104 |
+
if (is_bool($info[$keys[$i]]))
|
105 |
+
echo "<li> " . $keys[$i] . " : <span>" . ($info[$keys[$i]] ? __('Yes', 'nggallery') : __('No', 'nggallery')) . "</span></li>\n";
|
106 |
else
|
107 |
+
echo "<li> " . $keys[$i] . " : <span>" . $info[$keys[$i]] . "</span></li>\n";
|
108 |
}
|
109 |
}
|
110 |
else {
|
115 |
// Display File upload quota on dashboard
|
116 |
function dashboard_quota()
|
117 |
{
|
118 |
+
if (get_site_option('upload_space_check_disabled'))
|
119 |
return;
|
120 |
|
121 |
+
if (!wpmu_enable_function('wpmuQuotaCheck'))
|
122 |
return;
|
123 |
|
124 |
$settings = C_NextGen_Settings::get_instance();
|
126 |
$dir = $fs->join_paths($fs->get_document_root('content'), $settings->gallerypath);
|
127 |
|
128 |
$quota = get_space_allowed();
|
129 |
+
$used = get_dirsize($dir) / 1024 / 1024;
|
130 |
|
131 |
+
if ($used > $quota)
|
132 |
$percentused = '100';
|
133 |
else
|
134 |
+
$percentused = ($used / $quota) * 100;
|
135 |
+
|
136 |
+
$used_color = ($percentused < 70) ? (($percentused >= 40) ? 'yellow' : 'green') : 'red';
|
137 |
+
$used = round($used, 2);
|
138 |
+
$percentused = number_format($percentused);
|
139 |
|
140 |
?>
|
141 |
+
<p><?php print __('Storage Space'); ?></p>
|
142 |
+
<ul>
|
143 |
+
<li><?php printf(__('%1$sMB Allowed', 'nggallery'), $quota); ?></li>
|
144 |
+
<li class="<?php print $used_color; ?>"><?php printf(__('%1$sMB (%2$s%%) Used', 'nggallery'), $used, $percentused); ?></li>
|
145 |
+
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
<?php
|
147 |
}
|
148 |
+
|
149 |
}
|
150 |
|
151 |
+
/**
|
152 |
+
* nggallery_admin_overview()
|
153 |
+
*
|
154 |
+
* Add the admin overview the dashboard style
|
155 |
+
* @return mixed content
|
156 |
+
*/
|
157 |
+
function nggallery_admin_overview()
|
158 |
+
{
|
159 |
+
$NGG_Admin_Overview = new C_NGG_Admin_Overview();
|
160 |
+
|
161 |
+
global $wpdb;
|
162 |
+
$images = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures"));
|
163 |
+
$galleries = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggallery"));
|
164 |
+
$albums = intval($wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggalbum"));
|
165 |
+
|
166 |
+
?>
|
167 |
+
|
168 |
+
<div class="wrap about-wrap">
|
169 |
+
<h1><?php _e( 'Welcome to NextGEN Gallery', 'nggallery' ); ?></h1>
|
170 |
+
|
171 |
+
<div class="about-text"><?php printf( __( "Congrats! You're now running the most popular WordPress gallery plugin of all time. So far you've added %s images, %s galleries, and %s albums." ), $images, $galleries, $albums); ?></div>
|
172 |
+
<div class="wp-badge"></div>
|
173 |
+
|
174 |
+
<h2 class="nav-tab-wrapper wp-clearfix" id="ngg-tabs-wrapper">
|
175 |
+
<a href="#top#welcome" class="nav-tab nav-tab-active" id="welcome-link"><?php _e( 'Welcome', 'nggallery' ); ?></a>
|
176 |
+
<a href="#top#videos" class="nav-tab" id="videos-link"><?php _e( 'More Videos' ); ?></a>
|
177 |
+
<a href="#top#pro" class="nav-tab" id="pro-link"><?php _e( 'NextGEN Pro' ); ?></a>
|
178 |
+
<a href="#top#genesis" class="nav-tab" id="genesis-link"><?php _e( 'Genesis Themes' ); ?></a>
|
179 |
+
<?php if (!is_multisite() || is_super_admin()) { ?>
|
180 |
+
<a href="#top#details" class="nav-tab" id="details-link"><?php _e( 'Site Details' ); ?></a>
|
181 |
+
<?php } ?>
|
182 |
+
<a href="#top#freedoms" class="nav-tab" id="freedoms-link"><?php _e( 'Freedoms' ); ?></a>
|
183 |
+
</h2>
|
184 |
+
|
185 |
+
<div id="welcome" class="ngg-tab">
|
186 |
+
|
187 |
+
<div class="headline-feature feature-video">
|
188 |
+
<iframe width="1050" height="590" src="https://www.youtube.com/embed/qwNr5ZNGavo?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<hr>
|
192 |
+
|
193 |
+
<div class="feature-section three-col">
|
194 |
+
<h2><?php _e( 'Meet the Imagely Product Ambassadors', 'nggallery' ); ?></h2>
|
195 |
+
<p class="about-text centered"><?php _e( "NextGEN Gallery and other Imagely products are used by some of the best photographers in the world. Meet some of the Imagely Ambassadors who are putting Imagely and NextGEN Gallery to work professionally.", 'nggallery' ); ?>
|
196 |
+
</p>
|
197 |
+
<div class="col">
|
198 |
+
<a href="https://www.imagely.com/team-member/the-youngrens/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/theyoungrens-ngg.jpg" alt="The Youngrens"/></a>
|
199 |
+
<h3><?php _e( 'The Youngrens' ); ?></h3>
|
200 |
+
<p><?php _e( 'Jeff and Erin are a luxury husband and wife photography team who deeply love each other and their photography clients. They shoot weddings and engagements all over the U.S. and beyond. With three photography businesses that serve different clientele, they have unique insights into business strategies and are passionate about improving the day to day lives of other photographers.', 'nggallery' ); ?></p>
|
201 |
+
</div>
|
202 |
+
<div class="col">
|
203 |
+
<a href="https://www.imagely.com/team-member/tamara-lackey/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/TamaraLackey-ngg.jpg" alt="Tamara Lackey" /></a>
|
204 |
+
<h3><?php _e( 'Tamara Lackey' ); ?></h3>
|
205 |
+
<p><?php _e( 'Tamara Lackey is a renowned professional photographer, speaker, and author. Her authentic lifestyle photography, from children’s portraits to celebrity portraits, is praised within her industry and published internationally. She is also founder of the charitable project, Beautiful Together.', 'nggallery' ); ?></p>
|
206 |
+
</div>
|
207 |
+
<div class="col">
|
208 |
+
<a href="https://www.imagely.com/team-member/colby-brown/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/colby-brown-ngg.jpg" alt="Colby Brown" /></a>
|
209 |
+
<h3><?php _e( 'Colby Brown' ); ?></h3>
|
210 |
+
<p><?php _e( 'Colby is a photographer, photo educator, and author specializing in landscape, travel and humanitarian photography. With an audience reaching millions, Colby partners on social influencer marketing campaigns with some of the biggest companies and destinations in the world, including Sony, Samsung, Toshiba, Iceland Naturally, Jordan Tourism Board, Australia.com, Visit California and more.', 'nggallery' ); ?></p>
|
211 |
+
</div>
|
212 |
+
</div>
|
213 |
+
|
214 |
+
<div class="feature-section three-col">
|
215 |
+
<div class="col">
|
216 |
+
<a href="https://www.imagely.com/team-member/jared-platt/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/jared-platt-ngg.jpg" alt="Jared Platt" /></a>
|
217 |
+
<h3><?php _e( 'Jared Platt' ); ?></h3>
|
218 |
+
<p><?php _e( 'Jared is a professional wedding and lifestyle photographer. He also travels the world giving lectures and workshops on photography, lighting, and post-production efficiency and workflow. His interactive style, and attention to detail and craft make him an entertaining and demanding photography instructor.', 'nggallery' ); ?></p>
|
219 |
+
</div>
|
220 |
+
<div class="col">
|
221 |
+
<a href="https://www.imagely.com/team-member/brian-matiash/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/brian-matiash-ngg.jpeg" alt="" /></a>
|
222 |
+
<h3><?php _e( 'Brian Matiash' ); ?></h3>
|
223 |
+
<p><?php _e( 'Brian is a professional photographer, author, and educator. He fuses landscape & travel photography with experiential storytelling and practical instructing to help others grow creatively. He is also a Sony Artisan of Imagery, a Zeiss Lens Ambassador, a Formatt-Hitech Featured Photographer, and a member of G-Technology’s G-Team.', 'nggallery' ); ?></p>
|
224 |
+
</div>
|
225 |
+
<div class="col">
|
226 |
+
<a href="https://www.imagely.com/team-member/christine-tremoulet/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/Christine-Tremoulet-ngg.jpg" alt="" /></a>
|
227 |
+
<h3><?php _e( 'Christine Tremoulet' ); ?></h3>
|
228 |
+
<p><?php _e( 'Christine famously coined the term WordPress. She is an author, speaker, business coach, and story strategist who specializes in helping creatives celebrate their story online through blogging and social media. When not offering actionable know-how to businesses, she can be found taking long road trips across North America in her Mini Cooper.', 'nggallery' ); ?></p>
|
229 |
+
</div>
|
230 |
+
</div>
|
231 |
+
|
232 |
+
<div class="feature-section three-col">
|
233 |
+
<div class="col">
|
234 |
+
<a href="https://www.imagely.com/team-member/david-beckstead/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/david-beckstead-ngg.jpg" alt="David Beckstead" /></a>
|
235 |
+
<h3><?php _e( 'David Beckstead' ); ?></h3>
|
236 |
+
<p><?php _e( 'Named one of the Top 10 Wedding Photographers in the World by American Photo magazine, David is a celebrated photographer and educator. He is also a mountain man with a enviable lifestyle: from his base in rural Washington, he travels all over the world teaching workshops, while sharing lessons with 16,000 photographers in the Abstract Canvas Facebook group.', 'nggallery' ); ?></p>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
|
240 |
+
|
241 |
+
</div>
|
242 |
+
|
243 |
+
<div id="videos" class="ngg-tab">
|
244 |
+
|
245 |
+
<p class="about-text centered"><?php printf( __( 'We have a growing list of video tutorials to get you started. Watch some below or head over to <a href="%s" target="_blank">NextGEN Gallery University on YouTube</a> to see all available vidoes.', 'nggallery' ), esc_url( 'https://www.youtube.com/playlist?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM' ) ); ?>
|
246 |
+
</p>
|
247 |
+
|
248 |
+
<div class="headline-feature feature-video">
|
249 |
+
<iframe width="1280" height="720" src="https://www.youtube.com/embed/c664fvAZ1nI?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
250 |
+
</div>
|
251 |
+
|
252 |
+
<hr>
|
253 |
+
|
254 |
+
<div class="feature-section two-col">
|
255 |
+
<h2><?php _e( 'More Video Tutorials' ); ?></h2>
|
256 |
+
<div class="col">
|
257 |
+
<div class="headline-feature feature-video">
|
258 |
+
<iframe width="1280" height="720" src="https://www.youtube.com/embed/h_HrKpkI90w?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
259 |
+
</div>
|
260 |
+
</div>
|
261 |
+
<div class="col">
|
262 |
+
<div class="headline-feature feature-video">
|
263 |
+
<iframe width="1280" height="720" src="https://www.youtube.com/embed/58u9AjMJqJM?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
264 |
+
</div>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
|
268 |
+
<div class="feature-section two-col">
|
269 |
+
<div class="col">
|
270 |
+
<div class="headline-feature feature-video">
|
271 |
+
<iframe width="1280" height="720" src="https://www.youtube.com/embed/OfxWM59fb_Y?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
<div class="col">
|
275 |
+
<div class="headline-feature feature-video">
|
276 |
+
<iframe width="1280" height="720" src="https://www.youtube.com/embed/BiFjDYIaZZw?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM" frameborder="0" allowfullscreen></iframe>
|
277 |
+
</div>
|
278 |
+
</div>
|
279 |
+
</div>
|
280 |
+
|
281 |
+
<p class="about-text centered"><?php printf( __( 'Want more? Head over to <a href="%s" target="_blank">NextGEN Gallery University on YouTube</a>.', 'nggallery' ), esc_url( 'https://www.youtube.com/playlist?list=PL9cmsdHslD0vIcJjBggJ-XMjtwvqrRgoM' ) ); ?>
|
282 |
+
</p>
|
283 |
+
|
284 |
+
</div>
|
285 |
+
|
286 |
+
<div id="pro" class="ngg-tab">
|
287 |
+
|
288 |
+
<h2><?php _e( 'Upgrade to NextGEN Pro!' ); ?></h2>
|
289 |
+
<p class="about-text centered"><?php _e( 'Gorgeous new gallery displays, image protection, full screen lightbox, commenting and social sharing for individual images, proofing, ecommerce, digital downloads, and more. Take your galleries to the next level with the Plus and Pro extensions for NextGEN Gallery. ', 'nggallery' ); ?></p>
|
290 |
+
<h3 class="about-text centered"><?php _e( 'CLICK TO LEARN MORE:', 'nggallery' ); ?></h3>
|
291 |
+
<div class="feature-section two-col">
|
292 |
+
<div class="col">
|
293 |
+
<a href="https://www.imagely.com/wordpress-gallery-plugin/nextgen-plus/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/nextgen-plus-ngg.jpg"></a>
|
294 |
+
</div>
|
295 |
+
<div class="col">
|
296 |
+
<a href="https://www.imagely.com/wordpress-gallery-plugin/nextgen-pro/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/nextgen-pro-ngg.jpg"></a>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
|
300 |
+
</div>
|
301 |
+
|
302 |
+
<div id="genesis" class="ngg-tab">
|
303 |
+
|
304 |
+
<h2><?php _e( 'Genesis Child Themes for Photographers' ); ?></h2>
|
305 |
+
<p class="about-text centered"><?php _e( 'Meet the new series of Genesis child themes by Imagely: gorgeous, responsive image-centric themes for photographers or anyone with visually rich websites.', 'nggallery' ); ?></p>
|
306 |
+
<h3 class="about-text centered"><?php _e( 'CLICK TO LEARN MORE:', 'nggallery' ); ?></h3>
|
307 |
+
<div class="feature-section two-col">
|
308 |
+
<div class="col">
|
309 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/ansel/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/ansel-ngg.jpg" class="ngg-theme-image"></a>
|
310 |
+
</div>
|
311 |
+
<div class="col">
|
312 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/fearless/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/fearless-ngg.jpg" class="ngg-theme-image"></a>
|
313 |
+
</div>
|
314 |
+
</div>
|
315 |
+
<div class="feature-section two-col">
|
316 |
+
<div class="col">
|
317 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/blush/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/blush-ngg.jpg" class="ngg-theme-image"></a>
|
318 |
+
</div>
|
319 |
+
<div class="col">
|
320 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/free-spirit/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/free-spirit-ngg.jpg" class="ngg-theme-image"></a>
|
321 |
+
</div>
|
322 |
+
</div>
|
323 |
+
<div class="feature-section two-col">
|
324 |
+
<div class="col">
|
325 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/reportage/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/reportage-ngg.jpg" class="ngg-theme-image"></a>
|
326 |
+
</div>
|
327 |
+
<div class="col">
|
328 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/lightly/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/lightly-ngg.jpg" class="ngg-theme-image"></a>
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
<div class="feature-section two-col">
|
332 |
+
<div class="col">
|
333 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/rebel/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/rebel-ngg.jpg" class="ngg-theme-image"></a>
|
334 |
+
</div>
|
335 |
+
<div class="col">
|
336 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/summerly/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/summerly-ngg.jpg" class="ngg-theme-image"></a>
|
337 |
+
</div>
|
338 |
+
</div>
|
339 |
+
<div class="feature-section two-col">
|
340 |
+
<div class="col">
|
341 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/expedition/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/expedition-ngg.jpg" class="ngg-theme-image"></a>
|
342 |
+
</div>
|
343 |
+
<div class="col">
|
344 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/punk-bride/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/punk-bride-ngg.jpg" class="ngg-theme-image"></a>
|
345 |
+
</div>
|
346 |
+
</div>
|
347 |
+
<div class="feature-section two-col">
|
348 |
+
<div class="col">
|
349 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/journal/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/journal-ngg.jpg" class="ngg-theme-image"></a>
|
350 |
+
</div>
|
351 |
+
<div class="col">
|
352 |
+
<a href="https://www.imagely.com/wordpress-photography-themes/simplicity/" target="_blank"><img src="https://f001.backblaze.com/file/nextgen-gallery/simplicity-ngg.jpg" class="ngg-theme-image"></a>
|
353 |
+
</div>
|
354 |
+
</div>
|
355 |
+
|
356 |
+
</div>
|
357 |
+
|
358 |
+
<?php if (!is_multisite() || is_super_admin()) { ?>
|
359 |
+
<div id="details" class="ngg-tab">
|
360 |
+
<h2><?php _e( 'Site Details' ); ?></h2>
|
361 |
+
<p class="about-text centered"><?php _e( 'When contacting support, consider copying and pasting this information in your support request. It helps us troubleshoot more quickly.', 'nggallery' ); ?>
|
362 |
+
</p>
|
363 |
+
<div class="two-col">
|
364 |
+
<div class="col">
|
365 |
+
<?php if (is_multisite()) $NGG_Admin_Overview->dashboard_quota(); ?>
|
366 |
+
</div>
|
367 |
+
<div class="col">
|
368 |
+
<p><strong><?php print __('Server Settings', 'nggallery'); ?></strong></p>
|
369 |
+
<ul>
|
370 |
+
<?php $NGG_Admin_Overview->server_info(); ?>
|
371 |
+
</ul>
|
372 |
+
</div>
|
373 |
+
</div>
|
374 |
+
<div class="two-col">
|
375 |
+
<div class="col">
|
376 |
+
<p><strong><?php print __('Graphic Library', 'nggallery'); ?></strong></p>
|
377 |
+
<ul>
|
378 |
+
<?php $NGG_Admin_Overview->gd_info(); ?>
|
379 |
+
</ul>
|
380 |
+
</div>
|
381 |
+
</div>
|
382 |
+
</div>
|
383 |
+
<?php } ?>
|
384 |
+
|
385 |
+
<div id="freedoms" class="ngg-tab">
|
386 |
+
|
387 |
+
<p class="about-description"><?php printf( __( 'NextGEN Gallery is Free and open source software, built by a small but dedicated team as well as community code contributions. It comes with awesome rights courtesy of its <a href="%s" target="_blank">license</a>, the GPL.' ), 'https://wordpress.org/about/license/' ); ?></p>
|
388 |
+
|
389 |
+
<ol start="0">
|
390 |
+
<li><p><?php _e( 'You have the freedom to run the program, for any purpose.' ); ?></p></li>
|
391 |
+
<li><p><?php _e( 'You have access to the source code, the freedom to study how the program works, and the freedom to change it to make it do what you wish.' ); ?></p></li>
|
392 |
+
<li><p><?php _e( 'You have the freedom to redistribute copies of the original program so you can help your neighbor.' ); ?></p></li>
|
393 |
+
<li><p><?php _e( 'You have the freedom to distribute copies of your modified versions to others. By doing this you can give the whole community a chance to benefit from your changes.' ); ?></p></li>
|
394 |
+
</ol>
|
395 |
+
|
396 |
+
<p><?php _e( 'NextGEN Gallery grows because people like you tell your friends and website visitors about it. We thank you for doing so.' ); ?></p>
|
397 |
+
|
398 |
+
</div>
|
399 |
+
|
400 |
+
</div>
|
401 |
+
|
402 |
+
<?php
|
403 |
+
}
|
products/photocrati_nextgen/modules/ngglegacy/lib/meta.php
CHANGED
@@ -121,7 +121,7 @@ class nggMeta{
|
|
121 |
|
122 |
$meta= array();
|
123 |
|
124 |
-
$exif = isset($this->
|
125 |
if (count($exif)) {
|
126 |
|
127 |
if (!empty($exif['FNumber']))
|
121 |
|
122 |
$meta= array();
|
123 |
|
124 |
+
$exif = isset($this->exif_data['EXIF']) ? $this->exif_data['EXIF'] : array();
|
125 |
if (count($exif)) {
|
126 |
|
127 |
if (!empty($exif['FNumber']))
|
products/photocrati_nextgen/modules/ngglegacy/lib/ngg-db.php
CHANGED
@@ -750,7 +750,7 @@ class nggdb
|
|
750 |
$searchand = ' AND ';
|
751 |
}
|
752 |
|
753 |
-
$term =
|
754 |
if (count($search_terms) > 1 && $search_terms[0] != $request )
|
755 |
$search .= " OR (tt.description LIKE '{$n}{$term}{$n}') OR (tt.alttext LIKE '{$n}{$term}{$n}') OR (tt.filename LIKE '{$n}{$term}{$n}')";
|
756 |
|
750 |
$searchand = ' AND ';
|
751 |
}
|
752 |
|
753 |
+
$term = esc_sql($request);
|
754 |
if (count($search_terms) > 1 && $search_terms[0] != $request )
|
755 |
$search .= " OR (tt.description LIKE '{$n}{$term}{$n}') OR (tt.alttext LIKE '{$n}{$term}{$n}') OR (tt.filename LIKE '{$n}{$term}{$n}')";
|
756 |
|
products/photocrati_nextgen/modules/ngglegacy/lib/tags.php
CHANGED
@@ -315,13 +315,13 @@ class nggTags {
|
|
315 |
|
316 |
$taglist = array_map('trim', $taglist);
|
317 |
$new_slugarray = array_map('sanitize_title', $taglist);
|
318 |
-
$sluglist
|
319 |
|
320 |
//Treat % as a litteral in the database, for unicode support
|
321 |
-
$sluglist=str_replace("%","%%",$sluglist);
|
322 |
|
323 |
// first get all $term_ids with this tag
|
324 |
-
$term_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug IN (
|
325 |
$picids = get_objects_in_term($term_ids, 'ngg_tag');
|
326 |
|
327 |
if ($mode == 'RAND')
|
315 |
|
316 |
$taglist = array_map('trim', $taglist);
|
317 |
$new_slugarray = array_map('sanitize_title', $taglist);
|
318 |
+
$sluglist = implode("', '", $new_slugarray);
|
319 |
|
320 |
//Treat % as a litteral in the database, for unicode support
|
321 |
+
$sluglist = str_replace("%","%%",$sluglist);
|
322 |
|
323 |
// first get all $term_ids with this tag
|
324 |
+
$term_ids = $wpdb->get_col( $wpdb->prepare("SELECT term_id FROM $wpdb->terms WHERE slug IN (%s) ORDER BY term_id ASC ", $sluglist));
|
325 |
$picids = get_objects_in_term($term_ids, 'ngg_tag');
|
326 |
|
327 |
if ($mode == 'RAND')
|
products/photocrati_nextgen/modules/ngglegacy/module.ngglegacy.php
CHANGED
@@ -22,7 +22,7 @@ class M_NggLegacy extends C_Base_Module
|
|
22 |
'photocrati-nextgen-legacy',
|
23 |
'NextGEN Legacy',
|
24 |
'Embeds the original version of NextGEN 1.9.3 by Alex Rabe',
|
25 |
-
'0.
|
26 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
27 |
'Photocrati Media',
|
28 |
'https://www.imagely.com'
|
22 |
'photocrati-nextgen-legacy',
|
23 |
'NextGEN Legacy',
|
24 |
'Embeds the original version of NextGEN 1.9.3 by Alex Rabe',
|
25 |
+
'0.15',
|
26 |
'https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/',
|
27 |
'Photocrati Media',
|
28 |
'https://www.imagely.com'
|
products/photocrati_nextgen/modules/ngglegacy/nggallery.php
CHANGED
@@ -71,7 +71,7 @@ class nggLoader
|
|
71 |
} else {
|
72 |
|
73 |
// Add MRSS to wp_head
|
74 |
-
if ( $this->options['useMediaRSS'] )
|
75 |
add_action('wp_head', array('nggMediaRss', 'add_mrss_alternate_link'));
|
76 |
|
77 |
}
|
71 |
} else {
|
72 |
|
73 |
// Add MRSS to wp_head
|
74 |
+
if ( isset( $this->options['useMediaRSS'] ) && $this->options['useMediaRSS'] )
|
75 |
add_action('wp_head', array('nggMediaRss', 'add_mrss_alternate_link'));
|
76 |
|
77 |
}
|
products/photocrati_nextgen/modules/ngglegacy/static/overview.css
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.toplevel_page_nextgen-gallery .wp-badge {
|
2 |
+
border: none;
|
3 |
+
background: url( 'https://www.imagely.com/wp-content/uploads/2016/06/on-white-icon.png' ) no-repeat;
|
4 |
+
background-size: 140px 140px;
|
5 |
+
box-shadow: none;
|
6 |
+
}
|
7 |
+
|
8 |
+
.ngg-tab {
|
9 |
+
display: none;
|
10 |
+
}
|
11 |
+
|
12 |
+
.ngg-tab.active {
|
13 |
+
display: block;
|
14 |
+
}
|
15 |
+
|
16 |
+
#ngg-server-settings {
|
17 |
+
float: left;
|
18 |
+
}
|
19 |
+
|
20 |
+
#ngg-server-settings p {
|
21 |
+
margin: 0 0 0.5em 0;
|
22 |
+
}
|
23 |
+
|
24 |
+
#ngg-server-settings:nth-of-type(2) {
|
25 |
+
margin-left: 20px;
|
26 |
+
}
|
27 |
+
|
28 |
+
.about-text.centered {
|
29 |
+
text-align: center;
|
30 |
+
margin: 1em;
|
31 |
+
}
|
32 |
+
|
33 |
+
.feature-video iframe,
|
34 |
+
.feature-video object,
|
35 |
+
.feature-video embed {
|
36 |
+
position: absolute;
|
37 |
+
top: 0;
|
38 |
+
left: 0;
|
39 |
+
width: 100%;
|
40 |
+
height: 100%;
|
41 |
+
}
|
42 |
+
|
43 |
+
.ngg-theme-image {
|
44 |
+
box-shadow: 0 0 8px #888888;
|
45 |
+
}
|
46 |
+
|
47 |
+
@media only screen and (max-width: 700px) {
|
48 |
+
#ngg-server-settings:nth-of-type(2) {
|
49 |
+
margin-left: 0;
|
50 |
+
}
|
51 |
+
}
|
products/photocrati_nextgen/modules/ngglegacy/static/overview.js
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Overview Page JS for NextGEN Gallery: Provides JS for
|
3 |
+
* navigating tabs on the NextGEN Overview page.
|
4 |
+
*
|
5 |
+
*/
|
6 |
+
|
7 |
+
jQuery(document).ready(function($) {
|
8 |
+
$('#ngg-tabs-wrapper').find('a').click(function() {
|
9 |
+
$('#ngg-tabs-wrapper').find('a').removeClass('nav-tab-active');
|
10 |
+
$('.ngg-tab').removeClass('active');
|
11 |
+
|
12 |
+
var id = jQuery(this).attr('id').replace('-link', '');
|
13 |
+
$('#' + id).addClass('active');
|
14 |
+
$(this).addClass('nav-tab-active');
|
15 |
+
});
|
16 |
+
|
17 |
+
var activeTab = window.location.hash.replace('#top#', '');
|
18 |
+
if ('' === activeTab) {
|
19 |
+
activeTab = $('.ngg-tab').attr('id');
|
20 |
+
}
|
21 |
+
|
22 |
+
$('#' + activeTab).addClass('active');
|
23 |
+
$('#' + activeTab + '-tab').addClass('nav-tab-active');
|
24 |
+
$('.nav-tab-active').click();
|
25 |
+
});
|
products/photocrati_nextgen/modules/ngglegacy/static/overview.min.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.toplevel_page_nextgen-gallery .wp-badge{border:0;background:url('https://www.imagely.com/wp-content/uploads/2016/06/on-white-icon.png') no-repeat;background-size:140px 140px;box-shadow:none}.ngg-tab{display:none}.ngg-tab.active{display:block}#ngg-server-settings{float:left}#ngg-server-settings p{margin:0 0 .5em 0}#ngg-server-settings:nth-of-type(2){margin-left:20px}.about-text.centered{text-align:center;margin:1em}.feature-video iframe,.feature-video object,.feature-video embed{position:absolute;top:0;left:0;width:100%;height:100%}.ngg-theme-image{box-shadow:0 0 8px #888}@media only screen and (max-width:700px){#ngg-server-settings:nth-of-type(2){margin-left:0}}
|
products/photocrati_nextgen/modules/ngglegacy/static/overview.min.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}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}('f(j).k(i($){$(\'#4-7-b\').g(\'a\').c(i(){$(\'#4-7-b\').g(\'a\').h(\'6-0-1\');$(\'.4-0\').h(\'1\');8 3=f(9).e(\'3\').d(\'-q\',\'\');$(\'#\'+3).5(\'1\');$(9).5(\'6-0-1\')});8 2=p.l.o.d(\'#m#\',\'\');n(\'\'===2){2=$(\'.4-0\').e(\'3\')}$(\'#\'+2).5(\'1\');$(\'#\'+2+\'-0\').5(\'6-0-1\');$(\'.6-0-1\').c()});',27,27,'tab|active|activeTab|id|ngg|addClass|nav|tabs|var|this||wrapper|click|replace|attr|jQuery|find|removeClass|function|document|ready|location|top|if|hash|window|link'.split('|'),0,{}))
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: photocrati, imagely
|
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: 4.0.0
|
5 |
-
Stable tag: 2.1.
|
6 |
-
Tested up to: 4.
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 15 million downloads.
|
@@ -187,6 +187,22 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
= V2.1.46 - 06.23.2016 =
|
191 |
* Fixed: Remove inner nextgen-gallery folder due to build issue
|
192 |
|
2 |
Contributors: photocrati, imagely
|
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: 4.0.0
|
5 |
+
Stable tag: 2.1.49
|
6 |
+
Tested up to: 4.6.0
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 15 million downloads.
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= V2.1.49 - 07.26.2016 =
|
191 |
+
* NEW: Add a "Default" template option to override ATP settings when a global setting is used
|
192 |
+
* NEW: Added "generic" error reporting back during image upload.
|
193 |
+
* NEW: Added notice for deprecating PHP 5.2
|
194 |
+
* NEW: Option to display child gallery and album descriptions when viewing albums
|
195 |
+
* Changed: ATP preview images are smaller with tighter margins to show more images
|
196 |
+
* Changed: Content of Upgrade to Pro page
|
197 |
+
* Changed: New NextGEN Overview page
|
198 |
+
* Changed: Replicate gallery name sanitation of NG legacy for gallery paths
|
199 |
+
* Fixed: Resolved all found PHP warnings/notices/deprecations and strict errors
|
200 |
+
* Fixed: Compatibility on Windows servers with network mounted document roots
|
201 |
+
* Fixed: Ensure EXIF meta data is loaded from the appropriate exif_data array instead of exif_array
|
202 |
+
* Fixed: Gallery Settings toggle not functioning
|
203 |
+
* Fixed: Uploading breaking when thumbnail or image resizing fails due to lack of specific format support for image libraries
|
204 |
+
* Fixed: Warning generated in nggallery.php checking useMediaRSS option
|
205 |
+
|
206 |
= V2.1.46 - 06.23.2016 =
|
207 |
* Fixed: Remove inner nextgen-gallery folder due to build issue
|
208 |
|