Slideshow Gallery - Version 1.3.1

Version Description

  • ADD: Images tester utility under Configuration to fix broken images
  • FIX: Issue with turning off navigation images
  • FIX: Issue with new slider settings if empty or set to zero (0)
Download this release

Release Info

Developer contrid
Plugin Icon 128x128 Slideshow Gallery
Version 1.3.1
Comparing to
See all releases

Code changes from version 1.3 to 1.3.1

helpers/db.php CHANGED
@@ -45,9 +45,14 @@ class GalleryDbHelper extends GalleryPlugin {
45
  }
46
  }
47
 
48
- $order = (empty($order)) ? array('id', "DESC") : $order;
49
- list($ofield, $odir) = $order;
50
- $query .= " ORDER BY `" . $ofield . "` " . $odir . "";
 
 
 
 
 
51
  $query .= " LIMIT 1";
52
 
53
  if ($record = $wpdb -> get_row($query)) {
45
  }
46
  }
47
 
48
+ if (!empty($order) && $order == "RAND") {
49
+ $query .= " ORDER BY RAND()";
50
+ } else {
51
+ $order = (empty($order)) ? array('id', "DESC") : $order;
52
+ list($ofield, $odir) = $order;
53
+ $query .= " ORDER BY `" . $ofield . "` " . $odir . "";
54
+ }
55
+
56
  $query .= " LIMIT 1";
57
 
58
  if ($record = $wpdb -> get_row($query)) {
helpers/html.php CHANGED
@@ -125,7 +125,7 @@ class GalleryHtmlHelper extends GalleryPlugin {
125
 
126
  function image_url($filename = null) {
127
  if (!empty($filename)) {
128
- return $this -> uploads_url() . '/slideshow-gallery/' . $filename;
129
  }
130
 
131
  return false;
125
 
126
  function image_url($filename = null) {
127
  if (!empty($filename)) {
128
+ return GalleryHtmlHelper::uploads_url() . '/slideshow-gallery/' . $filename;
129
  }
130
 
131
  return false;
models/slide.php CHANGED
@@ -49,7 +49,12 @@ class GallerySlide extends GalleryDbHelper {
49
  }
50
  break;
51
  case 'image' :
52
- $this -> image_path = GalleryHtmlHelper::uploads_path() . DS . 'slideshow-gallery' . DS . $dval;
 
 
 
 
 
53
  break;
54
  }
55
  }
49
  }
50
  break;
51
  case 'image' :
52
+ $imagespath = $this -> get_option('imagespath');
53
+ if (empty($imagespath)) {
54
+ $this -> image_path = GalleryHtmlHelper::uploads_path() . DS . 'slideshow-gallery' . DS . $dval;
55
+ } else {
56
+ $this -> image_path = rtrim($imagespath, DS) . DS . $dval;
57
+ }
58
  break;
59
  }
