NextGEN Gallery – WordPress Gallery Plugin - Version 2.0.66.37

Version Description

  • 12.18.2014 =
  • NEW: Admin notice manager
  • Secured: Removed flash slideshow support
  • Secured: Image upload mechanism
  • Fixed: Accordion styling in WordPress 4.1
  • Fixed: Sorting images in WordPress 4.1
Download this release

Release Info

Developer photocrati
Plugin Icon 128x128 NextGEN Gallery – WordPress Gallery Plugin
Version 2.0.66.37
Comparing to
See all releases

Code changes from version 2.0.66.33 to 2.0.66.37

Files changed (26) hide show
  1. changelog.txt +7 -0
  2. nggallery.php +2 -2
  3. products/photocrati_nextgen/modules/attach_to_post/class.attach_controller.php +2 -1
  4. products/photocrati_nextgen/modules/datamapper/class.custompost_datamapper_driver.php +14 -2
  5. products/photocrati_nextgen/modules/datamapper/class.datamapper_model.php +1 -1
  6. products/photocrati_nextgen/modules/nextgen_admin/class.admin_notification_manager.php +155 -0
  7. products/photocrati_nextgen/modules/nextgen_admin/class.page_manager.php +1 -1
  8. products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php +7 -1
  9. products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js +18 -0
  10. products/photocrati_nextgen/modules/nextgen_admin/static/jquery-ui/jquery-ui-1.10.4.custom.css +7 -1
  11. products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php +6 -0
  12. products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_gallery_mapper.php +0 -16
  13. products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_slideshow_controller.php +3 -24
  14. products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_slideshow_form.php +0 -213
  15. products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php +37 -0
  16. products/photocrati_nextgen/modules/nextgen_basic_gallery/static/slideshow/imagerotator.swf +0 -0
  17. products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/slideshow/index.php +74 -183
  18. products/photocrati_nextgen/modules/nextgen_data/class.gallerystorage_driver_base.php +12 -6
  19. products/photocrati_nextgen/modules/nextgen_gallery_display/class.display_type_mapper.php +11 -0
  20. products/photocrati_nextgen/modules/nextgen_other_options/adapter.other_options_forms.php +5 -2
  21. products/photocrati_nextgen/modules/ngglegacy/admin/manage-sort.php +13 -18
  22. products/photocrati_nextgen/modules/ngglegacy/admin/overview.php +1 -1
  23. products/photocrati_nextgen/modules/ngglegacy/lib/swfobject.php +0 -195
  24. products/photocrati_nextgen/modules/ngglegacy/nggallery.php +0 -1
  25. products/photocrati_nextgen/modules/router/class.routing_app.php +2 -2
  26. readme.txt +16 -6
changelog.txt CHANGED
@@ -1,6 +1,13 @@
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
 
 
 
 
 
 
 
4
  = V2.0.66.33 - 11.24.2014 =
5
  * Fixed: Broken NextGEN Pro ecommerce-related shortcodes
6
  * Fixed: Spanish PO file
1
  NextGEN Gallery
2
  by Photocrati Media
3
 
4
+ = V2.0.66.37 - 12.18.2014 =
5
+ * NEW: Admin notice manager
6
+ * Secured: Removed flash slideshow support
7
+ * Secured: Image upload mechanism
8
+ * Fixed: Accordion styling in WordPress 4.1
9
+ * Fixed: Sorting images in WordPress 4.1
10
+
11
  = V2.0.66.33 - 11.24.2014 =
12
  * Fixed: Broken NextGEN Pro ecommerce-related shortcodes
13
  * Fixed: Spanish PO file
nggallery.php CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 9 million downloads.
7
- * Version: 2.0.66.33
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
@@ -431,7 +431,7 @@ class C_NextGEN_Bootstrap
431
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
432
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
433
  define('NGG_PLUGIN_STARTED_AT', microtime());
434
- define('NGG_PLUGIN_VERSION', '2.0.66.33');
435
 
436
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
437
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
4
  /**
5
  * Plugin Name: NextGEN Gallery by Photocrati
6
  * Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 9 million downloads.
7
+ * Version: 2.0.66.37
8
  * Author: Photocrati Media
9
  * Plugin URI: http://www.nextgen-gallery.com
10
  * Author URI: http://www.photocrati.com
431
  define('NGG_PRODUCT_URL', path_join(str_replace("\\", '/', NGG_PLUGIN_URL), 'products'));
432
  define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
433
  define('NGG_PLUGIN_STARTED_AT', microtime());
434
+ define('NGG_PLUGIN_VERSION', '2.0.66.37');
435
 
436
  if (!defined('NGG_HIDE_STRICT_ERRORS')) {
437
  define('NGG_HIDE_STRICT_ERRORS', TRUE);
products/photocrati_nextgen/modules/attach_to_post/class.attach_controller.php CHANGED
@@ -87,7 +87,7 @@ class Mixin_Attach_To_Post extends Mixin
87
  {
88
  function _load_displayed_gallery()
89
  {
90
- $mapper = $this->get_registry()->get_utility('I_Displayed_Gallery_Mapper');
91
  if (!($this->object->_displayed_gallery = $mapper->find($this->object->param('id'), TRUE))) {
92
  $this->object->_displayed_gallery = $mapper->create();
93
  }
@@ -101,6 +101,7 @@ class Mixin_Attach_To_Post extends Mixin
101
  function enqueue_backend_resources()
102
  {
103
  $this->call_parent('enqueue_backend_resources');
 
104
  // Enqueue frame event publishing
105
  wp_enqueue_script('frame_event_publisher');
106
  $this->object->mark_script('frame_event_publisher');
87
  {
88
  function _load_displayed_gallery()
89
  {
90
+ $mapper = C_Displayed_Gallery_Mapper::get_instance();
91
  if (!($this->object->_displayed_gallery = $mapper->find($this->object->param('id'), TRUE))) {
92
  $this->object->_displayed_gallery = $mapper->create();
93
  }
101
  function enqueue_backend_resources()
102
  {
103
  $this->call_parent('enqueue_backend_resources');
104
+
105
  // Enqueue frame event publishing
106
  wp_enqueue_script('frame_event_publisher');
107
  $this->object->mark_script('frame_event_publisher');
products/photocrati_nextgen/modules/datamapper/class.custompost_datamapper_driver.php CHANGED
@@ -255,6 +255,15 @@ class Mixin_CustomPost_DataMapper_Driver extends Mixin
255
  {
256
  $entity = new stdClass();
257
 
 
 
 
 
 
 
 
 
 
258
  // Unserialize the post content field
259
  if (is_string($post->post_content)) {
260
  if (($post_content = $this->object->unserialize($post->post_content))) {
@@ -264,12 +273,15 @@ class Mixin_CustomPost_DataMapper_Driver extends Mixin
264
  }
265
 
266
  }
267
- unset($post->post_content);
268
 
269
- // Copy all fields to the entity
 
 
270
  foreach ($post as $key => $value) {
271
  $entity->$key = $value;
272
  }
 
 
273
  $this->object->_convert_to_entity($entity);
274
  return $model? $this->object->convert_to_model($entity) : $entity;
275
  }
255
  {
256
  $entity = new stdClass();
257
 
258
+ // Unserialize the post_content_filtered field
259
+ if (is_string($post->post_content_filtered)) {
260
+ if (($post_content = $this->object->unserialize($post->post_content_filtered))) {
261
+ foreach ($post_content as $key => $value) {
262
+ $post->$key = $value;
263
+ }
264
+ }
265
+ }
266
+
267
  // Unserialize the post content field
268
  if (is_string($post->post_content)) {
269
  if (($post_content = $this->object->unserialize($post->post_content))) {
273
  }
274
 
275
  }
 
276
 
277
+ // Copy post fields to entity
278
+ unset($post->post_content);
279
+ unset($post->post_content_filtered);
280
  foreach ($post as $key => $value) {
281
  $entity->$key = $value;
282
  }
283
+
284
+
285
  $this->object->_convert_to_entity($entity);
286
  return $model? $this->object->convert_to_model($entity) : $entity;
287
  }
products/photocrati_nextgen/modules/datamapper/class.datamapper_model.php CHANGED
@@ -42,7 +42,7 @@ class C_DataMapper_Model extends C_Component
42
 
43
 
44
  /**
45
- * Gets a property of the model
46
  */
47
  function &__get($property_name)
