Slideshow - Version 2.0.1

Version Description

  • IMPORTANT: This update is only for those people who want their old slides from version 1.x.x back.
  • IMPORTANT: If you are satisfied with version 2.0.0, please ignore this update as it might fiddle with the settings you just set.
Download this release

Release Info

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

Code changes from version 2.1.0 to 2.0.1

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: 15-09-12
9
  */
10
  class SlideshowPlugin {
11
 
@@ -108,12 +108,6 @@ class SlideshowPlugin {
108
  include(SlideshowPluginMain::getPluginPath() . '/views/' . __CLASS__ . '/slideshow.php');
109
  $output .= ob_get_clean();
110
 
111
- // Enqueue flash object creation script
112
- wp_enqueue_script(
113
- 'swfobject',
114
- SlideshowPluginMain::getPluginUrl() . '/js/' . __CLASS__ . 'swfobject.js'
115
- );
116
-
117
  // Enqueue slideshow script
118
  wp_enqueue_script(
119
  'slideshow_script',
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
 
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',
classes/SlideshowPluginAjax.php CHANGED
@@ -5,7 +5,7 @@
5
  * exceedingly large.
6
  *
7
  * @author: Stefan Boonstra
8
- * @version: 19-05-12
9
  */
10
  class SlideshowPluginAjax {
11
 
5
  * exceedingly large.
6
  *
7
  * @author: Stefan Boonstra
8
+ * @version: 25-08-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: 15-09-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: 03-07-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: 15-09-12
8
  */
9
  class SlideshowPluginPostType {
10
 
@@ -369,11 +369,11 @@ class SlideshowPluginPostType {
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
  );
378
 
379
  if($fullDefinition){
@@ -381,22 +381,22 @@ class SlideshowPluginPostType {
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', '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')), 'group' => __('Animation', 'slideshow-plugin')),
386
- 'setting_slideSpeed' => array('text', '', $data['setting_slideSpeed'], __('Number of seconds the slide takes to slide in', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
387
- 'setting_descriptionSpeed' => array('text', '', $data['setting_descriptionSpeed'], __('Number of seconds the description takes to slide in', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
388
- 'setting_intervalSpeed' => array('text', '', $data['setting_intervalSpeed'], __('Seconds between changing slides', 'slideshow-plugin'), 'group' => __('Animation', 'slideshow-plugin')),
389
- 'setting_slidesPerView' => array('text', '', $data['setting_slidesPerView'], __('Number of slides to fit into one slide', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
390
- 'setting_width' => array('text', '', $data['setting_width'], __('Width of the slideshow, set to parent's width on 0', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
391
- 'setting_height' => array('text', '', $data['setting_height'], __('Height of the slideshow', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
392
- 'setting_descriptionHeight' => array('text', '', $data['setting_descriptionHeight'], __('Height of the description boxes', 'slideshow-plugin'), 'group' => __('Display', 'slideshow-plugin')),
393
- 'setting_stretchImages' => array('radio', '', $data['setting_stretchImages'], __('Fit image into slide (stretching it)', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Display', 'slideshow-plugin')),
394
- 'setting_showDescription' => array('radio', '', $data['setting_showDescription'], __('Show title and description', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Display', 'slideshow-plugin')),
395
- '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')),
396
- 'setting_play' => array('radio', '', $data['setting_play'], __('Automatically slide to the next slide', 'slideshow-plugin'), array('true' => $yes, 'false' => $no), 'group' => __('Control', 'slideshow-plugin')),
397
- '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')),
398
- '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')),
399
- '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')),
400
  );
401
  }
402
 
4
  * slideshows and their individual settings
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 03-07-12
8
  */
9
  class SlideshowPluginPostType {
10
 
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){
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
 
classes/SlideshowPluginShortcode.php CHANGED
@@ -3,7 +3,7 @@
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
 
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
 
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 15-09-2012
9
  */
10
  class SlideshowPluginSlideInserter {
11
 
@@ -46,23 +46,6 @@ class SlideshowPluginSlideInserter {
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,17 +70,11 @@ class SlideshowPluginSlideInserter {
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,13 +82,6 @@ class SlideshowPluginSlideInserter {
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,15 +107,6 @@ class SlideshowPluginSlideInserter {
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;">
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
  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
  * 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
  ));
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
  </td>
108
  </tr>';
109
  }
 
 
 
 
 
 
 
 
 
110
  } else {
111
  echo '<tr>
112
  <td colspan="3" style="text-align: center;">
classes/SlideshowPluginUpload.php CHANGED
@@ -4,7 +4,7 @@
4
  * anywhere on a website.
5
  *
6
  * @author: Stefan Boonstra
7
- * @version: 15-09-12
8
  */
9
  class SlideshowPluginUpload {
10
 
4
  * anywhere on a website.
5
  *
6
  * @author: Stefan Boonstra
7
+ * @version: 03-07-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: 15-09-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: 03-07-12
7
  */
8
  class SlideshowPluginWidget extends WP_Widget {
9
 
js/SlideshowPlugin/slideshow.js CHANGED
@@ -1 +1,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){$container.css('width',$container.parent().width());$overflow.css('width',$container.parent().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'},{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)}};
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ };
js/SlideshowPlugin/swfobject.js DELETED
@@ -1,4 +0,0 @@
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,22 +1,18 @@
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
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
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, select, p'
12
  });
13
 
14
  // Make the black background stretch all the way down the document
@@ -26,6 +26,20 @@ jQuery(document).ready(function(){
26
  // Preload attachments
27
  slideshowSlideInserterGetSearchResults();
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  /**
30
  * Close popup when clicked on cross
31
  */
@@ -57,27 +71,6 @@ jQuery(document).ready(function(){
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 text slide into the sortable list when the Insert Text 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,52 +120,31 @@ jQuery(document).ready(function(){
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,12 +152,12 @@ jQuery(document).ready(function(){
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,14 +190,15 @@ jQuery(document).ready(function(){
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,39 +225,10 @@ jQuery(document).ready(function(){
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
  /**
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
  // 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
  }
72
  });
73
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  /**
75
  * Ajax deletes a slide from the slides list and from the database
76
  */
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
  /**
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
  // 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
  // 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
  /**
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-15 16:24+0100\n"
6
- "PO-Revision-Date: 2012-09-15 16:42+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"
@@ -104,13 +104,6 @@ msgstr "Slide"
104
  msgid "Fade"
105
  msgstr "Fade"
106
 
107
- #: classes/SlideshowPluginPostType.php:385
108
- #: classes/SlideshowPluginPostType.php:386
109
- #: classes/SlideshowPluginPostType.php:387
110
- #: classes/SlideshowPluginPostType.php:388
111
- msgid "Animation"
112
- msgstr "Animatie"
113
-
114
  #: classes/SlideshowPluginPostType.php:386
115
  msgid "Number of seconds the slide takes to slide in"
116
  msgstr "Aantal seconden dat de animatie van het inschuiven van de volgende slide duurt"
@@ -124,75 +117,54 @@ msgid "Seconds between changing slides"
124
  msgstr "Seconden tussen het wisselen van de slides"
125
 
126
  #: classes/SlideshowPluginPostType.php:389
127
- msgid "Number of slides to fit into one slide"
128
- msgstr "Aantal slides om in een slide te plaatsen"
129
 
130
- #: classes/SlideshowPluginPostType.php:389
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
- msgid "Display"
138
- msgstr "Weergave"
139
 
140
- #: classes/SlideshowPluginPostType.php:390
141
  msgid "Width of the slideshow, set to parent&#39;s width on 0"
142
  msgstr "Breedte van de slideshow, past zich aan op bovenliggende element wanneer 0"
143
 
144
- #: classes/SlideshowPluginPostType.php:391
145
  msgid "Height of the slideshow"
146
  msgstr "Hoogte van de slideshow"
147
 
148
- #: classes/SlideshowPluginPostType.php:392
149
  msgid "Height of the description boxes"
150
  msgstr "Hoogte van de beschrijvingen"
151
 
152
- #: classes/SlideshowPluginPostType.php:393
153
  msgid "Fit image into slide (stretching it)"
154
  msgstr "Pas afbeelding in de slideshow (oprekken)"
155
 
156
- #: classes/SlideshowPluginPostType.php:394
157
- msgid "Show title and description"
158
- msgstr "Toon titel en beschrijving"
159
-
160
- #: classes/SlideshowPluginPostType.php:395
161
- msgid "Hide description box, it will pop up when a mouse hovers over the slide"
162
- msgstr "Verbeg beschrijving, toon de slide alleen wanneer de muisaanwijzer boven de slide is"
163
-
164
- #: classes/SlideshowPluginPostType.php:396
165
- msgid "Automatically slide to the next slide"
166
- msgstr "Automatisch naar de volgende slide gaan"
167
-
168
  #: classes/SlideshowPluginPostType.php:396
169
- #: classes/SlideshowPluginPostType.php:397
170
- #: classes/SlideshowPluginPostType.php:398
171
- #: classes/SlideshowPluginPostType.php:399
172
- msgid "Control"
173
- msgstr "Controle"
174
 
175
  #: classes/SlideshowPluginPostType.php:397
176
- msgid "Return to the beginning of the slideshow after last slide"
177
- msgstr "Keer terug naar het begin van de slideshow na de laatste slide."
178
 
179
  #: classes/SlideshowPluginPostType.php:398
180
- msgid "Activate buttons (so the user can scroll through the slides)"
181
- msgstr "Knoppen activeren (zodat de gebruiker door de slides kan scrollen)"
182
 
183
  #: classes/SlideshowPluginPostType.php:399
184
- msgid "Show control panel (play and pause button)"
185
- msgstr "Toon controlepaneel (speel en pause knop)"
186
 
187
- #: classes/SlideshowPluginSlideInserter.php:135
188
  msgid "Insert"
189
  msgstr "Invoegen"
190
 
191
- #: classes/SlideshowPluginSlideInserter.php:144
192
- msgid "Load more results"
193
- msgstr "Meer resultaten laden"
194
-
195
- #: classes/SlideshowPluginSlideInserter.php:153
196
  msgid "No images were found, click here to upload some."
197
  msgstr "Geen afbeeldingen gevonden, klik hier om afbeeldingen te uploaden."
198
 
@@ -212,83 +184,64 @@ msgstr "Om deze slideshow op je website te gebruiken voeg je of dit stukje short
212
  msgid "Or add this piece of code to where ever in your website you want to place the slideshow"
213
  msgstr "Of je voegt dit stuk code toe aan je broncode op de plaats waar je wilt dat de slideshow te zien is"
214
 
215
- #: views/SlideshowPluginPostType/settings.php:8
216
- msgid "settings"
217
- msgstr "instellingen"
218
-
219
- #: views/SlideshowPluginPostType/settings.php:22
220
  #: views/SlideshowPluginPostType/style-settings.php:6
221
  msgid "Default"
222
  msgstr "Standaard"
223
 
224
- #: views/SlideshowPluginPostType/slides.php:9
225
  msgid "Add slides to this slideshow by using one of the buttons above."
226
  msgstr "Voeg slides toe doormiddel van de bovenstaande knoppen."
227
 
228
- #: views/SlideshowPluginPostType/slides.php:47
229
- #: views/SlideshowPluginPostType/slides.php:141
230
  msgid "Title"
231
  msgstr "Titel"
232
 
233
- #: views/SlideshowPluginPostType/slides.php:48
234
- #: views/SlideshowPluginPostType/slides.php:142
235
  msgid "Description"
236
  msgstr "Beschrijving"
237
 
238
- #: views/SlideshowPluginPostType/slides.php:49
239
- #: views/SlideshowPluginPostType/slides.php:143
240
  msgid "Background color"
241
  msgstr "Achtergrond kleur"
242
 
243
- #: views/SlideshowPluginPostType/slides.php:55
244
- #: views/SlideshowPluginPostType/slides.php:110
245
- #: views/SlideshowPluginPostType/slides.php:149
246
- #: views/SlideshowPluginPostType/slides.php:197
247
- msgid "Same window"
248
- msgstr "Zelfde scherm"
249
-
250
- #: views/SlideshowPluginPostType/slides.php:56
251
- #: views/SlideshowPluginPostType/slides.php:111
252
- #: views/SlideshowPluginPostType/slides.php:150
253
- #: views/SlideshowPluginPostType/slides.php:198
254
- msgid "New window"
255
- msgstr "Nieuw scherm"
256
-
257
- #: views/SlideshowPluginPostType/slides.php:60
258
- #: views/SlideshowPluginPostType/slides.php:115
259
- #: views/SlideshowPluginPostType/slides.php:154
260
- #: views/SlideshowPluginPostType/slides.php:202
261
  msgid "URL"
262
  msgstr "URL"
263
 
264
- #: views/SlideshowPluginPostType/slides.php:76
265
- #: views/SlideshowPluginPostType/slides.php:170
266
- msgid "Youtube Video ID"
267
- msgstr "Youtube Video ID"
268
 
269
- #: views/SlideshowPluginPostType/slides.php:94
270
- #: views/SlideshowPluginPostType/slides.php:101
271
  msgid "Edit"
272
  msgstr "Bewerken"
273
 
274
- #: views/SlideshowPluginPostType/slides.php:126
275
- msgid "An error occurred while loading this slide, and it will not be present in the slideshow"
276
- msgstr "Een fout is ontstaan tijdens het laden van deze slide, de slide zal niet te bekijken zijn in je slideshow"
277
-
278
- #: views/SlideshowPluginPostType/slides.php:131
279
- #: views/SlideshowPluginPostType/slides.php:162
280
- #: views/SlideshowPluginPostType/slides.php:177
281
- #: views/SlideshowPluginPostType/slides.php:211
282
  msgid "Delete slide"
283
  msgstr "Verwijder slide"
284
 
285
  #: views/SlideshowPluginPostType/support-plugin.php:3
286
- msgid "Help to keep this plugin free!"
287
- msgstr "Help mee om deze plugin gratis te houden!"
 
 
 
 
288
 
289
  #: views/SlideshowPluginPostType/support-plugin.php:6
290
- 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!"
291
- 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!"
292
 
293
  #: views/SlideshowPluginPostType/support-plugin.php:15
294
  msgid "Rate on Wordpress.org"
@@ -299,16 +252,12 @@ msgid "Questions / Suggestions"
299
  msgstr "Vragen / Opmerkingen"
300
 
301
  #: views/SlideshowPluginSlideInserter/insert-image-button.php:1
302
- msgid "Image slide"
303
- msgstr "Afbeeldingsslide"
304
 
305
  #: views/SlideshowPluginSlideInserter/insert-text-button.php:1
306
- msgid "Text slide"
307
- msgstr "Tekst slide"
308
-
309
- #: views/SlideshowPluginSlideInserter/insert-video-button.php:1
310
- msgid "Video slide"
311
- msgstr "Video slide"
312
 
313
  #: views/SlideshowPluginSlideInserter/search-popup.php:6
314
  msgid "Search"
@@ -318,32 +267,10 @@ msgstr "Zoek"
318
  msgid "Search images by title"
319
  msgstr "Zoek plaatjes op titel"
320
 
321
- #: views/SlideshowPluginUpload/upload-button.php:1
322
- msgid "Upload/Manage Images"
323
- msgstr "Upload/Beheer Afbeeldingen"
324
-
325
  #: views/SlideshowPluginWidget/form.php:9
326
  msgid "Random Slideshow"
327
  msgstr "Willekeurige Slideshow"
328
 
329
- #~ msgid "Has the Slideshow plugin helped you?"
330
- #~ msgstr "Heeft de Slideshow plugin je geholpen?"
331
-
332
- #~ msgid "Help it back!"
333
- #~ msgstr "Help hem terug!"
334
-
335
- #~ msgid ""
336
- #~ "If this plugin has filled you with happiness, please support the upkeep "
337
- #~ "of the plugin by rating it on Wordpress, posting a suggestion for "
338
- #~ "improvement on the support forum, or making a donation."
339
- #~ msgstr ""
340
- #~ "Als deze plugin je met blijdschap heeft vervuld, zou ik het enorm "
341
- #~ "waarderen als je de plugin wilt beoordelen op Wordpress, een suggestie "
342
- #~ "wilt maken voor verbetering, of een donatie doen wilt."
343
-
344
- #~ msgid "Insert Text Slide"
345
- #~ msgstr "Tekst-slide invoegen"
346
-
347
  #~ msgid "Click on an image to insert it as a slide"
348
  #~ msgstr "Klik op een plaatje om deze in te voegen als slide"
349
 
@@ -367,5 +294,8 @@ msgstr "Willekeurige Slideshow"
367
  #~ msgid "Custom style"
368
  #~ msgstr "Aangepaste stijl"
369
 
 
 
 
370
  #~ msgid "Leave any field open to use default value."
371
  #~ 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-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"
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"
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
  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
  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
  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
 
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."
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.3
6
  Tested up to: 3.4.1
7
- Stable tag: 2.1.0
8
  License: GPLv2
9
 
10
  Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
@@ -14,25 +14,21 @@ 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
@@ -62,15 +58,9 @@ You can choose from images that have already been uploaded to your Wordpress web
62
  by name for image you want to use. If you want to add new images to the slideshow, you need to upload them to the
63
  Wordpress media page.
64
 
65
- = The slideshow does not show up (but it's html tags are in the source code) =
66
-
67
- Often when images are not shown by the slideshow, there's a javascript error somewhere on the page and this error has
68
- caused javascript to break. For the slideshow to work again, this error needs to be fixed. Check if any errors were
69
- thrown by opening Google Chrome or Firefox (with Firebug installed) and press the 'F12' key. Errors show in the console tab.
70
-
71
  = The slideshow does not show up / The slideshow looks like it's not styled =
72
 
73
- Most times the slideshow is called after the '</head>' tag, which means the scripts need to load in the footer of
74
  the website. A theme that has no '<?php wp_footer(); ?>' call in it's footer will not be able to load the slideshow's
75
  scripts.
76
 
@@ -98,20 +88,9 @@ slideshow is not styled.
98
 
99
  == Changelog ==
100
 
101
- = 2.1.0 =
102
- * Added Youtube video slides.
103
- * Slide URLs can now be chosen to open in a new window.
104
- * Added headers above settings, giving the user mover oversight.
105
- * Endless scrolling is now available in the image inserter pop up.
106
- * Images are now centered in their slides by default.
107
- * Script is now activated on document ready, not window load.
108
- * Hid slides in another element so that buttons could overflow the slideshow container.
109
- * Fixed: Hide-away settings were influenced by their own settings fields.
110
- * Fixed: Stretching was not always handled correctly.
111
- * Fixed: Script counter made the first view show twice.
112
-
113
  = 2.0.1 =
114
- * Fixed: Version 1.x.x slides disappeared after updating to version 2.0.0. An automatic converter has been added.
 
115
 
116
  = 2.0.0 =
117
  * Complete sideshow script revision to support new features.
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.1
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 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
58
  by name for image you want to use. If you want to add new images to the slideshow, you need to upload them to the
59
  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
 
88
 
89
  == Changelog ==
90
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  = 2.0.1 =
92
+ * IMPORTANT: This update is only for those people who want their old slides from version 1.x.x back.
93
+ * IMPORTANT: If you are satisfied with version 2.0.0, please ignore this update as it might fiddle with the settings you just set.
94
 
95
  = 2.0.0 =
96
  * Complete sideshow script revision to support new features.
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.1.0
7
- Requires at least: 3.3
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 15-09-12
20
  */
21
  class SlideshowPluginMain {
22
 
23
  /** Variables */
24
- static $version = '2.1.0';
25
 
26
  /**
27
  * Bootstraps the application by assigning the right functions to
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.1
7
+ Requires at least: 3.0
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 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
style/SlideshowPlugin/functional.css CHANGED
@@ -1 +1,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{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{position:absolute;top:50%;cursor:pointer;display:none}.slideshow_container .previous{left:5px}.slideshow_container .next{right:5px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ }
style/SlideshowPluginSlideInserter/slide-inserter.css CHANGED
@@ -15,7 +15,7 @@
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,12 +39,6 @@
39
  cursor: pointer;
40
  }
41
 
42
- #slideshow-slide-inserter-popup #search-results {
43
- height: 400px;
44
- overflow-y: scroll;
45
- overflow-x: hidden;
46
- }
47
-
48
  .sortable-slides-list-item {
49
  background: #fff url('../../images/SlideshowPluginPostType/draggable.png') no-repeat right center;
50
  }
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
  cursor: pointer;
40
  }
41
 
 
 
 
 
 
 
42
  .sortable-slides-list-item {
43
  background: #fff url('../../images/SlideshowPluginPostType/draggable.png') no-repeat right center;
44
  }
views/SlideshowPlugin/slideshow.php CHANGED
@@ -1,112 +1,78 @@
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 . ';"'; ?>>
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; ?>">
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(!isset($attachment))
61
- continue;
62
- ?>
 
 
 
 
 
 
 
63
 
64
- <div class="slide slide_<?php echo $i; ?>">
65
- <div class="description transparent">
66
- <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
67
- <h2><?php echo $attachment->post_title; ?></h2>
68
- <p><?php echo $attachment->post_content; ?></p>
69
- </a>
70
- </div>
71
- <a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
72
- <img
73
- src="<?php echo $attachment->guid; ?>"
74
- alt="<?php echo $attachment->post_title; ?>"
75
- />
76
  </a>
77
  </div>
78
-
79
- <?php endif; ?>
80
- <?php $i++; ?>
81
- <?php endforeach; ?>
82
- <?php endif; ?>
83
- </div>
 
 
 
 
 
 
84
  </div>
85
 
86
- <div class="controllers">
87
- <div class="controlPanel transparent"><ul><li class="togglePlay play"></li></li></ul></div>
88
 
89
- <div class="button previous transparent"></div>
90
- <div class="button next transparent"></div>
91
- </div>
92
 
93
  <div class="settings" style="display: none;"><?php echo json_encode($settings); ?></div>
94
 
95
- <div style="
96
- position: absolute !important;
97
- height: 1px;
98
- width: 1px;
99
- overflow: hidden;
100
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
101
- clip: rect(1px, 1px, 1px, 1px);
102
- ">
103
- <?php echo SlideshowPluginMain::$version; ?>
104
- <a href="http://www.stefanboonstra.com/">Slideshow Stefan Boonstra</a>
105
- </div>
106
-
107
  <script type="text/javascript">
108
- jQuery(document).ready(function(){
109
- //jQuery(window).load(function(){
110
  jQuery('.slideshow_id_<?php echo $id; ?>').slideshow_script();
111
  });
112
  </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['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>
views/SlideshowPluginPostType/settings.php CHANGED
@@ -1,22 +1,6 @@
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
- <?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>
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>
views/SlideshowPluginPostType/slides.php CHANGED
@@ -1,8 +1,6 @@
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,41 +41,17 @@
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,19 +76,12 @@
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,9 +89,7 @@
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,23 +102,10 @@
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,21 +116,6 @@
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,19 +126,12 @@
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="" />
1
+ <p>
 
2
  <?php echo SlideshowPluginSlideInserter::getImageSlideInsertButton(); ?>
3
  <?php echo SlideshowPluginSlideInserter::getTextSlideInsertButton(); ?>
 
4
  </p>
5
 
6
  <?php if(count($slides) <= 0): ?>
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
  </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
 
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
 
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
  </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
  <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="" />
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('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
 
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
 
views/SlideshowPluginSlideInserter/insert-image-button.php CHANGED
@@ -1 +1 @@
1
- <input type="button" id="slideshow-insert-image-slide" class="button" value="<?php _e('Image slide', 'slideshow-plugin'); ?>" />
1
+ <input type="button" id="slideshow-insert-image-slide" class="button" value="<?php _e('Insert 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('Text slide', 'slideshow-plugin'); ?>" />
1
+ <input type="button" id="slideshow-insert-text-slide" class="button" value="<?php _e('Insert Text Slide', 'slideshow-plugin'); ?>" />
views/SlideshowPluginSlideInserter/insert-video-button.php DELETED
@@ -1 +0,0 @@
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,9 +6,6 @@
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" style="height: 400px; width: 600px;"></table>
13
- </div>
14
  </div>
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>