Version Description
- Updated Metacafe code
- Stop using PHP split function
Download this release
Release Info
Developer | denzel_chia |
Plugin | Video Sidebar Widgets |
Version | 6.0 |
Comparing to | |
See all releases |
Code changes from version 5.9 to 6.0
- class-randomvideosidebarwidget.php +29 -16
- helper-functions.php +15 -1
- readme.txt +10 -5
- video-sidebar-widgets.php +3 -3
class-randomvideosidebarwidget.php
CHANGED
@@ -173,6 +173,7 @@ extract( $args );
|
|
173 |
$rv_cap = $Embed_cap;
|
174 |
break;
|
175 |
|
|
|
176 |
case 'Metacafe':
|
177 |
$rid = split('/',$Embed_id);
|
178 |
$rv_value = "http://www.metacafe.com/fplayer/$rid[0]/$rid[1].swf";
|
@@ -182,6 +183,7 @@ extract( $args );
|
|
182 |
}
|
183 |
$rv_cap = $Embed_cap;
|
184 |
break;
|
|
|
185 |
|
186 |
case 'Tudou':
|
187 |
$rv_value = "$Embed_id";
|
@@ -243,7 +245,13 @@ extract( $args );
|
|
243 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
244 |
*/
|
245 |
echo "<br/><iframe src='//player.vimeo.com/video/$Embed_id?autoplay=$RV_autoplay' width='$RV_width' height='$RV_height' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
246 |
-
if(!empty($Embed_cap)){echo "<p class=\"VideoCaption\">$Embed_cap</p>\n\n";};
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
else:
|
249 |
|
@@ -360,11 +368,12 @@ $instance = wp_parse_args( (array) $instance, array( 'RV_title' => '', 'RV_width
|
|
360 |
$autoplaysetting = '0';
|
361 |
$videoid = $instance['RV_id1'];
|
362 |
$videosource = $instance['RV_source1'];
|
363 |
-
$videowidth = "";
|
364 |
-
$videoheight = "";
|
365 |
//$admin = true // to show video in admin
|
366 |
-
|
367 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
|
|
368 |
?>
|
369 |
<p>
|
370 |
<label for="<?php echo $this->get_field_id( 'RV_source1' ); ?>">Select Video 1 Source:</label>
|
@@ -405,11 +414,12 @@ $instance = wp_parse_args( (array) $instance, array( 'RV_title' => '', 'RV_width
|
|
405 |
$autoplaysetting = '0';
|
406 |
$videoid = $instance['RV_id2'];
|
407 |
$videosource = $instance['RV_source2'];
|
408 |
-
$videowidth = "";
|
409 |
-
$videoheight = "";
|
410 |
//$admin = true // to show video in admin
|
411 |
-
|
412 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
|
|
413 |
?>
|
414 |
<p>
|
415 |
<label for="<?php echo $this->get_field_id( 'RV_source2' ); ?>">Select Video 2 Source:</label>
|
@@ -452,11 +462,12 @@ $instance = wp_parse_args( (array) $instance, array( 'RV_title' => '', 'RV_width
|
|
452 |
$autoplaysetting = '0';
|
453 |
$videoid = $instance['RV_id3'];
|
454 |
$videosource = $instance['RV_source3'];
|
455 |
-
$videowidth = "";
|
456 |
-
$videoheight = "";
|
457 |
//$admin = true // to show video in admin
|
458 |
-
|
459 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
|
|
460 |
?>
|
461 |
<p>
|
462 |
<label for="<?php echo $this->get_field_id( 'RV_source3' ); ?>">Select Video 3 Source:</label>
|
@@ -498,11 +509,12 @@ $instance = wp_parse_args( (array) $instance, array( 'RV_title' => '', 'RV_width
|
|
498 |
$autoplaysetting = '0';
|
499 |
$videoid = $instance['RV_id4'];
|
500 |
$videosource = $instance['RV_source4'];
|
501 |
-
$videowidth = "";
|
502 |
-
$videoheight = "";
|
503 |
//$admin = true // to show video in admin
|
504 |
-
|
505 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
|
|
506 |
?>
|
507 |
<p>
|
508 |
<label for="<?php echo $this->get_field_id( 'RV_source4' ); ?>">Select Video 4 Source:</label>
|
@@ -543,11 +555,12 @@ $instance = wp_parse_args( (array) $instance, array( 'RV_title' => '', 'RV_width
|
|
543 |
$autoplaysetting = '0';
|
544 |
$videoid = $instance['RV_id5'];
|
545 |
$videosource = $instance['RV_source5'];
|
546 |
-
$videowidth = "";
|
547 |
-
$videoheight = "";
|
548 |
//$admin = true // to show video in admin
|
549 |
-
|
550 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
|
|
551 |
?>
|
552 |
<p>
|
553 |
<label for="<?php echo $this->get_field_id( 'RV_source5' ); ?>">Select Video 5 Source:</label>
|
173 |
$rv_cap = $Embed_cap;
|
174 |
break;
|
175 |
|
176 |
+
/** @since 6.0, we are not using this anymore... Metacafe uses iframe embed now, and does not have any parameters.. cannot stop autoplay.
|
177 |
case 'Metacafe':
|
178 |
$rid = split('/',$Embed_id);
|
179 |
$rv_value = "http://www.metacafe.com/fplayer/$rid[0]/$rid[1].swf";
|
183 |
}
|
184 |
$rv_cap = $Embed_cap;
|
185 |
break;
|
186 |
+
**/
|
187 |
|
188 |
case 'Tudou':
|
189 |
$rv_value = "$Embed_id";
|
245 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
246 |
*/
|
247 |
echo "<br/><iframe src='//player.vimeo.com/video/$Embed_id?autoplay=$RV_autoplay' width='$RV_width' height='$RV_height' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
248 |
+
if(!empty($Embed_cap)){echo "<p class=\"VideoCaption\">$Embed_cap</p>\n\n";};
|
249 |
+
|
250 |
+
elseif($select_source == 'Metacafe'):
|
251 |
+
|
252 |
+
echo "<iframe width='$RV_width' height='$RV_height' src='http://www.metacafe.com/embed/$Embed_id' frameborder='0' allowfullscreen></iframe>";
|
253 |
+
if(!empty($Embed_cap)){echo "<p class=\"VideoCaption\">$Embed_cap</p>\n\n";};
|
254 |
+
|
255 |
|
256 |
else:
|
257 |
|
368 |
$autoplaysetting = '0';
|
369 |
$videoid = $instance['RV_id1'];
|
370 |
$videosource = $instance['RV_source1'];
|
371 |
+
$videowidth = "400";
|
372 |
+
$videoheight = "225";
|
373 |
//$admin = true // to show video in admin
|
374 |
+
if($videoid!==''):
|
375 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
376 |
+
endif;
|
377 |
?>
|
378 |
<p>
|
379 |
<label for="<?php echo $this->get_field_id( 'RV_source1' ); ?>">Select Video 1 Source:</label>
|
414 |
$autoplaysetting = '0';
|
415 |
$videoid = $instance['RV_id2'];
|
416 |
$videosource = $instance['RV_source2'];
|
417 |
+
$videowidth = "400";
|
418 |
+
$videoheight = "225";
|
419 |
//$admin = true // to show video in admin
|
420 |
+
if($videoid!==''):
|
421 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
422 |
+
endif;
|
423 |
?>
|
424 |
<p>
|
425 |
<label for="<?php echo $this->get_field_id( 'RV_source2' ); ?>">Select Video 2 Source:</label>
|
462 |
$autoplaysetting = '0';
|
463 |
$videoid = $instance['RV_id3'];
|
464 |
$videosource = $instance['RV_source3'];
|
465 |
+
$videowidth = "400";
|
466 |
+
$videoheight = "225";
|
467 |
//$admin = true // to show video in admin
|
468 |
+
if($videoid!==''):
|
469 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
470 |
+
endif;
|
471 |
?>
|
472 |
<p>
|
473 |
<label for="<?php echo $this->get_field_id( 'RV_source3' ); ?>">Select Video 3 Source:</label>
|
509 |
$autoplaysetting = '0';
|
510 |
$videoid = $instance['RV_id4'];
|
511 |
$videosource = $instance['RV_source4'];
|
512 |
+
$videowidth = "400";
|
513 |
+
$videoheight = "225";
|
514 |
//$admin = true // to show video in admin
|
515 |
+
if($videoid!==''):
|
516 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
517 |
+
endif;
|
518 |
?>
|
519 |
<p>
|
520 |
<label for="<?php echo $this->get_field_id( 'RV_source4' ); ?>">Select Video 4 Source:</label>
|
555 |
$autoplaysetting = '0';
|
556 |
$videoid = $instance['RV_id5'];
|
557 |
$videosource = $instance['RV_source5'];
|
558 |
+
$videowidth = "400";
|
559 |
+
$videoheight = "225";
|
560 |
//$admin = true // to show video in admin
|
561 |
+
if($videoid!==''):
|
562 |
VSWShowVideo($videosource,$videoid,$autoplaysetting,$videowidth,$videoheight,'true','false');
|
563 |
+
endif;
|
564 |
?>
|
565 |
<p>
|
566 |
<label for="<?php echo $this->get_field_id( 'RV_source5' ); ?>">Select Video 5 Source:</label>
|
helper-functions.php
CHANGED
@@ -95,6 +95,7 @@ if(!empty($source)): //do this only if video source not empty, to fix widget pag
|
|
95 |
$flashvar2 = "";
|
96 |
break;
|
97 |
|
|
|
98 |
case 'Metacafe':
|
99 |
$id = split('/',$v_id2);
|
100 |
$value = "http://www.metacafe.com/fplayer/$id[0]/$id[1].swf";
|
@@ -103,7 +104,8 @@ if(!empty($source)): //do this only if video source not empty, to fix widget pag
|
|
103 |
$flashvar2 = 'flashVars="playerVars=showStats=no|autoPlay=yes|"';
|
104 |
}
|
105 |
break;
|
106 |
-
|
|
|
107 |
case 'Tudou':
|
108 |
$value = "$v_id2";
|
109 |
$flashvar = "";
|
@@ -157,6 +159,10 @@ if(!empty($source)): //do this only if video source not empty, to fix widget pag
|
|
157 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
158 |
*/
|
159 |
return "<iframe src='//player.vimeo.com/video/$v_id2?autoplay=$v_autoplay2' width='$v_width2' height='$v_height2' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
|
|
|
|
|
|
|
|
160 |
|
161 |
|
162 |
else:
|
@@ -205,6 +211,11 @@ if(!empty($source)): //do this only if video source not empty, to fix widget pag
|
|
205 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
206 |
*/
|
207 |
echo "<br/><iframe src='//player.vimeo.com/video/$v_id2?autoplay=0' width='$admin_video_width' height='$admin_video_height' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
|
|
|
|
|
|
|
|
|
|
208 |
|
209 |
|
210 |
else:
|
@@ -241,6 +252,9 @@ if(!empty($source)): //do this only if video source not empty, to fix widget pag
|
|
241 |
*/
|
242 |
echo "<iframe src='//player.vimeo.com/video/$v_id2?autoplay=$v_autoplay2' width='$v_width2' height='$v_height2' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
243 |
|
|
|
|
|
|
|
244 |
|
245 |
else:
|
246 |
|
95 |
$flashvar2 = "";
|
96 |
break;
|
97 |
|
98 |
+
/** @since 6.0, we are not using this anymore... Metacafe uses iframe embed now, and does not have any parameters.. cannot stop autoplay.
|
99 |
case 'Metacafe':
|
100 |
$id = split('/',$v_id2);
|
101 |
$value = "http://www.metacafe.com/fplayer/$id[0]/$id[1].swf";
|
104 |
$flashvar2 = 'flashVars="playerVars=showStats=no|autoPlay=yes|"';
|
105 |
}
|
106 |
break;
|
107 |
+
**/
|
108 |
+
|
109 |
case 'Tudou':
|
110 |
$value = "$v_id2";
|
111 |
$flashvar = "";
|
159 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
160 |
*/
|
161 |
return "<iframe src='//player.vimeo.com/video/$v_id2?autoplay=$v_autoplay2' width='$v_width2' height='$v_height2' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
162 |
+
|
163 |
+
elseif($source == 'Metacafe'):
|
164 |
+
|
165 |
+
return "<iframe width='$v_width2' height='$v_height2' src='http://www.metacafe.com/embed/$v_id2' frameborder='0' allowfullscreen></iframe>";
|
166 |
|
167 |
|
168 |
else:
|
211 |
*<iframe src="//player.vimeo.com/video/113758779" width="500" height="281" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
212 |
*/
|
213 |
echo "<br/><iframe src='//player.vimeo.com/video/$v_id2?autoplay=0' width='$admin_video_width' height='$admin_video_height' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
214 |
+
|
215 |
+
|
216 |
+
elseif($source == 'Metacafe'):
|
217 |
+
|
218 |
+
echo "<br/><iframe width='$admin_video_width' height='$admin_video_height' src='http://www.metacafe.com/embed/$v_id2' frameborder='0' allowfullscreen></iframe>";
|
219 |
|
220 |
|
221 |
else:
|
252 |
*/
|
253 |
echo "<iframe src='//player.vimeo.com/video/$v_id2?autoplay=$v_autoplay2' width='$v_width2' height='$v_height2' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>";
|
254 |
|
255 |
+
elseif($source == 'Metacafe'):
|
256 |
+
|
257 |
+
echo "<iframe width='$v_width2' height='$v_height2' src='http://www.metacafe.com/embed/$v_id2' frameborder='0' allowfullscreen></iframe>";
|
258 |
|
259 |
else:
|
260 |
|
readme.txt
CHANGED
@@ -1,19 +1,24 @@
|
|
1 |
=== Video Sidebar Widgets ===
|
2 |
Contributors: denzel_chia
|
3 |
-
Donate link: https://
|
4 |
Author link: https://github.com/denzelchia/
|
5 |
-
Tags:video
|
6 |
Requires at least:2.8.1
|
7 |
-
Tested up to: 4.
|
8 |
-
Stable tag:
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
A collection of sidebar widgets for displaying Flash Videos from 14 video sharing networks.
|
13 |
-
Video networks includes Youtube, Vimeo, BlipTV, Google, etc. This plugin consist of
|
14 |
|
15 |
== Changelog ==
|
16 |
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
= 5.9 =
|
19 |
|
1 |
=== Video Sidebar Widgets ===
|
2 |
Contributors: denzel_chia
|
3 |
+
Donate link: https://www.paypal.me/denzelchia/10usd
|
4 |
Author link: https://github.com/denzelchia/
|
5 |
+
Tags:video sidebar widget, video widgets, widgets, sidebar, videos, video widget, embed video, video embed, video in sidebar, youtube, vimeo, veoh, myspace video, revver, blip tv, tudou, youku, 6.cn, google videos, tangle
|
6 |
Requires at least:2.8.1
|
7 |
+
Tested up to: 4.9
|
8 |
+
Stable tag:6.0
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
A collection of sidebar widgets for displaying Flash Videos from 14 video sharing networks.
|
13 |
+
Video networks includes Youtube, Vimeo, BlipTV, Google, etc. This plugin consist of 3 widgets and 1 TinyMCE editor button.
|
14 |
|
15 |
== Changelog ==
|
16 |
|
17 |
+
= 6.0 =
|
18 |
+
|
19 |
+
* Updated Metacafe code
|
20 |
+
* Stop using PHP split function
|
21 |
+
|
22 |
|
23 |
= 5.9 =
|
24 |
|
video-sidebar-widgets.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Video Sidebar Widgets
|
4 |
-
Plugin URI:
|
5 |
-
Version:
|
6 |
Description: Video Sidebar Widgets to display videos such as Vimeo, YouTube, MySpace Videos etc. Now with added shortcode and quicktag to embed video in post and page content.
|
7 |
Author: Denzel Chia
|
8 |
-
Author URI:
|
9 |
*/
|
10 |
|
11 |
//load helper functions
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Video Sidebar Widgets
|
4 |
+
Plugin URI: https://github.com/denzelchia/Video-Sidebar-Widgets/
|
5 |
+
Version: 6.0
|
6 |
Description: Video Sidebar Widgets to display videos such as Vimeo, YouTube, MySpace Videos etc. Now with added shortcode and quicktag to embed video in post and page content.
|
7 |
Author: Denzel Chia
|
8 |
+
Author URI: https://github.com/denzelchia/Video-Sidebar-Widgets/
|
9 |
*/
|
10 |
|
11 |
//load helper functions
|