48
  {
42
 
43
 
44
  /**
45
+ * Gets a property of the model
46
  */
47
  function &__get($property_name)
48
  {
products/photocrati_nextgen/modules/nextgen_admin/class.admin_notification_manager.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ class C_Admin_Notification_Manager
5
+ {
6
+ var $_notifications = array();
7
+ var $_displayed_notice = FALSE;
8
+ var $_dismiss_url = NULL;
9
+
10
+ static $_instance = NULL;
11
+ static function get_instance()
12
+ {
13
+ if (!isset(self::$_instance)) {
14
+ $klass = get_class();
15
+ self::$_instance = new $klass;
16
+ }
17
+ return self::$_instance;
18
+ }
19
+
20
+ function __construct()
21
+ {
22
+ $this->_dismiss_url = site_url('/?ngg_dismiss_notice=1');
23
+ }
24
+
25
+ function has_displayed_notice()
26
+ {
27
+ return $this->_displayed_notice;
28
+ }
29
+
30
+ function add($name, $handler)
31
+ {
32
+ $this->_notifications[$name] = $handler;
33
+ }
34
+
35
+ function remove($name)
36
+ {
37
+ unset($this->_notifications[$name]);
38
+ }
39
+
40
+ function render()
41
+ {
42
+ $output= array();
43
+
44
+ foreach (array_keys($this->_notifications) as $notice) {
45
+ if (($html = $this->render_notice($notice))) {
46
+ $output[] = $html;
47
+ }
48
+ }
49
+
50
+ echo implode("\n", $output);
51
+ }
52
+
53
+ function is_dismissed($name)
54
+ {
55
+ $retval = FALSE;
56
+
57
+ $settings = C_NextGen_Settings::get_instance();
58
+ $dismissed= $settings->get('dismissed_notifications', array());
59
+
60
+ if (isset($dismissed[$name])) {
61
+ if (($id = get_current_user_id())) {
62
+ if (in_array($id, $dismissed[$name])) $retval = TRUE;
63
+ else if (in_array('unknown', $dismissed[$name])) $retval = TRUE;
64
+ }
65
+ }
66
+
67
+ return $retval;
68
+ }
69
+
70
+ function dismiss($name)
71
+ {
72
+ $retval = FALSE;
73
+
74
+ if (($handler = $this->get_handler_instance($name))) {
75
+ $has_method = method_exists($handler, 'is_dismissable');
76
+ if (($has_method && $handler->is_dismissable()) || !$has_method) {
77
+ $settings = C_NextGen_Settings::get_instance();
78
+ $dismissed= $settings->get('dismissed_notifications', array());
79
+ if (!isset($dismissed[$name])) $dismissed[$name] = array();
80
+ $user_id = get_current_user_id();
81
+ $dismissed[$name][] = ($user_id ? $user_id : 'unknown');
82
+ $settings->set('dismissed_notifications', $dismissed);
83
+ $settings->save();
84
+ $retval = TRUE;
85
+ }
86
+ }
87
+
88
+ return $retval;
89
+ }
90
+
91
+ function get_handler_instance($name)
92
+ {
93
+ $retval = NULL;
94
+
95
+ if (isset($this->_notifications[$name]) && (($handler = $this->_notifications[$name]))) {
96
+ if (class_exists($handler)) $retval = call_user_func(array($handler, 'get_instance'), $name);
97
+ }
98
+
99
+ return $retval;
100
+ }
101
+
102
+ function enqueue_scripts()
103
+ {
104
+ if ($this->has_displayed_notice()) {
105
+ $router = C_Router::get_instance();
106
+ wp_enqueue_script('ngg_admin_notices', $router->get_static_url('photocrati-nextgen_admin#admin_notices.js'), array(), FALSE, TRUE);
107
+ wp_localize_script('ngg_admin_notices', 'ngg_dismiss_url', $this->_dismiss_url);
108
+ }
109
+ }
110
+
111
+ function serve_ajax_request()
112
+ {
113
+ $retval = array('failure' => TRUE);
114
+
115
+ if (isset($_REQUEST['ngg_dismiss_notice'])) {
116
+ header('Content-Type: application/json');
117
+ // ob_start();
118
+ if (isset($_REQUEST['name']) && $this->dismiss($_REQUEST['name'])) {
119
+ $retval = array('success' => TRUE);
120
+ }
121
+ else $retval['msg'] = __('Not a valid notice name', 'nggallery');
122
+ // ob_end_clean();
123
+
124
+ echo json_encode($retval);
125
+
126
+ throw new E_Clean_Exit;
127
+ }
128
+ }
129
+
130
+ function render_notice($name)
131
+ {
132
+ $retval = '';
133
+
134
+ if (($handler = $this->get_handler_instance($name)) && !$this->is_dismissed($name)) {
135
+
136
+ // Does the handler want to render?
137
+ $has_method = method_exists($handler, 'is_renderable');
138
+ if (($has_method && $handler->is_renderable()) || !$has_method) {
139
+
140
+ $view = new C_MVC_View('photocrati-nextgen_admin#admin_notice', array(
141
+ 'css_class' => (method_exists($handler, 'get_css_class') ? $handler->get_css_class() : 'updated'),
142
+ 'is_dismissable' => (method_exists($handler, 'is_dismissable') ? $handler->is_dismissable() : FALSE),
143
+ 'html' => (method_exists($handler, 'render') ? $handler->render() : ''),
144
+ 'notice_name' => $name
145
+ ));
146
+
147
+ $retval = $view->render(TRUE);
148
+ $this->_displayed_notice = TRUE;
149
+ }
150
+ }
151
+
152
+ return $retval;
153
+ }
154
+ }
155
+
products/photocrati_nextgen/modules/nextgen_admin/class.page_manager.php CHANGED
@@ -127,7 +127,7 @@ class Mixin_Page_Manager extends Mixin
127
  }
128
 
129
  // Are we to add a menu?
130
- if ($properties['add_menu']) {
131
 
132
  add_submenu_page(
133
  $properties['parent'],
127
  }
128
 
129
  // Are we to add a menu?
130
+ if ($properties['add_menu'] && current_user_can($permission)) {
131
 
132
  add_submenu_page(
133
  $properties['parent'],
products/photocrati_nextgen/modules/nextgen_admin/module.nextgen_admin.php CHANGED
@@ -101,6 +101,11 @@ class M_NextGen_Admin extends C_Base_Module
101
 
102
  // Provides menu options for managing NextGEN Settings
103
  add_action('admin_menu', array(&$this, 'add_menu_pages'), 999);
 
 
 
 
 
104
  }
105
 
106
  function register_scripts()
@@ -150,7 +155,8 @@ class M_NextGen_Admin extends C_Base_Module
150
  'I_Form_Manager' => 'interface.form_manager.php',
151
  'I_Nextgen_Admin_Page' => 'interface.nextgen_admin_page.php',
152
  'I_Nextgen_Settings' => 'interface.nextgen_settings.php',
153
- 'I_Page_Manager' => 'interface.page_manager.php'
 
154
  );
155
  }
156
  }
101
 
102
  // Provides menu options for managing NextGEN Settings
103
  add_action('admin_menu', array(&$this, 'add_menu_pages'), 999);
104
+
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 register_scripts()
155
  'I_Form_Manager' => 'interface.form_manager.php',
156
  'I_Nextgen_Admin_Page' => 'interface.nextgen_admin_page.php',
157
  'I_Nextgen_Settings' => 'interface.nextgen_settings.php',
158
+ 'I_Page_Manager' => 'interface.page_manager.php',
159
+ 'C_Admin_Notification_Manager' => 'class.admin_notification_manager.php'
160
  );
161
  }
162
  }
products/photocrati_nextgen/modules/nextgen_admin/static/admin_notices.js ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery(function($){
2
+ $('.ngg_admin_notice .dismiss').click(function(e){
3
+ e.preventDefault();
4
+
5
+ var $notice = $(this).parents('.ngg_admin_notice');
6
+ var $notice_name = $notice.attr('data-notification-name');
7
+ if ($notice_name.length > 0) {
8
+ var url = ngg_dismiss_url+'&name='+$notice_name;
9
+ $.post(url, function(response){
10
+ if (typeof(response) != 'object') response = JSON.parse(response);
11
+ if (response.success) {
12
+ $notice.fadeOut();
13
+ }
14
+ else alert(response.msg);
15
+ });
16
+ }
17
+ });
18
+ });
products/photocrati_nextgen/modules/nextgen_admin/static/jquery-ui/jquery-ui-1.10.4.custom.css CHANGED
@@ -1268,4 +1268,10 @@ body .ui-tooltip {
1268
  /* Necessary w/WP 3.9's new dialogs */
1269
  .ui-autocomplete {
1270
  z-index: 250;
1271
- }
 
 
 
 
 
 
1268
  /* Necessary w/WP 3.9's new dialogs */
1269
  .ui-autocomplete {
1270
  z-index: 250;
1271
+ }
1272
+
1273
+ /* WP 4.1-beta1 makes the accordion fonts & margin huge */
1274
+ h3.ui-accordion-header {
1275
+ margin: 3px 0 0 0;
1276
+ font-size: 13px;
1277
+ }
products/photocrati_nextgen/modules/nextgen_admin/templates/admin_notice.php ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
1
+ <div data-notification-name="<?php esc_attr_e($notice_name)?>" class="ngg_admin_notice <?php esc_attr_e($css_class)?>">
2
+ <p><?php echo $html ?></p>
3
+ <?php if ($is_dismissable): ?>
4
+ <p><a class='dismiss' href="#"><?php esc_html_e(__('Dismiss', 'nggallery')) ?></a></p>
5
+ <?php endif ?>
6
+ </div>
products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_gallery_mapper.php CHANGED
@@ -37,22 +37,6 @@ class Hook_NextGen_Basic_Gallery_Defaults extends Hook
37
  $this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight);
38
  $this->object->_set_default_value($entity, 'settings', 'cycle_interval', $settings->irRotatetime);
39
  $this->object->_set_default_value($entity, 'settings', 'cycle_effect', $settings->slideFx);
