Version Description
- 2013-10-13 =
- New. Added support for YouTube and Vimeo slide types in thumbnails template.
- New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
Download this release
Release Info
Developer | kosinix |
Plugin | Cyclone Slider |
Version | 2.7.6 |
Comparing to | |
See all releases |
Code changes from version 2.7.5 to 2.7.6
- README.txt +9 -1
- classes/class-cyclone-slider-vimeo.php +16 -0
- classes/class-cyclone-slider-youtube.php +18 -0
- classes/class-cyclone-slider.php +5 -0
- cyclone-slider.php +2 -2
- templates/thumbnails/config.txt +2 -1
- templates/thumbnails/script.js +36 -5
- templates/thumbnails/slider.php +25 -19
- templates/thumbnails/style.css +5 -4
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.codefleet.net/donate/
|
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6.1
|
7 |
-
Stable tag: 2.7.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -99,6 +99,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
99 |
|
100 |
== Changelog ==
|
101 |
|
|
|
|
|
|
|
|
|
102 |
= 2.7.5 - 2013-10-10 =
|
103 |
* Fix. Fix critical error with slider not working caused by easing plugin.
|
104 |
* New. Added ability to add a title to slider widget.
|
@@ -271,6 +275,10 @@ Inside your current active theme create a folder named "cycloneslider". Add your
|
|
271 |
|
272 |
== Upgrade Notice ==
|
273 |
|
|
|
|
|
|
|
|
|
274 |
= 2.7.5 - 2013-10-10 =
|
275 |
* Fix. Fix critical error with slider not working caused by easing plugin.
|
276 |
* New. Added ability to add a title to slider widget.
|
4 |
Tags: slider, slideshow, drag-and-drop, wordpress-slider, wordpress-slideshow, cycle 2, jquery, responsive, translation-ready, custom-post, cyclone-slider
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 3.6.1
|
7 |
+
Stable tag: 2.7.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
99 |
|
100 |
== Changelog ==
|
101 |
|
102 |
+
= 2.7.6 - 2013-10-13 =
|
103 |
+
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
104 |
+
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
105 |
+
|
106 |
= 2.7.5 - 2013-10-10 =
|
107 |
* Fix. Fix critical error with slider not working caused by easing plugin.
|
108 |
* New. Added ability to add a title to slider widget.
|
275 |
|
276 |
== Upgrade Notice ==
|
277 |
|
278 |
+
= 2.7.6 - 2013-10-13 =
|
279 |
+
* New. Added support for YouTube and Vimeo slide types in thumbnails template.
|
280 |
+
* New. Added ability to fetch thumbnails of videos from youtube.com and vimeo.com. The thumbnails template will use this to display the thumbnails in its pager.
|
281 |
+
|
282 |
= 2.7.5 - 2013-10-10 =
|
283 |
* Fix. Fix critical error with slider not working caused by easing plugin.
|
284 |
* New. Added ability to add a title to slider widget.
|
classes/class-cyclone-slider-vimeo.php
CHANGED
@@ -26,6 +26,22 @@ if(!class_exists('Cyclone_Slider_Vimeo')):
|
|
26 |
}
|
27 |
return false;
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
} // end class
|
30 |
|
31 |
endif;
|
26 |
}
|
27 |
return false;
|
28 |
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Get vimeo video thumbnail image
|
32 |
+
*
|
33 |
+
* @param int Vimeo ID.
|
34 |
+
* @param string Size can be: thumbnail_small, thumbnail_medium, thumbnail_large.
|
35 |
+
*
|
36 |
+
* @return string URL of thumbnail image.
|
37 |
+
*/
|
38 |
+
public function get_vimeo_thumb($video_id, $size = 'small'){
|
39 |
+
$vimeo = unserialize( file_get_contents('http://vimeo.com/api/v2/video/'.$video_id.'.php') );
|
40 |
+
if( isset($vimeo[0]['thumbnail_'.$size]) ){
|
41 |
+
return $vimeo[0]['thumbnail_'.$size];
|
42 |
+
}
|
43 |
+
return '';
|
44 |
+
}
|
45 |
} // end class
|
46 |
|
47 |
endif;
|
classes/class-cyclone-slider-youtube.php
CHANGED
@@ -74,6 +74,24 @@ if(!class_exists('Cyclone_Slider_Youtube')):
|
|
74 |
|
75 |
return false;
|
76 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
} // end class
|
78 |
|
79 |
endif;
|
74 |
|
75 |
return false;
|
76 |
}
|
77 |
+
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Get youtube video thumbnail image
|
81 |
+
*
|
82 |
+
* @param int string $video_id YouTube ID
|
83 |
+
* @param string $size Can be: small, medium, large
|
84 |
+
*
|
85 |
+
* @return string URL of thumbnail image.
|
86 |
+
*/
|
87 |
+
public function get_youtube_thumb( $video_id, $size = 'small' ){
|
88 |
+
if( 'large' == $size ){
|
89 |
+
return 'http://img.youtube.com/vi/'.$video_id.'/hqdefault.jpg';
|
90 |
+
} else if( 'medium' == $size ){
|
91 |
+
return 'http://img.youtube.com/vi/'.$video_id.'/mqdefault.jpg';
|
92 |
+
}
|
93 |
+
return 'http://img.youtube.com/vi/'.$video_id.'/default.jpg';
|
94 |
+
}
|
95 |
} // end class
|
96 |
|
97 |
endif;
|
classes/class-cyclone-slider.php
CHANGED
@@ -158,11 +158,16 @@ if(!class_exists('Cyclone_Slider')):
|
|
158 |
$youtube_id = $this->cyclone_slider_youtube->get_youtube_id($slides[$i]['youtube_url']);
|
159 |
|
160 |
$slides[$i]['youtube_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="//www.youtube.com/embed/'.$youtube_id.'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
|
|
|
|
|
|
|
161 |
} else if($slides[$i]['type']=='vimeo'){
|
162 |
$vimeo_count++;
|
163 |
$vimeo_id = $this->cyclone_slider_vimeo->get_vimeo_id($slides[$i]['vimeo_url']);
|
164 |
|
165 |
$slides[$i]['vimeo_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="http://player.vimeo.com/video/'.$vimeo_id.'?api=1&wmode=transparent" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
|
|
|
|
166 |
}
|
167 |
}
|
168 |
|
158 |
$youtube_id = $this->cyclone_slider_youtube->get_youtube_id($slides[$i]['youtube_url']);
|
159 |
|
160 |
$slides[$i]['youtube_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="//www.youtube.com/embed/'.$youtube_id.'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';
|
161 |
+
$slides[$i]['youtube_id'] = $youtube_id;
|
162 |
+
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_youtube->get_youtube_thumb($youtube_id);
|
163 |
+
|
164 |
} else if($slides[$i]['type']=='vimeo'){
|
165 |
$vimeo_count++;
|
166 |
$vimeo_id = $this->cyclone_slider_vimeo->get_vimeo_id($slides[$i]['vimeo_url']);
|
167 |
|
168 |
$slides[$i]['vimeo_embed_code'] = '<iframe width="'.$slider_settings['width'].'" height="'.$slider_settings['height'].'" src="http://player.vimeo.com/video/'.$vimeo_id.'?api=1&wmode=transparent" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>';
|
169 |
+
$slides[$i]['vimeo_id'] = $vimeo_id;
|
170 |
+
$slides[$i]['thumbnail_small'] = $this->cyclone_slider_vimeo->get_vimeo_thumb($vimeo_id);
|
171 |
}
|
172 |
}
|
173 |
|
cyclone-slider.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
-
Version: 2.7.
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
@@ -25,7 +25,7 @@ License:
|
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
-
define('CYCLONE_VERSION', '2.7.
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
3 |
Plugin Name: Cyclone Slider 2
|
4 |
Plugin URI: http://www.codefleet.net/cyclone-slider-pro/
|
5 |
Description: Create and manage sliders with ease. Built for both casual users and developers.
|
6 |
+
Version: 2.7.6
|
7 |
Author: Nico Amarilla
|
8 |
Author URI: http://www.codefleet.net/
|
9 |
License:
|
25 |
|
26 |
*/
|
27 |
if(!defined('CYCLONE_VERSION')){
|
28 |
+
define('CYCLONE_VERSION', '2.7.6' );
|
29 |
}
|
30 |
if(!defined('CYCLONE_PATH')){
|
31 |
define('CYCLONE_PATH', realpath(plugin_dir_path(__FILE__)) . DIRECTORY_SEPARATOR );
|
templates/thumbnails/config.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
; Slide Types Supported
|
2 |
slide_type[] = "image"
|
3 |
-
slide_type[] = "
|
|
|
4 |
slide_type[] = "custom"
|
1 |
; Slide Types Supported
|
2 |
slide_type[] = "image"
|
3 |
+
slide_type[] = "youtube"
|
4 |
+
slide_type[] = "vimeo"
|
5 |
slide_type[] = "custom"
|
templates/thumbnails/script.js
CHANGED
@@ -3,23 +3,54 @@
|
|
3 |
|
4 |
jQuery(document).on('cycle-initialized', main+' .cycloneslider-slides', function( event, optionHash ) {
|
5 |
|
6 |
-
jQuery(this).parent().next().find('li').eq(optionHash.currSlide).addClass('current'); /*
|
7 |
|
8 |
});
|
9 |
|
10 |
-
jQuery(document).on('cycle-before',
|
11 |
-
var i = optionHash.nextSlide
|
|
|
12 |
|
13 |
jQuery(this).parent().next().find('li').removeClass('current').eq(i).addClass('current');
|
14 |
|
15 |
if(optionHash.dynamicHeight == "on") jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
});
|
18 |
-
|
19 |
jQuery(document).on('click', '.cycloneslider-thumbnails li', function(){
|
20 |
var i = jQuery(this).index();
|
21 |
|
22 |
jQuery(this).parents('.cycloneslider-thumbnails').prev().find('.cycloneslider-slides').cycle('goto', i);
|
23 |
});
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
})();
|
3 |
|
4 |
jQuery(document).on('cycle-initialized', main+' .cycloneslider-slides', function( event, optionHash ) {
|
5 |
|
6 |
+
jQuery(this).parent().next().find('li').eq(optionHash.currSlide).addClass('current'); /* Highlight first thumb */
|
7 |
|
8 |
});
|
9 |
|
10 |
+
jQuery(document).on('cycle-before', '.cycloneslider-template-thumbnails .cycloneslider-slides', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
11 |
+
var i = optionHash.nextSlide,
|
12 |
+
slide = jQuery( outgoingSlideEl ); /* Current slide */
|
13 |
|
14 |
jQuery(this).parent().next().find('li').removeClass('current').eq(i).addClass('current');
|
15 |
|
16 |
if(optionHash.dynamicHeight == "on") jQuery(this).animate({height:jQuery(incomingSlideEl).outerHeight()}, optionHash.autoHeightSpeed, optionHash.autoHeightEasing); /* Autoheight when dynamic height is on and auto height is not ratio (eg. 300:250) */
|
17 |
|
18 |
+
if(slide.hasClass('cycloneslider-slide-youtube')) pauseYoutube( slide ); /* Pause youtube video on next */
|
19 |
+
|
20 |
+
if(slide.hasClass('cycloneslider-slide-vimeo')) pauseVimeo( slide ); /* Pause vimeo video on next */
|
21 |
+
});
|
22 |
+
|
23 |
+
jQuery(document).on('cycle-initialized cycle-after', '.cycloneslider-template-thumbnails .cycloneslider-slides', function( event, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag ) {
|
24 |
+
var index = (event.type == 'cycle-initialized') ? optionHash.currSlide : optionHash.nextSlide;
|
25 |
+
var slide = jQuery( optionHash.slides[ index ] );
|
26 |
+
slide.css('zIndex', parseInt(slide.css('zIndex'))+20); /* Fix for slideshow with youtube slide */
|
27 |
});
|
28 |
+
|
29 |
jQuery(document).on('click', '.cycloneslider-thumbnails li', function(){
|
30 |
var i = jQuery(this).index();
|
31 |
|
32 |
jQuery(this).parents('.cycloneslider-thumbnails').prev().find('.cycloneslider-slides').cycle('goto', i);
|
33 |
});
|
34 |
+
|
35 |
+
function pauseYoutube( slide ){
|
36 |
+
var data = {
|
37 |
+
"event": "command",
|
38 |
+
"func": "pauseVideo",
|
39 |
+
"args": [],
|
40 |
+
"id": ""
|
41 |
+
}
|
42 |
+
postMessage( slide.find('iframe'), data, '*');
|
43 |
+
}
|
44 |
+
|
45 |
+
function pauseVimeo( slide ){
|
46 |
+
postMessage( slide.find('iframe'), {method:'pause'}, slide.find('iframe').attr('src'));
|
47 |
+
}
|
48 |
+
|
49 |
+
function postMessage(iframe, data, url){
|
50 |
+
try{
|
51 |
+
if (iframe[0]) { // Frame exists
|
52 |
+
iframe[0].contentWindow.postMessage(JSON.stringify(data), url);
|
53 |
+
}
|
54 |
+
} catch (ignore) {}
|
55 |
+
}
|
56 |
})();
|
templates/thumbnails/slider.php
CHANGED
@@ -58,12 +58,12 @@
|
|
58 |
<?php endif; ?>
|
59 |
</div>
|
60 |
<?php elseif ( 'youtube' == $slide['type'] ) : ?>
|
61 |
-
<div class="cycloneslider-slide cycloneslider-slide-
|
62 |
-
|
63 |
</div>
|
64 |
<?php elseif ( 'vimeo' == $slide['type'] ) : ?>
|
65 |
-
<div class="cycloneslider-slide cycloneslider-slide-
|
66 |
-
|
67 |
</div>
|
68 |
<?php elseif ( 'video' == $slide['type'] ) : ?>
|
69 |
<div class="cycloneslider-slide" <?php echo cyclone_slide_settings($slide, $slider_settings); ?>>
|
@@ -88,21 +88,27 @@
|
|
88 |
>
|
89 |
<ul class="clearfix">
|
90 |
<?php foreach($slides as $i=>$slide): ?>
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
<?php endforeach; ?>
|
107 |
</ul>
|
108 |
</div>
|
58 |
<?php endif; ?>
|
59 |
</div>
|
60 |
<?php elseif ( 'youtube' == $slide['type'] ) : ?>
|
61 |
+
<div class="cycloneslider-slide cycloneslider-slide-youtube" <?php echo cyclone_slide_settings($slide, $slider_settings); ?> style="padding-bottom:<?php echo $slider_settings['height']/$slider_settings['width']*100;?>%">
|
62 |
+
<?php echo $slide['youtube_embed_code']; ?>
|
63 |
</div>
|
64 |
<?php elseif ( 'vimeo' == $slide['type'] ) : ?>
|
65 |
+
<div class="cycloneslider-slide cycloneslider-slide-vimeo" <?php echo cyclone_slide_settings($slide, $slider_settings); ?> style="padding-bottom:<?php echo $slider_settings['height']/$slider_settings['width']*100;?>%">
|
66 |
+
<?php echo $slide['vimeo_embed_code']; ?>
|
67 |
</div>
|
68 |
<?php elseif ( 'video' == $slide['type'] ) : ?>
|
69 |
<div class="cycloneslider-slide" <?php echo cyclone_slide_settings($slide, $slider_settings); ?>>
|
88 |
>
|
89 |
<ul class="clearfix">
|
90 |
<?php foreach($slides as $i=>$slide): ?>
|
91 |
+
<?php if ( 'image' == $slide['type'] ) : ?>
|
92 |
+
<li>
|
93 |
+
<img src="<?php echo cyclone_slide_image_url($slide['id'], 40, 40, array('current_slide_settings'=>$slide, 'slideshow_settings'=>$slider_settings, 'resize_option'=>'crop') ); ?>" width="40" height="40" alt="<?php echo $slide['img_alt'];?>" title="<?php echo $slide['img_title'];?>" />
|
94 |
+
</li>
|
95 |
+
<?php elseif ( 'youtube' == $slide['type'] ) : ?>
|
96 |
+
<li>
|
97 |
+
<img src="<?php echo $slide['thumbnail_small']; ?>" width="auto" height="40" alt="<?php echo $slide['img_alt'];?>" title="<?php echo $slide['img_title'];?>" />
|
98 |
+
</li>
|
99 |
+
<?php elseif ( 'vimeo' == $slide['type'] ) : ?>
|
100 |
+
<li>
|
101 |
+
<img src="<?php echo $slide['thumbnail_small']; ?>" width="auto" height="40" alt="<?php echo $slide['img_alt'];?>" title="<?php echo $slide['img_title'];?>" />
|
102 |
+
</li>
|
103 |
+
<?php elseif ( 'video' == $slide['type'] ) : ?>
|
104 |
+
<li>
|
105 |
+
<div class="thumb-custom">Video</div>
|
106 |
+
</li>
|
107 |
+
<?php elseif ( 'custom' == $slide['type'] ) : ?>
|
108 |
+
<li>
|
109 |
+
<div class="thumb-custom">HTML</div>
|
110 |
+
</li>
|
111 |
+
<?php endif; ?>
|
112 |
<?php endforeach; ?>
|
113 |
</ul>
|
114 |
</div>
|
templates/thumbnails/style.css
CHANGED
@@ -140,7 +140,7 @@
|
|
140 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails li{
|
141 |
list-style:none inside;
|
142 |
display:inline-block;
|
143 |
-
width:40px;
|
144 |
height:40px;
|
145 |
margin:5px;
|
146 |
padding: 0;
|
@@ -148,6 +148,7 @@
|
|
148 |
cursor:pointer;
|
149 |
vertical-align:top;
|
150 |
box-sizing: content-box;
|
|
|
151 |
}
|
152 |
.ie7 .cycloneslider-template-thumbnails.cycloneslider-thumbnails li{
|
153 |
zoom: 1;/* IE 7 inline-block */
|
@@ -157,10 +158,10 @@
|
|
157 |
border-color:#333;
|
158 |
}
|
159 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails .thumb-custom{
|
160 |
-
background:#
|
161 |
height:100%;
|
162 |
-
font-size:
|
163 |
-
color:#
|
164 |
}
|
165 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails img{
|
166 |
border-radius:0;
|
140 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails li{
|
141 |
list-style:none inside;
|
142 |
display:inline-block;
|
143 |
+
min-width:40px;
|
144 |
height:40px;
|
145 |
margin:5px;
|
146 |
padding: 0;
|
148 |
cursor:pointer;
|
149 |
vertical-align:top;
|
150 |
box-sizing: content-box;
|
151 |
+
overflow: hidden;
|
152 |
}
|
153 |
.ie7 .cycloneslider-template-thumbnails.cycloneslider-thumbnails li{
|
154 |
zoom: 1;/* IE 7 inline-block */
|
158 |
border-color:#333;
|
159 |
}
|
160 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails .thumb-custom{
|
161 |
+
background:#fefefe;
|
162 |
height:100%;
|
163 |
+
font-size:9px;
|
164 |
+
color:#BBBBBB;
|
165 |
}
|
166 |
.cycloneslider-template-thumbnails.cycloneslider-thumbnails img{
|
167 |
border-radius:0;
|