Changeset 794942
- Timestamp:
- 10/28/2013 07:03:08 PM (12 years ago)
- Location:
- blue-wrench-videos-widget/trunk
- Files:
-
- 1 added
- 5 edited
-
bluewrench-video-controller.php (modified) (1 diff)
-
bluewrench-video-widget.php (modified) (2 diffs)
-
bw_script.js (modified) (1 diff)
-
class-bluewrench-video-controller.php (modified) (4 diffs)
-
images/yahoo.png (added)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blue-wrench-videos-widget/trunk/bluewrench-video-controller.php
r791973 r794942 359 359 <th scope="row">URL</th> 360 360 <td> 361 <input id="bw_url" maxlength=" 75" size="70" name="bw_url" value="<?php echo $bw_url;?>" />361 <input id="bw_url" maxlength="255" size="70" name="bw_url" value="<?php echo $bw_url;?>" /> 362 362 <p>Hint: Simply copy the video's URL from your web browser's address bar while viewing the video</p> 363 364 <a id="bw_infobar_link" href="javascript: void(0);" onclick="javascript: bw_infobarToggle();">More Help</a> 365 366 <div id="bw_infobar" style="display:none;"> 363 367 <p>Examples:<br />http://www.youtube.com/embed/XXXXXXXXXXX<br />http://player.vimeo.com/video/XXXXXXXX<br />http://www.dailymotion.com/video/XXXXXXX</p> 368 369 <p><strong>Note for Yahoo! Video: </strong>Please use Embedd button on video player to get the video link. See screenshot below:</p> 370 <img src='<?php echo plugin_dir_url( __FILE__ ) . '/images/yahoo.png' ?>'> 371 </div> 364 372 </td> 365 373 </tr> -
blue-wrench-videos-widget/trunk/bluewrench-video-widget.php
r793205 r794942 4 4 Plugin URI: http://bluewrenchsoftware.com/wordpress-plugins/bluewrench-video-widget/ 5 5 Description: Blue Wrench Video Widget to display videos from various video sharing networks such as Vimeo, YouTube, Metacafe etc into your widget box. Simply copy the video's URL from your web browser's address bar and paste it in 'Add new video' page and add 'Blue Wrench Video Widget' from WP-Admin >> Appearance >> Widgets to desired area. Supported Networks: Vimeo, YouTube, BlipTV, Dailymotion, Veoh, Metacafe, MeFeedia and Break 6 Version: 1.0. 36 Version: 1.0.4 7 7 Author: Sunil Nanda 8 8 Author URI: http://www.sunilnanda.com/ … … 16 16 define('BW_DIR_NAME', basename(BW_FILE_PATH)); 17 17 if (!defined('BW_VERSION_NUM')) 18 define('BW_VERSION_NUM', '1.0. 3');18 define('BW_VERSION_NUM', '1.0.4'); 19 19 20 20 global $wpdb; -
blue-wrench-videos-widget/trunk/bw_script.js
r793205 r794942 25 25 } 26 26 } 27 function bw_infobarToggle(){ 28 obj = jQuery("#bw_infobar"); 29 if (obj.length==1){ 30 if (obj.is(':visible')){ 31 obj.hide("slow"); 32 }else{ 33 obj.show("slow"); 34 } 35 } 36 } -
blue-wrench-videos-widget/trunk/class-bluewrench-video-controller.php
r793205 r794942 30 30 # Could not find id 31 31 return null; 32 } 33 function fetch_revision3_video_info($url='') { 34 /*Uses oEmbed*/ 35 if(filter_var($url, FILTER_VALIDATE_URL)){ 36 $url = "http://revision3.com/api/oembed/?url=".urlencode($url)."&format=xml"; 37 $result = file_get_contents($url); 38 if ($result){ 39 $matches = array(); 40 preg_match('#\<html\>(.+?)\<\/html\>#s', $result, $matches); 41 if (is_array($matches) && count($matches)>0){ 42 $result = html_entity_decode(array_pop($matches)); 43 44 $pattern = '#(\s+)(width)(=(\"?)[0-9]*(\"?))+#s'; 45 $result = preg_replace($pattern, '{width}',$result); 46 47 $pattern = '#(\s+)(height)(=(\"?)[0-9]*(\"?))+#s'; 48 $result = preg_replace($pattern, '{height}',$result); 49 50 $pattern = '#(\&?)(width)(=[0-9]*)+#s'; 51 $result = preg_replace($pattern, '{width1}',$result); 52 53 $pattern = '#(\&?)(height)(=[0-9]*)+#s'; 54 $result = preg_replace($pattern, '{height1}',$result); 55 56 $result = str_replace("{width}",' width="'.$this->videowidth.'"',$result); 57 $result = str_replace("{height}",' height="'.$this->videoheight.'"',$result); 58 59 $result = str_replace("{width1}",'&width='.$this->videowidth.'',$result); 60 $result = str_replace("{height1}",'&height='.$this->videoheight.'',$result); 61 62 return $result; 63 } 64 } 65 } 66 return false; 32 67 } 33 68 function generateEmbeddHTML($video_url=''){ … … 143 178 case 'screen.yahoo.com': 144 179 case 'news.yahoo.com': 180 $path = $url_chunks['path']; 181 $v_arr = preg_split("/[\/]+/",$path); 182 if (is_array($v_arr) && count($v_arr)>0){ 183 $v_arr[0] = "embed"; 184 $path = "/".implode($v_arr,"/"); 185 } 186 $video_url = "http://screen.yahoo.com".$path; 145 187 $network = 'yahoo'; 188 break; 189 case 'www.liveleak.com': 190 $path = $url_chunks['path']; 191 $video_url = $url_chunks['scheme']."://".$url_chunks['host']."/ll_embed?".$url_chunks['query']; 192 $network = 'liveleak.com'; 193 break; 194 case 'revision3.com': 195 $path = $url_chunks['path']; 196 $video_url = html_entity_decode($this->fetch_revision3_video_info($video_url)); 197 $network = 'revision3.com'; 146 198 break; 147 199 default: … … 162 214 case 'metacafe': 163 215 case 'break': 164 case ' yahoo':216 case 'liveleak.com': 165 217 $video_preview = '<iframe src="'.$video_url.'" width="'.$videowidth.'" height="'.$videoheight.'" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>'; 166 218 break; … … 174 226 $video_preview = '<object width="'.$videowidth.'" height="'.($videoheight+52).'" id="veohFlashPlayer" name="veohFlashPlayer"><param name="movie" value="http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1419&permalinkId='.$video_url.'&player=videodetailsembedded&videoAutoPlay=0&id=anonymous"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.veoh.com/swf/webplayer/WebPlayer.swf?version=AFrontend.5.7.0.1419&permalinkId='.$video_url.'&player=videodetailsembedded&videoAutoPlay=0&id=anonymous" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="'.$videowidth.'" height="'.($videoheight+52).'" id="veohFlashPlayerEmbed" name="veohFlashPlayerEmbed"></embed></object>'; 175 227 break; 228 case 'yahoo': 229 $video_preview = '<iframe src="'.$video_url.'" width="'.$videowidth.'" height="'.$videoheight.'" frameborder="0" scrolling="no"></iframe>'; 230 break; 231 case 'revision3.com': 232 $video_preview = $video_url; 233 break; 176 234 default: 177 235 $video_preview = '<iframe src="'.$video_url.'" width="'.$videowidth.'" height="'.$videoheight.'" frameborder="0"></iframe>'; -
blue-wrench-videos-widget/trunk/readme.txt
r793205 r794942 6 6 Requires at least: 2.8.1 7 7 Tested up to: 3.6 8 Stable tag: 1.0. 38 Stable tag: 1.0.4 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 16 16 Blue Wrench Video Widget enables the user to embed videos from various video sharing networks such as Vimeo, YouTube, Metacafe etc into your widget box. Simply copy the video's URL from your web browser's address bar and paste it in 'Add new video' page and add 'Blue Wrench Video Widget' from WP-Admin >> Appearance >> Widgets to desired area. 17 17 18 Supported Networks: Vimeo, YouTube, BlipTV, Dailymotion, Veoh, Metacafe, MeFeedia and Break 18 = Supported Video Networks = 19 20 * Vimeo 21 * YouTube 22 * BlipTV 23 * Dailymotion 24 * Veoh 25 * Metacafe 26 * MeFeedia 27 * Break 28 * Yahoo! 29 * LiveLeak 30 * Revision3 31 19 32 20 33 == Installation == … … 30 43 31 44 1. Visit Plugins > Add New > Upload in WordPress admin 32 2. Upload blue-wrench-videos-widget.1.0. 3.zip file45 2. Upload blue-wrench-videos-widget.1.0.4.zip file 33 46 3. Once uploaded, click Activate Plugin link 34 47 … … 44 57 == Changelog == 45 58 59 = 1.0.4 = 60 * URL Maximum length increased to 255 charachars 61 * Added Support for Yahoo! Videos 62 * Added Support for LiveLeak.com Videos 63 * Added Support for Revision3 Videos 64 46 65 = 1.0.3 = 47 66 * Added Widget Layout settings (Grid View/List View) … … 56 75 = 1.0.0 = 57 76 * Initial Release 77 78 == Frequently Asked Questions == 79 80 = Is a way to use this without the widget? = 81 82 I am adding shortcode support to the upcoming releases. It should be ready very soon. 83 84 = I need to add a video from non-supported video networks? How can I do that? = 85 86 Please shoot me an email and let me know the video network name you wish to use within this plugin.
Note: See TracChangeset
for help on using the changeset viewer.