40
- $this->object->_set_default_value($entity, 'settings', 'flash_enabled', $settings->enableIR);
41
- $this->object->_set_default_value($entity, 'settings', 'flash_path', $settings->irURL);
42
- $this->object->_set_default_value($entity, 'settings', 'flash_shuffle', $settings->irShuffle);
43
- $this->object->_set_default_value($entity, 'settings', 'flash_next_on_click', $settings->irLinkfromdisplay);
44
- $this->object->_set_default_value($entity, 'settings', 'flash_navigation_bar', $settings->irShownavigation);
45
- $this->object->_set_default_value($entity, 'settings', 'flash_loading_icon', $settings->irShowicons);
46
- $this->object->_set_default_value($entity, 'settings', 'flash_watermark_logo', $settings->irWatermark);
47
- $this->object->_set_default_value($entity, 'settings', 'flash_stretch_image', $settings->irOverstretch);
48
- $this->object->_set_default_value($entity, 'settings', 'flash_transition_effect', $settings->irTransition);
49
- $this->object->_set_default_value($entity, 'settings', 'flash_slow_zoom', $settings->irKenburns);
50
- $this->object->_set_default_value($entity, 'settings', 'flash_background_color', $settings->irBackcolor);
51
- $this->object->_set_default_value($entity, 'settings', 'flash_text_color', $settings->irFrontcolor);
52
- $this->object->_set_default_value($entity, 'settings', 'flash_rollover_color', $settings->irLightcolor);
53
- $this->object->_set_default_value($entity, 'settings', 'flash_screen_color', $settings->irScreencolor);
54
- $this->object->_set_default_value($entity, 'settings', 'flash_background_music', $settings->irAudio);
55
- $this->object->_set_default_value($entity, 'settings', 'flash_xhtml_validation', $settings->irXHTMLvalid);
56
  $this->object->_set_default_value($entity, 'settings', 'effect_code', $settings->thumbCode);
57
  $this->object->_set_default_value($entity, 'settings', 'show_thumbnail_link', $settings->galShowSlide ? 1 : 0);
58
  $this->object->_set_default_value($entity, 'settings', 'thumbnail_link_text', $settings->galTextGallery);
37
  $this->object->_set_default_value($entity, 'settings', 'thumbnail_height', $settings->thumbheight);
38
  $this->object->_set_default_value($entity, 'settings', 'cycle_interval', $settings->irRotatetime);
39
  $this->object->_set_default_value($entity, 'settings', 'cycle_effect', $settings->slideFx);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  $this->object->_set_default_value($entity, 'settings', 'effect_code', $settings->thumbCode);
41
  $this->object->_set_default_value($entity, 'settings', 'show_thumbnail_link', $settings->galShowSlide ? 1 : 0);
42
  $this->object->_set_default_value($entity, 'settings', 'thumbnail_link_text', $settings->galTextGallery);
products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_slideshow_controller.php CHANGED
@@ -28,19 +28,8 @@ class A_NextGen_Basic_Slideshow_Controller extends Mixin_NextGen_Basic_Gallery_C
28
  $gallery_width = $displayed_gallery->display_settings['gallery_width'];
29
  $gallery_height = $displayed_gallery->display_settings['gallery_height'];
30
  $params['aspect_ratio'] = $gallery_width/$gallery_height;
31
- $params['flash_path'] = $this->object->get_static_url('photocrati-nextgen_basic_gallery#slideshow/imagerotator.swf');
32
  $params['placeholder'] = $this->object->get_static_url('photocrati-nextgen_basic_gallery#slideshow/placeholder.gif');
33
 
34
- // Are we displayed a flash slideshow?
35
- if ($displayed_gallery->display_settings['flash_enabled'])
36
- {
37
- include_once(NGGALLERY_ABSPATH . implode(DIRECTORY_SEPARATOR, array('lib', 'swfobject.php')));
38
- $transient_id = $displayed_gallery->transient_id;
39
- $params['mediarss_link'] = $this->get_router()->get_url(
40
- '/nextgen-mediarss?template=playlist_feed&source=displayed_gallery&transient_id=' . $transient_id, false
41
- );
42
- }
43
-
44
  // Are we to generate a thumbnail link?