60
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://tribulant.com/
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
- Stable tag: 1.3
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
@@ -107,6 +107,10 @@ You can embed a slideshow and show the images uploaded to a post with the `post_
107
 
108
  Yes, you can use the `exclude` parameter to exclude post images by their order in the gallery (comma separated) like this `[slideshow post_id="123" exclude="2,4,8"]`.
109
 
 
 
 
 
110
  == Screenshots ==
111
 
112
  1. Slideshow gallery with thumbnails at the bottom.
@@ -118,6 +122,12 @@ Yes, you can use the `exclude` parameter to exclude post images by their order i
118
 
119
  == Changelog ==
120
 
 
 
 
 
 
 
121
  = 1.3 =
122
 
123
  * ADD: Show latest/featured products from Shopping Cart plugin
4
  Tags: wordpress plugins, wordpress slideshow gallery, slides, slideshow, image gallery, images, gallery, featured content, content gallery, javascript, javascript slideshow, slideshow gallery
5
  Requires at least: 3.1
6
  Tested up to: 3.8.1
7
+ Stable tag: 1.3.1
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
107
 
108
  Yes, you can use the `exclude` parameter to exclude post images by their order in the gallery (comma separated) like this `[slideshow post_id="123" exclude="2,4,8"]`.
109
 
110
+ = How can I fix slide images or thumbnails not displaying? =
111
+
112
+ There is an "Images Tester" utility under Slideshow > Configuration on the right-hand side. Use that to determine the problem.
113
+
114
  == Screenshots ==
115
 
116
  1. Slideshow gallery with thumbnails at the bottom.
122
 
123
  == Changelog ==
124
 
125
+ = 1.3.1 =
126
+
127
+ * ADD: Images tester utility under Configuration to fix broken images
128
+ * FIX: Issue with turning off navigation images
129
+ * FIX: Issue with new slider settings if empty or set to zero (0)
130
+
131
  = 1.3 =
132
 
133
  * ADD: Show latest/featured products from Shopping Cart plugin
slideshow-gallery-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class GalleryPlugin {
4
 
5
- var $version = '1.3';
6
  var $plugin_name;
7
  var $plugin_base;
8
  var $pre = 'Gallery';
@@ -117,6 +117,7 @@ class GalleryPlugin {
117
  'resizeimages' => "N",
118
  );
119
 
 
120
  $this -> add_option('styles', $styles);
121
  $this -> add_option('timthumb_align', "c");
122
  $this -> add_option('fadespeed', 10);
2
 
3
  class GalleryPlugin {
4
 
5
+ var $version = '1.3.1';
6
  var $plugin_name;
7
  var $plugin_base;
8
  var $pre = 'Gallery';
117
  'resizeimages' => "N",
118
  );
119
 
120
+ $this -> add_option('imagespath', $this -> Html -> uploads_path() . DS . 'slideshow-gallery' . DS);
121
  $this -> add_option('styles', $styles);
122
  $this -> add_option('timthumb_align', "c");
123
  $this -> add_option('fadespeed', 10);
slideshow-gallery.php CHANGED
@@ -6,7 +6,7 @@ Plugin URI: http://wpgallery.tribulant.net
6
  Author: Tribulant Software
7
  Author URI: http://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</code>.
9
- Version: 1.3
10
  */
11
 
12
  if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); }
@@ -95,6 +95,13 @@ if (!class_exists('Gallery')) {
95
  $msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
96
  call_user_method('render_' . $msg_type, $this, $_GET[$this -> pre . 'message']);
97
  }
 
 
 
 
 
 
 
98
  }
99
 
100
  function mce_buttons($buttons) {
@@ -436,6 +443,42 @@ if (!class_exists('Gallery')) {
436
 
437
  function admin_settings() {
438
  switch ($_GET['method']) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  case 'reset' :
440
  global $wpdb;
441
  $query = "DELETE FROM `" . $wpdb -> prefix . "options` WHERE `option_name` LIKE '" . $this -> pre . "%';";
@@ -497,10 +540,10 @@ if (!class_exists('Gallery')) {
497
  $message = __('Configuration has been saved', $this -> plugin_name);
498
  $this -> render_msg($message);
499
  }
 
 
500
  break;
501
  }
502
-
503
- $this -> render('settings', false, true, 'admin');
504
  }
505
  }
506
  }
6
  Author: Tribulant Software
7
  Author URI: http://tribulant.com
8
  Description: Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website. The slideshow is flexible and all aspects can easily be configured. Embedding or hardcoding the slideshow gallery is a breeze. To embed into a post/page, simply insert <code>[slideshow]</code> into its content with an optional <code>post_id</code> parameter. To hardcode into any PHP file of your WordPress theme, simply use <code>&lt;?php if (function_exists('slideshow')) { slideshow($output = true, $post_id = false, $gallery_id = false, $params = array()); } ?&gt;</code>.
9
+ Version: 1.3.1
10
  */
11
 
12
  if (!defined('DS')) { define('DS', DIRECTORY_SEPARATOR); }
95
  $msg_type = (!empty($_GET[$this -> pre . 'updated'])) ? 'msg' : 'err';
96
  call_user_method('render_' . $msg_type, $this, $_GET[$this -> pre . 'message']);
97
  }
98
+
99
+ if (!empty($_GET['page']) && (empty($_GET['method']) || $_GET['method'] != "imagestester") && in_array($_GET['page'], (array) $this -> sections)) {
100
+ $dismiss_imagestester = $this -> get_option('dismiss_imagestester');
101
+ if (empty($dismiss_imagestester)) {
102
+ $this -> render_msg(sprintf(__('Slideshow images and thumbnails working fine? If not, use the %sImages Tester%s to fix it. Working fine? Then you can %s this message.', $this -> plugin_name), '<a class="button" href="admin.php?page=' . $this -> sections -> settings . '&amp;method=imagestester">', '</a>', '<a class="button" href="admin.php?page=' . $this -> sections -> settings . '&amp;method=dismiss&amp;dismiss=imagestester">' . __('Dismiss', $this -> plugin_name) . '</a>'));
103
+ }
104
+ }
105
  }
106
 
107
  function mce_buttons($buttons) {
443
 
444
  function admin_settings() {
445
  switch ($_GET['method']) {
446
+ case 'dismiss' :
447
+ if (!empty($_GET['dismiss'])) {
448
+ $this -> update_option('dismiss_' . $_GET['dismiss'], 1);
449
+ }
450
+
451
+ $this -> redirect($this -> referer);
452
+ break;
453
+ case 'imagestester' :
454
+
455
+ if (!empty($_GET['changepath'])) {
456
+ $newpath = $_GET['changepath'];
457
+
458
+ switch ($newpath) {
459
+ case 1 :
460
+ $path = $this -> Html -> uploads_path() . DS . $this -> plugin_name . DS;
461
+ break;
462
+ case 2 :
463
+ $path = 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS;
464
+ break;
465
+ case 3 :
466
+ $path = $this -> Html -> uploads_url() . DS . $this -> plugin_name . DS;
467
+ break;
468
+ }
469
+
470
+ $this -> update_option('imagespath', $path);
471
+ $this -> render_msg(__('Images path has been updated, please check if the images work now. If not, click "Try Different Path" again in Step 3.', $this -> plugin_name));
472
+ }
473
+
474
+ $conditions = false;
475
+ if (!empty($_GET['id'])) {
476
+ $conditions['id'] = $_GET['id'];
477
+ }
478
+
479
+ $slide = $this -> Slide -> find($conditions, false, "RAND");
480
+ $this -> render('settings-images', array('slide' => $slide), true, 'admin');
481
+ break;
482
  case 'reset' :
483
  global $wpdb;
484
  $query = "DELETE FROM `" . $wpdb -> prefix . "options` WHERE `option_name` LIKE '" . $this -> pre . "%';";
540
  $message = __('Configuration has been saved', $this -> plugin_name);
541
  $this -> render_msg($message);
542
  }
543
+
544
+ $this -> render('settings', false, true, 'admin');
545
  break;
546
  }
 
 
547
  }
548
  }
549
  }
vendors/timthumb.php CHANGED
@@ -30,7 +30,7 @@ if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS', fa
30
 
31
  //Image fetching and caching
32
  if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL', TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
33
- if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', true); // Less secure.
34
  if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
35
  if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
36
 
30
 
31
  //Image fetching and caching
32
  if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL', TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
33
+ if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE); // Less secure.
34
  if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
35
  if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
36
 
views/admin/metaboxes/settings-general.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  <?php
4
 
 
5
  $autospeed = $this -> get_option('autospeed');
6
  $fadespeed = $this -> get_option('fadespeed');
7
  $navopacity = $this -> get_option('navopacity');
@@ -14,6 +15,14 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
14
 
15
  <table class="form-table">
16
  <tbody>
 
 
 
 
 
 
 
 
17
  <tr>
18
  <th><label for="autoslideY"><?php _e('Auto Slide', $this -> plugin_name); ?></label>
19
  <?php echo GalleryHtmlHelper::help(__('Turn this on so that the slideshow can automatically slide through the slides.<br/><br/><strong>Override per slideshow:</strong> Using parameter <code>auto</code> with value <code>true</code> or <code>false</code> eg. <code>[slideshow auto="false"]</code>.', $this -> plugin_name)); ?></th>
@@ -44,13 +53,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
44
  <td>
45
  <input type="hidden" style="width:45px;" name="autospeed" value="<?php echo $autospeed; ?>" id="autospeed" />
46
  <div id="autospeed_slider"></div>
47
- <span class="slider-value" id="autospeed_slider_value"><?php echo $autospeed; ?></span>
48
  <script type="text/javascript">
49
  jQuery(document).ready(function() {
50
  jQuery('#autospeed_slider').slider({
51
  min: 1,
52
  max: 20,
53
- value: <?php echo $autospeed; ?>,
54
  slide: function(event, ui) {
55
  jQuery('#autospeed').val(ui.value);
56
  jQuery('#autospeed_slider_value').text(ui.value);
@@ -73,13 +82,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
73
  <td>
74
  <input style="width:45px;" type="hidden" name="fadespeed" value="<?php echo $fadespeed; ?>" id="fadespeed" />
75
  <div id="fadespeed_slider"></div>
76
- <span class="slider-value" id="fadespeed_slider_value"><?php echo $fadespeed; ?></span>
77
  <script type="text/javascript">
78
  jQuery(document).ready(function() {
79
  jQuery('#fadespeed_slider').slider({
80
  min: 1,
81
  max: 20,
82
- value: <?php echo $fadespeed; ?>,
83
  slide: function(event, ui) {
84
  jQuery('#fadespeed').val(ui.value);
85
  jQuery('#fadespeed_slider_value').text(ui.value);
@@ -111,13 +120,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
111
  <td>
112
  <input type="hidden" name="navopacity" value="<?php echo $navopacity; ?>" id="navopacity" style="width:45px;" />
113
  <div id="navopacity_slider"></div>
114
- <span class="slider-value" id="navopacity_slider_value"><?php echo $navopacity; ?></span>
115
  <script type="text/javascript">
116
  jQuery(document).ready(function() {
117
  jQuery('#navopacity_slider').slider({
118
  min: 0,
119
  max: 100,
120
- value: <?php echo $navopacity; ?>,
121
  slide: function(event, ui) {
122
  jQuery('#navopacity').val(ui.value);
123
  jQuery('#navopacity_slider_value').text(ui.value);
@@ -135,13 +144,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
135
  <td>
136
  <input type="hidden" name="navhover" value="<?php echo $navhover; ?>" id="navhover" style="width:45px;" />
137
  <div id="navhover_slider"></div>
138
- <span class="slider-value" id="navhover_slider_value"><?php echo $navhover; ?></span>
139
  <script type="text/javascript">
140
  jQuery(document).ready(function() {
141
  jQuery('#navhover_slider').slider({
142
  min: 0,
143
  max: 100,
144
- value: <?php echo $navhover; ?>,
145
  slide: function(event, ui) {
146
  jQuery('#navhover').val(ui.value);
147
  jQuery('#navhover_slider_value').text(ui.value);
@@ -179,13 +188,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
179
  <td>
180
  <input type="hidden" style="width:45px;" name="infospeed" value="<?php echo $infospeed; ?>" id="infospeed" />
181
  <div id="infospeed_slider"></div>
182
- <span class="slider-value" id="infospeed_slider_value"><?php echo $infospeed; ?></span>
183
  <script type="text/javascript">
184
  jQuery(document).ready(function() {
185
  jQuery('#infospeed_slider').slider({
186
  min: 1,
187
  max: 20,
188
- value: <?php echo $infospeed; ?>,
189
  slide: function(event, ui) {
190
  jQuery('#infospeed').val(ui.value);
191
  jQuery('#infospeed_slider_value').text(ui.value);
@@ -244,13 +253,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
244
  <td>
245
  <input style="width:45px;" type="hidden" name="thumbopacity" value="<?php echo $thumbopacity; ?>" id="thumbopacity" />
246
  <div id="thumbopacity_slider"></div>
247
- <span class="slider-value" id="thumbopacity_slider_value"><?php echo $thumbopacity; ?></span>
248
  <script type="text/javascript">
249
  jQuery(document).ready(function() {
250
  jQuery('#thumbopacity_slider').slider({
251
  min: 0,
252
  max: 100,
253
- value: <?php echo $thumbopacity; ?>,
254
  slide: function(event, ui) {
255
  jQuery('#thumbopacity').val(ui.value);
256
  jQuery('#thumbopacity_slider_value').text(ui.value);
@@ -267,13 +276,13 @@ $thumbscrollspeed = $this -> get_option('thumbscrollspeed');
267
  <td>
268
  <input type="hidden" class="widefat" style="width:45px;" name="thumbscrollspeed" value="<?php echo $thumbscrollspeed; ?>" id="thumbscrollspeed" />
269
  <div id="thumbscrollspeed_slider"></div>
270
- <span class="slider-value" id="thumbscrollspeed_slider_value"><?php echo $thumbscrollspeed; ?></span>
271
  <script type="text/javascript">
272
  jQuery(document).ready(function() {
273
  jQuery('#thumbscrollspeed_slider').slider({
274
  min: 1,
275
  max: 20,
276
- value: <?php echo $thumbscrollspeed; ?>,
277
  slide: function(event, ui) {
278
  jQuery('#thumbscrollspeed').val(ui.value);
279
  jQuery('#thumbscrollspeed_slider_value').text(ui.value);
2
 
3
  <?php
4
 
5
+ $imagespath = $this -> get_option('imagespath');
6
  $autospeed = $this -> get_option('autospeed');
7
  $fadespeed = $this -> get_option('fadespeed');
8
  $navopacity = $this -> get_option('navopacity');
15
 
16
  <table class="form-table">
17
  <tbody>
18
+ <tr>
19
+ <th><label for="imagespath"><?php _e('Images Path', $this -> plugin_name); ?></label>
20
+ <?php echo GalleryHtmlHelper::help(__('This is the relative or absolute path or even absolute URL to the images for slides and thumbnails. By default, it loads an absolute path in order to be accurate but it may not work on all hosting setups. If images are not working, use the "Images Tester" link on the right-hand side of this page to determine the issue and resolve it.', $this -> plugin_name)); ?></th>
21
+ <td>
22
+ <input type="text" class="widefat" name="imagespath" value="<?php echo esc_attr(stripslashes($imagespath)); ?>" id="imagespath" />
23
+ <span class="howto"><?php _e('Path to images where slide and thumbnail images are generated from.', $this -> plugin_name); ?></span>
24
+ </td>
25
+ </tr>
26
  <tr>
27
  <th><label for="autoslideY"><?php _e('Auto Slide', $this -> plugin_name); ?></label>
28
  <?php echo GalleryHtmlHelper::help(__('Turn this on so that the slideshow can automatically slide through the slides.<br/><br/><strong>Override per slideshow:</strong> Using parameter <code>auto</code> with value <code>true</code> or <code>false</code> eg. <code>[slideshow auto="false"]</code>.', $this -> plugin_name)); ?></th>
53
  <td>
54
  <input type="hidden" style="width:45px;" name="autospeed" value="<?php echo $autospeed; ?>" id="autospeed" />
55
  <div id="autospeed_slider"></div>
56
+ <span class="slider-value" id="autospeed_slider_value"><?php echo (empty($autospeed)) ? 0 : $autospeed; ?></span>
57
  <script type="text/javascript">
58
  jQuery(document).ready(function() {
59
  jQuery('#autospeed_slider').slider({
60
  min: 1,
61
  max: 20,
62
+ value: <?php echo (empty($autospeed)) ? 0 : $autospeed; ?>,
63
  slide: function(event, ui) {
64
  jQuery('#autospeed').val(ui.value);
65
  jQuery('#autospeed_slider_value').text(ui.value);
82
  <td>
83
  <input style="width:45px;" type="hidden" name="fadespeed" value="<?php echo $fadespeed; ?>" id="fadespeed" />
84
  <div id="fadespeed_slider"></div>
85
+ <span class="slider-value" id="fadespeed_slider_value"><?php echo (empty($fadespeed)) ? 0 : $fadespeed; ?></span>
86
  <script type="text/javascript">
87
  jQuery(document).ready(function() {
88
  jQuery('#fadespeed_slider').slider({
89
  min: 1,
90
  max: 20,
91
+ value: <?php echo (empty($fadespeed)) ? 0 : $fadespeed; ?>,
92
  slide: function(event, ui) {
93
  jQuery('#fadespeed').val(ui.value);
94
  jQuery('#fadespeed_slider_value').text(ui.value);
120
  <td>
121
  <input type="hidden" name="navopacity" value="<?php echo $navopacity; ?>" id="navopacity" style="width:45px;" />
122
  <div id="navopacity_slider"></div>
123
+ <span class="slider-value" id="navopacity_slider_value"><?php echo (empty($navopacity)) ? 0 : $navopacity; ?></span>
124
  <script type="text/javascript">
125
  jQuery(document).ready(function() {
126
  jQuery('#navopacity_slider').slider({
127
  min: 0,
128
  max: 100,
129
+ value: <?php echo (empty($navopacity)) ? 0 : $navopacity; ?>,
130
  slide: function(event, ui) {
131
  jQuery('#navopacity').val(ui.value);
132
  jQuery('#navopacity_slider_value').text(ui.value);
144
  <td>
145
  <input type="hidden" name="navhover" value="<?php echo $navhover; ?>" id="navhover" style="width:45px;" />
146
  <div id="navhover_slider"></div>
147
+ <span class="slider-value" id="navhover_slider_value"><?php echo (empty($navhover)) ? 0 : $navhover; ?></span>
148
  <script type="text/javascript">
149
  jQuery(document).ready(function() {
150
  jQuery('#navhover_slider').slider({
151
  min: 0,
152
  max: 100,
153
+ value: <?php echo (empty($navhover)) ? 0 : $navhover; ?>,
154
  slide: function(event, ui) {
155
  jQuery('#navhover').val(ui.value);
156
  jQuery('#navhover_slider_value').text(ui.value);
188
  <td>
189
  <input type="hidden" style="width:45px;" name="infospeed" value="<?php echo $infospeed; ?>" id="infospeed" />
190
  <div id="infospeed_slider"></div>
191
+ <span class="slider-value" id="infospeed_slider_value"><?php echo (empty($infospeed)) ? 0 : $infospeed; ?></span>
192
  <script type="text/javascript">
193
  jQuery(document).ready(function() {
194
  jQuery('#infospeed_slider').slider({
195
  min: 1,
196
  max: 20,
197
+ value: <?php echo (empty($infospeed)) ? 0 : $infospeed; ?>,
198
  slide: function(event, ui) {
199
  jQuery('#infospeed').val(ui.value);
200
  jQuery('#infospeed_slider_value').text(ui.value);
253
  <td>
254
  <input style="width:45px;" type="hidden" name="thumbopacity" value="<?php echo $thumbopacity; ?>" id="thumbopacity" />
255
  <div id="thumbopacity_slider"></div>
256
+ <span class="slider-value" id="thumbopacity_slider_value"><?php echo (empty($thumbopacity)) ? 0 : $thumbopacity; ?></span>
257
  <script type="text/javascript">
258
  jQuery(document).ready(function() {
259
  jQuery('#thumbopacity_slider').slider({
260
  min: 0,
261
  max: 100,
262
+ value: <?php echo (empty($thumbopacity)) ? 0 : $thumbopacity; ?>,
263
  slide: function(event, ui) {
264
  jQuery('#thumbopacity').val(ui.value);
265
  jQuery('#thumbopacity_slider_value').text(ui.value);
276
  <td>
277
  <input type="hidden" class="widefat" style="width:45px;" name="thumbscrollspeed" value="<?php echo $thumbscrollspeed; ?>" id="thumbscrollspeed" />
278
  <div id="thumbscrollspeed_slider"></div>
279
+ <span class="slider-value" id="thumbscrollspeed_slider_value"><?php echo (empty($thumbscrollspeed)) ? 0 : $thumbscrollspeed; ?></span>
280
  <script type="text/javascript">
281
  jQuery(document).ready(function() {
282
  jQuery('#thumbscrollspeed_slider').slider({
283
  min: 1,
284
  max: 20,
285
+ value: <?php echo (empty($thumbscrollspeed)) ? 0 : $thumbscrollspeed; ?>,
286
  slide: function(event, ui) {
287
  jQuery('#thumbscrollspeed').val(ui.value);
288
  jQuery('#thumbscrollspeed_slider_value').text(ui.value);
views/admin/metaboxes/settings-styles.php CHANGED
@@ -48,26 +48,9 @@ $timthumb_align = $this -> get_option('timthumb_align');
48
  <th><label for="styles.resizeimages"><?php _e('Resize Images', $this -> plugin_name); ?></label>
49
  <?php echo GalleryHtmlHelper::help(__('Should images be automatically resized? If you specify No, the images will be used in the slideshow as you originally upload them. If you specify Yes, the images will be cropped/resized to fit the slideshow better which is the recommended setting.', $this -> plugin_name)); ?></th>
50
  <td>
51
- <label><input onclick="jQuery('#resizeimagesYdiv').show();" <?php echo (empty($styles['resizeimages']) || $styles['resizeimages'] == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="styles[resizeimages]" value="Y" id="styles.resizeimages_Y" /> <?php _e('Yes', $this -> plugin_name); ?></label>
52
- <label><input onclick="jQuery('#resizeimagesYdiv').hide();" <?php echo ($styles['resizeimages'] == "N") ? 'checked="checked"' : ''; ?> type="radio" name="styles[resizeimages]" value="N" id="styles.resizeimages_N" /> <?php _e('No', $this -> plugin_name); ?></label>
53
  <span class="howto"><?php _e('Should images be resized proportionally to fit the width of the slideshow area?', $this -> plugin_name); ?></span>
54
-
55
- <div id="resizeimagesYdiv" style="display:<?php echo ($styles['resizeimages'] == "Y") ? 'block' : 'none'; ?>;">
56
- <p>
57
- <?php _e('When resize images is turned on, TimThumb will be used to resize/crop images.', $this -> plugin_name); ?><br/>
58
- <?php _e('Below is a test image and the URL to the image to ensure that TimThumb works.', $this -> plugin_name); ?><br/>
59
- </p>
60
- <?php
61
-
62
- //$img = 'wp-content/plugins/' . $this -> plugin_name . '/screenshot-1.png';
63
- $img = $this -> plugin_base() . DS . 'screenshot-1.png';
64
- $align = (empty($timthumb_align)) ? "c" : $timthumb_align;
65
- $src = plugins_url() . '/' . $this -> plugin_name . '/vendors/timthumb.php?src=' . $img . '&w=50&h=50&q=100&a=' . $align;
66
- echo '<p><a target="_blank" href="' . $src . '">' . $src . '</a> <small>(' . __('click to open to test TimThumb', $this -> plugin_name) . ')</small></p>';
67
- echo '<p><img class="slideshow_dropshadow" src="' . $src . '" /></p>';
68
-
69
- ?>
70
- </div>
71
  </td>
72
  </tr>
73
  </tbody>
48
  <th><label for="styles.resizeimages"><?php _e('Resize Images', $this -> plugin_name); ?></label>
49
  <?php echo GalleryHtmlHelper::help(__('Should images be automatically resized? If you specify No, the images will be used in the slideshow as you originally upload them. If you specify Yes, the images will be cropped/resized to fit the slideshow better which is the recommended setting.', $this -> plugin_name)); ?></th>
50
  <td>
51
+ <label><input <?php echo (empty($styles['resizeimages']) || $styles['resizeimages'] == "Y") ? 'checked="checked"' : ''; ?> type="radio" name="styles[resizeimages]" value="Y" id="styles.resizeimages_Y" /> <?php _e('Yes', $this -> plugin_name); ?></label>
52
+ <label><input <?php echo ($styles['resizeimages'] == "N") ? 'checked="checked"' : ''; ?> type="radio" name="styles[resizeimages]" value="N" id="styles.resizeimages_N" /> <?php _e('No', $this -> plugin_name); ?></label>
53
  <span class="howto"><?php _e('Should images be resized proportionally to fit the width of the slideshow area?', $this -> plugin_name); ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  </td>
55
  </tr>
56
  </tbody>
views/admin/metaboxes/settings-submit.php CHANGED
@@ -12,6 +12,10 @@ $debugging = get_option('tridebugging');
12
  <div class="misc-pub-section">
13
  <a href="<?php echo $this -> url; ?>&amp;method=reset" title="<?php _e('Reset all configuration settings to their default values', $this -> plugin_name); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all configuration settings?', $this -> plugin_name); ?>')) { return false; }"><?php _e('Reset to Defaults', $this -> plugin_name); ?></a>
14
  </div>
 
 
 
 
15
  <div class="misc-pub-section misc-pub-section-last">
16
  <label><input <?php echo (!empty($debugging) && $debugging == 1) ? 'checked="checked"' : ''; ?> type="checkbox" name="debugging" value="1" id="debugging" /> <?php _e('Turn on debugging', $this -> plugin_name); ?></label>
17
  </div>
12
  <div class="misc-pub-section">
13
  <a href="<?php echo $this -> url; ?>&amp;method=reset" title="<?php _e('Reset all configuration settings to their default values', $this -> plugin_name); ?>" onclick="if (!confirm('<?php _e('Are you sure you wish to reset all configuration settings?', $this -> plugin_name); ?>')) { return false; }"><?php _e('Reset to Defaults', $this -> plugin_name); ?></a>
14
  </div>
15
+ <div class="misc-pub-section">
16
+ <a href="<?php echo $this -> url; ?>&amp;method=imagestester"><?php _e('Images Tester', $this -> plugin_name); ?></a>
17
+ <?php echo GalleryHtmlHelper::help(__('Slide or thumbnail images not working? Use the images tester to fix the problem', $this -> plugin_name)); ?>
18
+ </div>
19
  <div class="misc-pub-section misc-pub-section-last">
20
  <label><input <?php echo (!empty($debugging) && $debugging == 1) ? 'checked="checked"' : ''; ?> type="checkbox" name="debugging" value="1" id="debugging" /> <?php _e('Turn on debugging', $this -> plugin_name); ?></label>
21
  </div>
views/admin/settings-images.php ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- Images Tester -->
2
+
3
+ <?php
4
+
5
+ $newpath = 2;
6
+ if (!empty($_GET['changepath'])) {
7
+ switch ($_GET['changepath']) {
8
+ case 1 :
9
+ $newpath = 2;
10
+ break;
11
+ case 2 :
12
+ $newpath = 3;
13
+ break;
14
+ case 3 :
15
+ $newpath = 1;
16
+ break;
17
+ }
18
+ }
19
+
20
+ ?>
21
+
22
+ <div class="wrap slideshow">
23
+ <h2>Slideshow Images Tester</h2>
24
+
25
+ <div style="float:none;" class="subsubsub">
26
+ <a href="?page=<?php echo $this -> sections -> settings; ?>"><?php _e('&larr; Back to Configuration', $this -> plugin_name); ?></a>
27
+ </div>
28
+
29
+ <?php if (!empty($slide)) : ?>
30
+ <p><?php _e('Kindly follow these steps to fix broken images:', $this -> plugin_name); ?></p>
31
+
32
+ <ol>
33
+ <li>
34
+ <h3><?php _e('Check Original Image', $this -> plugin_name); ?></h3>
35
+ <p><?php echo __('Ensure that the original image exists by clicking the button below to open the image.', $this -> plugin_name); ?><br/>
36
+ <?php echo sprintf(__('If the image does not open, go to Slideshow > Manage Slides and reupload the image to the slide for slide ID %s'), $slide -> id); ?><br/>
37
+ <?php echo __('If it does open, you can continue to step 2 below.', $this -> plugin_name); ?></p>
38
+ <p><a class="button" href="<?php echo GalleryHtmlHelper::image_url($slide -> image); ?>" target="_blank"><?php echo sprintf(__('Open Original Image: %s', $this -> plugin_name), __($slide -> title)); ?></a></p>
39
+ </li>
40
+ <li>
41
+ <h3><?php _e('Test Resized/Cropped Image', $this -> plugin_name); ?></h3>
42
+ <p><?php _e('Below is a button to open the resized image in a new tab and then an actual 100 by 100 pixels sample of the image.', $this -> plugin_name); ?><br/>
43
+ <?php _e('If both the image from the button below and the sample below works fine, there is nothing wrong with the image cropping procedure.', $this -> plugin_name); ?><br/>
44
+ <?php _e('If neither of them work, there is something wrong, continue to step 3 below.', $this -> plugin_name); ?></p>
45
+ <p><a class="button" target="_blank" href="<?php echo $this -> Html -> timthumb_image_src($slide -> image_path, 100, 100, 100); ?>"><?php echo sprintf(__('Open Resized Image: %s', $this -> plugin_name), __($slide -> title)); ?></a></p>
46
+ <p><?php echo $this -> Html -> timthumb_image($slide -> image_path, 100, 100, 100, "slideshow_dropshadow"); ?></p>
47
+ </li>
48
+ <li>
49
+ <h3><?php _e('Analyze Error Message', $this -> plugin_name); ?></h3>
50
+ <p><?php _e('When you clicked the "Open Resized Image" button above, it opened the TimThumb URL of the image.', $this -> plugin_name); ?><br/>
51
+ <?php _e('TimThumb will give you a descriptive error telling you what is wrong.', $this -> plugin_name); ?></p>
52
+
53
+ <p><?php _e('If the error is simply "Could not find the internal image you specified." then you now your "Images Path" setting is incorrect.', $this -> plugin_name); ?><br/>
54
+ <?php _e('With that being the case, let us try a different "Images Path" to see if that resolves it. Click "Try Different Path" below.', $this -> plugin_name); ?><br/>
55
+ <?php _e('Alternatively, if you know what the path should be, go and change it under Slideshow > Configuration > General Settings.', $this -> plugin_name); ?></p>
56
+ <p><a class="button" href="?page=<?php echo $this -> sections -> settings; ?>&amp;method=imagestester&amp;id=<?php echo $slide -> id; ?>&amp;changepath=<?php echo $newpath; ?>"><?php _e('Try Different Path', $this -> plugin_name); ?></a></p>
57
+ </li>
58
+ </ol>
59
+ <?php else : ?>
60
+ <p class="slideshow_error"><?php _e('No slide available. In order to use the tester, add at least one slide under Slideshow > Manage Slides.', $this -> plugin_name); ?></p>
61
+ <?php endif; ?>
62
+ </div>
views/default/gallery.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  $wrapperid = "slideshow-wrapper" . $unique;
4
  if (!$products) $slides = stripslashes_deep($slides);
 
5
 
6
  ?>
7
 
@@ -16,7 +17,7 @@ if (!$products) $slides = stripslashes_deep($slides);
16
  <?php $full_image_path = get_attached_file($slide -> ID); ?>
17
  <?php $full_image_url = wp_get_attachment_url($slide -> ID); ?>
18
  <?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
19
- <span><?php echo $this -> Html -> timthumb_image_src($full_image_href[0], $options['width'], $options['height'], 100); ?></span>
20
  <?php else : ?>
21
  <span><?php echo $full_image_href[0]; ?></span>
22
  <?php endif; ?>
@@ -26,7 +27,7 @@ if (!$products) $slides = stripslashes_deep($slides);
26
  <?php if (!empty($slide -> guid)) : ?>
27
  <a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo esc_attr($slide -> post_title); ?>"><img src="<?php echo $this -> Html -> timthumb_image_src($full_image_href[0], $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> post_title); ?>" /></a>
28
  <?php else : ?>
29
- <a><img src="<?php echo $this -> Html -> timthumb_image_src($full_image_href[0], $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> post_title); ?>" /></a>
30
  <?php endif; ?>
31
  <?php else : ?>
32
  <a href="<?php echo $slide -> guid; ?>" title="<?php echo $slide -> post_title; ?>"></a>
@@ -144,14 +145,14 @@ if (!$products) $slides = stripslashes_deep($slides);
144
  slideshow<?php echo $unique; ?>.speed = <?php echo $options['autospeed']; ?>;
145
  slideshow<?php echo $unique; ?>.alwaysauto = <?php echo $options['alwaysauto']; ?>;
146
  slideshow<?php echo $unique; ?>.imgSpeed = <?php echo $options['fadespeed']; ?>;
147
- slideshow<?php echo $unique; ?>.navOpacity = <?php echo $options['navopacity']; ?>;
148
- slideshow<?php echo $unique; ?>.navHover = <?php echo $options['navhoveropacity']; ?>;
149
  slideshow<?php echo $unique; ?>.letterbox = "#000000";
150
  slideshow<?php echo $unique; ?>.linkclass = "linkhover";
151
  slideshow<?php echo $unique; ?>.info = "<?php echo ($options['showinfo'] == "true") ? 'information' . $unique : ''; ?>";
152
  slideshow<?php echo $unique; ?>.infoSpeed = <?php echo $options['infospeed']; ?>;
153
  slideshow<?php echo $unique; ?>.thumbs = "<?php echo ($options['showthumbs'] == "true") ? 'slider' . $unique : ''; ?>";
154
- slideshow<?php echo $unique; ?>.thumbOpacity = <?php echo $this -> get_option('thumbopacity'); ?>;
155
  slideshow<?php echo $unique; ?>.left = "slideleft<?php echo $unique; ?>";
156
  slideshow<?php echo $unique; ?>.right = "slideright<?php echo $unique; ?>";
157
  slideshow<?php echo $unique; ?>.scrollSpeed = <?php echo $options['thumbsspeed']; ?>;
@@ -159,7 +160,7 @@ if (!$products) $slides = stripslashes_deep($slides);
159
  slideshow<?php echo $unique; ?>.active = "<?php echo $options['thumbsborder']; ?>";
160
  slideshow<?php echo $unique; ?>.imagesthickbox = "<?php echo $options['imagesoverlay']; ?>";
161
  jQuery("#spinner<?php echo $unique; ?>").remove();
162
- slideshow<?php echo $unique; ?>.init("slideshow<?php echo $unique; ?>","image<?php echo $unique; ?>","<?php echo $navb . $unique; ?>","<?php echo $navf . $unique; ?>","imglink<?php echo $unique; ?>");
163
  tid('<?php echo $wrapperid; ?>').style.visibility = 'visible';
164
  jQuery(window).trigger('resize');
165
  });
2
 
3
  $wrapperid = "slideshow-wrapper" . $unique;
4
  if (!$products) $slides = stripslashes_deep($slides);
5
+ $thumbopacity = $this -> get_option('thumbopacity');
6
 
7
  ?>
8
 
17
  <?php $full_image_path = get_attached_file($slide -> ID); ?>
18
  <?php $full_image_url = wp_get_attachment_url($slide -> ID); ?>
19
  <?php if ($options['layout'] != "responsive" && $options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
20
+ <span><?php echo $this -> Html -> timthumb_image_src($full_image_path, $options['width'], $options['height'], 100); ?></span>
21
  <?php else : ?>
22
  <span><?php echo $full_image_href[0]; ?></span>
23
  <?php endif; ?>
27
  <?php if (!empty($slide -> guid)) : ?>
28
  <a href="<?php echo $slide -> guid; ?>" target="_self" title="<?php echo esc_attr($slide -> post_title); ?>"><img src="<?php echo $this -> Html -> timthumb_image_src($full_image_href[0], $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> post_title); ?>" /></a>
29
  <?php else : ?>
30
+ <a><img src="<?php echo $this -> Html -> timthumb_image_src($full_image_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> post_title); ?>" /></a>
31
  <?php endif; ?>
32
  <?php else : ?>
33
  <a href="<?php echo $slide -> guid; ?>" title="<?php echo $slide -> post_title; ?>"></a>
145
  slideshow<?php echo $unique; ?>.speed = <?php echo $options['autospeed']; ?>;
146
  slideshow<?php echo $unique; ?>.alwaysauto = <?php echo $options['alwaysauto']; ?>;
147
  slideshow<?php echo $unique; ?>.imgSpeed = <?php echo $options['fadespeed']; ?>;
148
+ slideshow<?php echo $unique; ?>.navOpacity = <?php echo (empty($options['navopacity'])) ? 0 : $options['navopacity']; ?>;
149
+ slideshow<?php echo $unique; ?>.navHover = <?php echo (empty($options['navhoveropacity'])) ? 0 : $options['navhoveropacity']; ?>;
150
  slideshow<?php echo $unique; ?>.letterbox = "#000000";
151
  slideshow<?php echo $unique; ?>.linkclass = "linkhover";
152
  slideshow<?php echo $unique; ?>.info = "<?php echo ($options['showinfo'] == "true") ? 'information' . $unique : ''; ?>";
153
  slideshow<?php echo $unique; ?>.infoSpeed = <?php echo $options['infospeed']; ?>;
154
  slideshow<?php echo $unique; ?>.thumbs = "<?php echo ($options['showthumbs'] == "true") ? 'slider' . $unique : ''; ?>";
155
+ slideshow<?php echo $unique; ?>.thumbOpacity = <?php echo (empty($thumbopacity)) ? 0 : $thumbopacity; ?>;
156
  slideshow<?php echo $unique; ?>.left = "slideleft<?php echo $unique; ?>";
157
  slideshow<?php echo $unique; ?>.right = "slideright<?php echo $unique; ?>";
158
  slideshow<?php echo $unique; ?>.scrollSpeed = <?php echo $options['thumbsspeed']; ?>;
160
  slideshow<?php echo $unique; ?>.active = "<?php echo $options['thumbsborder']; ?>";
161
  slideshow<?php echo $unique; ?>.imagesthickbox = "<?php echo $options['imagesoverlay']; ?>";
162
  jQuery("#spinner<?php echo $unique; ?>").remove();
163
+ slideshow<?php echo $unique; ?>.init("slideshow<?php echo $unique; ?>","image<?php echo $unique; ?>","<?php echo (!empty($options['shownav']) && $options['shownav'] == "true") ? $navb . $unique : ''; ?>","<?php echo (!empty($options['shownav']) && $options['shownav'] == "true") ? $navf . $unique : ''; ?>","imglink<?php echo $unique; ?>");
164
  tid('<?php echo $wrapperid; ?>').style.visibility = 'visible';
165
  jQuery(window).trigger('resize');
166
  });