Plugin Directory

Changeset 794942


Ignore:
Timestamp:
10/28/2013 07:03:08 PM (12 years ago)
Author:
nandasunil
Message:

Version 1.0.4

Location:
blue-wrench-videos-widget/trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • blue-wrench-videos-widget/trunk/bluewrench-video-controller.php

    r791973 r794942  
    359359            <th scope="row">URL</th>
    360360            <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;?>" />
    362362                <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;">
    363367                <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>
    364372            </td>
    365373        </tr>
  • blue-wrench-videos-widget/trunk/bluewrench-video-widget.php

    r793205 r794942  
    44Plugin URI: http://bluewrenchsoftware.com/wordpress-plugins/bluewrench-video-widget/
    55Description: 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.3
     6Version: 1.0.4
    77Author: Sunil Nanda
    88Author URI: http://www.sunilnanda.com/
     
    1616define('BW_DIR_NAME', basename(BW_FILE_PATH));
    1717if (!defined('BW_VERSION_NUM'))
    18     define('BW_VERSION_NUM', '1.0.3');
     18    define('BW_VERSION_NUM', '1.0.4');
    1919
    2020global $wpdb;
  • blue-wrench-videos-widget/trunk/bw_script.js

    r793205 r794942  
    2525    }
    2626}
     27function 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  
    3030        # Could not find id
    3131        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;
    3267    }
    3368    function generateEmbeddHTML($video_url=''){
     
    143178                    case 'screen.yahoo.com':
    144179                    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;
    145187                        $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';
    146198                        break;
    147199                    default:
     
    162214            case 'metacafe':
    163215            case 'break':
    164             case 'yahoo':
     216            case 'liveleak.com':
    165217                $video_preview = '<iframe src="'.$video_url.'" width="'.$videowidth.'" height="'.$videoheight.'" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>';
    166218                break;
     
    174226                $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>';
    175227                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;
    176234            default:
    177235                $video_preview = '<iframe src="'.$video_url.'" width="'.$videowidth.'" height="'.$videoheight.'" frameborder="0"></iframe>';
  • blue-wrench-videos-widget/trunk/readme.txt

    r793205 r794942  
    66Requires at least: 2.8.1
    77Tested up to: 3.6
    8 Stable tag: 1.0.3
     8Stable tag: 1.0.4
    99License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    1616Blue 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.
    1717
    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
    1932
    2033== Installation ==
     
    3043
    3144   1. Visit Plugins > Add New > Upload in WordPress admin
    32    2. Upload blue-wrench-videos-widget.1.0.3.zip file
     45   2. Upload blue-wrench-videos-widget.1.0.4.zip file
    3346   3. Once uploaded, click Activate Plugin link
    3447
     
    4457== Changelog ==
    4558
     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
    4665= 1.0.3 =
    4766* Added Widget Layout settings (Grid View/List View)
     
    5675= 1.0.0 =
    5776* Initial Release
     77
     78== Frequently Asked Questions ==
     79
     80= Is a way to use this without the widget? =
     81
     82I 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
     86Please 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.