Slideshow Gallery - Version 1.2.2

Version Description

  • FIX: Slides paging numbers didn't show up
  • REMOVE: 'Description' not mandatory/required for each slide.
  • FIX: Slashes caused by single/double quotes in titles/descriptions
  • ADD: Hardcode for each gallery in 'Manage Galleries' section
  • ADD: Shortcode in the 'Manage Galleries' section for each gallery
  • ADD: Gallery ID to the 'Manage Galleries' section
  • FIX: the 100% width issue on the 'img' tag if resizeimages
Download this release

Release Info

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

Code changes from version 1.2 to 1.2.2

css/gallery-css.php CHANGED
@@ -15,7 +15,7 @@ ul.slideshow span { display:none; }
15
  #<?php echo $styles['wrapperid']; ?> #information<?php echo $styles['wrapperrand']; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
16
  #<?php echo $styles['wrapperid']; ?> #information<?php echo $styles['wrapperrand']; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
17
  #<?php echo $styles['wrapperid']; ?> #image<?php echo $styles['wrapperrand']; ?> { width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width'] - 4) . 'px' : 'auto'; ?>; no-repeat; }
18
- #<?php echo $styles['wrapperid']; ?> #image<?php echo $styles['wrapperrand']; ?> img { position:absolute; left:0; border:none; width:100%; height:auto; }
19
  #<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:<?php echo ((int) $styles['height'] + 8); ?>px; cursor:pointer; z-index:150; }
20
  #<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $styles['wrapperrand']; ?> { left:0; background:url('../images/left.gif') left center no-repeat; }
21
  #<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $styles['wrapperrand']; ?> { right:0; background:url('../images/right.gif') right center no-repeat; }
15
  #<?php echo $styles['wrapperid']; ?> #information<?php echo $styles['wrapperrand']; ?> h3 { color:<?php echo $styles['infocolor']; ?>; padding:4px 8px 3px; margin:0 !important; font-size:16px; font-weight:bold; }
16
  #<?php echo $styles['wrapperid']; ?> #information<?php echo $styles['wrapperrand']; ?> p { color:<?php echo $styles['infocolor']; ?>; padding:0 8px 8px; margin:0 !important; font-size: 14px; font-weight:normal; }
17
  #<?php echo $styles['wrapperid']; ?> #image<?php echo $styles['wrapperrand']; ?> { width:<?php echo ($styles['width'] != "auto") ? ((int) $styles['width'] - 4) . 'px' : 'auto'; ?>; no-repeat; }
18
+ #<?php echo $styles['wrapperid']; ?> #image<?php echo $styles['wrapperrand']; ?> img { position:absolute; left:0; border:none; height:auto; }
19
  #<?php echo $styles['wrapperid']; ?> .imgnav { position:absolute; width:25%; height:<?php echo ((int) $styles['height'] + 8); ?>px; cursor:pointer; z-index:150; }
20
  #<?php echo $styles['wrapperid']; ?> #imgprev<?php echo $styles['wrapperrand']; ?> { left:0; background:url('../images/left.gif') left center no-repeat; }
21
  #<?php echo $styles['wrapperid']; ?> #imgnext<?php echo $styles['wrapperrand']; ?> { right:0; background:url('../images/right.gif') right center no-repeat; }