45
  if ($displayed_gallery->display_settings['show_thumbnail_link']) {
46
  $params['thumbnail_link'] = $this->object->get_url_for_alternate_display_type(
@@ -67,14 +56,9 @@ class A_NextGen_Basic_Slideshow_Controller extends Mixin_NextGen_Basic_Gallery_C
67
  */
68
  function enqueue_frontend_resources($displayed_gallery)
69
  {
70
- if ($this->object->is_flash_enabled($displayed_gallery)) {
71
- wp_enqueue_script('swfobject'); // WordPress built-in library
72
- }
73
- else {
74
- $resource = defined('SCRIPT_DEBUG') ? 'jquery.cycle.all.min.js' : "jquery.cycle.all.js";
75
- wp_register_script('jquery-cycle', $this->get_static_url("photocrati-nextgen_basic_gallery#slideshow/{$resource}"), array('jquery'));
76
- wp_enqueue_script('jquery-cycle');
77
- }
78
 
79
  wp_enqueue_style('nextgen_basic_slideshow_style', $this->get_static_url('photocrati-nextgen_basic_gallery#slideshow/nextgen_basic_slideshow.css'));
80
  wp_enqueue_script('waitforimages', $this->get_static_url('photocrati-nextgen_basic_gallery#slideshow/jquery.waitforimages.js'), array('jquery'));
@@ -82,11 +66,6 @@ class A_NextGen_Basic_Slideshow_Controller extends Mixin_NextGen_Basic_Gallery_C
82
  $this->enqueue_ngg_styles();
83
  }
84
 
85
- function is_flash_enabled($displayed_gallery)
86
- {
87
- return $displayed_gallery->display_settings['flash_enabled'];
88
- }
89
-
90
  /**
91
  * Provides the url of the JavaScript library required for
92
  * NextGEN Basic Slideshow to display
28
  $gallery_width = $displayed_gallery->display_settings['gallery_width'];
29
  $gallery_height = $displayed_gallery->display_settings['gallery_height'];
30
  $params['aspect_ratio'] = $gallery_width/$gallery_height;
 
31
  $params['placeholder'] = $this->object->get_static_url('photocrati-nextgen_basic_gallery#slideshow/placeholder.gif');
32
 
 
 
 
 
 
 
 
 
 
 
33
  // Are we to generate a thumbnail link?
34
  if ($displayed_gallery->display_settings['show_thumbnail_link']) {
35
  $params['thumbnail_link'] = $this->object->get_url_for_alternate_display_type(
56
  */
57
  function enqueue_frontend_resources($displayed_gallery)
58
  {
59
+ $resource = defined('SCRIPT_DEBUG') ? 'jquery.cycle.all.min.js' : "jquery.cycle.all.js";
60
+ wp_register_script('jquery-cycle', $this->get_static_url("photocrati-nextgen_basic_gallery#slideshow/{$resource}"), array('jquery'));
61
+ wp_enqueue_script('jquery-cycle');
 
 
 
 
 
62
 
63
  wp_enqueue_style('nextgen_basic_slideshow_style', $this->get_static_url('photocrati-nextgen_basic_gallery#slideshow/nextgen_basic_slideshow.css'));
64
  wp_enqueue_script('waitforimages', $this->get_static_url('photocrati-nextgen_basic_gallery#slideshow/jquery.waitforimages.js'), array('jquery'));
66
  $this->enqueue_ngg_styles();
67
  }
68
 
 
 
 
 
 
69
  /**
70
  * Provides the url of the JavaScript library required for
71
  * NextGEN Basic Slideshow to display
products/photocrati_nextgen/modules/nextgen_basic_gallery/adapter.nextgen_basic_slideshow_form.php CHANGED
@@ -34,21 +34,6 @@ class A_NextGen_Basic_Slideshow_Form extends Mixin_Display_Type_Form
34
  'nextgen_basic_slideshow_gallery_dimensions',
35
  'nextgen_basic_slideshow_cycle_effect',
36
  'nextgen_basic_slideshow_cycle_interval',
37
- 'nextgen_basic_slideshow_flash_enabled',
38
- 'nextgen_basic_slideshow_flash_background_music',
39
- 'nextgen_basic_slideshow_flash_stretch_image',
40
- 'nextgen_basic_slideshow_flash_transition_effect',
41
- 'nextgen_basic_slideshow_flash_shuffle',
42
- 'nextgen_basic_slideshow_flash_next_on_click',
43
- 'nextgen_basic_slideshow_flash_navigation_bar',
44
- 'nextgen_basic_slideshow_flash_loading_icon',
45
- 'nextgen_basic_slideshow_flash_watermark_logo',
46
- 'nextgen_basic_slideshow_flash_slow_zoom',
47
- 'nextgen_basic_slideshow_flash_xhtml_validation',
48
- 'nextgen_basic_slideshow_flash_background_color',
49
- 'nextgen_basic_slideshow_flash_text_color',
50
- 'nextgen_basic_slideshow_flash_rollover_color',
51
- 'nextgen_basic_slideshow_flash_screen_color',
52
  'nextgen_basic_slideshow_show_thumbnail_link',
53
  'nextgen_basic_slideshow_thumbnail_link_text'
54
  );
@@ -101,204 +86,6 @@ class A_NextGen_Basic_Slideshow_Form extends Mixin_Display_Type_Form
101
  ), True);
102
  }
103
 
104
- function _render_nextgen_basic_slideshow_flash_enabled_field($display_type)
105
- {
106
- return $this->_render_radio_field(
107
- $display_type,
108
- 'flash_enabled',
109
- __('Enable flash slideshow', 'nggallery'),
110
- $display_type->settings['flash_enabled'],
111
- __('Integrate the flash based slideshow for all flash supported devices', 'nggallery')
112
- );
113
- }
114
-
115
- function _render_nextgen_basic_slideshow_flash_shuffle_field($display_type)
116
- {
117
- return $this->_render_radio_field(
118
- $display_type,
119
- 'flash_shuffle',
120
- __('Shuffle', 'nggallery'),
121
- $display_type->settings['flash_shuffle'],
122
- '',
123
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
124
- );
125
- }
126
-
127
- function _render_nextgen_basic_slideshow_flash_next_on_click_field($display_type)
128
- {
129
- return $this->_render_radio_field(
130
- $display_type,
131
- 'flash_next_on_click',
132
- __('Show next image on click', 'nggallery'),
133
- $display_type->settings['flash_next_on_click'],
134
- '',
135
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
136
- );
137
- }
138
-
139
- function _render_nextgen_basic_slideshow_flash_navigation_bar_field($display_type)
140
- {
141
- return $this->_render_radio_field(
142
- $display_type,
143
- 'flash_navigation_bar',
144
- __('Show navigation bar', 'nggallery'),
145
- $display_type->settings['flash_navigation_bar'],
146
- '',
147
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
148
- );
149
- }
150
-
151
- function _render_nextgen_basic_slideshow_flash_loading_icon_field($display_type)
152
- {
153
- return $this->_render_radio_field(
154
- $display_type,
155
- 'flash_loading_icon',
156
- __('Show loading icon', 'nggallery'),
157
- $display_type->settings['flash_loading_icon'],
158
- '',
159
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
160
- );
161
- }
162
-
163
- function _render_nextgen_basic_slideshow_flash_watermark_logo_field($display_type)
164
- {
165
- return $this->_render_radio_field(
166
- $display_type,
167
- 'flash_watermark_logo',
168
- __('Use watermark logo', 'nggallery'),
169
- $display_type->settings['flash_watermark_logo'],
170
- __('Use the watermark image in the Flash object. Note: this does not watermark the image itself, and cannot be applied with text watermarks', 'nggallery'),
171
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
172
- );
173
- }
174
-
175
- function _render_nextgen_basic_slideshow_flash_stretch_image_field($display_type)
176
- {
177
- return $this->_render_select_field(
178
- $display_type,
179
- 'flash_stretch_image',
180
- __('Stretch image', 'nggallery'),
181
- array(
182
- 'true' => __('true', 'nggallery'),
183
- 'false' => __('false', 'nggallery'),
184
- 'fit' => __('fit', 'nggallery'),
185
- 'none' => __('none', 'nggallery')
186
- ),
187
- $display_type->settings['flash_stretch_image'],
188
- '',
189
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
190
- );
191
- }
192
-
193
- function _render_nextgen_basic_slideshow_flash_transition_effect_field($display_type)
194
- {
195
- return $this->_render_select_field(
196
- $display_type,
197
- 'flash_transition_effect',
198
- 'Transition / fade effect',
199
- array(
200
- 'fade' => __('fade', 'nggallery'),
201
- 'bgfade' => __('bgfade', 'nggallery'),
202
- 'slowfade' => __('slowfade', 'nggallery'),
203
- 'circles' => __('circles', 'nggallery'),
204
- 'bubbles' => __('bubbles', 'nggallery'),
205
- 'blocks' => __('blocks', 'nggallery'),
206
- 'fluids' => __('fluids', 'nggallery'),
207
- 'flash' => __('flash', 'nggallery'),
208
- 'lines' => __('lines', 'nggallery'),
209
- 'random' => __('random', 'nggallery')
210
- ),
211
- $display_type->settings['flash_transition_effect'],
212
- '',
213
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
214
- );
215
- }
216
-
217
- function _render_nextgen_basic_slideshow_flash_slow_zoom_field($display_type)
218
- {
219
- return $this->_render_radio_field(
220
- $display_type,
221
- 'flash_slow_zoom',
222
- __('Use slow zooming effect', 'nggallery'),
223
- $display_type->settings['flash_slow_zoom'],
224
- '',
225
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
226
- );
227
- }
228
-
229
- function _render_nextgen_basic_slideshow_flash_background_music_field($display_type)
230
- {
231
- return $this->_render_text_field(
232
- $display_type,
233
- 'flash_background_music',
234
- __('Background music (url)', 'nggallery'),
235
- $display_type->settings['flash_background_music'],
236
- '',
237
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE,
238
- 'http://...'
239
- );
240
- }
241
-
242
- function _render_nextgen_basic_slideshow_flash_xhtml_validation_field($display_type)
243
- {
244
- return $this->_render_radio_field(
245
- $display_type,
246
- 'flash_xhtml_validation',
247
- __('Try XHTML validation', 'nggallery'),
248
- $display_type->settings['flash_xhtml_validation'],
249
- 'Uses CDATA. Important: Could cause problems with some older browsers',
250
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
251
- );
252
- }
253
-
254
- function _render_nextgen_basic_slideshow_flash_background_color_field($display_type)
255
- {
256
- return $this->_render_color_field(
257
- $display_type,
258
- 'flash_background_color',
259
- __('Background', 'nggallery'),
260
- $display_type->settings['flash_background_color'],
261
- '',
262
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
263
- );
264
- }
265
-
266
- function _render_nextgen_basic_slideshow_flash_text_color_field($display_type)
267
- {
268
- return $this->_render_color_field(
269
- $display_type,
270
- 'flash_text_color',
271
- __('Texts / buttons', 'nggallery'),
272
- $display_type->settings['flash_text_color'],
273
- '',
274
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
275
- );
276
- }
277
-
278
- function _render_nextgen_basic_slideshow_flash_rollover_color_field($display_type)
279
- {
280
- return $this->_render_color_field(
281
- $display_type,
282
- 'flash_rollover_color',
283
- __('Rollover / active', 'nggallery'),
284
- $display_type->settings['flash_rollover_color'],
285
- '',
286
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
287
- );
288
- }
289
-
290
- function _render_nextgen_basic_slideshow_flash_screen_color_field($display_type)
291
- {
292
- return $this->_render_color_field(
293
- $display_type,
294
- 'flash_screen_color',
295
- __('Screen', 'nggallery'),
296
- $display_type->settings['flash_screen_color'],
297
- '',
298
- empty($display_type->settings['flash_enabled']) ? TRUE : FALSE
299
- );
300
- }
301
-
302
  /**
303
  * Renders the show_thumbnail_link settings field
304
  *
34
  'nextgen_basic_slideshow_gallery_dimensions',
35
  'nextgen_basic_slideshow_cycle_effect',
36
  'nextgen_basic_slideshow_cycle_interval',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  'nextgen_basic_slideshow_show_thumbnail_link',
38
  'nextgen_basic_slideshow_thumbnail_link_text'
39
  );
86
  ), True);
87
  }
88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  /**
90
  * Renders the show_thumbnail_link settings field
91
  *
products/photocrati_nextgen/modules/nextgen_basic_gallery/module.nextgen_basic_gallery.php CHANGED
@@ -34,6 +34,13 @@ class M_NextGen_Basic_Gallery extends C_Base_Module
34
  include_once('class.nextgen_basic_gallery_installer.php');
35
  C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Basic_Gallery_Installer');
36
  }
 
 
 
 
 
 
 
37
 
38
  function get_type_list()
39
  {
@@ -243,4 +250,34 @@ class M_NextGen_Basic_Gallery extends C_Base_Module
243
  }
244
  }
245
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  new M_NextGen_Basic_Gallery;
34
  include_once('class.nextgen_basic_gallery_installer.php');
35
  C_Photocrati_Installer::add_handler($this->module_id, 'C_NextGen_Basic_Gallery_Installer');
36
  }
37
+
38
+ function initialize()
39
+ {
40
+ parent::initialize();
41
+ $notices = C_Admin_Notification_Manager::get_instance();
42
+ $notices->add('image_rotator_notice', 'C_Image_Rotator_Notice');
43
+ }
44
 
45
  function get_type_list()
46
  {
250
  }
251
  }
252
 
253
+ class C_Image_Rotator_Notice
254
+ {
255
+ static $_instance = NULL;
256
+ static function get_instance($name)
257
+ {
258
+ if (!self::$_instance) {
259
+ $klass = get_class();
260
+ self::$_instance = new $klass($name);
261
+ }
262
+ return self::$_instance;
263
+ }
264
+
265
+ function __construct($name)
266
+ {
267
+ $this->name = $name;
268
+ }
269
+
270
+ function render()
271
+ {
272
+ $link = __('this blog post', 'nggallery');
273
+ $link = "<a href='http://www.nextgen-gallery.com/flash-removed'>{$link}</a>";
274
+ return sprintf(__("Flash slideshow support has been removed from NextGEN Gallery. Please see %s for more information.", 'nggallery'), $link);
275
+ }
276
+
277
+ function is_dismissable()
278
+ {
279
+ return TRUE;
280
+ }
281
+ }
282
+
283
  new M_NextGen_Basic_Gallery;
products/photocrati_nextgen/modules/nextgen_basic_gallery/static/slideshow/imagerotator.swf CHANGED
Binary file
products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/slideshow/index.php CHANGED
@@ -1,193 +1,85 @@
1
  <?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?>
2
- <?php if ($show_thumbnail_link): ?>
3
- <!-- Thumbnails Link -->
4
- <div class="slideshowlink">
5
- <a href='<?php esc_attr_e($thumbnail_link) ?>'><?php echo_h($thumbnail_link_text) ?></a>
6
- </div>
7
- <?php endif ?>
8
 
9
- <?php if ($flash_enabled): ?>
10
- <!-- Display Flash Slideshow -->
 
 
 
 
11
 
 
12
  <?php
13
- // Configure slideshow parameters
14
- $width = $gallery_width;
15
- $height = $gallery_height;
16
-
17
- if ($cycle_interval == 0)
18
- $cycle_interval = 1;
19
-
20
- if ($flash_background_color && $flash_background_color[0] == '#')
21
- $flash_background_color = substr($flash_background_color, 1);
22
-
23
- if ($flash_text_color && $flash_text_color[0] == '#')
24
- $flash_text_color = substr($flash_text_color, 1);
25
-
26
- if ($flash_rollover_color && $flash_rollover_color[0] == '#')
27
- $flash_rollover_color = substr($flash_rollover_color, 1);
28
-
29
- if ($flash_screen_color && $flash_screen_color[0] == '#')
30
- $flash_screen_color = substr($flash_screen_color, 1);
31
-
32
- // init the flash output
33
- $swfobject = new swfobject( $flash_path, 'so' . $displayed_gallery_id, $width, $height, '7.0.0', 'false');
34
-
35
- $swfobject->message = '<p>' . __('Slideshows require the&nbsp;<a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a>&nbsp;and a&nbsp;<a href="http://www.mozilla.com/firefox/">browser with Javascript support</a>.', 'nggallery') . '</p>';
36
-
37
- $swfobject->add_params('wmode', 'opaque');
38
- $swfobject->add_params('allowfullscreen', 'true');
39
- $swfobject->add_params('bgcolor', $flash_screen_color, 'FFFFFF', 'string', '#');
40
- $swfobject->add_attributes('styleclass', 'slideshow');
41
- $swfobject->add_attributes('name', 'so' . $displayed_gallery_id);
42
-
43
- // adding the flash parameter
44
- $swfobject->add_flashvars( 'file', urlencode ( $mediarss_link ) );
45
- $swfobject->add_flashvars( 'shuffle', (!empty($flash_shuffle) ? TRUE : FALSE), '', 'bool');
46
-
47
- // option has oposite meaning : true should switch to next image
48
- $swfobject->add_flashvars( 'linkfromdisplay', !$flash_next_on_click, 'false', 'bool');
49
- $swfobject->add_flashvars( 'shownavigation', $flash_navigation_bar, 'true', 'bool');
50
- $swfobject->add_flashvars( 'showicons', $flash_loading_icon, 'true', 'bool');
51
- $swfobject->add_flashvars( 'kenburns', $flash_slow_zoom, 'false', 'bool');
52
- $swfobject->add_flashvars( 'overstretch', $flash_stretch_image, 'false', 'string');
53
- $swfobject->add_flashvars( 'rotatetime', $cycle_interval, 5, 'int');
54
- $swfobject->add_flashvars( 'transition', $flash_transition_effect, 'random', 'string');
55
-
56
- $swfobject->add_flashvars( 'backcolor', $flash_background_color, 'FFFFFF', 'string', '0x');
57
- $swfobject->add_flashvars( 'frontcolor', $flash_text_color, '000000', 'string', '0x');
58
- $swfobject->add_flashvars( 'lightcolor', $flash_rollover_color, '000000', 'string', '0x');
59
- $swfobject->add_flashvars( 'screencolor', $flash_screen_color, '000000', 'string', '0x');
60
- if ($flash_watermark_logo) {
61
- $ngg_options = C_NextGen_Settings::get_instance();
62
- $swfobject->add_flashvars( 'logo', $ngg_options['wmPath'], '', 'string');
63
- }
64
-
65
-
66
- $swfobject->add_flashvars( 'audio', $flash_background_music, '', 'string');
67
- $swfobject->add_flashvars( 'width', $width, '260');
68
- $swfobject->add_flashvars( 'height', $height, '320');
69
- ?>
70
-
71
- <div class="slideshow" id="gallery_<?php echo_h($displayed_gallery_id) ?>">
72
- <?php echo $swfobject->output(); ?>
73
- </div>
74
- <script type="text/javascript" defer="defer">
75
- <?php if ($flash_xhtml_validation): ?>
76
- <!--
77
- <?php endif ?>
78
- jQuery(function($){
79
- <?php echo $swfobject->javascript(); ?>
80
- });
81
- <?php if ($flash_xhtml_validation): ?>
82
- -->
83
- <?php endif ?>
84
- </script>
85
-
86
- <?php else: ?>
87
- <?php // Display JQuery Cycle Slideshow ?>
88
- <div class="ngg-slideshow-image-list ngg-slideshow-nojs" id="<?php echo_h($anchor)?>-image-list">
89
- <?php
90
-
91
- $this->include_template('photocrati-nextgen_gallery_display#list/before');
92
-
93
- ?>
94
- <?php for ($i=0; $i<count($images); $i++): ?>
95
-
96
- <?php
97
- // Determine image dimensions
98
- $image = $images[$i];
99
- $image_size = $storage->get_original_dimensions($image);
100
-
101
- if ($image_size == null) {
102
- $image_size['width'] = $image->meta_data['width'];
103
- $image_size['height'] = $image->meta_data['height'];
104
- }
105
-
106
- // Determine whether an image is hidden or not
107
- if (isset($image->hidden) && $image->hidden) {
108
- $image->style = 'style="display: none;"';
109
- }
110
- else {
111
- $image->style = '';
112
  }
113
-
114
- // Determine image aspect ratio
115
- $image_ratio = $image_size['width'] / $image_size['height'];
116
- if ($image_ratio > $aspect_ratio) {
117
- if ($image_size['width'] > $gallery_width) {
118
- $image_size['width'] = $gallery_width;
119
- $image_size['height'] = (int) round($gallery_width / $image_ratio);
120
- }
121
  }
122
- else {
123
- if ($image_size['height'] > $gallery_height) {
124
- $image_size['width'] = (int) round($gallery_height * $image_ratio);
125
- $image_size['height'] = $gallery_height;
126
- }
127
- }
128
- ?>
129
-
130
- <?php
131
-
132
- $template_params = array(
133
- 'index' => $i,
134
- 'class' => 'ngg-gallery-slideshow-image'
135
- );
136
- $template_params = array_merge(get_defined_vars(), $template_params);
137
-
138
- $this->include_template('photocrati-nextgen_gallery_display#image/before', $template_params);
139
-
140
- ?>
141
-
142
- <img data-image-id='<?php echo esc_attr($image->pid); ?>'
143
- title="<?php echo esc_attr($image->description)?>"
144
- alt="<?php echo esc_attr($image->alttext)?>"
145
- src="<?php echo esc_attr($storage->get_image_url($image, 'full', TRUE))?>"
146
- width="<?php echo esc_attr($image_size['width'])?>"
147
- height="<?php echo esc_attr($image_size['height'])?>"
148
- />
149
-
150
- <?php
151
-
152
- $this->include_template('photocrati-nextgen_gallery_display#image/after', $template_params);
153
-
154
- ?>
155
-
156
- <?php endfor ?>
157
-
158
- <?php
159
-
160
- $this->include_template('photocrati-nextgen_gallery_display#list/after');
161
-
162
  ?>
163
- </div>
164
-
165
- <?php
166
-
167
- $this->include_template('photocrati-nextgen_gallery_display#container/before');
168
-
 
 
 
 
169
  ?>
170
- <div
171
- class="ngg-galleryoverview ngg-slideshow"
172
- id="<?php echo_h($anchor)?>"
173
- data-placeholder="<?php echo nextgen_esc_url($placeholder)?>"
174
- style="max-width:<?php echo_h($gallery_width) ?>px; max-height:<?php echo_h($gallery_height) ?>px;">
175
-
176
- <div
177
- class="ngg-slideshow-loader"
178
- id="<?php echo_h($anchor)?>-loader"
179
- style="width:<?php echo_h($gallery_width) ?>px; height:<?php echo_h($gallery_height) ?>px;">
180
- <img src="<?php echo_h(NGGALLERY_URLPATH) ?>images/loader.gif" alt="" />
181
- </div>
182
  </div>
183
- <?php
184
-
185
- $this->include_template('photocrati-nextgen_gallery_display#container/after');
186
-
187
- ?>
188
- <script type="text/javascript">
189
- jQuery('#<?php echo_h($anchor)?>-image-list').hide().removeClass('ngg-slideshow-nojs');
190
- jQuery(function($){
191
  jQuery('#<?php echo_h($anchor); ?>').nggShowSlideshow({
192
  id: '<?php echo_h($displayed_gallery_id); ?>',
193
  fx: '<?php echo_h($cycle_effect); ?>',
@@ -197,6 +89,5 @@
197
  timeout: <?php echo_h(intval($cycle_interval) * 1000); ?>
198
  });
199
  });
200
- </script>
201
- <?php endif ?>
202
  <?php $this->end_element(); ?>
1
  <?php $this->start_element('nextgen_gallery.gallery_container', 'container', $displayed_gallery); ?>
 
 
 
 
 
 
2
 
3
+ <?php if ($show_thumbnail_link) { ?>
4
+ <!-- Thumbnails Link -->
5
+ <div class="slideshowlink">
6
+ <a href='<?php esc_attr_e($thumbnail_link); ?>'><?php echo_h($thumbnail_link_text); ?></a>
7
+ </div>
8
+ <?php } ?>
9
 
10
+ <div class="ngg-slideshow-image-list ngg-slideshow-nojs" id="<?php echo_h($anchor); ?>-image-list">
11
  <?php
12
+ $this->include_template('photocrati-nextgen_gallery_display#list/before');
13
+ for ($i = 0; $i < count($images); $i++) {
14
+ // Determine image dimensions
15
+ $image = $images[$i];
16
+ $image_size = $storage->get_original_dimensions($image);
17
+ if ($image_size == null)
18
+ {
19
+ $image_size['width'] = $image->meta_data['width'];
20
+ $image_size['height'] = $image->meta_data['height'];
21
+ }
22
+
23
+ // Determine whether an image is hidden or not
24
+ if (isset($image->hidden) && $image->hidden) {
25
+ $image->style = 'style="display: none;"';
26
+ }
27
+ else {
28
+ $image->style = '';
29
+ }
30
+
31
+ // Determine image aspect ratio
32
+ $image_ratio = $image_size['width'] / $image_size['height'];
33
+ if ($image_ratio > $aspect_ratio)
34
+ {
35
+ if ($image_size['width'] > $gallery_width)
36
+ {
37
+ $image_size['width'] = $gallery_width;
38
+ $image_size['height'] = (int) round($gallery_width / $image_ratio);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  }
40
+ }
41
+ else {
42
+ if ($image_size['height'] > $gallery_height)
43
+ {
44
+ $image_size['width'] = (int) round($gallery_height * $image_ratio);
45
+ $image_size['height'] = $gallery_height;
 
 
46
  }
47
+ }
48
+
49
+ $template_params = array(
50
+ 'index' => $i,
51
+ 'class' => 'ngg-gallery-slideshow-image'
52
+ );
53
+ $template_params = array_merge(get_defined_vars(), $template_params);
54
+ $this->include_template('photocrati-nextgen_gallery_display#image/before', $template_params);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ?>
56
+ <img data-image-id='<?php echo esc_attr($image->pid); ?>'
57
+ title="<?php echo esc_attr($image->description)?>"
58
+ alt="<?php echo esc_attr($image->alttext)?>"
59
+ src="<?php echo esc_attr($storage->get_image_url($image, 'full', TRUE))?>"
60
+ width="<?php echo esc_attr($image_size['width'])?>"
61
+ height="<?php echo esc_attr($image_size['height'])?>"/>
62
+ <?php
63
+ $this->include_template('photocrati-nextgen_gallery_display#image/after', $template_params);
64
+ }
65
+ $this->include_template('photocrati-nextgen_gallery_display#list/after');
66
  ?>
67
+ </div>
68
+ <?php $this->include_template('photocrati-nextgen_gallery_display#container/before'); ?>
69
+ <div class="ngg-galleryoverview ngg-slideshow"
70
+ id="<?php echo_h($anchor); ?>"
71
+ data-placeholder="<?php echo nextgen_esc_url($placeholder); ?>"
72
+ style="max-width: <?php echo_h($gallery_width); ?>px; max-height: <?php echo_h($gallery_height); ?>px;">
73
+ <div class="ngg-slideshow-loader"
74
+ id="<?php echo_h($anchor); ?>-loader"
75
+ style="width: <?php echo_h($gallery_width); ?>px; height: <?php echo_h($gallery_height); ?>px;">
76
+ <img src="<?php echo_h(NGGALLERY_URLPATH); ?>images/loader.gif" alt=""/>
 
 
77
  </div>
78
+ </div>
79
+ <?php $this->include_template('photocrati-nextgen_gallery_display#container/after'); ?>
80
+ <script type="text/javascript">
81
+ jQuery('#<?php echo_h($anchor); ?>-image-list').hide().removeClass('ngg-slideshow-nojs');
82
+ jQuery(function($) {
 
 
 
83
  jQuery('#<?php echo_h($anchor); ?>').nggShowSlideshow({
84
  id: '<?php echo_h($displayed_gallery_id); ?>',
85
  fx: '<?php echo_h($cycle_effect); ?>',
89
  timeout: <?php echo_h(intval($cycle_interval) * 1000); ?>
90
  });
91
  });
92
+ </script>
 
93
  <?php $this->end_element(); ?>
products/photocrati_nextgen/modules/nextgen_data/class.gallerystorage_driver_base.php CHANGED
@@ -490,22 +490,28 @@ class Mixin_GalleryStorage_Driver_Base extends Mixin
490
  $retval = in_array(image_type_to_mime_type($image_type), $valid_types);
491
  }
492
  }
493
-
494
  else {
495
  $file_info = @getimagesize($filename);
496
  if (isset($file_info[2])) {
497
  $retval = in_array(image_type_to_mime_type($file_info[2]), $valid_types);
498
  }
499
-
500
- // We'll assume things are ok as there isn't much else we can do
501
- else $retval = TRUE;
502
  }
503
  }
504
 
505
  // Is this a valid extension?
506
- // TODO: Should we remove this?
507
  else if (strpos($type, 'octet-stream') !== FALSE && preg_match($valid_regex, $type)) {
508
- $retval = TRUE;
 
 
 
 
 
 
 
 
 
 
 
509
  }
510
  }
511
  }
490
  $retval = in_array(image_type_to_mime_type($image_type), $valid_types);
491
  }
492
  }
 
493
  else {
494
  $file_info = @getimagesize($filename);
495
  if (isset($file_info[2])) {
496
  $retval = in_array(image_type_to_mime_type($file_info[2]), $valid_types);
497
  }
 
 
 
498
  }
499
  }
500
 
501
  // Is this a valid extension?
 
502
  else if (strpos($type, 'octet-stream') !== FALSE && preg_match($valid_regex, $type)) {
503
+ // If we can, we'll verify the mime type
504
+ if (function_exists('exif_imagetype')) {
505
+ if (($image_type = @exif_imagetype($filename)) !== FALSE) {
506
+ $retval = in_array(image_type_to_mime_type($image_type), $valid_types);
507
+ }
508
+ }
509
+ else {
510
+ $file_info = @getimagesize($filename);
511
+ if (isset($file_info[2])) {
512
+ $retval = in_array(image_type_to_mime_type($file_info[2]), $valid_types);
513
+ }
514
+ }
515
  }
516
  }
517
  }
products/photocrati_nextgen/modules/nextgen_gallery_display/class.display_type_mapper.php CHANGED
@@ -20,6 +20,17 @@ class C_Display_Type_Mapper extends C_CustomPost_DataMapper_Driver
20
  $this->add_mixin('Mixin_Display_Type_Mapper');
21
  $this->implement('I_Display_Type_Mapper');
22
  $this->set_model_factory_method($object_name);
 
 
 
 
 
 
 
 
 
 
 
23
  }
24
 
25
  function initialize($context=FALSE)
20
  $this->add_mixin('Mixin_Display_Type_Mapper');
21
  $this->implement('I_Display_Type_Mapper');
22
  $this->set_model_factory_method($object_name);
23
+
24
+ // Define columns
25
+ $this->define_column('ID', 'BIGINT', 0);
26
+ $this->define_column('name', 'VARCHAR(255)');
27
+ $this->define_column('title', 'VARCHAR(255)');
28
+ $this->define_column('preview_image_relpath', 'VARCHAR(255)');
29
+ $this->define_column('default_source', 'VARCHAR(255)');
30
+ $this->define_column('view_order', 'BIGINT', NGG_DISPLAY_PRIORITY_BASE);
31
+
32
+ $this->add_serialized_column('settings');
33
+ $this->add_serialized_column('entity_types');
34
  }
35
 
36
  function initialize($context=FALSE)
products/photocrati_nextgen/modules/nextgen_other_options/adapter.other_options_forms.php CHANGED
@@ -14,7 +14,7 @@ class A_Other_Options_Forms extends Mixin
14
  if (!is_multisite() || (is_multisite() && C_NextGen_Settings::get_instance()->get('wpmuStyle')))
15
  $forms['styles'] = 'A_Styles_Form';
16
 
17
- if (is_super_admin() && (!is_multisite() || (is_multisite() && C_NextGen_Settings::get_instance()->get('wpmuRoles'))))
18
  $forms['roles_and_capabilities'] = 'A_Roles_Form';
19
 
20
  $forms += array(
@@ -23,7 +23,10 @@ class A_Other_Options_Forms extends Mixin
23
  'lightbox_effects' => 'A_Lightbox_Manager_Form',
24
  'watermarks' => 'A_Watermarks_Form',
25
  'miscellaneous' => 'A_Miscellaneous_Form',
26
- 'reset' => 'A_Reset_Form'
 
 
 
27
  );
28
 
29
  $registry = $this->object->get_registry();
14
  if (!is_multisite() || (is_multisite() && C_NextGen_Settings::get_instance()->get('wpmuStyle')))
15
  $forms['styles'] = 'A_Styles_Form';
16
 
17
+ if (is_super_admin() && (!is_multisite() || (is_multisite() && C_NextGen_Settings::get_instance()->get('wpmuRoles')))) {}
18
  $forms['roles_and_capabilities'] = 'A_Roles_Form';
19
 
20
  $forms += array(
23
  'lightbox_effects' => 'A_Lightbox_Manager_Form',
24
  'watermarks' => 'A_Watermarks_Form',
25
  'miscellaneous' => 'A_Miscellaneous_Form',
26
+ );
27
+
28
+ if (is_admin()) $forms += array(
29
+ 'reset' => 'A_Reset_Form'
30
  );
31
 
32
  $registry = $this->object->get_registry();
products/photocrati_nextgen/modules/ngglegacy/admin/manage-sort.php CHANGED
@@ -19,7 +19,6 @@ function nggallery_sortorder($galleryID = 0){
19
  if (is_array($sortArray)){
20
  $neworder = array();
21
  foreach($sortArray as $pid) {
22
- $pid = substr($pid, 4); // get id from "pid-x"
23
  $neworder[] = (int) $pid;
24
  }
25
  $sortindex = 1;
@@ -59,27 +58,23 @@ function nggallery_sortorder($galleryID = 0){
59
 
60
  ?>
61
  <script type="text/javascript">
62
- // seralize the ImageOrder
63
- function saveImageOrder()
64
- {
65
- var serial = "";
66
- var objects = document.getElementsByTagName('div');
67
- for(var no=0;no<objects.length;no++){
68
- if(objects[no].className=='imageBox' || objects[no].className=='imageBoxHighlighted'){
69
- if (serial.length > 0) serial = serial + '&'
70
- serial = serial + "sortArray[]=" + objects[no].id;
71
- }
72
- }
73
- jQuery('input[name=sortorder]').val(serial);
74
- // debug( 'This is the new order of the images(IDs) : <br>' + orderString );
75
-
76
- }
77
  jQuery(document).ready(function($) {
78
  if ($(this).data('ready')) return;
79
 
80
  // Enable sorting
81
  $(".jqui-sortable").sortable({items: 'div.imageBox'});
82
 
 
 
 
 
 
 
 
 
 
 
 
83
  // Listen for events in other frames
84
  if (window.Frame_Event_Publisher) {
85
  Frame_Event_Publisher.listen_for('attach_to_post:manage_galleries attach_to_post:manage_images', function(){
@@ -93,12 +88,12 @@ function nggallery_sortorder($galleryID = 0){
93
 
94
  </script>
95
  <div class="wrap">
96
- <form id="sortGallery" method="POST" action="<?php echo $clean_url ?>" onsubmit="saveImageOrder()" accept-charset="utf-8">
97
  <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
98
  <div class="tablenav">
99
  <div class="alignleft actions">
100
  <?php wp_nonce_field('ngg_updatesortorder') ?>
101
- <input class="button-primary action" type="submit" name="updateSortorder" onclick="saveImageOrder()" value="<?php _e('Update Sort Order', 'nggallery') ?>" />
102
  </div>
103
  <div class="alignright actions">
104
  <a href="<?php echo nextgen_esc_url( $back_url ); ?>" class="button"><?php _e('Back to gallery', 'nggallery'); ?></a>
19
  if (is_array($sortArray)){
20
  $neworder = array();
21
  foreach($sortArray as $pid) {
 
22
  $neworder[] = (int) $pid;
23
  }
24
  $sortindex = 1;
58
 
59
  ?>
60
  <script type="text/javascript">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  jQuery(document).ready(function($) {
62
  if ($(this).data('ready')) return;
63
 
64
  // Enable sorting
65
  $(".jqui-sortable").sortable({items: 'div.imageBox'});
66
 
67
+ $('#sortGallery').submit(function(e){
68
+ var serial = "";
69
+ var $images = $('div.imageBox');
70
+ for (var i=0; i<$images.length; i++) {
71
+ var image_id = $images[i].id.split('-').pop();
72
+ if (serial.length > 0) serial = serial + '&';
73
+ serial = serial + "sortArray[]=" + image_id;
74
+ }
75
+ $('input[name=sortorder]').val(serial);
76
+ });
77
+
78
  // Listen for events in other frames
79
  if (window.Frame_Event_Publisher) {
80
  Frame_Event_Publisher.listen_for('attach_to_post:manage_galleries attach_to_post:manage_images', function(){
88
 
89
  </script>
90
  <div class="wrap">
91
+ <form id="sortGallery" method="POST" action="<?php echo $clean_url ?>" accept-charset="utf-8">
92
  <h2><?php _e('Sort Gallery', 'nggallery') ?></h2>
93
  <div class="tablenav">
94
  <div class="alignleft actions">
95
  <?php wp_nonce_field('ngg_updatesortorder') ?>
96
+ <input class="button-primary action" type="submit" name="updateSortorder" value="<?php _e('Update Sort Order', 'nggallery') ?>" />
97
  </div>
98
  <div class="alignright actions">
99
  <a href="<?php echo nextgen_esc_url( $back_url ); ?>" class="button"><?php _e('Back to gallery', 'nggallery'); ?></a>
products/photocrati_nextgen/modules/ngglegacy/admin/overview.php CHANGED
@@ -94,7 +94,7 @@ function ngg_AboutMetaBox()
94
  {
95
  ?>
96
  <div id="poststuff">
97
- <p><?php _e("NextGEN Gallery is one of the most popular Wordpress plugins of all time with over 9 million downloads. It is developed and supported by Photocrati Media. We'd like to offer a special thanks to Alex Rabe, who first developed the plugin and maintained it through 2011.", 'nggallery'); ?></p>
98
  <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>
99
  <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>
100
  </div>
94
  {
95
  ?>
96
  <div id="poststuff">
97
+ <p><?php _e("NextGEN Gallery is one of the most popular Wordpress plugins of all time with over 10 million downloads.", 'nggallery'); __(" It is developed and supported by Photocrati Media. We'd like to offer a special thanks to Alex Rabe, who first developed the plugin and maintained it through 2011.", 'nggallery'); ?></p>
98
  <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>
99
  <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>
100
  </div>
products/photocrati_nextgen/modules/ngglegacy/lib/swfobject.php DELETED
@@ -1,195 +0,0 @@
1
- <?php
2
- if ( !class_exists('swfobject') ) :
3
- /**
4
- * swfobject - PHP class for creating dynamic content of SWFObject V2.1
5
- *
6
- * @author Alex Rabe
7
- * @package NextGEN Gallery
8
- * @version 0.6
9
- *
10
- * @access public
11
- * @example http://code.google.com/p/swfobject/
12
- */
13
- class swfobject {
14
- /**
15
- * id of the HTML element
16
- *
17
- * @var string
18
- */
19
- var $id;
20
- /**
21
- * specifies the width of your SWF
22
- *
23
- * @var string
24
- * @private
25
- */
26
- var $width;
27
- /**
28
- * specifies the height of your SWF
29
- *
30
- * @var string
31
- * @privat
32
- */
33
- var $height;
34
- /**
35
- * the javascript output
36
- *
37
- * @var string
38
- */
39
- var $js;
40
- /**
41
- * the replacemnt message
42
- *
43
- * @var string
44
- */
45
- var $message = 'The <a href="http://www.macromedia.com/go/getflashplayer">Flash Player</a> and <a href="http://www.mozilla.com/firefox/">a browser with Javascript support</a> are needed..';
46
- /**
47
- * the classname for the div element
48
- *
49
- * @var string
50
- */
51
- var $classname = 'swfobject';
52
- /**
53
- * array of flashvars
54
- *
55
- * @var array
56
- */
57
- var $flashvars;
58
- /**
59
- * array of nested object element params
60
- *
61
- * @var array
62
- */
63
- var $params;
64
- /**
65
- * array of object's attributest
66
- *
67
- * @var array
68
- */
69
- var $attributes;
70
-
71
- /**
72
- * swfobject::swfobject()
73
- *
74
- * @param string $swfUrl (required) specifies the URL of your SWF
75
- * @param string $id (required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content
76
- * @param string $width (required) specifies the width of your SWF
77
- * @param string $height (required) specifies the height of your SWF
78
- * @param string $version (required) specifies the Flash player version your SWF is published for (format is: "major.minor.release")
79
- * @param string $expressInstallSwfurl (optional) specifies the URL of your express install SWF and activates Adobe express install
80
- * @param array $flashvars (optional) specifies your flashvars with name:value pairs
81
- * @param array $params (optional) specifies your nested object element params with name:value pair
82
- * @param array $attributes (optional) specifies your object's attributes with name:value pairs
83
- * @return string the content
84
- */
85
- function swfobject( $swfUrl, $id, $width, $height, $version, $expressInstallSwfurl = false, $flashvars = false, $params = false, $attributes = false ) {
86
-
87
- global $swfCounter;
88
-
89
- // look for a other swfobject instance
90
- if ( !isset($swfCounter) )
91
- $swfCounter = 1;
92
-
93
- $this->id = $id . '_' . $swfCounter;
94
- $this->width = $width;
95
- $this->height = $height;
96
-
97
- $this->flashvars = ( is_array($flashvars) ) ? $flashvars : array();
98
- $this->params = ( is_array($params) ) ? $params : array();
99
- $this->attributes = ( is_array($attributes) ) ? $attributes : array();
100
-
101
- $this->embedSWF = 'swfobject.embedSWF("'. $swfUrl .'", "'. $this->id .'", "'. $width .'", "'. $height .'", "'. $version .'", '. $expressInstallSwfurl .', this.flashvars, this.params , this.attr );' . "\n";
102
- }
103
-
104
- function output () {
105
-
106
- global $swfCounter;
107
-
108
- // count up if we have more than one swfobject
109
- $swfCounter++;
110
-
111
- $out = "\n" . '<div class="'. $this->classname .'" id="'. $this->id .'" style="width:'.$this->width .'px; height:'. $this->height .'px;">';
112
- $out .= "\n" . $this->message;
113
- $out .= "\n" . '</div>';
114
-
115
- return $out;
116
- }
117
-
118
- function javascript () {
119
-
120
- //Build javascript
121
- $this->js = "\nvar " . $this->id . " = {\n";
122
- $this->js .= $this->add_js_parameters('params', $this->params) . ",\n";
123
- $this->js .= $this->add_js_parameters('flashvars', $this->flashvars) . ",\n";
124
- $this->js .= $this->add_js_parameters('attr', $this->attributes) . ",\n";
125
- $this->js .= "\tstart : function() {" . "\n\t\t";
126
- $this->js .= $this->embedSWF;
127
- $this->js .= "\t}\n}\n";
128
- $this->js .= $this->id . '.start();';
129
-
130
- return $this->js;
131
- }
132
-
133
- function add_flashvars ( $key, $value, $default = '', $type = '', $prefix = '' ) {
134
-
135
- if ( is_bool( $value ) )
136
- $value = ( $value ) ? 'true' : 'false';
137
- elseif ( $type == 'bool' )
138
- $value = ( $value == '1' ) ? 'true' : 'false';
139
-
140
- // do not add the variable if we hit the default setting
141
- if ( $value == $default )
142
- return;
143
-
144
- $this->flashvars[$key] = $prefix . $value;
145
- return;
146
- }
147
-
148
- function add_params ( $key, $value, $default = '', $type = '', $prefix = '' ) {
149
-
150
- if ( is_bool( $value ) )
151
- $value = ( $value ) ? 'true' : 'false';
152
- elseif ( $type == 'bool' )
153
- $value = ( $value == '1' ) ? 'true' : 'false';
154
-
155
- // do not add the variable if we hit the default setting
156
- if ( $value == $default )
157
- return;
158
-
159
- $this->params[$key] = $prefix . $value;
160
- return;
161
- }
162
-
163
- function add_attributes ( $key, $value, $default = '', $type = '', $prefix = '' ) {
164
-
165
- if ( is_bool( $value ) )
166
- $value = ( $value ) ? 'true' : 'false';
167
- elseif ( $type == 'bool' )
168
- $value = ( $value == '1' ) ? 'true' : 'false';
169
-
170
- // do not add the variable if we hit the default setting
171
- if ( $value == $default )
172
- return;
173
-
174
- $this->attributes[$key] = $prefix . $value;
175
- return;
176
- }
177
-
178
- function add_js_parameters( $name, $params ) {
179
- $list = '';
180
- if ( is_array($params) ) {
181
- foreach ($params as $key => $value) {
182
- if ( !empty($list) )
183
- $list .= ",";
184
- if (false === strrpos($key, '.') )
185
- $list .= "\n\t\t" . $key . ' : ' . '"' . $value .'"';
186
- else
187
- $list .= "\n\t\t'" . $key . '\' : ' . '"' . $value .'"';
188
- }
189
- }
190
- $js = "\t" . $name . ' : {' . $list . '}';
191
- return $js;
192
- }
193
-
194
- }
195
- endif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
products/photocrati_nextgen/modules/ngglegacy/nggallery.php CHANGED
@@ -62,7 +62,6 @@ if (!class_exists('nggLoader')) {
62
 
63
  // All credits to the tranlator
64
  $this->translator = '<p class="hint">'. __('<strong>Translation by : </strong><a target="_blank" href="http://www.nextgen-gallery.com/languages/">See here</a>', 'nggallery') . '</p>';
65
- $this->translator .= '<p class="hint">'. __('<strong>This translation is not yet updated for Version 1.9.0</strong>. If you would like to help with translation, download the current po from the plugin folder and read <a href="http://www.nextgen-gallery.com/languages/">here</a> how you can translate the plugin.', 'nggallery') . '</p>';
66
 
67
  // Content Filters
68
  add_filter('ngg_gallery_name', 'sanitize_title');
62
 
63
  // All credits to the tranlator
64
  $this->translator = '<p class="hint">'. __('<strong>Translation by : </strong><a target="_blank" href="http://www.nextgen-gallery.com/languages/">See here</a>', 'nggallery') . '</p>';
 
65
 
66
  // Content Filters
67
  add_filter('ngg_gallery_name', 'sanitize_title');
products/photocrati_nextgen/modules/router/class.routing_app.php CHANGED
@@ -552,7 +552,7 @@ class Mixin_Routing_App extends Mixin
552
  $retval = $this->object->get_routed_url();
553
  }
554
 
555
- return $retval;
556
  }
557
 
558
  /**
@@ -617,7 +617,7 @@ class Mixin_Routing_App extends Mixin
617
 
618
  $retval = rtrim($retval, ' ?&');
619
 
620
- return $retval;
621
  }
622
 
623
 
552
  $retval = $this->object->get_routed_url();
553
  }
554
 
555
+ return esc_url($retval);
556
  }
557
 
558
  /**
617
 
618
  $retval = rtrim($retval, ' ?&');
619
 
620
+ return esc_url($retval);
621
  }
622
 
623
 
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
- Tags:gallery,image,images,photo,photos,picture,pictures,slideshow,flash,media,thumbnails,photo-albums,nextgen-gallery,nextgen
4
  Requires at least: 3.6.1
5
- Tested up to: 4.0
6
  Stable tag: trunk
7
  License: GPLv2
8
 
@@ -76,10 +76,6 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY
76
 
77
  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
78
 
79
- ** Please note **
80
-
81
- NextGEN Gallery's flash slideshow option is powered by the JW Image Rotator from Long Tail Video. The Image Rotator is provided free as part of our plugin package thanks to a special arrangement with Long Tail Video. Over time, we will be moving away from reliance on this file. For more information, see the Long Tail Video website: http://www.longtailvideo.com.
82
-
83
  == Installation ==
84
 
85
  INSTALLATION: The easiest way to enjoy NextGEN Gallery is to login to you WordPress dashboard, go to Plugins >> Add New, search for NextGEN Gallery, and click to install. You can also download the zip file from this page and upload it from the Plugins >> Add New > Upload page.
@@ -199,6 +195,20 @@ For more information, feel free to visit the official website for the NextGEN Ga
199
 
200
  == Changelog ==
201
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
202
  = V2.0.66.29 - 09.17.2014 =
203
  * NEW: Added skip_excluding_globally_excluded_images property to displayed gallery objects
204
  * Fixed: SQL generation for random image selection
1
  === NextGEN Gallery ===
2
  Contributors: photocrati
3
+ Tags: nextgen, nextgen gallery, gallery, galleries, image, images, image gallery, photo, photos, photo gallery, picture, pictures, picture gallery, album, albums, photo albums, image album, media, media gallery, thumbnails, thumbnail gallery, thumbnail galleries, slideshow, slideshows, slideshow gallery, slideshow galleries, fancybox, lightbox, responsive, responsive gallery, responsive galleries, wordpress responsive gallery, nextcellent, wordpress gallery plugin, wordpress photo gallery plugin, wp gallery, wp gallery plugins, best gallery plugin, free photo gallery, singlepic, image captions imagebrowser, watermarks, watermarking, photography, photographer
4
  Requires at least: 3.6.1
5
+ Tested up to: 4.1
6
  Stable tag: trunk
7
  License: GPLv2
8
 
76
 
77
  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
78
 
 
 
 
 
79
  == Installation ==
80
 
81
  INSTALLATION: The easiest way to enjoy NextGEN Gallery is to login to you WordPress dashboard, go to Plugins >> Add New, search for NextGEN Gallery, and click to install. You can also download the zip file from this page and upload it from the Plugins >> Add New > Upload page.
195
 
196
  == Changelog ==
197
 
198
+ = V2.0.66.37 - 12.18.2014 =
199
+ * NEW: Admin notice manager
200
+ * Secured: Removed flash slideshow support
201
+ * Secured: Image upload mechanism
202
+ * Fixed: Accordion styling in WordPress 4.1
203
+ * Fixed: Sorting images in WordPress 4.1
204
+
205
+ = V2.0.66.33 - 11.24.2014 =
206
+ * Fixed: Broken NextGEN Pro ecommerce-related shortcodes
207
+ * Fixed: Spanish PO file
208
+
209
+ = V2.0.66.31 - 11.21.2014 =
210
+ * Fixed: Broken shortcodes with WordPress 4.0.1
211
+
212
  = V2.0.66.29 - 09.17.2014 =
213
  * NEW: Added skip_excluding_globally_excluded_images property to displayed gallery objects
214
  * Fixed: SQL generation for random image selection