Version Description
- Wordpress media uploader link in image inserter pop-up now opens in a new window.
- Fixed: Image inserter pop-up CSS no longer pushes the 'insert' buttons off-screen.
Download this release
Release Info
Developer | stefanboonstra |
Plugin | Slideshow |
Version | 2.1.2 |
Comparing to | |
See all releases |
Code changes from version 2.1.3 to 2.1.2
- js/SlideshowPlugin/slideshow.js +1 -1
- readme.txt +1 -6
- slideshow.php +2 -2
- views/SlideshowPlugin/slideshow.php +5 -11
js/SlideshowPlugin/slideshow.js
CHANGED
@@ -1 +1 @@
|
|
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',$
|
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)}};
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.
|
8 |
License: GPLv2
|
9 |
|
10 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
@@ -101,11 +101,6 @@ slideshow is not styled.
|
|
101 |
= 2.2.0 Pre-release =
|
102 |
* Slides can now be randomized.
|
103 |
|
104 |
-
= 2.1.3 =
|
105 |
-
* Fixed: Overflow container now adapts to its parent element correctly.
|
106 |
-
* Fixed: Internet Explorer now shows control panel (buttons etc.) on top of the Flash element.
|
107 |
-
* Fixed: Images are now loaded by the Wordpress function, rather than being loaded from the database's 'guid'.
|
108 |
-
|
109 |
= 2.1.2 =
|
110 |
* Wordpress media uploader link in image inserter pop-up now opens in a new window.
|
111 |
* Fixed: Image inserter pop-up CSS no longer pushes the 'insert' buttons off-screen.
|
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.2
|
8 |
License: GPLv2
|
9 |
|
10 |
Integrate a fancy slideshow in just five steps. - Rainbows. Rainbows everywhere.
|
101 |
= 2.2.0 Pre-release =
|
102 |
* Slides can now be randomized.
|
103 |
|
|
|
|
|
|
|
|
|
|
|
104 |
= 2.1.2 =
|
105 |
* Wordpress media uploader link in image inserter pop-up now opens in a new window.
|
106 |
* Fixed: Image inserter pop-up CSS no longer pushes the 'insert' buttons off-screen.
|
slideshow.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com
|
@@ -21,7 +21,7 @@
|
|
21 |
class SlideshowPluginMain {
|
22 |
|
23 |
/** Variables */
|
24 |
-
static $version = '2.1.
|
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.1.2
|
7 |
Requires at least: 3.3
|
8 |
Author: StefanBoonstra
|
9 |
Author URI: http://stefanboonstra.com
|
21 |
class SlideshowPluginMain {
|
22 |
|
23 |
/** Variables */
|
24 |
+
static $version = '2.1.2';
|
25 |
|
26 |
/**
|
27 |
* Bootstraps the application by assigning the right functions to
|
views/SlideshowPlugin/slideshow.php
CHANGED
@@ -42,7 +42,7 @@
|
|
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>
|
@@ -57,11 +57,8 @@
|
|
57 |
continue;
|
58 |
|
59 |
$attachment = get_post($postId);
|
60 |
-
if(
|
61 |
continue;
|
62 |
-
|
63 |
-
$image = wp_get_attachment_image_src($attachment->ID, 'full');
|
64 |
-
if(!is_array($image) || !$image) continue;
|
65 |
?>
|
66 |
|
67 |
<div class="slide slide_<?php echo $i; ?>">
|
@@ -73,7 +70,7 @@
|
|
73 |
</div>
|
74 |
<a <?php if(!empty($url)) echo 'href="' . $url . '"'; ?> <?php if(!empty($target)) echo 'target="' . $target . '"'; ?>>
|
75 |
<img
|
76 |
-
src="<?php echo $
|
77 |
alt="<?php echo $attachment->post_title; ?>"
|
78 |
/>
|
79 |
</a>
|
@@ -87,7 +84,7 @@
|
|
87 |
</div>
|
88 |
|
89 |
<div class="controllers">
|
90 |
-
<div class="controlPanel transparent"><ul><li class="togglePlay play"></li></ul></div>
|
91 |
|
92 |
<div class="button previous transparent"></div>
|
93 |
<div class="button next transparent"></div>
|
@@ -103,11 +100,8 @@
|
|
103 |
clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
|
104 |
clip: rect(1px, 1px, 1px, 1px);
|
105 |
">
|
106 |
-
<a href="http://www.stefanboonstra.com/">Slideshow Stefan Boonstra</a>
|
107 |
-
</div>
|
108 |
-
|
109 |
-
<div style="display: none;">
|
110 |
<?php echo SlideshowPluginMain::$version; ?>
|
|
|
111 |
</div>
|
112 |
|
113 |
<script type="text/javascript">
|
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>
|
57 |
continue;
|
58 |
|
59 |
$attachment = get_post($postId);
|
60 |
+
if(!isset($attachment))
|
61 |
continue;
|
|
|
|
|
|
|
62 |
?>
|
63 |
|
64 |
<div class="slide slide_<?php echo $i; ?>">
|
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>
|
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>
|
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">
|