models/gallery.php CHANGED
@@ -25,7 +25,7 @@ class GalleryGallery extends GalleryDbHelper {
25
 
26
  if (!empty($data)) {
27
  foreach ($data as $dkey => $dval) {
28
- $this -> {$dkey} = $dval;
29
 
30
  switch ($dkey) {
31
  case 'id' :
25
 
26
  if (!empty($data)) {
27
  foreach ($data as $dkey => $dval) {
28
+ $this -> {$dkey} = stripslashes_deep($dval);
29
 
30
  switch ($dkey) {
31
  case 'id' :
models/slide.php CHANGED
@@ -33,7 +33,7 @@ class GallerySlide extends GalleryDbHelper {
33
 
34
  if (!empty($data)) {
35
  foreach ($data as $dkey => $dval) {
36
- $this -> {$dkey} = $dval;
37
 
38
  switch ($dkey) {
39
  case 'id' :
@@ -78,7 +78,7 @@ class GallerySlide extends GalleryDbHelper {
78
  extract($data, EXTR_SKIP);
79
 
80
  if (empty($title)) { $this -> errors['title'] = __('Please fill in a title', $this -> plugin_name); }
81
- if (empty($description)) { $this -> errors['description'] = __('Please fill in a description', $this -> plugin_name); }
82
  if (empty($type)) { $this -> errors['type'] = __('Please select an image type', $this -> plugin_name); }
83
  elseif ($type == "file") {
84
  if (!empty($image_oldfile) && empty($_FILES['image_file']['name'])) {
@@ -87,6 +87,7 @@ class GallerySlide extends GalleryDbHelper {
87
  $imagefull = $imagepath . $imagename;
88
 
89
  $this -> data -> image = $imagename;
 
90
  } else {
91
  if ($_FILES['image_file']['error'] <= 0) {
92
  $imagename = $_FILES['image_file']['name'];
@@ -97,6 +98,7 @@ class GallerySlide extends GalleryDbHelper {
97
  elseif (!move_uploaded_file($_FILES['image_file']['tmp_name'], $imagefull)) { $this -> errors['image_file'] = __('Image could not be moved from TMP to "wp-content/uploads/", please check permissions', $this -> plugin_name); }
98
  else {
99
  $this -> data -> image = $imagename;
 
100
  }
101
  } else {
102
  switch ($_FILES['image_file']['error']) {
33
 
34
  if (!empty($data)) {
35
  foreach ($data as $dkey => $dval) {
36
+ $this -> {$dkey} = stripslashes_deep($dval);
37
 
38
  switch ($dkey) {
39
  case 'id' :
78
  extract($data, EXTR_SKIP);
79
 
80
  if (empty($title)) { $this -> errors['title'] = __('Please fill in a title', $this -> plugin_name); }
81
+ //if (empty($description)) { $this -> errors['description'] = __('Please fill in a description', $this -> plugin_name); }
82
  if (empty($type)) { $this -> errors['type'] = __('Please select an image type', $this -> plugin_name); }
83
  elseif ($type == "file") {
84
  if (!empty($image_oldfile) && empty($_FILES['image_file']['name'])) {
87
  $imagefull = $imagepath . $imagename;
88
 
89
  $this -> data -> image = $imagename;
90
+ $this -> data -> image_path = 'wp-content/uploads/slideshow-gallery/' . $imagename;
91
  } else {
92
  if ($_FILES['image_file']['error'] <= 0) {
93
  $imagename = $_FILES['image_file']['name'];
98
  elseif (!move_uploaded_file($_FILES['image_file']['tmp_name'], $imagefull)) { $this -> errors['image_file'] = __('Image could not be moved from TMP to "wp-content/uploads/", please check permissions', $this -> plugin_name); }
99
  else {
100
  $this -> data -> image = $imagename;
101
+ $this -> data -> image_path = 'wp-content/uploads/slideshow-gallery/' . $imagename;
102
  }
103
  } else {
104
  switch ($_FILES['image_file']['error']) {
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: 2.9
6
  Tested up to: 3.3.2
7
- Stable tag: 1.2
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
@@ -80,6 +80,21 @@ Yes, you can use the `exclude` parameter to exclude post images by their order i
80
 
81
  == Changelog ==
82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  = 1.2 =
84
  * ADD: 'About Us' box in the Configuration section
85
  * IMPROVE: Better, more usable hardcoding procedure
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: 2.9
6
  Tested up to: 3.3.2
7
+ Stable tag: 1.2.2
8
 
9
  Feature content in a JavaScript powered slideshow gallery showcase on your WordPress website
10
 
80
 
81
  == Changelog ==
82
 
83
+ = 1.2.2 =
84
+ * FIX: Slides paging numbers didn't show up
85
+ * REMOVE: 'Description' not mandatory/required for each slide.
86
+ * FIX: Slashes caused by single/double quotes in titles/descriptions
87
+ * ADD: Hardcode for each gallery in 'Manage Galleries' section
88
+ * ADD: Shortcode in the 'Manage Galleries' section for each gallery
89
+ * ADD: Gallery ID to the 'Manage Galleries' section
90
+ * FIX: the 100% width issue on the 'img' tag if resizeimages = false
91
+ * IMPROVE: Change cache directory to "wp-content/uploads/slideshow-gallery/cache" for TimThumb
92
+
93
+ = 1.2.1 =
94
+ * FIX: Thumbnails On/Off setting doesn't work
95
+ * IMPROVE: TimThumb absolute URLs to prevent permission problems
96
+ * FIX: Colorbox script should only load with this featured turned on
97
+
98
  = 1.2 =
99
  * ADD: 'About Us' box in the Configuration section
100
  * IMPROVE: Better, more usable hardcoding procedure
slideshow-gallery-plugin.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  class GalleryPlugin {
4
 
5
- var $version = '1.2';
6
  var $plugin_name;
7
  var $plugin_base;
8
  var $pre = 'Gallery';
@@ -221,13 +221,23 @@ class GalleryPlugin {
221
 
222
  function check_uploaddir() {
223
  $uploaddir = ABSPATH . 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS;
 
224
 
225
  if (!file_exists($uploaddir)) {
226
  if (@mkdir($uploaddir, 0777)) {
227
  @chmod($uploaddir, 0777);
228
  return true;
229
  } else {
230
- $message = __('Uploads folder named "' . $this -> plugin_name . '" cannot be created inside "wp-content/uploads"', $this -> plugin_name);
 
 
 
 
 
 
 
 
 
231
  $this -> render_msg($message);
232
  }
233
  }
2
 
3
  class GalleryPlugin {
4
 
5
+ var $version = '1.2.2';
6
  var $plugin_name;
7
  var $plugin_base;
8
  var $pre = 'Gallery';
221
 
222
  function check_uploaddir() {
223
  $uploaddir = ABSPATH . 'wp-content' . DS . 'uploads' . DS . $this -> plugin_name . DS;
224
+ $cachedir = $uploaddir . 'cache' . DS;
225
 
226
  if (!file_exists($uploaddir)) {
227
  if (@mkdir($uploaddir, 0777)) {
228
  @chmod($uploaddir, 0777);
229
  return true;
230
  } else {
231
+ $message = sprintf(__('Uploads folder named "%s" cannot be created inside "%s"', $this -> plugin_name), $this -> plugin_name, "wp-content/uploads/");
232
+ $this -> render_msg($message);
233
+ }
234
+ }
235
+
236
+ if (!file_exists($cachedir)) {
237
+ if (@mkdir($cachedir, 0777)) {
238
+ @chmod($cachedir, 0777);
239
+ } else {
240
+ $message = sprintf(__('Slideshow cache folder "%s" for resizing images cannot be created inside "%s"', $this -> plugin_name), 'cache', 'wp-content/uploads/' . $this -> plugin_name . '/');
241
  $this -> render_msg($message);
242
  }
243
  }
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 (class_exists('Gallery')) { $Gallery = new Gallery(); $Gallery -> slideshow($output = true, $post_id = null); } ?&gt;</code> and specify the required <code>$post_id</code> parameter accordingly.
9
- Version: 1.2
10
  */
11
 
12
  define('DS', DIRECTORY_SEPARATOR);
@@ -152,7 +152,7 @@ if (!class_exists('Gallery')) {
152
  'navhoveropacity' => ($this -> get_option('navhover')),
153
  'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
154
  'infospeed' => ($this -> get_option('infospeed')),
155
- 'showthumbs' => (($this -> get_option('thumbnails')) ? "true" : "false"),
156
  'thumbsposition' => ($this -> get_option('thumbposition')),
157
  'thumbsborder' => ($this -> get_option('thumbactive')),
158
  'thumbsspeed' => ($this -> get_option('thumbscrollspeed')),
@@ -325,6 +325,11 @@ if (!class_exists('Gallery')) {
325
 
326
  $this -> render('galleries' . DS . 'view', array('gallery' => $gallery, 'slides' => $data[$this -> Slide -> model], 'paginate' => $data['Paginate']), true, 'admin');
327
  break;
 
 
 
 
 
328
  case 'delete' :
329
  if (!empty($_GET['id'])) {
330
  if ($this -> Gallery -> delete($_GET['id'])) {
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 (class_exists('Gallery')) { $Gallery = new Gallery(); $Gallery -> slideshow($output = true, $post_id = null); } ?&gt;</code> and specify the required <code>$post_id</code> parameter accordingly.
9
+ Version: 1.2.2
10
  */
11
 
12
  define('DS', DIRECTORY_SEPARATOR);
152
  'navhoveropacity' => ($this -> get_option('navhover')),
153
  'showinfo' => (($this -> get_option('information') == "Y") ? "true" : "false"),
154
  'infospeed' => ($this -> get_option('infospeed')),
155
+ 'showthumbs' => (($this -> get_option('thumbnails') == "Y") ? "true" : "false"),
156
  'thumbsposition' => ($this -> get_option('thumbposition')),
157
  'thumbsborder' => ($this -> get_option('thumbactive')),
158
  'thumbsspeed' => ($this -> get_option('thumbscrollspeed')),
325
 
326
  $this -> render('galleries' . DS . 'view', array('gallery' => $gallery, 'slides' => $data[$this -> Slide -> model], 'paginate' => $data['Paginate']), true, 'admin');
327
  break;
328
+ case 'hardcode' :
329
+ $this -> Db -> model = $this -> Gallery -> model;
330
+ $gallery = $this -> Gallery -> find(array('id' => $_GET['id']));
331
+ $this -> render('galleries' . DS . 'hardcode', array('gallery' => $gallery), true, 'admin');
332
+ break;
333
  case 'delete' :
334
  if (!empty($_GET['id'])) {
335
  if ($this -> Gallery -> delete($_GET['id'])) {
vendors/timthumb.php CHANGED
@@ -33,8 +33,8 @@ if(! defined('MEMORY_LIMIT') ) define ('MEMORY_LIMIT', '128M'); // Set P
33
  if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS', false); // If the image or webshot is being loaded on an external site, display a red "No Hotlinking" gif.
34
 
35
  //Image fetching and caching
36
- 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
37
- if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', false); // Less secure.
38
  if(! defined('FETCH_LOCAL_URLS') ) define ('FETCH_LOCAL_URLS', true); // If true, URL sources will always be fetched over HTTP, even if they have the same hostname as this script
39
  if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
40
  if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
@@ -42,7 +42,7 @@ if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN
42
  if(! defined('FILE_CACHE_MAX_FILE_AGE') ) define ('FILE_CACHE_MAX_FILE_AGE', 86400); // How old does a file have to be to be deleted from the cache
43
  if(! defined('FILE_CACHE_SUFFIX') ) define ('FILE_CACHE_SUFFIX', '.timthumb.txt'); // What to put at the end of all files in the cache directory so we can identify them
44
  if(! defined('FILE_CACHE_PREFIX') ) define ('FILE_CACHE_PREFIX', 'timthumb'); // What to put at the beg of all files in the cache directory so we can identify them
45
- if(! defined('FILE_CACHE_DIRECTORY') ) define ('FILE_CACHE_DIRECTORY', ''); // Directory where images are cached. Left blank it will use the system temporary directory (which is better for security)
46
  if(! defined('MAX_FILE_SIZE') ) define ('MAX_FILE_SIZE', 10485760); // 10 Megs is 10485760. This is the max internal or external file size that we'll process.
47
  if(! defined('CURL_TIMEOUT') ) define ('CURL_TIMEOUT', 20); // Timeout duration for Curl. This only applies if you have Curl installed and aren't using PHP's default URL fetching mechanism.
48
  if(! defined('WAIT_BETWEEN_FETCH_ERRORS') ) define ('WAIT_BETWEEN_FETCH_ERRORS', 3600); //Time to wait between errors fetching remote file
@@ -138,6 +138,7 @@ if(! isset($ALLOWED_SITES)){
138
  'imgur.com',
139
  'imageshack.us',
140
  'tinypic.com',
 
141
  );
142
  }
143
  // -------------------------------------------------------------
33
  if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS', false); // If the image or webshot is being loaded on an external site, display a red "No Hotlinking" gif.
34
 
35
  //Image fetching and caching
36
+ 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
37
+ if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', true); // Less secure.
38
  if(! defined('FETCH_LOCAL_URLS') ) define ('FETCH_LOCAL_URLS', true); // If true, URL sources will always be fetched over HTTP, even if they have the same hostname as this script
39
  if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
40
  if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
42
  if(! defined('FILE_CACHE_MAX_FILE_AGE') ) define ('FILE_CACHE_MAX_FILE_AGE', 86400); // How old does a file have to be to be deleted from the cache
43
  if(! defined('FILE_CACHE_SUFFIX') ) define ('FILE_CACHE_SUFFIX', '.timthumb.txt'); // What to put at the end of all files in the cache directory so we can identify them
44
  if(! defined('FILE_CACHE_PREFIX') ) define ('FILE_CACHE_PREFIX', 'timthumb'); // What to put at the beg of all files in the cache directory so we can identify them
45
+ if(! defined('FILE_CACHE_DIRECTORY') ) define ('FILE_CACHE_DIRECTORY', '../../../uploads/slideshow-gallery/cache/'); // Directory where images are cached. Left blank it will use the system temporary directory (which is better for security)
46
  if(! defined('MAX_FILE_SIZE') ) define ('MAX_FILE_SIZE', 10485760); // 10 Megs is 10485760. This is the max internal or external file size that we'll process.
47
  if(! defined('CURL_TIMEOUT') ) define ('CURL_TIMEOUT', 20); // Timeout duration for Curl. This only applies if you have Curl installed and aren't using PHP's default URL fetching mechanism.
48
  if(! defined('WAIT_BETWEEN_FETCH_ERRORS') ) define ('WAIT_BETWEEN_FETCH_ERRORS', 3600); //Time to wait between errors fetching remote file
138
  'imgur.com',
139
  'imageshack.us',
140
  'tinypic.com',
141
+
142
  );
143
  }
144
  // -------------------------------------------------------------
views/admin/galleries/hardcode.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <div class="wrap <?php echo $this -> pre; ?>">
2
+ <div class="icon32">
3
+ <img src="<?php echo $this -> url(); ?>/images/icon-galleries-32.png" />
4
+ </div>
5
+
6
+ <h2><?php echo sprintf(__('Hardcode Gallery: %s', $this -> plugin_name), $gallery -> title); ?></h2>
7
+ <div style="float:none;" class="subsubsub"><?php echo $this -> Html -> link(__('&larr; All Galleries', $this -> plugin_name), $this -> url, array('title' => __('All Galleries', $this -> plugin_name))); ?></div>
8
+ <p><?php _e('This PHP code can be used inside your WordPress theme to display slides inside this gallery.', $this -> plugin_name); ?></p>
9
+ <textarea onmouseup="jQuery(this).unbind('onmouseup'); return false;" onfocus="jQuery(this).select();" cols="100%" rows="4"><?php echo htmlentities('<?php if (function_exists(\'slideshow\')) { slideshow(true, "' . $gallery -> id . '", false, array()); } ?>'); ?></textarea>
10
+ </div>
views/admin/galleries/index.php CHANGED
@@ -28,16 +28,20 @@
28
  <thead>
29
  <tr>
30
  <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
 
31
  <th><?php _e('Title', $this -> plugin_name); ?></th>
32
  <th><?php _e('Slides', $this -> plugin_name); ?></th>
 
33
  <th><?php _e('Date', $this -> plugin_name); ?></th>
34
  </tr>
35
  </thead>
36
  <tfoot>
37
  <tr>
38
  <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
 
39
  <th><?php _e('Title', $this -> plugin_name); ?></th>
40
  <th><?php _e('Slides', $this -> plugin_name); ?></th>
 
41
  <th><?php _e('Date', $this -> plugin_name); ?></th>
42
  </tr>
43
  </tfoot>
@@ -45,16 +49,21 @@
45
  <?php foreach ($galleries as $gallery) : ?>
46
  <tr class="<?php echo $class = (empty($class)) ? 'alternate' : ''; ?>">
47
  <th class="check-column"><input type="checkbox" name="Gallery[checklist][]" value="<?php echo $gallery -> id; ?>" id="checklist<?php echo $gallery -> id; ?>" /></th>
 
48
  <td>
49
  <a class="row-title" href="<?php echo $this -> url; ?>&amp;method=save&amp;id=<?php echo $gallery -> id; ?>" title=""><?php echo $gallery -> title; ?></a>
50
  <div class="row-actions">
51
  <span class="view"><?php echo $this -> Html -> link(__('View', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=view&amp;id=" . $gallery -> id); ?> |</span>
52
  <span class="edit"><?php echo $this -> Html -> link(__('Edit', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=save&amp;id=" . $gallery -> id); ?> |</span>
 
53
  <span class="delete"><?php echo $this -> Html -> link(__('Delete', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=delete&amp;id=" . $gallery -> id, array('class' => "submitdelete", 'onclick' => "if (!confirm('" . __('Are you sure you want to permanently remove this slide?', $this -> plugin_name) . "')) { return false; }")); ?></span>
54
  </div>
55
  </td>
56
  <td>
57
  <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=view&amp;id=<?php echo $gallery -> id; ?>"><?php echo $gallery -> slidescount; ?></a>
 
 
 
58
  </td>
59
  <td><abbr title="<?php echo $gallery -> modified; ?>"><?php echo date("Y-m-d", strtotime($gallery -> modified)); ?></abbr></td>
60
  </tr>
28
  <thead>
29
  <tr>
30
  <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
31
+ <th><?php _e('ID', $this -> plugin_name); ?></th>
32
  <th><?php _e('Title', $this -> plugin_name); ?></th>
33
  <th><?php _e('Slides', $this -> plugin_name); ?></th>
34
+ <th><?php _e('Shortcode', $this -> plugin_name); ?></th>
35
  <th><?php _e('Date', $this -> plugin_name); ?></th>
36
  </tr>
37
  </thead>
38
  <tfoot>
39
  <tr>
40
  <th class="check-column"><input type="checkbox" name="checkboxall" id="checkboxall" value="checkboxall" /></th>
41
+ <th><?php _e('ID', $this -> plugin_name); ?></th>
42
  <th><?php _e('Title', $this -> plugin_name); ?></th>
43
  <th><?php _e('Slides', $this -> plugin_name); ?></th>
44
+ <th><?php _e('Shortcode', $this -> plugin_name); ?></th>
45
  <th><?php _e('Date', $this -> plugin_name); ?></th>
46
  </tr>
47
  </tfoot>
49
  <?php foreach ($galleries as $gallery) : ?>
50
  <tr class="<?php echo $class = (empty($class)) ? 'alternate' : ''; ?>">
51
  <th class="check-column"><input type="checkbox" name="Gallery[checklist][]" value="<?php echo $gallery -> id; ?>" id="checklist<?php echo $gallery -> id; ?>" /></th>
52
+ <td><?php echo $gallery -> id; ?></td>
53
  <td>
54
  <a class="row-title" href="<?php echo $this -> url; ?>&amp;method=save&amp;id=<?php echo $gallery -> id; ?>" title=""><?php echo $gallery -> title; ?></a>
55
  <div class="row-actions">
56
  <span class="view"><?php echo $this -> Html -> link(__('View', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=view&amp;id=" . $gallery -> id); ?> |</span>
57
  <span class="edit"><?php echo $this -> Html -> link(__('Edit', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=save&amp;id=" . $gallery -> id); ?> |</span>
58
+ <span class="edit"><?php echo $this -> Html -> link(__('Hardcode', $this -> plugin_name), '?page=' . $this -> sections -> galleries . "&amp;method=hardcode&amp;id=" . $gallery -> id); ?> |</span>
59
  <span class="delete"><?php echo $this -> Html -> link(__('Delete', $this -> plugin_name), "?page=" . $this -> sections -> galleries . "&amp;method=delete&amp;id=" . $gallery -> id, array('class' => "submitdelete", 'onclick' => "if (!confirm('" . __('Are you sure you want to permanently remove this slide?', $this -> plugin_name) . "')) { return false; }")); ?></span>
60
  </div>
61
  </td>
62
  <td>
63
  <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=view&amp;id=<?php echo $gallery -> id; ?>"><?php echo $gallery -> slidescount; ?></a>
64
+ </td>
65
+ <td>
66
+ <code>[slideshow gallery_id="<?php echo $gallery -> id; ?>"]</code>
67
  </td>
68
  <td><abbr title="<?php echo $gallery -> modified; ?>"><?php echo date("Y-m-d", strtotime($gallery -> modified)); ?></abbr></td>
69
  </tr>
views/admin/galleries/view.php CHANGED
@@ -10,9 +10,10 @@
10
  <div class="tablenav">
11
  <div class="alignleft actions">
12
  <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=save&amp;id=<?php echo $gallery -> id; ?>" class="button" title="<?php _e('Edit', $this -> plugin_name); ?>"><?php _e('Edit Gallery', $this -> plugin_name); ?></a>
 
13
  <a onclick="if (!confirm('<?php _e('Are you sure you want to delete this gallery?', $this -> plugin_name); ?>')) { return false; }" href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=delete&amp;id=<?php echo $gallery -> id; ?>" class="button button-highlighted" title="<?php _e('Delete', $this -> plugin_name); ?>"><?php _e('Delete Gallery', $this -> plugin_name); ?></a>
14
  </div>
15
  </div>
16
 
17
- <?php $this -> render('slides' . DS . 'loop', array('slides' => $slides), true, 'admin'); ?>
18
  </div>
10
  <div class="tablenav">
11
  <div class="alignleft actions">
12
  <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=save&amp;id=<?php echo $gallery -> id; ?>" class="button" title="<?php _e('Edit', $this -> plugin_name); ?>"><?php _e('Edit Gallery', $this -> plugin_name); ?></a>
13
+ <a href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=hardcode&amp;id=<?php echo $gallery -> id; ?>" class="button" title="<?php _e('Hardcode', $this -> plugin_name); ?>"><?php _e('Hardcode', $this -> plugin_name); ?></a>
14
  <a onclick="if (!confirm('<?php _e('Are you sure you want to delete this gallery?', $this -> plugin_name); ?>')) { return false; }" href="?page=<?php echo $this -> sections -> galleries; ?>&amp;method=delete&amp;id=<?php echo $gallery -> id; ?>" class="button button-highlighted" title="<?php _e('Delete', $this -> plugin_name); ?>"><?php _e('Delete Gallery', $this -> plugin_name); ?></a>
15
  </div>
16
  </div>
17
 
18
+ <?php $this -> render('slides' . DS . 'loop', array('slides' => $slides, 'paginate' => $paginate), true, 'admin'); ?>
19
  </div>
views/admin/slides/index.php CHANGED
@@ -13,5 +13,5 @@
13
  </form>
14
  <?php endif; ?>
15
 
16
- <?php $this -> render('slides' . DS . 'loop', array('slides' => $slides), true, 'admin'); ?>
17
  </div>
13
  </form>
14
  <?php endif; ?>
15
 
16
+ <?php $this -> render('slides' . DS . 'loop', array('slides' => $slides, 'paginate' => $paginate), true, 'admin'); ?>
17
  </div>
views/default/gallery.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  $rand = 's' . rand(1,99) . 'w';
4
  $wrapperid = "slideshow-wrapper-" . $rand;
 
5
 
6
  ?>
7
 
@@ -13,8 +14,9 @@ $wrapperid = "slideshow-wrapper-" . $rand;
13
  <h3><?php echo $slide -> post_title; ?></h3>
14
  <?php $full_image_href = wp_get_attachment_image_src($slide -> ID, 'full', false); ?>
15
  <?php $full_image_path = get_attached_file($slide -> ID); ?>
 
16
  <?php if ($options['resizeimages'] == "true" && $options['width'] != "auto") : ?>
17
- <span><?php echo $this -> Html -> timthumb_image_src($full_image_path, $options['width'], $options['height'], 100); ?></span>
18
  <?php else : ?>
19
  <span><?php echo $full_image_href[0]; ?></span>
20
  <?php endif; ?>
@@ -22,9 +24,9 @@ $wrapperid = "slideshow-wrapper-" . $rand;
22
  <?php $thumbnail_link = wp_get_attachment_image_src($slide -> ID, 'thumbnail', false); ?>
23
  <?php if ($options['showthumbs'] == "true") : ?>
24
  <?php if (!empty($slide -> guid)) : ?>
25
- <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_path, $this -> get_option('thumbwidth'), $this -> get_option('thumbheight'), 100); ?>" alt="<?php echo $this -> Html -> sanitize($slide -> post_title); ?>" /></a>
26
  <?php else : ?>
27
- <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); ?>" />
28
  <?php endif; ?>
29
  <?php else : ?>
30
  <a href="<?php echo $slide -> guid; ?>" title="<?php echo $slide -> post_title; ?>"></a>
2
 
3
  $rand = 's' . rand(1,99) . 'w';
4
  $wrapperid = "slideshow-wrapper-" . $rand;
5
+ $slides = stripslashes_deep($slides);
6
 
7
  ?>
8
 
14
  <h3><?php echo $slide -> post_title; ?></h3>
15
  <?php $full_image_href = wp_get_attachment_image_src($slide -> ID, 'full', false); ?>
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['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; ?>
24
  <?php $thumbnail_link = wp_get_attachment_image_src($slide -> ID, 'thumbnail', false); ?>
25
  <?php if ($options['showthumbs'] == "true") : ?>
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
+ <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); ?>" />
30
  <?php endif; ?>
31
  <?php else : ?>
32
  <a href="<?php echo $slide -> guid; ?>" title="<?php echo $slide -> post_title; ?>"></a>