Slideshow - Version 2.1.5

Version Description

  • Fixed: Wordpress intervened with the HTML output by the shortcode, this caused scripts to break.
  • Fixed: Slideshow width isn't affected by width-less elements anymore, instead it seeks the first div's width.
Download this release

Release Info

Developer stefanboonstra
Plugin Icon 128x128 Slideshow
Version 2.1.5
Comparing to
See all releases

Code changes from version 2.0.0 to 2.1.5

classes/SlideshowPlugin.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * TODO Create a variable in which all slideshow html can be stored
7
  * @author: Stefan Boonstra
8
- * @version: 03-07-12
9
  */
10
  class SlideshowPlugin {
11
 
@@ -77,6 +77,10 @@ class SlideshowPlugin {
77
  // Add remaining (unordered) slides to the end of the array.
78
  $slides = array_merge($slides, $slidesPreOrder);
79
 
 
 
 
 
80
  // Enqueue functional sheet
81
  wp_enqueue_style(
82
  'slideshow_functional_style',
@@ -108,6 +112,12 @@ class SlideshowPlugin {
108
  include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slideshow.php');
109
  $output .= ob_get_clean();
110
 
 
 
 
 
 
 
111
  // Enqueue slideshow script
112
  wp_enqueue_script(
113
  'slideshow_script',
5
  *
6
  * TODO Create a variable in which all slideshow html can be stored
7
  * @author: Stefan Boonstra
8
+ * @version: 15-09-12
9
  */
10
  class SlideshowPlugin {
11
 
77
  // Add remaining (unordered) slides to the end of the array.
78
  $slides = array_merge($slides, $slidesPreOrder);
79
 
80
+ // Randomize if setting is true.
81
+ if(isset($allSettings['setting_random']) && $allSettings['setting_random'] == 'true')
82
+ shuffle($slides);
83
+
84
  // Enqueue functional sheet
85
  wp_enqueue_style(
86
  'slideshow_functional_style',
112
  include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slideshow.php');
113
  $output .= ob_get_clean();
114
 
115
+ // Enqueue flash object creation script
116
+ wp_enqueue_script(
117
+ 'swfobject',
118
+ SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . 'swfobject.js'
119
+ );
120
+
121
  // Enqueue slideshow script
122
  wp_enqueue_script(
123
  'slideshow_script',
classes/SlideshowPluginAjax.php CHANGED
@@ -5,7 +5,7 @@
5
  * exceedingly large.
6
  *
7
  * @author: Stefan Boonstra
8
- * @version: 25-08-12
9
  */
10
  class SlideshowPluginAjax {
11
 
5
  * exceedingly large.
6
  *
7
  * @author: Stefan Boonstra
8
+ * @version: 19-05-12
9
  */
10
  class SlideshowPluginAjax {
11
 
classes/SlideshowPluginFeedback.php CHANGED
@@ -3,7 +3,7 @@
3
  * Class SlideshowPluginFeedback collects plugin feedback which helps resolving plugin-related issues faster.
4
  *
5
  * @author: Stefan Boonstra
6
- * @version: 03-07-12
7
  */
8
  class SlideshowPluginFeedback {
9
 
3
  * Class SlideshowPluginFeedback collects plugin feedback which helps resolving plugin-related issues faster.
4
  *
5
  * @author: Stefan Boonstra
6
+ * @version: 15-09-12
7
  */
8
  class SlideshowPluginFeedback {
9
 
classes/SlideshowPluginPostType.php CHANGED
@@ -4,7 +4,7 @@
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
- * @version: 03-07-12
8
  */
9
  class SlideshowPluginPostType {
10
 
@@ -355,7 +355,7 @@ class SlideshowPluginPostType {
355
  * @param boolean $fullDefinition (optional, defaults to true)
356
  * @return mixed $defaultData
357
  */
358
- private static function getDefaultData($fullDefinition = true){
359
  $data = array(
360
  'style_style' => 'light',
361
  'style_custom' => '',
@@ -369,34 +369,36 @@ class SlideshowPluginPostType {
369
  'setting_width' => '0',
370
  'setting_height' => '200',
371
  'setting_descriptionHeight' => '50',
372
- 'setting_stretchImages' => 'false',
373
  'setting_controllable' => 'true',
374
  'setting_controlPanel' => 'false',
375
  'setting_showDescription' => 'true',
376
  'setting_hideDescription' => 'true',
 
377
  );
378
 
379
  if($fullDefinition){
380
  $yes = __('Yes', 'slideshow-plugin');
381
  $no = __('No', 'slideshow-plugin');
382
- $data = array( // $data : array([prefix_settingName] => array([inputType], [value], [default], [description], array([options]), array([dependsOn], [onValue])))
383
  'style_style' => array('select', '', $data['style_style'], __('The style used for this slideshow', 'slideshow-plugin'), array('light' => __('Light', 'slideshow-plugin'), 'dark' => __('Dark', 'slideshow-plugin'), 'custom' => __('Custom', 'slideshow-plugin'))),
384
- 'style_custom' => array('textarea', '', $data['style_custom'], __('Custom style editor (Does not work with a Strict Doctype)', 'slideshow-plugin'), null, array('style_style', 'custom')),
385
- 'setting_animation' => array('select', '', $data['setting_animation'], __('Animation used for transition between slides', 'slideshow-plugin'), array('slide' => __('Slide', 'slideshow-plugin'), 'fade' => __('Fade', 'slideshow-plugin'))),
386
- 'setting_slideSpeed' => array('text', '', $data['setting_slideSpeed'], __('Number of seconds the slide takes to slide in', 'slideshow-plugin')),
387
- 'setting_descriptionSpeed' => array('text', '', $data['setting_descriptionSpeed'], __('Number of seconds the description takes to slide in', 'slideshow-plugin')),
388
- 'setting_intervalSpeed' => array('text', '', $data['setting_intervalSpeed'], __('Seconds between changing slides', 'slideshow-plugin')),
389
- 'setting_play' => array('radio', '', $data['setting_play'], __('Automatically slide to the next slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
390
- 'setting_loop' => array('radio', '', $data['setting_loop'], __('Return to the beginning of the slideshow after last slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
391
- 'setting_slidesPerView' => array('text', '', $data['setting_slidesPerView'], __('Number of slides to fit into one slide', 'slideshow-plugin')),
392
- 'setting_width' => array('text', '', $data['setting_width'], __('Width of the slideshow, set to parent's width on 0', 'slideshow-plugin')),
393
- 'setting_height' => array('text', '', $data['setting_height'], __('Height of the slideshow', 'slideshow-plugin')),
394
- 'setting_descriptionHeight' => array('text', '', $data['setting_descriptionHeight'], __('Height of the description boxes', 'slideshow-plugin')),
395
- 'setting_stretchImages' => array('radio', '', $data['setting_stretchImages'], __('Fit image into slide (stretching it)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
396
- 'setting_controllable' => array('radio', '', $data['setting_controllable'], __('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
397
- 'setting_controlPanel' => array('radio', '', $data['setting_controlPanel'], __('Show control panel (play and pause button)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
398
- 'setting_showDescription' => array('radio', '', $data['setting_showDescription'], __('Show title and description', 'slideshow-plugin'), array('true' => $yes, 'false' => $no)),
399
- 'setting_hideDescription' => array('radio', '', $data['setting_hideDescription'], __('Hide description box, it will pop up when a mouse hovers over the slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), array('setting_showDescription', 'true'))
 
400
  );
401
  }
402
 
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 15-09-12
8
  */
9
  class SlideshowPluginPostType {
10
 
355
  * @param boolean $fullDefinition (optional, defaults to true)
356
  * @return mixed $defaultData
357
  */
358
+ static function getDefaultData($fullDefinition = true){
359
  $data = array(
360
  'style_style' => 'light',
361
  'style_custom' => '',
369
  'setting_width' => '0',
370
  'setting_height' => '200',
371
  'setting_descriptionHeight' => '50',
372
+ 'setting_stretchImages' => 'true',
373
  'setting_controllable' => 'true',
374
  'setting_controlPanel' => 'false',
375
  'setting_showDescription' => 'true',
376
  'setting_hideDescription' => 'true',
377
+ 'setting_random' => 'false'
378
  );
379
 
380
  if($fullDefinition){
381
  $yes = __('Yes', 'slideshow-plugin');
382
  $no = __('No', 'slideshow-plugin');
383
+ $data = array( // $data : array([prefix_settingName] => array([inputType], [value], [default], [description], array([options]), array([dependsOn], [onValue]), 'group' => [groupName]))
384
  'style_style' => array('select', '', $data['style_style'], __('The style used for this slideshow', 'slideshow-plugin'), array('light' => __('Light', 'slideshow-plugin'), 'dark' => __('Dark', 'slideshow-plugin'), 'custom' => __('Custom', 'slideshow-plugin'))),
385
+ 'style_custom' => array('textarea', '', $data['style_custom'], __('Custom style editor', 'slideshow-plugin'), null, array('style_style', 'custom')),
386
+ 'setting_animation' => array('select', '', $data['setting_animation'], __('Animation used for transition between slides', 'slideshow-plugin'), array('slide' => __('Slide', 'slideshow-plugin'), 'fade' => __('Fade', 'slideshow-plugin')), 'group' => __('Animation', 'slideshow-plugin')),
387
+ 'setting_slideSpeed' => array('text', '', $data['setting_slideSpeed'], __('Number of seconds the slide takes to slide in', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
388
+ 'setting_descriptionSpeed' => array('text', '', $data['setting_descriptionSpeed'], __('Number of seconds the description takes to slide in', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
389
+ 'setting_intervalSpeed' => array('text', '', $data['setting_intervalSpeed'], __('Seconds between changing slides', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
390
+ 'setting_slidesPerView' => array('text', '', $data['setting_slidesPerView'], __('Number of slides to fit into one slide', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
391
+ 'setting_width' => array('text', '', $data['setting_width'], __('Width of the slideshow, set to parent's width on 0', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
392
+ 'setting_height' => array('text', '', $data['setting_height'], __('Height of the slideshow', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
393
+ 'setting_descriptionHeight' => array('text', '', $data['setting_descriptionHeight'], __('Height of the description boxes', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
394
+ 'setting_stretchImages' => array('radio', '', $data['setting_stretchImages'], __('Fit image into slide (stretching it)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Display', 'slideshow-plugin')),
395
+ 'setting_showDescription' => array('radio', '', $data['setting_showDescription'], __('Show title and description', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Display', 'slideshow-plugin')),
396
+ 'setting_hideDescription' => array('radio', '', $data['setting_hideDescription'], __('Hide description box, it will pop up when a mouse hovers over the slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), array('setting_showDescription', 'true'), 'group' => __('Display', 'slideshow-plugin')),
397
+ 'setting_play' => array('radio', '', $data['setting_play'], __('Automatically slide to the next slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
398
+ 'setting_loop' => array('radio', '', $data['setting_loop'], __('Return to the beginning of the slideshow after last slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
399
+ 'setting_controllable' => array('radio', '', $data['setting_controllable'], __('Activate buttons (so the user can scroll through the slides)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
400
+ 'setting_controlPanel' => array('radio', '', $data['setting_controlPanel'], __('Show control panel (play and pause button)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
401
+ 'setting_random' => array('radio', '', $data['setting_random'], __('Randomize slides', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Miscellaneous', 'slideshow-plugin'))
402
  );
403
  }
404
 
classes/SlideshowPluginShortcode.php CHANGED
@@ -3,16 +3,19 @@
3
  * Class SlideshowPluginShortcode is called on use of shortcode anywhere on the website.
4
  *
5
  * @author: Stefan Boonstra
6
- * @version: 03-07-12
7
  */
8
  class SlideshowPluginShortcode {
9
 
10
  /** Variables */
11
  static $shortCode = 'slideshow_deploy';
 
 
12
 
13
  /**
14
- * Function slideshowDeploy uses the prepare method of class Slideshow
15
- * to deploy the slideshow on location of the [slideshow] shortcode.
 
16
  *
17
  * @param mixed $atts
18
  * @return String $output
@@ -22,6 +25,36 @@ class SlideshowPluginShortcode {
22
  if(isset($atts['id']))
23
  $postId = $atts['id'];
24
 
25
- return SlideshowPlugin::prepare($postId);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
  }
3
  * Class SlideshowPluginShortcode is called on use of shortcode anywhere on the website.
4
  *
5
  * @author: Stefan Boonstra
6
+ * @version: 15-09-12
7
  */
8
  class SlideshowPluginShortcode {
9
 
10
  /** Variables */
11
  static $shortCode = 'slideshow_deploy';
12
+ private static $bookmark = '!slideshow_deploy!';
13
+ private static $postIds = array();
14
 
15
  /**
16
+ * Function slideshowDeploy adds a bookmark to where ever a shortcode
17
+ * is found and adds the postId to an array, it then is loaded after
18
+ * Wordpress has done its HTML checks.
19
  *
20
  * @param mixed $atts
21
  * @return String $output
25
  if(isset($atts['id']))
26
  $postId = $atts['id'];
27
 
28
+ // Filter content after all Wordpress HTML parsers are done, then replace bookmarks with raw HTML
29
+ add_filter('the_content', array(__CLASS__, 'insertSlideshow'), 999);
30
+ add_filter('the_excerpt', array(__CLASS__, 'insertSlideshow'), 999);
31
+
32
+ // Save post id
33
+ self::$postIds[] = $postId;
34
+
35
+ // Return bookmark
36
+ return self::$bookmark;
37
+ }
38
+
39
+ /**
40
+ * Function insertSlideshow uses the prepare method of class SlideshowPlugin
41
+ * to insert the code for the slideshow on the location a bookmark was found.
42
+ *
43
+ * @param String $content
44
+ * @return String $content
45
+ */
46
+ static function insertSlideshow($content){
47
+ // Loop through post ids
48
+ foreach(self::$postIds as $postId){
49
+ $updatedContent = preg_replace("/" . self::$bookmark . "/", SlideshowPlugin::prepare($postId), $content, 1);
50
+
51
+ if(is_string($updatedContent))
52
+ $content = $updatedContent;
53
+ }
54
+
55
+ // Reset postIds, so a shortcode in a next post can be used
56
+ self::$postIds = array();
57
+
58
+ return $content;
59
  }
60
  }
classes/SlideshowPluginSlideInserter.php CHANGED
@@ -5,7 +5,7 @@
5
  * TODO This class will probanbly need to be renamed to SlideshowPluginSlideHandler to explain more functionality
6
  * TODO than just inserting slides. (Show and delete functionality should be applied here as well)
7
  * @author Stefan Boonstra
8
- * @version 24-08-2012
9
  */
10
  class SlideshowPluginSlideInserter {
11
 
@@ -46,6 +46,23 @@ class SlideshowPluginSlideInserter {
46
  return ob_get_clean();
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  /**
50
  * This function is registered in the SlideshowPluginAjax class
51
  * and deletes slides with a particular $_POST['slideId']
@@ -70,11 +87,17 @@ class SlideshowPluginSlideInserter {
70
  * and prints the results from the search query
71
  */
72
  static function printSearchResults(){
 
 
 
 
 
 
73
  // Get attachments with a title alike the search string, needs to be filtered
74
  add_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
75
  $attachments = get_posts(array(
76
- 'numberposts' => 5,
77
- 'offset' => 0,
78
  'orderby' => 'post_title',
79
  'order' => 'ASC',
80
  'post_type' => 'attachment',
@@ -82,6 +105,13 @@ class SlideshowPluginSlideInserter {
82
  ));
83
  remove_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
84
 
 
 
 
 
 
 
 
85
  // Print results to the screen
86
  if(count($attachments) > 0){
87
  foreach($attachments as $attachment){
@@ -107,10 +137,19 @@ class SlideshowPluginSlideInserter {
107
  </td>
108
  </tr>';
109
  }
 
 
 
 
 
 
 
 
 
110
  } else {
111
  echo '<tr>
112
  <td colspan="3" style="text-align: center;">
113
- <a href="' . admin_url() . 'media-new.php">
114
  ' . __('No images were found, click here to upload some.', 'slideshow-plugin') . '
115
  </a>
116
  </td>
5
  * TODO This class will probanbly need to be renamed to SlideshowPluginSlideHandler to explain more functionality
6
  * TODO than just inserting slides. (Show and delete functionality should be applied here as well)
7
  * @author Stefan Boonstra
8
+ * @version 15-09-2012
9
  */
10
  class SlideshowPluginSlideInserter {
11
 
46
  return ob_get_clean();
47
  }
48
 
49
+ /**
50
+ * Returns the html for showing the video insert button.
51
+ * Enqueues scripts unless $enqueueFiles is set to false.
52
+ *
53
+ * @param boolean $enqueueFiles
54
+ * @return String $button
55
+ */
56
+ static function getVideoSlideInsertButton($enqueueFiles = true){
57
+ if($enqueueFiles)
58
+ self::enqueueFiles();
59
+
60
+ // Return button html
61
+ ob_start();
62
+ include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/insert-video-button.php');
63
+ return ob_get_clean();
64
+ }
65
+
66
  /**
67
  * This function is registered in the SlideshowPluginAjax class
68
  * and deletes slides with a particular $_POST['slideId']
87
  * and prints the results from the search query
88
  */
89
  static function printSearchResults(){
90
+ // Numberposts and offset
91
+ $numberPosts = 10;
92
+ $offset = 0;
93
+ if(isset($_POST['offset']))
94
+ $offset = $_POST['offset'];
95
+
96
  // Get attachments with a title alike the search string, needs to be filtered
97
  add_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
98
  $attachments = get_posts(array(
99
+ 'numberposts' => $numberPosts + 1,
100
+ 'offset' => $offset,
101
  'orderby' => 'post_title',
102
  'order' => 'ASC',
103
  'post_type' => 'attachment',
105
  ));
106
  remove_filter('posts_where', array(__CLASS__, 'printSearchResultsWhereFilter'));
107
 
108
+ // Check if there are enough attachments to print a 'Load more images' button
109
+ $loadMoreResults = false;
110
+ if(count($attachments) > $numberPosts){
111
+ array_pop($attachments);
112
+ $loadMoreResults = true;
113
+ }
114
+
115
  // Print results to the screen
116
  if(count($attachments) > 0){
117
  foreach($attachments as $attachment){
137
  </td>
138
  </tr>';
139
  }
140
+ if($loadMoreResults){
141
+ echo '<tr>
142
+ <td colspan="3" style="text-align: center;">
143
+ <button class="button-secondary load-more-results ' . ($offset + $numberPosts) . '" >
144
+ ' . __('Load more results', 'slideshow-plugin') . '
145
+ </button>
146
+ </td>
147
+ </tr>';
148
+ }
149
  } else {
150
  echo '<tr>
151
  <td colspan="3" style="text-align: center;">
152
+ <a href="' . admin_url() . 'media-new.php" target="_blank">
153
  ' . __('No images were found, click here to upload some.', 'slideshow-plugin') . '
154
  </a>
155
  </td>
classes/SlideshowPluginUpload.php CHANGED
@@ -4,7 +4,7 @@
4
  * anywhere on a website.
5
  *
6
  * @author: Stefan Boonstra
7
- * @version: 03-07-12
8
  */
9
  class SlideshowPluginUpload {
10
 
4
  * anywhere on a website.
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 15-09-12
8
  */
9
  class SlideshowPluginUpload {
10
 
classes/SlideshowPluginWidget.php CHANGED
@@ -3,7 +3,7 @@
3
  * Class SlideshowPluginWidget allows showing one of your slideshows in your widget area.
4
  *
5
  * @author: Stefan Boonstra
6
- * @version: 03-07-12
7
  */
8
  class SlideshowPluginWidget extends WP_Widget {
9
 
3
  * Class SlideshowPluginWidget allows showing one of your slideshows in your widget area.
4
  *
5
  * @author: Stefan Boonstra
6
+ * @version: 15-09-12
7
  */
8
  class SlideshowPluginWidget extends WP_Widget {
9
 
js/SlideshowPlugin/slideshow.js CHANGED
@@ -1,254 +1 @@
1
- jQuery.fn.slideshow_script = function(){
2
- /** Element variables */
3
- var $container = jQuery(this),
4
- $controlPanel = $container.find('.controlPanel'),
5
- $togglePlayButton = $controlPanel.find('.togglePlay'),
6
- $nextButton = $container.find('.next'),
7
- $previousButton = $container.find('.previous'),
8
- $slideshow = $container.find('.slideshow'),
9
- $slides = $slideshow.find('.slide');
10
-
11
- /** Settings */
12
- var $settings = jQuery.parseJSON($container.find('.settings').text());
13
- jQuery.each($settings, function(setting, value){ // Convert 'true' and 'false' to boolean values.
14
- if(value == 'true')
15
- $settings[setting] = true;
16
- else if(value == 'false')
17
- $settings[setting] = false;
18
- });
19
-
20
- /** Set container width to parent width if 0 */
21
- if($container.width() <= 0)
22
- $container.css({ width: $container.parent().width() });
23
-
24
- /** Misc */
25
- var $numberSlidesVisible = 3,
26
- $buttonsActive = false,
27
- $interval = '',
28
- $currentSlideId = 0,
29
- $currentViewId = 0,
30
- $slideWidth = $container.width() / $settings['slidesPerView'];
31
-
32
- init();
33
- /**
34
- * Initialize the slideshow
35
- */
36
- function init(){
37
- var slidePosition = 0;
38
- var totalWidth = 0;
39
-
40
- // Prepare slides with their descriptions
41
- jQuery.each($slides, function(key, slide){
42
- // Delete margin and padding from the sides of the view
43
- if(slidePosition <= 0)
44
- jQuery(slide).css({
45
- 'padding-left': 0,
46
- 'margin-left': 0
47
- });
48
- if(slidePosition >= $settings['slidesPerView'] - 1)
49
- jQuery(slide).css({
50
- 'padding-right': 0,
51
- 'margin-right': 0
52
- });
53
-
54
- // Adapt the width of the slides to their margin and padding, so nothing will fall off-screen
55
- var thisSlideWidth = $slideWidth - (jQuery(slide).outerWidth(true) - jQuery(slide).width());
56
- jQuery(slide).css({ width: thisSlideWidth });
57
- totalWidth += jQuery(slide).outerWidth(true);
58
-
59
- // If the user want the images stretched, stretch it!
60
- if($settings['stretchImages'])
61
- jQuery(slide).find('img').css({ width: jQuery(slide).width(), height: jQuery(slide).height() });
62
-
63
- // Hide descriptionbox if wanted.
64
- var description = jQuery(slide).find('.description');
65
- if($settings['showDescription']){
66
- if($settings['hideDescription'])
67
- description.css({ marginBottom: '-' + description.outerHeight(true) + 'px' });
68
- else
69
- description.css({ height: $settings['descriptionHeight'] });
70
-
71
- description.css({ display: 'inline' });
72
- }
73
-
74
- // Count in what position of the view this slide is in.
75
- slidePosition++;
76
- if(slidePosition >= $settings['slidesPerView'])
77
- slidePosition = 0;
78
- });
79
-
80
- // Set width of slideshow and adjust it's settings so we can move it.
81
- $slideshow.css({
82
- width: totalWidth,
83
- float: 'none',
84
- position: 'absolute',
85
- top: 0,
86
- left: 0
87
- });
88
-
89
- // If controlpanel is visible and autoplay is enabled, show pause button
90
- if($settings['controlPanel'] && $settings['play'])
91
- togglePlay(true); // Only changes button to correct image
92
-
93
- // Start playing (resetInterval() checks for $settings['play'] option
94
- resetInterval();
95
-
96
- // Enable buttons
97
- if($settings['controllable']){
98
- var style = { display: 'inline' };
99
- $nextButton.css(style);
100
- $previousButton.css(style);
101
- $buttonsActive = true;
102
- }
103
- }
104
-
105
- /**
106
- * Jump to view of slides
107
- *
108
- * @param int viewId
109
- */
110
- function gotoView(viewId){
111
- if(!viewId || viewId * $settings['slidesPerView'] > $slides.length)
112
- viewId = 0;
113
-
114
- var position = 0;
115
- var slidePosition = $slideshow.find('.slide_' + (viewId * $settings['slidesPerView'])).position();
116
- if(slidePosition)
117
- var position = '-=' + (slidePosition.left - Math.abs($slideshow.position().left));
118
-
119
- $buttonsActive = false;
120
-
121
- if($settings['animation'] == 'fade'){
122
- $slideshow.fadeOut(parseInt($settings['slideSpeed'] * 1000) / 2);
123
- setTimeout(function(){
124
- $slideshow.css({ left: position });
125
- $slideshow.fadeIn(parseInt($settings['slideSpeed'] * 1000) / 2);
126
- }, parseInt($settings['slideSpeed'] * 1000) / 2);
127
- }else{
128
- $slideshow.animate({
129
- left: position
130
- }, parseInt($settings['slideSpeed'] * 1000));
131
- }
132
-
133
- setTimeout(function(){ $buttonsActive = true; }, parseInt($settings['slideSpeed'] * 1000));
134
- }
135
-
136
- /**
137
- * Makes use of function gotoView(viewId) to jump to the next view
138
- */
139
- function nextView(){
140
- $currentViewId++;
141
- if($currentViewId * $settings['slidesPerView'] > $slides.length){
142
- if(!$settings['loop']){
143
- $currentViewId--;
144
- return;
145
- }
146
-
147
- $currentViewId = 0;
148
- }
149
-
150
- gotoView($currentViewId);
151
- }
152
-
153
- /**
154
- * Makes use of function gotoView(viewId) to jump to the previous view
155
- */
156
- function previousView(){
157
- $currentViewId--;
158
- if($currentViewId < 0){
159
- if(!$settings['loop']){
160
- $currentViewId++;
161
- return;
162
- }
163
-
164
- $currentViewId = Math.floor($slides.length / $settings['slidesPerView']);
165
- }
166
-
167
- gotoView($currentViewId);
168
- }
169
-
170
- /**
171
- * Called when clicked on next button
172
- */
173
- $nextButton.click(function(){
174
- if($buttonsActive){
175
- resetInterval();
176
- nextView();
177
- }
178
- });
179
-
180
- /**
181
- * Called when clicked on previous button
182
- */
183
- $previousButton.click(function(){
184
- if($buttonsActive){
185
- resetInterval();
186
- previousView();
187
- }
188
- });
189
-
190
- /**
191
- * Called when clicked on togglePlay button
192
- */
193
- $togglePlayButton.click(function(){
194
- togglePlay();
195
- });
196
-
197
- /**
198
- * Toggles play
199
- */
200
- function togglePlay(adaptButton){
201
- if(!adaptButton){
202
- $settings['play'] = !$settings['play'];
203
- resetInterval();
204
- }
205
-
206
- if($settings['play'])
207
- $togglePlayButton.attr('class', 'pause');
208
- else
209
- $togglePlayButton.attr('class', 'play');
210
- }
211
-
212
- /**
213
- * Called when mouse enters the container
214
- */
215
- $container.mouseleave(function(){
216
- $controlPanel.stop(true, true).fadeOut('slow');
217
- });
218
-
219
- /**
220
- * Called when mouse exits the container
221
- */
222
- $container.mouseenter(function(){
223
- if($settings['controlPanel'])
224
- $controlPanel.stop(true, true).fadeIn('fast');
225
- });
226
-
227
- /**
228
- * Called when mouse enters a slide
229
- */
230
- $slides.mouseenter(function(){
231
- if($settings['showDescription'] && $settings['hideDescription'])
232
- jQuery(this).find('.description').stop(true, true).animate({ 'margin-bottom': '0px' }, parseInt($settings['descriptionSpeed'] * 1000));
233
- });
234
-
235
- /**
236
- * Called when mouse leaves a slide
237
- */
238
- $slides.mouseleave(function(){
239
- if($settings['showDescription'] && $settings['hideDescription']){
240
- var description = jQuery(this).find('.description');
241
- description.stop(true, true).animate({ 'margin-bottom': '-' + description.outerHeight(true) + 'px' }, parseInt($settings['descriptionSpeed'] * 1000));
242
- }
243
- });
244
-
245
- /**
246
- * Resets the interval and starts a new one.
247
- */
248
- function resetInterval(){
249
- clearInterval($interval);
250
-
251
- if($settings['play'])
252
- $interval = setInterval(function(){ nextView(); }, $settings['intervalSpeed'] * 1000);
253
- }
254
- };
1
+ jQuery.fn.slideshow_script=function(){var $container=jQuery(this),$overflow=$container.find('.slideshow_overflow'),$controlPanel=$container.find('.controlPanel'),$togglePlayButton=$controlPanel.find('.togglePlay'),$nextButton=$container.find('.next'),$previousButton=$container.find('.previous'),$slideshow=$container.find('.slideshow'),$slides=$slideshow.find('.slide');var $settings=jQuery.parseJSON($container.find('.settings').text());jQuery.each($settings,function(setting,value){if(value=='true')$settings[setting]=true;else if(value=='false')$settings[setting]=false});if($container.width()<=0){var parentElement=$container.parent();if(parentElement.width()<=0)$container.css('width',parentElement.closest('div').width());else $container.css('width',parentElement.width())}$overflow.css('width',$container.width());var $numberSlidesVisible=3,$buttonsActive=false,$interval='',$currentSlideId=0,$currentViewId=0,$slideWidth=$container.width()/$settings['slidesPerView'];init();function init(){var slidePosition=0;var totalWidth=1;jQuery.each($slides,function(key,slide){if(slidePosition<=0)jQuery(slide).css({'padding-left':0,'margin-left':0});if(slidePosition>=$settings['slidesPerView']-1)jQuery(slide).css({'padding-right':0,'margin-right':0});var slideWidth=$slideWidth-(jQuery(slide).outerWidth(true)-jQuery(slide).width());jQuery(slide).css({width:slideWidth});totalWidth+=jQuery(slide).outerWidth(true);var image=jQuery(slide).find('img');if(image.attr('src')!=undefined){if($settings['stretchImages']){image.attr({width:jQuery(slide).width(),height:jQuery(slide).height()})}else{image.css('width','auto')}}var description=jQuery(slide).find('.description');if($settings['showDescription']&&description.attr('class')!=undefined){if($settings['hideDescription'])description.css({marginBottom:'-'+description.outerHeight(true)+'px'});else description.css({height:$settings['descriptionHeight']});description.css({display:'block'})}var videoSlideIds=jQuery(slide).find('.videoId').text().split(' ');var videoId=videoSlideIds[0];var elementVideoId=videoSlideIds[1];if(videoId&&elementVideoId){swfobject.embedSWF('http://www.youtube.com/v/'+videoId+'?version=3&enablejsapi=1&playerapiid=player',elementVideoId,jQuery(slide).width(),jQuery(slide).height(),'9',null,null,{allowScriptAccess:'always',wmode:'opaque'},{id:elementVideoId})}slidePosition++;if(slidePosition>=$settings['slidesPerView'])slidePosition=0});$slideshow.css({width:totalWidth,float:'none',position:'absolute',top:0,left:0});if($settings['controlPanel']&&$settings['play'])togglePlay(true);resetInterval();if($settings['controllable']){setNextButtonVisible(true);setPreviousButtonVisible(true);$buttonsActive=true}}function gotoView(viewId,relative){if(relative)viewId=$currentViewId+viewId;if(viewId*$settings['slidesPerView']>=$slides.length){if($settings['loop']){viewId=0}else{viewId=Math.floor(($slides.length-1)/$settings['slidesPerView']);return}}else if(viewId<0){if($settings['loop']){viewId=Math.floor(($slides.length-1)/$settings['slidesPerView'])}else{viewId=0;return}}$currentViewId=viewId;var position=0;var slidePosition=$slideshow.find('.slide_'+(viewId*$settings['slidesPerView'])).position();if(slidePosition)position='-='+(slidePosition.left-Math.abs($slideshow.position().left));$buttonsActive=false;if($settings['animation']=='fade'){$slideshow.fadeOut(parseInt($settings['slideSpeed']*1000)/2);setTimeout(function(){$slideshow.css({left:position});$slideshow.fadeIn(parseInt($settings['slideSpeed']*1000)/ 2)}, parseInt($settings['slideSpeed'] * 1000) /2)}else{$slideshow.animate({left:position},parseInt($settings['slideSpeed']*1000))}setTimeout(function(){$buttonsActive=true},parseInt($settings['slideSpeed']*1000))}$nextButton.click(function(){if($buttonsActive){resetInterval();gotoView(1,true)}});$previousButton.click(function(){if($buttonsActive){resetInterval();gotoView(-1,true)}});function setNextButtonVisible(visible){if(!$settings['controllable'])return;if(visible)$nextButton.stop(true,true).fadeIn($settings['slideSpeed']);else $nextButton.stop(true,true).fadeOut($settings['slideSpeed'])}function setPreviousButtonVisible(visible){if(!$settings['controllable'])return;if(visible)$previousButton.stop(true,true).fadeIn($settings['slideSpeed']);else $previousButton.stop(true,true).fadeOut($settings['slideSpeed'])}$togglePlayButton.click(function(){togglePlay()});function togglePlay(adaptButton){if(!adaptButton){$settings['play']=!$settings['play'];resetInterval()}if($settings['play'])$togglePlayButton.attr('class','pause');else $togglePlayButton.attr('class','play')}$container.mouseleave(function(){$controlPanel.stop(true,true).fadeOut('slow')});$container.mouseenter(function(){if($settings['controlPanel'])$controlPanel.stop(true,true).fadeIn('fast')});$slides.mouseenter(function(){if($settings['showDescription']&&$settings['hideDescription'])jQuery(this).find('.description').stop(true,true).animate({'margin-bottom':'0px'},parseInt($settings['descriptionSpeed']*1000))});$slides.mouseleave(function(){if($settings['showDescription']&&$settings['hideDescription']){var description=jQuery(this).find('.description');description.stop(true,true).animate({'margin-bottom':'-'+description.outerHeight(true)+'px'},parseInt($settings['descriptionSpeed']*1000))}});function resetInterval(){clearInterval($interval);if($settings['play'])$interval=setInterval(function(){gotoView(1,true)},$settings['intervalSpeed']*1000)}jQuery(window).load(function(){jQuery.each($slides,function(key,slide){var image=jQuery(slide).find('img');if(image.attr('src')!=undefined){var imageWidth=jQuery(slide).width()-(image.outerWidth(true)-image.width());var imageHeight=jQuery(slide).height()-(image.outerHeight(true)-image.height());if($settings['stretchImages']){image.css({width:imageWidth,height:imageHeight})}else{if(image.outerWidth(true)>jQuery(slide).width()){image.css({width:imageWidth,height:'auto'})}else if(image.outerHeight(true)>jQuery(slide).height()){image.css({width:'auto',height:imageHeight})}}}})})};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
js/SlideshowPlugin/swfobject.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ /* SWFObject v2.2 <http://code.google.com/p/swfobject/>
2
+ is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
3
+ */
4
+ var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return !a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();
js/SlideshowPluginPostType/post-type-handler.js CHANGED
@@ -1,18 +1,22 @@
1
  jQuery(document).ready(function(){
2
- // Loop through fields that depend on another fields value for showing, register change event
 
 
3
  jQuery('.depends-on-field-value').each(function(key, value){
4
  var attributes = jQuery(this).attr('class').split(' ');
5
 
6
- // Check if field should already be shown
7
  var element = jQuery(this).closest('tr');
8
- if(jQuery('.' + attributes[1]).val() == attributes[2])
 
9
  setElementVisibility(element, true);
10
  else
11
  setElementVisibility(element, false);
12
 
13
  // On change, set field's visibility
14
- jQuery('.' + attributes[1]).change(attributes, function(){
15
  var element = jQuery('.' + attributes[3]).closest('tr');
 
16
  if(jQuery(this).val() == attributes[2])
17
  setElementVisibility(element, true);
18
  else
1
  jQuery(document).ready(function(){
2
+ /**
3
+ * Loop through fields that depend on another field's value for showing, register change event
4
+ */
5
  jQuery('.depends-on-field-value').each(function(key, value){
6
  var attributes = jQuery(this).attr('class').split(' ');
7
 
8
+ // Check if field should be shown
9
  var element = jQuery(this).closest('tr');
10
+ if((jQuery('input[name="' + attributes[1] + '"]').val() == attributes[2] && jQuery('input[name="' + attributes[1] + '"]').prop('checked')) ||
11
+ jQuery('select[name="' + attributes[1] + '"]').val() == attributes[2])
12
  setElementVisibility(element, true);
13
  else
14
  setElementVisibility(element, false);
15
 
16
  // On change, set field's visibility
17
+ jQuery('input[name="' + attributes[1] + '"], select[name="' + attributes[1] + '"]').change(attributes, function(){
18
  var element = jQuery('.' + attributes[3]).closest('tr');
19
+
20
  if(jQuery(this).val() == attributes[2])
21
  setElementVisibility(element, true);
22
  else
js/SlideshowPluginSlideInserter/slide-inserter.js CHANGED
@@ -8,7 +8,7 @@ jQuery(document).ready(function(){
8
  stop: function(event, ui){
9
  slideshowSlideInserterIndexSlidesOrder();
10
  },
11
- cancel: 'input, p'
12
  });
13
 
14
  // Make the black background stretch all the way down the document
@@ -26,20 +26,6 @@ jQuery(document).ready(function(){
26
  // Preload attachments
27
  slideshowSlideInserterGetSearchResults();
28
 
29
- /**
30
- * Open popup by click on button
31
- */
32
- jQuery('#slideshow-insert-image-slide').click(function(){
33
- jQuery('#slideshow-slide-inserter-popup, #slideshow-slide-inserter-popup-background').css({ display: 'block' });
34
- });
35
-
36
- /**
37
- * Insert text slide into the sortable list when the Insert Text Slide button is clicked
38
- */
39
- jQuery('#slideshow-insert-text-slide').click(function(){
40
- SlideshowSlideInserterInsertTextSlide();
41
- });
42
-
43
  /**
44
  * Close popup when clicked on cross
45
  */
@@ -71,6 +57,27 @@ jQuery(document).ready(function(){
71
  }
72
  });
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * Ajax deletes a slide from the slides list and from the database
76
  */
@@ -120,31 +127,52 @@ jQuery(document).ready(function(){
120
  /**
121
  * Sends an ajax post request with the search query and print
122
  * retrieved html to the results table.
 
 
 
 
123
  */
124
- function slideshowSlideInserterGetSearchResults(){
125
- jQuery('#slideshow-slide-inserter-popup #results').html('');
 
 
 
 
126
  jQuery.post(
127
  ajaxurl,
128
  {
129
  action: 'slideshow_slide_inserter_search_query',
130
- search: jQuery('#slideshow-slide-inserter-popup #search').attr('value')
 
131
  },
132
  function(response){
133
  // Fill table
134
- jQuery('#slideshow-slide-inserter-popup #results').html(response);
135
 
136
  // Apply insert to slideshow script
137
  jQuery('#slideshow-slide-inserter-popup #results .insert-attachment').click(function(){
138
- slideshowSlideInserterClosePopup();
139
-
140
- var tr = jQuery(this).parent().parent();
141
- SlideshowSlideInserterInsertImageSlide(
142
  jQuery(this).attr('id'),
143
  jQuery(tr).find('.title').text(),
144
  jQuery(tr).find('.description').text(),
145
  jQuery(tr).find('.image img').attr('src')
146
  );
147
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  }
149
  );
150
  }
@@ -152,12 +180,12 @@ jQuery(document).ready(function(){
152
  /**
153
  * Inserts image slide into the slides list
154
  *
155
- * @param int id
156
- * @param string title
157
- * @param string description
158
- * @param string src
159
  */
160
- function SlideshowSlideInserterInsertImageSlide(id, title, description, src){
161
  if(slideshowHighestSlideId == 'undefined')
162
  return;
163
 
@@ -190,15 +218,14 @@ jQuery(document).ready(function(){
190
  // Put slide in the sortables list.
191
  jQuery('.sortable-slides-list').prepend(imageSlide);
192
 
193
- jQuery.each(jQuery('.sortable-slides-list').find('li'), function(key, value){
194
- jQuery(value).find('.slide_order').attr('value', key + 1);
195
- });
196
  }
197
 
198
  /**
199
  * Inserts text slide into the slides list
200
  */
201
- function SlideshowSlideInserterInsertTextSlide(){
202
  if(slideshowHighestSlideId == 'undefined')
203
  return;
204
 
@@ -225,10 +252,39 @@ jQuery(document).ready(function(){
225
  // Put slide in the sortables list.
226
  jQuery('.sortable-slides-list').prepend(textSlide);
227
 
228
- // Renumbers slide orders
229
- jQuery.each(jQuery('.sortable-slides-list').find('li'), function(key, value){
230
- jQuery(value).find('.slide_order').attr('value', key + 1);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
231
  });
 
 
 
 
 
 
232
  }
233
 
234
  /**
8
  stop: function(event, ui){
9
  slideshowSlideInserterIndexSlidesOrder();
10
  },
11
+ cancel: 'input, select, p'
12
  });
13
 
14
  // Make the black background stretch all the way down the document
26
  // Preload attachments
27
  slideshowSlideInserterGetSearchResults();
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * Close popup when clicked on cross
31
  */
57
  }
58
  });
59
 
60
+ /**
61
+ * Open popup by click on button
62
+ */
63
+ jQuery('#slideshow-insert-image-slide').click(function(){
64
+ jQuery('#slideshow-slide-inserter-popup, #slideshow-slide-inserter-popup-background').css({ display: 'block' });
65
+ });
66
+
67
+ /**
68
+ * Insert text slide into the sortable list when the Insert Text Slide button is clicked
69
+ */
70
+ jQuery('#slideshow-insert-text-slide').click(function(){
71
+ slideshowSlideInserterInsertTextSlide();
72
+ });
73
+
74
+ /**
75
+ * Insert video slide into the sortable list when the Insert Video Slide button is clicked
76
+ */
77
+ jQuery('#slideshow-insert-video-slide').click(function(){
78
+ slideshowSlideInserterInsertVideoSlide();
79
+ });
80
+
81
  /**
82
  * Ajax deletes a slide from the slides list and from the database
83
  */
127
  /**
128
  * Sends an ajax post request with the search query and print
129
  * retrieved html to the results table.
130
+ *
131
+ * If offset is set, append data to data that is already there
132
+ *
133
+ * @param offset (optional, defaults to 0)
134
  */
135
+ function slideshowSlideInserterGetSearchResults(offset){
136
+ if(!offset){
137
+ offset = 0;
138
+ jQuery('#slideshow-slide-inserter-popup #results').html('');
139
+ }
140
+
141
  jQuery.post(
142
  ajaxurl,
143
  {
144
  action: 'slideshow_slide_inserter_search_query',
145
+ search: jQuery('#slideshow-slide-inserter-popup #search').attr('value'),
146
+ offset: offset
147
  },
148
  function(response){
149
  // Fill table
150
+ jQuery('#slideshow-slide-inserter-popup #results').append(response);
151
 
152
  // Apply insert to slideshow script
153
  jQuery('#slideshow-slide-inserter-popup #results .insert-attachment').click(function(){
154
+ var tr = jQuery(this).closest('tr');
155
+ slideshowSlideInserterInsertImageSlide(
 
 
156
  jQuery(this).attr('id'),
157
  jQuery(tr).find('.title').text(),
158
  jQuery(tr).find('.description').text(),
159
  jQuery(tr).find('.image img').attr('src')
160
  );
161
  });
162
+
163
+ // Load more results on click of the 'Load more results' button
164
+ if(jQuery('.load-more-results')){
165
+ jQuery('.load-more-results').click(function(){
166
+ // Get offset
167
+ var previousOffset = jQuery(this).attr('class').split(' ')[2];
168
+
169
+ // Load ajax results
170
+ slideshowSlideInserterGetSearchResults(previousOffset);
171
+
172
+ // Remove button row
173
+ jQuery(this).closest('tr').remove();
174
+ });
175
+ }
176
  }
177
  );
178
  }
180
  /**
181
  * Inserts image slide into the slides list
182
  *
183
+ * @param id
184
+ * @param title
185
+ * @param description
186
+ * @param src
187
  */
188
+ function slideshowSlideInserterInsertImageSlide(id, title, description, src){
189
  if(slideshowHighestSlideId == 'undefined')
190
  return;
191
 
218
  // Put slide in the sortables list.
219
  jQuery('.sortable-slides-list').prepend(imageSlide);
220
 
221
+ // Reindex
222
+ slideshowSlideInserterIndexSlidesOrder();
 
223
  }
224
 
225
  /**
226
  * Inserts text slide into the slides list
227
  */
228
+ function slideshowSlideInserterInsertTextSlide(){
229
  if(slideshowHighestSlideId == 'undefined')
230
  return;
231
 
252
  // Put slide in the sortables list.
253
  jQuery('.sortable-slides-list').prepend(textSlide);
254
 
255
+ // Reindex slide orders
256
+ slideshowSlideInserterIndexSlidesOrder();
257
+ }
258
+
259
+ /**
260
+ * Inserts video slide into the slides list
261
+ */
262
+ function slideshowSlideInserterInsertVideoSlide(){
263
+ if(slideshowHighestSlideId == 'undefined')
264
+ return;
265
+
266
+ slideshowHighestSlideId++;
267
+ var videoSlide = jQuery('.video-slide-template').find('li').clone();
268
+
269
+ // Set names to be saved to the database
270
+ videoSlide.find('.videoId').attr('name', 'slide_' + slideshowHighestSlideId + '_videoId');
271
+ videoSlide.find('.type').attr('name', 'slide_' + slideshowHighestSlideId + '_type');
272
+ videoSlide.find('.slide_order').attr('name', 'slide_' + slideshowHighestSlideId + '_order');
273
+
274
+ // Register delete link (only needs to delete from DOM)
275
+ videoSlide.find('.slideshow-delete-new-slide').click(function(){
276
+ var deleteSlide = confirm('Are you sure you want to delete this slide?');
277
+ if(!deleteSlide)
278
+ return;
279
+
280
+ jQuery(this).closest('li').remove();
281
  });
282
+
283
+ // Put slide in the sortables list.
284
+ jQuery('.sortable-slides-list').prepend(videoSlide);
285
+
286
+ // Reindex slide orders
287
+ slideshowSlideInserterIndexSlidesOrder();
288
  }
289
 
290
  /**
languages/slideshow-plugin-nl_NL.mo CHANGED
Binary file
languages/slideshow-plugin-nl_NL.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: Slideshow Plugin\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2012-09-02 16:18+0100\n"
6
- "PO-Revision-Date: 2012-09-02 16:18+0100\n"
7
  "Last-Translator: Stefan Boonstra <stefanboonstra@hotmail.com>\n"
8
  "Language-Team: Stefan Boonstra <wordpress@stefanboonstra.com>\n"
9
  "MIME-Version: 1.0\n"
@@ -64,107 +64,144 @@ msgstr "Slideshow Stijl"
64
  msgid "Slideshow Settings"
65
  msgstr "Slideshow Instellingen"
66
 
67
- #: classes/SlideshowPluginPostType.php:380
68
  msgid "Yes"
69
  msgstr "Ja"
70
 
71
- #: classes/SlideshowPluginPostType.php:381
72
  msgid "No"
73
  msgstr "Nee"
74
 
75
- #: classes/SlideshowPluginPostType.php:383
76
  msgid "The style used for this slideshow"
77
  msgstr "De stijl te gebruiken voor deze slideshow"
78
 
79
- #: classes/SlideshowPluginPostType.php:383
80
  msgid "Light"
81
  msgstr "Licht"
82
 
83
- #: classes/SlideshowPluginPostType.php:383
84
  msgid "Dark"
85
  msgstr "Donker"
86
 
87
- #: classes/SlideshowPluginPostType.php:383
88
  msgid "Custom"
89
  msgstr "Aangepast"
90
 
91
- #: classes/SlideshowPluginPostType.php:384
92
- msgid "Custom style editor (Does not work with a Strict Doctype)"
93
- msgstr "Aangepaste stijl bewerker (Werkt niet met een Strict Doctype)"
94
-
95
  #: classes/SlideshowPluginPostType.php:385
 
 
 
 
 
96
  msgid "Animation used for transition between slides"
97
  msgstr "Animatie tussen het wisselen van de slides"
98
 
99
- #: classes/SlideshowPluginPostType.php:385
100
  msgid "Slide"
101
  msgstr "Slide"
102
 
103
- #: classes/SlideshowPluginPostType.php:385
104
  msgid "Fade"
105
  msgstr "Fade"
106
 
107
  #: classes/SlideshowPluginPostType.php:386
 
 
 
 
 
 
 
108
  msgid "Number of seconds the slide takes to slide in"
109
  msgstr "Aantal seconden dat de animatie van het inschuiven van de volgende slide duurt"
110
 
111
- #: classes/SlideshowPluginPostType.php:387
112
  msgid "Number of seconds the description takes to slide in"
113
  msgstr "Aantal seconden dat het inschuiven van de beschrijving duurt"
114
 
115
- #: classes/SlideshowPluginPostType.php:388
116
  msgid "Seconds between changing slides"
117
  msgstr "Seconden tussen het wisselen van de slides"
118
 
119
- #: classes/SlideshowPluginPostType.php:389
120
- msgid "Automatically slide to the next slide"
121
- msgstr "Automatisch naar de volgende slide gaan"
122
-
123
  #: classes/SlideshowPluginPostType.php:390
124
- msgid "Return to the beginning of the slideshow after last slide"
125
- msgstr "Keer terug naar het begin van de slideshow na de laatste slide."
126
-
127
- #: classes/SlideshowPluginPostType.php:391
128
  msgid "Number of slides to fit into one slide"
129
  msgstr "Aantal slides om in een slide te plaatsen"
130
 
 
 
131
  #: classes/SlideshowPluginPostType.php:392
 
 
 
 
 
 
 
 
132
  msgid "Width of the slideshow, set to parent&#39;s width on 0"
133
  msgstr "Breedte van de slideshow, past zich aan op bovenliggende element wanneer 0"
134
 
135
- #: classes/SlideshowPluginPostType.php:393
136
  msgid "Height of the slideshow"
137
  msgstr "Hoogte van de slideshow"
138
 
139
- #: classes/SlideshowPluginPostType.php:394
140
  msgid "Height of the description boxes"
141
  msgstr "Hoogte van de beschrijvingen"
142
 
143
- #: classes/SlideshowPluginPostType.php:395
144
  msgid "Fit image into slide (stretching it)"
145
  msgstr "Pas afbeelding in de slideshow (oprekken)"
146
 
 
 
 
 
147
  #: classes/SlideshowPluginPostType.php:396
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  msgid "Activate buttons (so the user can scroll through the slides)"
149
  msgstr "Knoppen activeren (zodat de gebruiker door de slides kan scrollen)"
150
 
151
- #: classes/SlideshowPluginPostType.php:397
152
  msgid "Show control panel (play and pause button)"
153
  msgstr "Toon controlepaneel (speel en pause knop)"
154
 
155
- #: classes/SlideshowPluginPostType.php:398
156
- msgid "Show title and description"
157
- msgstr "Toon titel en beschrijving"
158
 
159
- #: classes/SlideshowPluginPostType.php:399
160
- msgid "Hide description box, it will pop up when a mouse hovers over the slide"
161
- msgstr "Verbeg beschrijving, toon de slide alleen wanneer de muisaanwijzer boven de slide is"
162
 
163
- #: classes/SlideshowPluginSlideInserter.php:103
164
  msgid "Insert"
165
  msgstr "Invoegen"
166
 
167
- #: classes/SlideshowPluginSlideInserter.php:112
 
 
 
 
168
  msgid "No images were found, click here to upload some."
169
  msgstr "Geen afbeeldingen gevonden, klik hier om afbeeldingen te uploaden."
170
 
@@ -184,64 +221,83 @@ msgstr "Om deze slideshow op je website te gebruiken voeg je of dit stukje short
184
  msgid "Or add this piece of code to where ever in your website you want to place the slideshow"
185
  msgstr "Of je voegt dit stuk code toe aan je broncode op de plaats waar je wilt dat de slideshow te zien is"
186
 
187
- #: views/SlideshowPluginPostType/settings.php:6
 
 
 
 
188
  #: views/SlideshowPluginPostType/style-settings.php:6
189
  msgid "Default"
190
  msgstr "Standaard"
191
 
192
- #: views/SlideshowPluginPostType/slides.php:7
193
  msgid "Add slides to this slideshow by using one of the buttons above."
194
  msgstr "Voeg slides toe doormiddel van de bovenstaande knoppen."
195
 
196
- #: views/SlideshowPluginPostType/slides.php:44
197
- #: views/SlideshowPluginPostType/slides.php:105
198
  msgid "Title"
199
  msgstr "Titel"
200
 
201
- #: views/SlideshowPluginPostType/slides.php:45
202
- #: views/SlideshowPluginPostType/slides.php:106
203
  msgid "Description"
204
  msgstr "Beschrijving"
205
 
206
- #: views/SlideshowPluginPostType/slides.php:46
207
- #: views/SlideshowPluginPostType/slides.php:107
208
  msgid "Background color"
209
  msgstr "Achtergrond kleur"
210
 
211
- #: views/SlideshowPluginPostType/slides.php:47
212
- #: views/SlideshowPluginPostType/slides.php:83
213
- #: views/SlideshowPluginPostType/slides.php:108
214
- #: views/SlideshowPluginPostType/slides.php:133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  msgid "URL"
216
  msgstr "URL"
217
 
218
- #: views/SlideshowPluginPostType/slides.php:54
219
- #: views/SlideshowPluginPostType/slides.php:92
220
- msgid "An error occurred while loading this slide, and it will not be present in the slideshow"
221
- msgstr "Een fout is ontstaan tijdens het laden van deze slide, de slide zal niet te bekijken zijn in je slideshow"
222
 
223
- #: views/SlideshowPluginPostType/slides.php:68
224
- #: views/SlideshowPluginPostType/slides.php:75
225
  msgid "Edit"
226
  msgstr "Bewerken"
227
 
228
- #: views/SlideshowPluginPostType/slides.php:96
229
- #: views/SlideshowPluginPostType/slides.php:114
230
- #: views/SlideshowPluginPostType/slides.php:141
 
 
 
 
 
231
  msgid "Delete slide"
232
  msgstr "Verwijder slide"
233
 
234
  #: views/SlideshowPluginPostType/support-plugin.php:3
235
- msgid "Has the Slideshow plugin helped you?"
236
- msgstr "Heeft de Slideshow plugin je geholpen?"
237
-
238
- #: views/SlideshowPluginPostType/support-plugin.php:3
239
- msgid "Help it back!"
240
- msgstr "Help hem terug!"
241
 
242
  #: views/SlideshowPluginPostType/support-plugin.php:6
243
- msgid "If this plugin has filled you with happiness, please support the upkeep of the plugin by rating it on Wordpress, posting a suggestion for improvement on the support forum, or making a donation."
244
- msgstr "Als deze plugin je met blijdschap heeft vervuld, zou ik het enorm waarderen als je de plugin wilt beoordelen op Wordpress, een suggestie wilt maken voor verbetering, of een donatie doen wilt."
245
 
246
  #: views/SlideshowPluginPostType/support-plugin.php:15
247
  msgid "Rate on Wordpress.org"
@@ -252,12 +308,16 @@ msgid "Questions / Suggestions"
252
  msgstr "Vragen / Opmerkingen"
253
 
254
  #: views/SlideshowPluginSlideInserter/insert-image-button.php:1
255
- msgid "Insert Image Slide"
256
- msgstr "Afbeeldings-slide invoegen"
257
 
258
  #: views/SlideshowPluginSlideInserter/insert-text-button.php:1
259
- msgid "Insert Text Slide"
260
- msgstr "Tekst-slide invoegen"
 
 
 
 
261
 
262
  #: views/SlideshowPluginSlideInserter/search-popup.php:6
263
  msgid "Search"
@@ -267,10 +327,35 @@ msgstr "Zoek"
267
  msgid "Search images by title"
268
  msgstr "Zoek plaatjes op titel"
269
 
 
 
 
 
270
  #: views/SlideshowPluginWidget/form.php:9
271
  msgid "Random Slideshow"
272
  msgstr "Willekeurige Slideshow"
273
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
274
  #~ msgid "Click on an image to insert it as a slide"
275
  #~ msgstr "Klik op een plaatje om deze in te voegen als slide"
276
 
@@ -288,14 +373,8 @@ msgstr "Willekeurige Slideshow"
288
  #~ msgid "Style"
289
  #~ msgstr "Style"
290
 
291
- #~ msgid "Custom Style Editor"
292
- #~ msgstr "Aangepaste Stijl Bewerker"
293
-
294
  #~ msgid "Custom style"
295
  #~ msgstr "Aangepaste stijl"
296
 
297
- #~ msgid "Upload/Manage Images"
298
- #~ msgstr "Upload/Beheer Afbeeldingen"
299
-
300
  #~ msgid "Leave any field open to use default value."
301
  #~ msgstr "Een veld dat open wordt gelaten neemt de standaardwaarde aan."
2
  msgstr ""
3
  "Project-Id-Version: Slideshow Plugin\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2012-09-15 17:46+0100\n"
6
+ "PO-Revision-Date: 2012-09-15 17:47+0100\n"
7
  "Last-Translator: Stefan Boonstra <stefanboonstra@hotmail.com>\n"
8
  "Language-Team: Stefan Boonstra <wordpress@stefanboonstra.com>\n"
9
  "MIME-Version: 1.0\n"
64
  msgid "Slideshow Settings"
65
  msgstr "Slideshow Instellingen"
66
 
67
+ #: classes/SlideshowPluginPostType.php:381
68
  msgid "Yes"
69
  msgstr "Ja"
70
 
71
+ #: classes/SlideshowPluginPostType.php:382
72
  msgid "No"
73
  msgstr "Nee"
74
 
75
+ #: classes/SlideshowPluginPostType.php:384
76
  msgid "The style used for this slideshow"
77
  msgstr "De stijl te gebruiken voor deze slideshow"
78
 
79
+ #: classes/SlideshowPluginPostType.php:384
80
  msgid "Light"
81
  msgstr "Licht"
82
 
83
+ #: classes/SlideshowPluginPostType.php:384
84
  msgid "Dark"
85
  msgstr "Donker"
86
 
87
+ #: classes/SlideshowPluginPostType.php:384
88
  msgid "Custom"
89
  msgstr "Aangepast"
90
 
 
 
 
 
91
  #: classes/SlideshowPluginPostType.php:385
92
+ #, fuzzy
93
+ msgid "Custom style editor"
94
+ msgstr "Aangepaste Stijl Bewerker"
95
+
96
+ #: classes/SlideshowPluginPostType.php:386
97
  msgid "Animation used for transition between slides"
98
  msgstr "Animatie tussen het wisselen van de slides"
99
 
100
+ #: classes/SlideshowPluginPostType.php:386
101
  msgid "Slide"
102
  msgstr "Slide"
103
 
104
+ #: classes/SlideshowPluginPostType.php:386
105
  msgid "Fade"
106
  msgstr "Fade"
107
 
108
  #: classes/SlideshowPluginPostType.php:386
109
+ #: classes/SlideshowPluginPostType.php:387
110
+ #: classes/SlideshowPluginPostType.php:388
111
+ #: classes/SlideshowPluginPostType.php:389
112
+ msgid "Animation"
113
+ msgstr "Animatie"
114
+
115
+ #: classes/SlideshowPluginPostType.php:387
116
  msgid "Number of seconds the slide takes to slide in"
117
  msgstr "Aantal seconden dat de animatie van het inschuiven van de volgende slide duurt"
118
 
119
+ #: classes/SlideshowPluginPostType.php:388
120
  msgid "Number of seconds the description takes to slide in"
121
  msgstr "Aantal seconden dat het inschuiven van de beschrijving duurt"
122
 
123
+ #: classes/SlideshowPluginPostType.php:389
124
  msgid "Seconds between changing slides"
125
  msgstr "Seconden tussen het wisselen van de slides"
126
 
 
 
 
 
127
  #: classes/SlideshowPluginPostType.php:390
 
 
 
 
128
  msgid "Number of slides to fit into one slide"
129
  msgstr "Aantal slides om in een slide te plaatsen"
130
 
131
+ #: classes/SlideshowPluginPostType.php:390
132
+ #: classes/SlideshowPluginPostType.php:391
133
  #: classes/SlideshowPluginPostType.php:392
134
+ #: classes/SlideshowPluginPostType.php:393
135
+ #: classes/SlideshowPluginPostType.php:394
136
+ #: classes/SlideshowPluginPostType.php:395
137
+ #: classes/SlideshowPluginPostType.php:396
138
+ msgid "Display"
139
+ msgstr "Weergave"
140
+
141
+ #: classes/SlideshowPluginPostType.php:391
142
  msgid "Width of the slideshow, set to parent&#39;s width on 0"
143
  msgstr "Breedte van de slideshow, past zich aan op bovenliggende element wanneer 0"
144
 
145
+ #: classes/SlideshowPluginPostType.php:392
146
  msgid "Height of the slideshow"
147
  msgstr "Hoogte van de slideshow"
148
 
149
+ #: classes/SlideshowPluginPostType.php:393
150
  msgid "Height of the description boxes"
151
  msgstr "Hoogte van de beschrijvingen"
152
 
153
+ #: classes/SlideshowPluginPostType.php:394
154
  msgid "Fit image into slide (stretching it)"
155
  msgstr "Pas afbeelding in de slideshow (oprekken)"
156
 
157
+ #: classes/SlideshowPluginPostType.php:395
158
+ msgid "Show title and description"
159
+ msgstr "Toon titel en beschrijving"
160
+
161
  #: classes/SlideshowPluginPostType.php:396
162
+ msgid "Hide description box, it will pop up when a mouse hovers over the slide"
163
+ msgstr "Verbeg beschrijving, toon de slide alleen wanneer de muisaanwijzer boven de slide is"
164
+
165
+ #: classes/SlideshowPluginPostType.php:397
166
+ msgid "Automatically slide to the next slide"
167
+ msgstr "Automatisch naar de volgende slide gaan"
168
+
169
+ #: classes/SlideshowPluginPostType.php:397
170
+ #: classes/SlideshowPluginPostType.php:398
171
+ #: classes/SlideshowPluginPostType.php:399
172
+ #: classes/SlideshowPluginPostType.php:400
173
+ msgid "Control"
174
+ msgstr "Controle"
175
+
176
+ #: classes/SlideshowPluginPostType.php:398
177
+ msgid "Return to the beginning of the slideshow after last slide"
178
+ msgstr "Keer terug naar het begin van de slideshow na de laatste slide."
179
+
180
+ #: classes/SlideshowPluginPostType.php:399
181
  msgid "Activate buttons (so the user can scroll through the slides)"
182
  msgstr "Knoppen activeren (zodat de gebruiker door de slides kan scrollen)"
183
 
184
+ #: classes/SlideshowPluginPostType.php:400
185
  msgid "Show control panel (play and pause button)"
186
  msgstr "Toon controlepaneel (speel en pause knop)"
187
 
188
+ #: classes/SlideshowPluginPostType.php:401
189
+ msgid "Randomize slides"
190
+ msgstr "Toon slides in willekeurige volgorde"
191
 
192
+ #: classes/SlideshowPluginPostType.php:401
193
+ msgid "Miscellaneous"
194
+ msgstr "Overige"
195
 
196
+ #: classes/SlideshowPluginSlideInserter.php:135
197
  msgid "Insert"
198
  msgstr "Invoegen"
199
 
200
+ #: classes/SlideshowPluginSlideInserter.php:144
201
+ msgid "Load more results"
202
+ msgstr "Meer resultaten laden"
203
+
204
+ #: classes/SlideshowPluginSlideInserter.php:153
205
  msgid "No images were found, click here to upload some."
206
  msgstr "Geen afbeeldingen gevonden, klik hier om afbeeldingen te uploaden."
207
 
221
  msgid "Or add this piece of code to where ever in your website you want to place the slideshow"
222
  msgstr "Of je voegt dit stuk code toe aan je broncode op de plaats waar je wilt dat de slideshow te zien is"
223
 
224
+ #: views/SlideshowPluginPostType/settings.php:8
225
+ msgid "settings"
226
+ msgstr "instellingen"
227
+
228
+ #: views/SlideshowPluginPostType/settings.php:22
229
  #: views/SlideshowPluginPostType/style-settings.php:6
230
  msgid "Default"
231
  msgstr "Standaard"
232
 
233
+ #: views/SlideshowPluginPostType/slides.php:9
234
  msgid "Add slides to this slideshow by using one of the buttons above."
235
  msgstr "Voeg slides toe doormiddel van de bovenstaande knoppen."
236
 
237
+ #: views/SlideshowPluginPostType/slides.php:47
238
+ #: views/SlideshowPluginPostType/slides.php:141
239
  msgid "Title"
240
  msgstr "Titel"
241
 
242
+ #: views/SlideshowPluginPostType/slides.php:48
243
+ #: views/SlideshowPluginPostType/slides.php:142
244
  msgid "Description"
245
  msgstr "Beschrijving"
246
 
247
+ #: views/SlideshowPluginPostType/slides.php:49
248
+ #: views/SlideshowPluginPostType/slides.php:143
249
  msgid "Background color"
250
  msgstr "Achtergrond kleur"
251
 
252
+ #: views/SlideshowPluginPostType/slides.php:55
253
+ #: views/SlideshowPluginPostType/slides.php:110
254
+ #: views/SlideshowPluginPostType/slides.php:149
255
+ #: views/SlideshowPluginPostType/slides.php:197
256
+ msgid "Same window"
257
+ msgstr "Zelfde scherm"
258
+
259
+ #: views/SlideshowPluginPostType/slides.php:56
260
+ #: views/SlideshowPluginPostType/slides.php:111
261
+ #: views/SlideshowPluginPostType/slides.php:150
262
+ #: views/SlideshowPluginPostType/slides.php:198
263
+ msgid "New window"
264
+ msgstr "Nieuw scherm"
265
+
266
+ #: views/SlideshowPluginPostType/slides.php:60
267
+ #: views/SlideshowPluginPostType/slides.php:115
268
+ #: views/SlideshowPluginPostType/slides.php:154
269
+ #: views/SlideshowPluginPostType/slides.php:202
270
  msgid "URL"
271
  msgstr "URL"
272
 
273
+ #: views/SlideshowPluginPostType/slides.php:76
274
+ #: views/SlideshowPluginPostType/slides.php:170
275
+ msgid "Youtube Video ID"
276
+ msgstr "Youtube Video ID"
277
 
278
+ #: views/SlideshowPluginPostType/slides.php:94
279
+ #: views/SlideshowPluginPostType/slides.php:101
280
  msgid "Edit"
281
  msgstr "Bewerken"
282
 
283
+ #: views/SlideshowPluginPostType/slides.php:126
284
+ msgid "An error occurred while loading this slide, and it will not be present in the slideshow"
285
+ msgstr "Een fout is ontstaan tijdens het laden van deze slide, de slide zal niet te bekijken zijn in je slideshow"
286
+
287
+ #: views/SlideshowPluginPostType/slides.php:131
288
+ #: views/SlideshowPluginPostType/slides.php:162
289
+ #: views/SlideshowPluginPostType/slides.php:177
290
+ #: views/SlideshowPluginPostType/slides.php:211
291
  msgid "Delete slide"
292
  msgstr "Verwijder slide"
293
 
294
  #: views/SlideshowPluginPostType/support-plugin.php:3
295
+ msgid "Help to keep this plugin free!"
296
+ msgstr "Help mee om deze plugin gratis te houden!"
 
 
 
 
297
 
298
  #: views/SlideshowPluginPostType/support-plugin.php:6
299
+ msgid "In order to keep you provided with the newest features, forum support, and bug-fixes, a lot of motivation is required. Therefore I'm kindly asking you to consider making a small donation to the plugin or rating it as 5-stars on Wordpress.org. Thank you in advance!"
300
+ msgstr "Om je te kunnen voorzien van de nieuwste functionaliteiten, forum ondersteuning en fout-oplossingen, is een hoop motivatie nodig. Daarom zou ik het enorm waarderen als je een kleine donatie aan de plugin zou willen doen, of de plugin 5 sterren zou willen geven op Wordpress.org. Alvast bedankt!"
301
 
302
  #: views/SlideshowPluginPostType/support-plugin.php:15
303
  msgid "Rate on Wordpress.org"
308
  msgstr "Vragen / Opmerkingen"
309
 
310
  #: views/SlideshowPluginSlideInserter/insert-image-button.php:1
311
+ msgid "Image slide"
312
+ msgstr "Afbeeldingsslide"
313
 
314
  #: views/SlideshowPluginSlideInserter/insert-text-button.php:1
315
+ msgid "Text slide"
316
+ msgstr "Tekst slide"
317
+
318
+ #: views/SlideshowPluginSlideInserter/insert-video-button.php:1
319
+ msgid "Video slide"
320
+ msgstr "Video slide"
321
 
322
  #: views/SlideshowPluginSlideInserter/search-popup.php:6
323
  msgid "Search"
327
  msgid "Search images by title"
328
  msgstr "Zoek plaatjes op titel"
329
 
330
+ #: views/SlideshowPluginUpload/upload-button.php:1
331
+ msgid "Upload/Manage Images"
332
+ msgstr "Upload/Beheer Afbeeldingen"
333
+
334
  #: views/SlideshowPluginWidget/form.php:9
335
  msgid "Random Slideshow"
336
  msgstr "Willekeurige Slideshow"
337
 
338
+ #~ msgid "Custom style editor (Does not work with a Strict Doctype)"
339
+ #~ msgstr "Aangepaste stijl bewerker (Werkt niet met een Strict Doctype)"
340
+
341
+ #~ msgid "Has the Slideshow plugin helped you?"
342
+ #~ msgstr "Heeft de Slideshow plugin je geholpen?"
343
+
344
+ #~ msgid "Help it back!"
345
+ #~ msgstr "Help hem terug!"
346
+
347
+ #~ msgid ""
348
+ #~ "If this plugin has filled you with happiness, please support the upkeep "
349
+ #~ "of the plugin by rating it on Wordpress, posting a suggestion for "
350
+ #~ "improvement on the support forum, or making a donation."
351
+ #~ msgstr ""
352
+ #~ "Als deze plugin je met blijdschap heeft vervuld, zou ik het enorm "
353
+ #~ "waarderen als je de plugin wilt beoordelen op Wordpress, een suggestie "
354
+ #~ "wilt maken voor verbetering, of een donatie doen wilt."
355
+
356
+ #~ msgid "Insert Text Slide"
357
+ #~ msgstr "Tekst-slide invoegen"
358
+
359
  #~ msgid "Click on an image to insert it as a slide"
360
  #~ msgstr "Klik op een plaatje om deze in te voegen als slide"
361
 
373
  #~ msgid "Style"
374
  #~ msgstr "Style"
375
 
 
 
 
376
  #~ msgid "Custom style"
377
  #~ msgstr "Aangepaste stijl"
378
 
 
 
 
379
  #~ msgid "Leave any field open to use default value."
380
  #~ msgstr "Een veld dat open wordt gelaten neemt de standaardwaarde aan."
readme.txt CHANGED
@@ -2,9 +2,9 @@
2
 
3
  Contributors: stefanboonstra
4
  Tags: slideshow, slider, slide, show, images, image, photo, gallery, galleries, jquery, javascript,
5
- Requires at least: 3.0
6
- Tested up to: 3.4.1
7
- Stable tag: 2.0.0
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
@@ -14,21 +14,25 @@ Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
14
 
15
  Slideshow provides an easy way to integrate a slideshow for any Wordpress installation.
16
 
17
- Any image can be loaded into the slideshow by picking it from the Wordpress media page, even image you already uploaded
18
- can be inserted into your slideshow right away!
19
 
20
  Fancy doing something crazy? You can create and use as many slideshows as you'd like, with
21
  different images, settings and styles for each one of them.
22
 
 
 
23
  - Create as many slideshows with as many slides as you like
24
  - Image slides
25
  - Text slides
26
- - Video slides (Coming in version 2.1.0)
27
- - Place it anywhere on your website.
28
- - Customize it to taste.
29
- - Show that visitor who's boss.
 
 
30
 
31
- = Currently supported languages =
32
 
33
  - English
34
  - Dutch
@@ -60,15 +64,19 @@ Wordpress media page.
60
 
61
  = The slideshow does not show up / The slideshow looks like it's not styled =
62
 
63
- Most times the slideshow is called after the </head> tag, which means the scripts need to load in the footer of
64
- the website. A theme that has no '<?php wp_footer(); ?>' call in it's footer will not be able to load the slideshow's
65
  scripts.
66
 
 
 
 
 
67
  = I chose the 'Custom' style option for my slideshow, but the slideshow is not styled anymore =
68
 
69
  Since the slideshow is most often called after the </head> tag, the slideshow can't print it's styles in the head of
70
  the website and has to output it on the page. A strict doctype does not allow stylesheets in the body and thus the
71
- slideshow is not styled.
72
 
73
 
74
  == Screenshots ==
@@ -88,6 +96,44 @@ slideshow is not styled.
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  = 2.0.0 =
92
  * Complete sideshow script revision to support new features.
93
  * The script now supports two kinds of animations: 'Slide' and 'Fade'.
2
 
3
  Contributors: stefanboonstra
4
  Tags: slideshow, slider, slide, show, images, image, photo, gallery, galleries, jquery, javascript,
5
+ Requires at least: 3.3
6
+ Tested up to: 3.4.2
7
+ Stable tag: 2.1.5
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
14
 
15
  Slideshow provides an easy way to integrate a slideshow for any Wordpress installation.
16
 
17
+ Any image can be loaded into the slideshow by picking it from the Wordpress media page, even images you've already
18
+ uploaded can be inserted into your slideshow right away!
19
 
20
  Fancy doing something crazy? You can create and use as many slideshows as you'd like, with
21
  different images, settings and styles for each one of them.
22
 
23
+ = Features =
24
+
25
  - Create as many slideshows with as many slides as you like
26
  - Image slides
27
  - Text slides
28
+ - Video slides
29
+ - Place it anywhere on your website
30
+ - Run multiple slideshows on the same page
31
+ - Change animations and handling
32
+ - Customize to taste
33
+ - Shows that visitor who's boss
34
 
35
+ = Languages =
36
 
37
  - English
38
  - Dutch
64
 
65
  = The slideshow does not show up / The slideshow looks like it's not styled =
66
 
67
+ - The slideshow is mostly called after the `</head>` tag, which means the scripts and stylesheet need to load in the footer
68
+ of the website. A theme that has no `<?php wp_footer(); ?>` call in it's footer will not be able to load the slideshow's
69
  scripts.
70
 
71
+ - Often when the slideshow isn't showing, there's a javascript error somewhere on the page and this error has caused
72
+ javascript to break. For the slideshow to work again, this error needs to be fixed. Check if any errors were thrown by
73
+ opening Google Chrome or Firefox (with Firebug installed) and press the 'F12' key. Errors show in the console tab.
74
+
75
  = I chose the 'Custom' style option for my slideshow, but the slideshow is not styled anymore =
76
 
77
  Since the slideshow is most often called after the </head> tag, the slideshow can't print it's styles in the head of
78
  the website and has to output it on the page. A strict doctype does not allow stylesheets in the body and thus the
79
+ slideshow may not be styled.
80
 
81
 
82
  == Screenshots ==
96
 
97
  == Changelog ==
98
 
99
+ = 2.2.0 Pre-release =
100
+ * Slides can now be randomized.
101
+
102
+ = 2.1.5 =
103
+ * Fixed: Wordpress intervened with the HTML output by the shortcode, this caused scripts to break.
104
+ * Fixed: Slideshow width isn't affected by width-less elements anymore, instead it seeks the first div's width.
105
+
106
+ = 2.1.4 =
107
+ * Fixed: Slideshows in posts are now longer broken by Wordpress inserted 'em' tags.
108
+ * Fixed: Image borders no longer fall off-slide.
109
+
110
+ = 2.1.3 =
111
+ * Fixed: Overflow container now adapts to its parent element correctly.
112
+ * Fixed: Internet Explorer now shows control panel (buttons etc.) on top of the Flash element.
113
+ * Fixed: Images are now loaded by the Wordpress function, rather than being loaded from the database's 'guid'.
114
+
115
+ = 2.1.2 =
116
+ * Wordpress media uploader link in image inserter pop-up now opens in a new window.
117
+ * Fixed: Image inserter pop-up CSS no longer pushes the 'insert' buttons off-screen.
118
+
119
+ = 2.1.1 =
120
+ * Fixed: Settings meta-box threw an unexpected 'T_ENDFOREACH' since a shorthand PHP tag was used improperly.
121
+
122
+ = 2.1.0 =
123
+ * Added Youtube video slides.
124
+ * Slide URLs can now be chosen to open in a new window.
125
+ * Added headers above settings, giving the user mover oversight.
126
+ * Endless scrolling is now available in the image inserter pop up.
127
+ * Images are now centered in their slides by default.
128
+ * Script is now activated on document ready, not window load.
129
+ * Hid slides in another element so that buttons could overflow the slideshow container.
130
+ * Fixed: Hide-away settings were influenced by their own settings fields.
131
+ * Fixed: Stretching was not always handled correctly.
132
+ * Fixed: Script counter made the first view show twice.
133
+
134
+ = 2.0.1 =
135
+ * Fixed: Version 1.x.x slides disappeared after updating to version 2.0.0. An automatic converter has been added.
136
+
137
  = 2.0.0 =
138
  * Complete sideshow script revision to support new features.
139
  * The script now supports two kinds of animations: 'Slide' and 'Fade'.
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
slideshow.php CHANGED
@@ -3,8 +3,8 @@
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
- Version: 2.0.0
7
- Requires at least: 3.0
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
10
  License: GPL
@@ -16,12 +16,12 @@
16
  * base path/url returning method.
17
  *
18
  * @author Stefan Boonstra
19
- * @version 03-07-12
20
  */
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
- static $version = '2.0.0';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
@@ -48,11 +48,89 @@ class SlideshowPluginMain {
48
  // Register slideshow post type
49
  SlideshowPluginPostType::initialize();
50
 
 
 
 
51
  // Plugin feedback
52
  add_action('admin_head', array('SlideshowPluginFeedback', 'adminInitialize'));
53
  register_deactivation_hook(__FILE__, array('SlideshowPluginFeedback', 'deactivation'));
54
  }
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  /**
57
  * Translates the plugin
58
  */
3
  Plugin Name: Slideshow
4
  Plugin URI: http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/
5
  Description: This plugin offers a slideshow that is easily deployable in your website. Add any image that has already been uploaded to add to your slideshow. Options and styles are customizable for every single slideshow on your website.
6
+ Version: 2.1.5
7
+ Requires at least: 3.3
8
  Author: StefanBoonstra
9
  Author URI: http://stefanboonstra.com
10
  License: GPL
16
  * base path/url returning method.
17
  *
18
  * @author Stefan Boonstra
19
+ * @version 16-09-12
20
  */
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
+ static $version = '2.1.5';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
48
  // Register slideshow post type
49
  SlideshowPluginPostType::initialize();
50
 
51
+ // Transfers v1.x.x slides to the new slide format
52
+ register_activation_hook(__FILE__, array(__CLASS__, 'transferV1toV2'));
53
+
54
  // Plugin feedback
55
  add_action('admin_head', array('SlideshowPluginFeedback', 'adminInitialize'));
56
  register_deactivation_hook(__FILE__, array('SlideshowPluginFeedback', 'deactivation'));
57
  }
58
 
59
+ /**
60
+ * Transfers v1.x.x slides to the new slide format
61
+ */
62
+ static function transferV1toV2(){
63
+ // Check if this has already been done
64
+ if(get_option('slideshow-plugin-updated-from-v1-x-x-to-v2-0-1') !== false)
65
+ return;
66
+
67
+ // Get posts
68
+ $posts = get_posts(array(
69
+ 'numberposts' => -1,
70
+ 'offset' => 0,
71
+ 'post_type' => SlideshowPluginPostType::$postType
72
+ ));
73
+
74
+ // Loop through posts
75
+ foreach($posts as $post){
76
+
77
+ // Stores highest slide id.
78
+ $highestSlideId = -1;
79
+
80
+ // Get stored slide settings and convert them to array([slide-key] => array([setting-name] => [value]));
81
+ $slidesPreOrder = array();
82
+ $settings = SlideshowPluginPostType::getSettings($post->ID, SlideshowPluginPostType::$prefixes['slide-list'], true);
83
+ foreach($settings as $key => $value){
84
+ $key = explode('_', $key);
85
+ if(is_numeric($key[1]))
86
+ $slidesPreOrder[$key[1]][$key[2]] = $value;
87
+ }
88
+
89
+ // Save slide keys from the $slidePreOrder array in the array itself for later use
90
+ foreach($slidesPreOrder as $key => $value){
91
+ // Save highest slide id
92
+ if($key > $highestSlideId)
93
+ $highestSlideId = $key;
94
+ }
95
+
96
+ // Get defaults
97
+ $defaultData = SlideshowPluginPostType::getDefaultData(false);
98
+
99
+ // Get old data
100
+ $oldData = get_post_meta($post->ID, SlideshowPluginPostType::$settingsMetaKey, true);
101
+ if(!is_array(($oldData)))
102
+ $oldData = array();
103
+
104
+ // Get attachments
105
+ $attachments = get_posts(array(
106
+ 'numberposts' => -1,
107
+ 'offset' => 0,
108
+ 'post_type' => 'attachment',
109
+ 'post_parent' => $post->ID
110
+ ));
111
+
112
+ // Get data from attachments
113
+ $newData = array();
114
+ foreach($attachments as $attachment){
115
+ $highestSlideId++;
116
+ $newData['slide_' . $highestSlideId . '_postId'] = $attachment->ID;
117
+ $newData['slide_' . $highestSlideId . '_type'] = 'attachment';
118
+ }
119
+
120
+ // Save settings
121
+ update_post_meta(
122
+ $post->ID,
123
+ SlideshowPluginPostType::$settingsMetaKey,
124
+ array_merge(
125
+ $defaultData,
126
+ $oldData,
127
+ $newData
128
+ ));
129
+ }
130
+
131
+ update_option('slideshow-plugin-updated-from-v1-x-x-to-v2-0-1', 'updated');
132
+ }
133
+
134
  /**
135
  * Translates the plugin
136
  */
style/SlideshowPlugin/functional.css CHANGED
@@ -1,74 +1 @@
1
- .slideshow_container {
2
- overflow: hidden;
3
- position: relative;
4
- }
5
-
6
- .slideshow_container .slideshow {
7
- height: 100%;
8
- width: 200%;
9
- overflow: hidden;
10
- }
11
-
12
- .slideshow_container img {
13
- max-width: 100%;
14
- max-height: 100%;
15
- width: 100%;
16
- height: 100%;
17
- width: auto;
18
- border: none;
19
- }
20
-
21
- .slideshow_container .slide {
22
- height: 100%;
23
- float: left;
24
- overflow: hidden;
25
- }
26
-
27
- .slideshow_container .transparent {
28
- zoom: 1;
29
- }
30
-
31
- .slideshow_container .transparent:hover {
32
- zoom: 1;
33
- }
34
-
35
- .slideshow_container .description {
36
- position: absolute;
37
- bottom: 0;
38
- display: none;
39
- width: inherit;
40
- }
41
-
42
- .slideshow_container .controlPanel {
43
- margin: 5px auto;
44
- display: none;
45
- }
46
-
47
- .slideshow_container .controlPanel ul {
48
- list-style: none;
49
- margin: 0;
50
- padding: 0;
51
- }
52
-
53
- .slideshow_container .controlPanel ul li {
54
- float: left;
55
- }
56
-
57
- .slideshow_container .controlPanel ul li:hover {
58
- cursor: pointer;
59
- }
60
-
61
- .slideshow_container .button {
62
- position: absolute;
63
- top: 50%;
64
- cursor: pointer;
65
- display: none;
66
- }
67
-
68
- .slideshow_container .previous {
69
- left: 5px;
70
- }
71
-
72
- .slideshow_container .next {
73
- right: 5px;
74
- }
1
+ .slideshow_container{position:relative}.slideshow_container .slideshow_overflow{position:relative;overflow:hidden}.slideshow_container .slideshow{height:100%;width:200%;overflow:hidden}.slideshow_container img{margin:0!important;padding:0!important;max-width:100%;max-height:100%;height:100%;border:0}.slideshow_container .slide{height:100%;float:left;overflow:hidden;text-align:center}.slideshow_container .transparent{zoom:1}.slideshow_container .transparent:hover{zoom:1}.slideshow_container .description{position:absolute;bottom:0;display:none;width:inherit}.slideshow_container .controlPanel{position:absolute;top:5px;left:50%;display:none}.slideshow_container .controlPanel ul{list-style:none;margin:0;padding:0}.slideshow_container .controlPanel ul li{float:left}.slideshow_container .controlPanel ul li:hover{cursor:pointer}.slideshow_container .button{padding:0;position:absolute;top:50%;cursor:pointer;display:none}.slideshow_container .previous{left:5px}.slideshow_container .next{right:5px}.slideshow_container .manufacturer{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
style/SlideshowPluginSlideInserter/slide-inserter.css CHANGED
@@ -15,7 +15,7 @@
15
  #slideshow-slide-inserter-popup {
16
  background: #fff;
17
  display: none;
18
- position: fixed;
19
  padding: 20px;
20
  line-height: 23px;
21
  z-index: 10001;
@@ -39,6 +39,11 @@
39
  cursor: pointer;
40
  }
41
 
 
 
 
 
 
42
  .sortable-slides-list-item {
43
  background: #fff url('../../images/SlideshowPluginPostType/draggable.png') no-repeat right center;
44
  }
15
  #slideshow-slide-inserter-popup {
16
  background: #fff;
17
  display: none;
18
+ position: absolute;
19
  padding: 20px;
20
  line-height: 23px;
21
  z-index: 10001;
39
  cursor: pointer;
40
  }
41
 
42
+ #slideshow-slide-inserter-popup #search-results {
43
+ height: 400px;
44
+ overflow-y: scroll;
45
+ }
46
+
47
  .sortable-slides-list-item {
48
  background: #fff url('../../images/SlideshowPluginPostType/draggable.png') no-repeat right center;
49
  }
views/SlideshowPlugin/slideshow.php CHANGED
@@ -1,78 +1,110 @@
1
- <div class="slideshow_container slideshow_id_<?php echo $id; ?>" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['width']))? $settings['height'] : 0; ?>px;">
2
- <div class="slideshow">
3
- <?php if(count($slides) > 0): ?>
4
- <?php $i = 0; ?>
5
- <?php foreach($slides as $slide): ?>
6
-
7
- <?php
8
- $url = '';
9
- if(isset($slide['url']))
10
- $url = $slide['url'];
11
- ?>
12
-
13
- <?php if($slide['type'] == 'text'): ?>
14
 
15
  <?php
16
- $title = $description = $color = '';
17
- if(isset($slide['title']))
18
- $title = $slide['title'];
19
- if(isset($slide['description']))
20
- $description = $slide['description'];
21
- if(isset($slide['color']))
22
- $color = $slide['color'];
23
  ?>
24
 
25
- <div class="slide slide_<?php echo $i; ?>" <?php if(!empty($color)) echo 'style="background: #' . $color . ';"'; ?>>
26
- <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?>>
27
- <h2><?php echo $title; ?></h2>
28
- <p><?php echo $description; ?></p>
29
- </a>
30
- </div>
31
 
32
- <?php elseif($slide['type'] == 'attachment'): ?>
 
 
 
 
 
 
 
 
33
 
34
- <?php
35
- $postId = '';
36
- if(isset($slide['postId']) && is_numeric($slide['postId']))
37
- $postId = $slide['postId'];
38
- else
39
- continue;
40
-
41
- $attachment = get_post($postId);
42
- if(!isset($attachment))
43
- continue;
44
- ?>
 
 
 
 
 
 
 
 
 
 
45
 
46
- <div class="slide slide_<?php echo $i; ?>">
47
- <div class="description transparent">
48
- <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?>>
49
- <h2><?php echo $attachment->post_title; ?></h2>
50
- <p><?php echo $attachment->post_content; ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  </a>
52
  </div>
53
- <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?>>
54
- <img
55
- src="<?php echo $attachment->guid; ?>"
56
- alt="<?php echo $attachment->post_title; ?>"
57
- />
58
- </a>
59
- </div>
60
-
61
- <?php endif; ?>
62
- <?php $i++; ?>
63
- <?php endforeach; ?>
64
- <?php endif; ?>
65
  </div>
66
 
67
- <div class="controlPanel transparent"><ul><li class="togglePlay play"></li></li></ul></div>
 
68
 
69
- <div class="button previous transparent"></div>
70
- <div class="button next transparent"></div>
 
71
 
72
  <div class="settings" style="display: none;"><?php echo json_encode($settings); ?></div>
73
 
 
 
 
 
 
 
 
 
74
  <script type="text/javascript">
75
- jQuery(window).load(function(){
76
  jQuery('.slideshow_id_<?php echo $id; ?>').slideshow_script();
77
  });
78
  </script>
1
+ <div class="slideshow_container slideshow_id_<?php echo $id; ?>" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
2
+ <div class="slideshow_overflow" style="width: <?php echo (is_numeric($settings['width']))? $settings['width'] : 0; ?>px; height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
3
+ <div class="slideshow">
4
+ <?php if(count($slides) > 0): ?>
5
+ <?php $i = 0; ?>
6
+ <?php foreach($slides as $slide): ?>
 
 
 
 
 
 
 
7
 
8
  <?php
9
+ $url = $target = '';
10
+ if(isset($slide['url']))
11
+ $url = $slide['url'];
12
+ if(isset($slide['urlTarget']))
13
+ $target = $slide['urlTarget'];
 
 
14
  ?>
15
 
16
+ <?php if($slide['type'] == 'text'): ?>
 
 
 
 
 
17
 
18
+ <?php
19
+ $title = $description = $color = '';
20
+ if(isset($slide['title']))
21
+ $title = $slide['title'];
22
+ if(isset($slide['description']))
23
+ $description = $slide['description'];
24
+ if(isset($slide['color']))
25
+ $color = $slide['color'];
26
+ ?>
27
 
28
+ <div class="slide slide_<?php echo $i; ?>" <?php if(!empty($color)) echo 'style="background: #' . $color . ';"'; ?> style="height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
29
+ <a <?php if(!empty($url)) echo 'href="' . $url . '"';?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
30
+ <h2><?php echo $title; ?></h2>
31
+ <p><?php echo $description; ?></p>
32
+ </a>
33
+ </div>
34
+
35
+ <?php elseif($slide['type'] == 'video'): ?>
36
+
37
+ <?php
38
+ $videoId = '';
39
+ if(isset($slide['videoId']))
40
+ $videoId = $slide['videoId'];
41
+
42
+ $elementVideoId = 'youtube-player-' . rand() . '-' . $videoId;
43
+ ?>
44
+
45
+ <div class="slide slide_<?php echo $i; ?> slide_video" style="height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
46
+ <div class="videoId" style="display: none;"><?php echo $videoId; ?> <?php echo $elementVideoId; ?></div>
47
+ <div id="<?php echo $elementVideoId; ?>"></div>
48
+ </div>
49
 
50
+ <?php elseif($slide['type'] == 'attachment'): ?>
51
+
52
+ <?php
53
+ $postId = '';
54
+ if(isset($slide['postId']) && is_numeric($slide['postId']))
55
+ $postId = $slide['postId'];
56
+ else
57
+ continue;
58
+
59
+ $attachment = get_post($postId);
60
+ if(empty($attachment))
61
+ continue;
62
+
63
+ $image = wp_get_attachment_image_src($attachment->ID, 'full');
64
+ if(!is_array($image) || !$image) continue;
65
+ ?>
66
+
67
+ <div class="slide slide_<?php echo $i; ?>" style="height: <?php echo (is_numeric($settings['height']))? $settings['height'] : 0; ?>px;">
68
+ <div class="description transparent">
69
+ <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
70
+ <h2><?php echo $attachment->post_title; ?></h2>
71
+ <p><?php echo $attachment->post_content; ?></p>
72
+ </a>
73
+ </div>
74
+ <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
75
+ <img
76
+ src="<?php echo $image[0]; ?>"
77
+ alt="<?php echo $attachment->post_title; ?>"
78
+ />
79
  </a>
80
  </div>
81
+
82
+ <?php endif; ?>
83
+ <?php $i++; ?>
84
+ <?php endforeach; ?>
85
+ <?php endif; ?>
86
+ </div>
 
 
 
 
 
 
87
  </div>
88
 
89
+ <div class="controllers">
90
+ <div class="controlPanel transparent"><ul><li class="togglePlay play"></li></ul></div>
91
 
92
+ <div class="button previous transparent"></div>
93
+ <div class="button next transparent"></div>
94
+ </div>
95
 
96
  <div class="settings" style="display: none;"><?php echo json_encode($settings); ?></div>
97
 
98
+ <div class="manufacturer">
99
+ <a href="http://www.stefanboonstra.com/">Slideshow Stefan Boonstra</a>
100
+ </div>
101
+
102
+ <div style="display: none;">
103
+ <?php echo SlideshowPluginMain::$version; ?>
104
+ </div>
105
+
106
  <script type="text/javascript">
107
+ jQuery(document).ready(function(){
108
  jQuery('.slideshow_id_<?php echo $id; ?>').slideshow_script();
109
  });
110
  </script>
views/SlideshowPluginPostType/settings.php CHANGED
@@ -1,6 +1,22 @@
1
  <table>
 
2
  <?php foreach($settings as $key => $value): ?>
3
- <tr <?php if(!empty($value[5])) echo 'style="display:none;"'; ?>>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  <td><?php echo $value[3]; ?></td>
5
  <td><?php echo $inputFields[$key]; ?></td>
6
  <td><?php _e('Default', 'slideshow-plugin'); ?>: &#39;<?php echo (isset($value[4]))? $value[4][$value[2]]: $value[2]; ?>&#39;</td>
1
  <table>
2
+ <?php $groups = array(); ?>
3
  <?php foreach($settings as $key => $value): ?>
4
+ <?php if(!empty($value['group']) && !isset($groups[$value['group']])): $groups[$value['group']] = true; ?>
5
+ <tr>
6
+ <td colspan="3" style="border-bottom: 1px solid #dfdfdf; text-align: center;">
7
+ <span style="display: inline-block; position: relative; top: 9px; padding: 0 12px; background: #f8f8f8;">
8
+ <?php echo $value['group']; ?> <?php _e('settings', 'slideshow-plugin'); ?>
9
+ </span>
10
+ </td>
11
+ </tr>
12
+ <tr>
13
+ <td colspan="3"></td>
14
+ </tr>
15
+ <?php endif; ?>
16
+ <tr
17
+ <?php echo !empty($value['group'])? 'class="group-' . strtolower(str_replace(' ', '-', $value['group'])) . '"': ''; ?>
18
+ <?php echo !empty($value[5])? 'style="display:none;"': ''; ?>
19
+ >
20
  <td><?php echo $value[3]; ?></td>
21
  <td><?php echo $inputFields[$key]; ?></td>
22
  <td><?php _e('Default', 'slideshow-plugin'); ?>: &#39;<?php echo (isset($value[4]))? $value[4][$value[2]]: $value[2]; ?>&#39;</td>
views/SlideshowPluginPostType/slides.php CHANGED
@@ -1,6 +1,8 @@
1
- <p>
 
2
  <?php echo SlideshowPluginSlideInserter::getImageSlideInsertButton(); ?>
3
  <?php echo SlideshowPluginSlideInserter::getTextSlideInsertButton(); ?>
 
4
  </p>
5
 
6
  <?php if(count($slides) <= 0): ?>
@@ -41,17 +43,41 @@
41
  $color = $slide['color'];
42
  ?>
43
 
 
44
  <input type="text" name="slide_<?php echo $id; ?>_title" value="<?php echo $title; ?>" /><i><?php _e('Title', 'slideshow-plugin'); ?></i><br />
45
  <input type="text" name="slide_<?php echo $id; ?>_description" value="<?php echo $description; ?>" /><i><?php _e('Description', 'slideshow-plugin'); ?></i><br />
46
  <input type="text" name="slide_<?php echo $id; ?>_color" value="<?php echo $color; ?>" class="color" /><i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
47
- <input type="text" name="slide_<?php echo $id; ?>_url" value="<?php echo $url; ?>" /><i><?php _e('URL', 'slideshow-plugin'); ?></i>
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
  <input type="hidden" name="slide_<?php echo $id; ?>_type" value="text" />
50
  <input type="hidden" name="slide_<?php echo $id; ?>_order" value="<?php echo $order; ?>" class="slide_order" />
51
 
52
- <?php elseif($slide['type'] == 'video'): ?>
 
 
 
 
 
 
 
 
 
 
53
 
54
- <p><?php _e('An error occurred while loading this slide, and it will not be present in the slideshow', 'slideshow-plugin'); ?></p>
 
55
 
56
  <?php elseif($slide['type'] == 'attachment'):
57
 
@@ -76,12 +102,19 @@
76
  </strong><br />
77
  <?php if(strlen($attachment->post_content) > 30) echo substr($attachment->post_content, 0, 20) . '...'; else echo $attachment->post_content; ?>
78
  </p>
79
-
80
  <p style="clear: both"></p>
81
 
82
- <p style="padding: 0 5px;">
83
- <input type="text" name="slide_<?php echo $id; ?>_url" value="<?php echo $url; ?>" /><i><?php _e('URL', 'slideshow-plugin'); ?></i>
 
 
 
 
 
 
 
84
  </p>
 
85
 
86
  <input type="hidden" name="slide_<?php echo $id; ?>_type" value="attachment" />
87
  <input type="hidden" name="slide_<?php echo $id; ?>_postId" value="<?php echo $attachment->ID; ?>" />
@@ -89,7 +122,9 @@
89
 
90
  <?php else: ?>
91
 
92
- <p><?php _e('An error occurred while loading this slide, and it will not be present in the slideshow', 'slideshow-plugin'); ?></p>
 
 
93
 
94
  <?php endif; ?>
95
  <p style="padding: 0 5px; color: red; cursor: pointer;" class="slideshow-delete-slide">
@@ -102,10 +137,23 @@
102
 
103
  <div class="text-slide-template" style="display: none;">
104
  <li class="widefat sortable-slides-list-item">
105
- <input type="text" class="title" /><i><?php _e('Title', 'slideshow-plugin'); ?></i><br />
106
- <input type="text" class="description" /><i><?php _e('Description', 'slideshow-plugin'); ?></i><br />
107
- <input type="text" class="color" /><i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
108
- <input type="text" class="url" /><i><?php _e('URL', 'slideshow-plugin'); ?></i>
 
 
 
 
 
 
 
 
 
 
 
 
 
109
 
110
  <input type="hidden" class="type" value="text" />
111
  <input type="hidden" class="slide_order" />
@@ -116,6 +164,21 @@
116
  </li>
117
  </div>
118
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
119
  <div class="image-slide-template" style="display: none;">
120
  <li class="widefat sortable-slides-list-item">
121
  <p style="float: left; padding: 0 5px;">
@@ -126,12 +189,19 @@
126
  <strong class="title"></strong><br />
127
  <span class="description"></span>
128
  </p>
129
-
130
  <p style="clear: both"></p>
131
 
132
- <p style="padding: 0 5px;">
133
- <input type="text" class="url" value="" /><i><?php _e('URL', 'slideshow-plugin'); ?></i>
 
 
 
 
134
  </p>
 
 
 
 
135
 
136
  <input type="hidden" class="type" value="attachment" />
137
  <input type="hidden" class="postId" value="" />
1
+ <p style="text-align: center;">
2
+ <i>Insert:</i><br/>
3
  <?php echo SlideshowPluginSlideInserter::getImageSlideInsertButton(); ?>
4
  <?php echo SlideshowPluginSlideInserter::getTextSlideInsertButton(); ?>
5
+ <?php echo SlideshowPluginSlideInserter::getVideoSlideInsertButton(); ?>
6
  </p>
7
 
8
  <?php if(count($slides) <= 0): ?>
43
  $color = $slide['color'];
44
  ?>
45
 
46
+ <p style="padding: 0 5px;">
47
  <input type="text" name="slide_<?php echo $id; ?>_title" value="<?php echo $title; ?>" /><i><?php _e('Title', 'slideshow-plugin'); ?></i><br />
48
  <input type="text" name="slide_<?php echo $id; ?>_description" value="<?php echo $description; ?>" /><i><?php _e('Description', 'slideshow-plugin'); ?></i><br />
49
  <input type="text" name="slide_<?php echo $id; ?>_color" value="<?php echo $color; ?>" class="color" /><i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
50
+ </p>
51
+
52
+ <p style="float: left; padding: 0 5px;">
53
+ <input type="text" name="slide_<?php echo $id; ?>_url" value="<?php echo $url; ?>" /><br />
54
+ <select name="slide_<?php echo $id; ?>_urlTarget">
55
+ <option value="_self" <?php selected('_self', $slide['urlTarget']); ?>><?php _e('Same window', 'slideshow-plugin'); ?></option>
56
+ <option value="_blank" <?php selected('_blank', $slide['urlTarget']); ?>><?php _e('New window', 'slideshow-plugin'); ?></option>
57
+ </select>
58
+ </p>
59
+ <p style="float: left; line-height: 50px;">
60
+ <i><?php _e('URL', 'slideshow-plugin'); ?></i>
61
+ </p>
62
+ <p style="clear: both;"></p>
63
 
64
  <input type="hidden" name="slide_<?php echo $id; ?>_type" value="text" />
65
  <input type="hidden" name="slide_<?php echo $id; ?>_order" value="<?php echo $order; ?>" class="slide_order" />
66
 
67
+ <?php elseif($slide['type'] == 'video'):
68
+
69
+ // Type specific values
70
+ $videoId = '';
71
+ if(isset($slide['videoId']))
72
+ $videoId = $slide['videoId'];
73
+ ?>
74
+
75
+ <p style="padding: 0 5px;">
76
+ <input type="text" name="slide_<?php echo $id; ?>_videoId" value="<?php echo $videoId; ?>" /><i><?php _e('Youtube Video ID', 'slideshow-plugin'); ?></i>
77
+ </p>
78
 
79
+ <input type="hidden" name="slide_<?php echo $id; ?>_type" value="video" />
80
+ <input type="hidden" name="slide_<?php echo $id; ?>_order" value="<?php echo $order; ?>" class="slide_order" />
81
 
82
  <?php elseif($slide['type'] == 'attachment'):
83
 
102
  </strong><br />
103
  <?php if(strlen($attachment->post_content) > 30) echo substr($attachment->post_content, 0, 20) . '...'; else echo $attachment->post_content; ?>
104
  </p>
 
105
  <p style="clear: both"></p>
106
 
107
+ <p style="float: left; padding: 0 5px;">
108
+ <input type="text" name="slide_<?php echo $id; ?>_url" value="<?php echo $url; ?>" /><br />
109
+ <select name="slide_<?php echo $id; ?>_urlTarget">
110
+ <option value="_self" <?php selected('_self', $slide['urlTarget']); ?>><?php _e('Same window', 'slideshow-plugin'); ?></option>
111
+ <option value="_blank" <?php selected('_blank', $slide['urlTarget']); ?>><?php _e('New window', 'slideshow-plugin'); ?></option>
112
+ </select>
113
+ </p>
114
+ <p style="float: left; line-height: 50px;">
115
+ <i><?php _e('URL', 'slideshow-plugin'); ?></i>
116
  </p>
117
+ <p style="clear: both;"></p>
118
 
119
  <input type="hidden" name="slide_<?php echo $id; ?>_type" value="attachment" />
120
  <input type="hidden" name="slide_<?php echo $id; ?>_postId" value="<?php echo $attachment->ID; ?>" />
122
 
123
  <?php else: ?>
124
 
125
+ <p style="padding: 0 5px;">
126
+ <?php _e('An error occurred while loading this slide, and it will not be present in the slideshow', 'slideshow-plugin'); ?>
127
+ </p>
128
 
129
  <?php endif; ?>
130
  <p style="padding: 0 5px; color: red; cursor: pointer;" class="slideshow-delete-slide">
137
 
138
  <div class="text-slide-template" style="display: none;">
139
  <li class="widefat sortable-slides-list-item">
140
+ <p style="padding: 0 5px;">
141
+ <input type="text" class="title" /><i><?php _e('Title', 'slideshow-plugin'); ?></i><br />
142
+ <input type="text" class="description" /><i><?php _e('Description', 'slideshow-plugin'); ?></i><br />
143
+ <input type="text" class="color" /><i><?php _e('Background color', 'slideshow-plugin'); ?></i><br />
144
+ </p>
145
+
146
+ <p style="float: left; padding: 0 5px;">
147
+ <input type="text" class="url" value="" /><br />
148
+ <select class="urlTarget">
149
+ <option value="_self"><?php _e('Same window', 'slideshow-plugin'); ?></option>
150
+ <option value="_blank"><?php _e('New window', 'slideshow-plugin'); ?></option>
151
+ </select>
152
+ </p>
153
+ <p style="float: left; line-height: 50px;">
154
+ <i><?php _e('URL', 'slideshow-plugin'); ?></i>
155
+ </p>
156
+ <p style="clear: both"></p>
157
 
158
  <input type="hidden" class="type" value="text" />
159
  <input type="hidden" class="slide_order" />
164
  </li>
165
  </div>
166
 
167
+ <div class="video-slide-template" style="display: none;">
168
+ <li class="widefat sortable-slides-list-item">
169
+ <p style="padding: 0 5px;">
170
+ <input type="text" class="videoId" /><i><?php _e('Youtube Video ID', 'slideshow-plugin'); ?></i>
171
+ </p>
172
+
173
+ <input type="hidden" class="type" value="video" />
174
+ <input type="hidden" class="slide_order" />
175
+
176
+ <p style="padding: 0 5px; color: red; cursor: pointer;" class="slideshow-delete-new-slide">
177
+ <?php _e('Delete slide', 'slideshow-plugin'); ?>
178
+ </p>
179
+ </li>
180
+ </div>
181
+
182
  <div class="image-slide-template" style="display: none;">
183
  <li class="widefat sortable-slides-list-item">
184
  <p style="float: left; padding: 0 5px;">
189
  <strong class="title"></strong><br />
190
  <span class="description"></span>
191
  </p>
 
192
  <p style="clear: both"></p>
193
 
194
+ <p style="float: left; padding: 0 5px;">
195
+ <input type="text" class="url" value="" /><br />
196
+ <select class="urlTarget">
197
+ <option value="_self"><?php _e('Same window', 'slideshow-plugin'); ?></option>
198
+ <option value="_blank"><?php _e('New window', 'slideshow-plugin'); ?></option>
199
+ </select>
200
  </p>
201
+ <p style="float: left; line-height: 50px;"
202
+ <i><?php _e('URL', 'slideshow-plugin'); ?></i>
203
+ </p>
204
+ <p style="clear: both"></p>
205
 
206
  <input type="hidden" class="type" value="attachment" />
207
  <input type="hidden" class="postId" value="" />
views/SlideshowPluginPostType/support-plugin.php CHANGED
@@ -1,9 +1,9 @@
1
  <div class="updated" style="background: #f7f7f7; border-color: #dfdfdf;">
2
  <div style="float: left; width: 50%;">
3
- <h3><?php _e('Has the Slideshow plugin helped you?', 'slideshow-plugin'); ?> <span><small><i><?php _e('Help it back!', 'slideshow-plugin'); ?></i></small></span></h3>
4
 
5
  <p>
6
- <?php _e('If this plugin has filled you with happiness, please support the upkeep of the plugin by rating it on Wordpress, posting a suggestion for improvement on the support forum, or making a donation.', 'slideshow-plugin'); ?>
7
  </p>
8
  </div>
9
 
1
  <div class="updated" style="background: #f7f7f7; border-color: #dfdfdf;">
2
  <div style="float: left; width: 50%;">
3
+ <h3><?php _e('Help to keep this plugin free!', 'slideshow-plugin'); ?></h3>
4
 
5
  <p>
6
+ <?php _e('In order to keep you provided with the newest features, forum support, and bug-fixes, a lot of motivation is required. Therefore I\'m kindly asking you to consider making a small donation to the plugin or rating it as 5-stars on Wordpress.org. Thank you in advance!', 'slideshow-plugin'); ?>
7
  </p>
8
  </div>
9
 
views/SlideshowPluginSlideInserter/insert-image-button.php CHANGED
@@ -1 +1 @@
1
- <input type="button" id="slideshow-insert-image-slide" class="button" value="<?php _e('Insert Image Slide', 'slideshow-plugin'); ?>" />
1
+ <input type="button" id="slideshow-insert-image-slide" class="button" value="<?php _e('Image slide', 'slideshow-plugin'); ?>" />
views/SlideshowPluginSlideInserter/insert-text-button.php CHANGED
@@ -1 +1 @@
1
- <input type="button" id="slideshow-insert-text-slide" class="button" value="<?php _e('Insert Text Slide', 'slideshow-plugin'); ?>" />
1
+ <input type="button" id="slideshow-insert-text-slide" class="button" value="<?php _e('Text slide', 'slideshow-plugin'); ?>" />
views/SlideshowPluginSlideInserter/insert-video-button.php ADDED
@@ -0,0 +1 @@
 
1
+ <input type="button" id="slideshow-insert-video-slide" class="button" value="<?php _e('Video slide', 'slideshow-plugin'); ?>" />
views/SlideshowPluginSlideInserter/search-popup.php CHANGED
@@ -6,6 +6,9 @@
6
  <?php submit_button(__('Search', 'slideshow-plugin'), 'primary', 'search-submit', false); ?>
7
  <i><?php _e('Search images by title'); ?></i>
8
  </div>
 
9
 
10
- <table id="results" class="widefat" style="height: 400px; width: 600px;"></table>
 
 
11
  </div>
6
  <?php submit_button(__('Search', 'slideshow-plugin'), 'primary', 'search-submit', false); ?>
7
  <i><?php _e('Search images by title'); ?></i>
8
  </div>
9
+ <div style="clear: both;"></div>
10
 
11
+ <div id="search-results">
12
+ <table id="results" class="widefat"></table>
13
+ </div>
14
  </div>