WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

WordPress 视频插件-WordPress 视频插件(Smartideo)绿色免费版【附代码】手游最新版本

大小:1,621.8M 语言: 简体中文

类型:兴趣社交 系统:macOS

备案号:备案号:苏5K-200950565-68X
简介 相关 评论(7)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

WordPress插件安装方法

[WordPress插件怎样安装WordPress插件安装方法]

WordPress视频播放插件(Smartideo)怎么用

Smartideo插件使用方法

你可以直接粘贴视频播放也完整的URL到编辑器(单独一行),就可以加载视频播放器。

URL地址格式如下

http://v.youku.com/v_show/id_XMTYzNTgxNTMy.html

http://www.tudou.com/programs/view/YBdHhxJqrLY/

http://www.56.com/u35/v_MTEwMjM5NDcy.html

http://v.qq.com/page/o/9/f/o0142tt1m9f.html

http://v.qq.com/cover/t/tyeqdw6rof7t5ow/p0015kjlai9.html

http://my.tv.sohu.com/us/94469256/77228432.shtml

http://www.wasu.cn/Play/show/id/5079941

http://v.yinyuetai.com/video/2207109

http://v.ku6.com/show/P0Ib_pTne6-FBSa1AbtKUQ...html

http://www.letv.com/ptv/vplay/20932037.html

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。

WordPress视频播放插件Smartideo怎么安装

WordPress视频播放插件(Smartideo)安装方法挖或死1.1正式版

你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.

在插件管理页面中激活Smartideo.

WordPress视频播放插件Smartideo插件代码预览

<?php

/*

PluginName:Smartideo

PluginURI:http://www.fengziliu.com/

Description:Smartideo是为WordPress添加对在线视频支持的一款插件(支持手机、平板等设备HTML5播放)。目前支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等网站。

Version:1.2

Author:FensLiu

AuthorURI:http://www.fengziliu.com/smartideo-for-wordpress.html

*/

define('SMARTIDEO_VERSION','1.0');

define('SMARTIDEO_URL',plugins_url('',__FILE__));

define('SMARTIDEO_PATH',dirname(__FILE__));

$smartideo=newsmartideo();

classsmartideo{

private$width='100%';

private$height='500';

private$mobile_width='100%';

private$mobile_height='250';

publicfunction__construct(){

if(is_admin()){

add_action('admin_menu',array($this,'admin_menu'));

}

$option=get_option('smartideo_option');

if(!empty($option)){

$option=json_decode($option,true);

}else{

$option=array();

}

extract($option);

if(!empty($width)){

$this->width=$width;

}

if(!empty($height)){

$this->height=$height;

}

if(!empty($mobile_width)){

$this->mobile_width=$mobile_width;

}

if(!empty($mobile_height)){

$this->mobile_height=$mobile_height;

}

wp_embed_register_handler('smartideo_tudou',

'#https?://(?:www.)?tudou.com/(?:programs/view|listplay/(?<list_id>[a-z0-9_=-]+))/(?<video_id>[a-z0-9_=-]+)#i',

array($this,'smartideo_embed_handler_tudou'));

wp_embed_register_handler('smartideo_56',

'#https?://(?:www.)?56.com/[a-z0-9]+/(?:play_album-aid-[0-9]+_vid-(?<video_id1>[a-z0-9_=-]+)|v_(?<video_id2>[a-z0-9_=-]+))#i',

array($this,'smartideo_embed_handler_56'));

wp_embed_register_handler('smartideo_youku',

'#https?://v.youku.com/v_show/id_(?<video_id>[a-z0-9_=-]+)#i',

array($this,'smartideo_embed_handler_youku'));

wp_embed_register_handler('smartideo_qq',

'#https?://v.qq.com/(?:cover/g/[a-z0-9_.]+?vid=(?<video_id1>[a-z0-9_=-]+)|(?:[a-z0-9/]+)/(?<video_id2>[a-z0-9_=-]+))#i',

array($this,'smartideo_embed_handler_qq'));

wp_embed_register_handler('smartideo_sohu',

'#https?://my.tv.sohu.com/us/(?:d+)/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_sohu'));

wp_embed_register_handler('smartideo_wasu',

'#https?://www.wasu.cn/play/show/id/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_wasu'));

wp_embed_register_handler('smartideo_yinyuetai',

'#https?://v.yinyuetai.com/video/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_yinyuetai'));

wp_embed_register_handler('smartideo_ku6',

'#https?://v.ku6.com/show/(?<video_id>[a-z0-9-_.]+).html#i',

array($this,'smartideo_embed_handler_ku6'));

wp_embed_register_handler('smartideo_letv',

'#https?://www.letv.com/ptv/vplay/(?<video_id>d+)#i',

array($this,'smartideo_embed_handler_letv'));

}

publicfunctionsmartideo_embed_handler_tudou($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.tudou.com/programs/view/html5embed.action?type=0&code={$matches['video_id']}");

}else{

$embed=$this->get_embed("http://www.tudou.com/v/{$matches['video_id']}/&resourceId=0_05_05_99&bid=05/v.swf");

}

returnapply_filters('embed_tudou',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_56($matches,$attr,$url,$rawattr){

$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.56.com/iframe/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://player.56.com/v_{$matches['video_id']}.swf");

}

returnapply_filters('embed_56',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_youku($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://player.youku.com/embed/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://player.youku.com/player.php/sid/{$matches['video_id']}/v.swf");

}

returnapply_filters('embed_youku',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_qq($matches,$attr,$url,$rawattr){

$matches['video_id']=$matches['video_id1']==''?$matches['video_id2']:$matches['video_id1'];

if(wp_is_mobile()){

$embed=$this->get_iframe("http://v.qq.com/iframe/player.html?vid={$matches['video_id']}");

}else{

$embed=$this->get_embed("http://static.video.qq.com/TPout.swf?vid={$matches['video_id']}");

}

returnapply_filters('embed_qq',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_sohu($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://tv.sohu.com/upload/static/share/share_play.html#{$matches['video_id']}_0_0_9001_0");

}else{

$embed=$this->get_embed("http://share.vrs.sohu.com/my/v.swf&topBar=1&id={$matches['video_id']}&autoplay=false&xuid=&from=page");

}

returnapply_filters('embed_sohu',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_wasu($matches,$attr,$url,$rawattr){

if(wp_is_mobile()){

$embed=$this->get_iframe("http://www.wasu.cn/Play/iframe/id/{$matches['video_id']}");

}else{

$embed=$this->get_embed("http://s.wasu.cn/portal/player/20141216/WsPlayer.swf?mode=3&vid={$matches['video_id']}&auto=0&ad=4228");

}

returnapply_filters('embed_wasu',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_yinyuetai($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://player.yinyuetai.com/video/player/{$matches['video_id']}/v_0.swf");

returnapply_filters('embed_yinyuetai',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_ku6($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://player.ku6.com/refer/{$matches['video_id']}/v.swf");

returnapply_filters('embed_ku6',$embed,$matches,$attr,$url,$rawattr);

}

publicfunctionsmartideo_embed_handler_letv($matches,$attr,$url,$rawattr){

$embed=$this->get_embed("http://i7.imgs.letv.com/player/swfPlayer.swf?id={$matches['video_id']}&autoplay=0");

returnapply_filters('embed_letv',$embed,$matches,$attr,$url,$rawattr);

}

privatefunctionget_embed($url){

$embed=sprintf(

'<embedsrc="%1$s"allowFullScreen="true"quality="high"width="%2$s"height="%3$s"allowScriptAccess="always"type="application/x-shockwave-flash"></embed>',

$url,$this->width,$this->height);

return$embed;

}

privatefunctionget_iframe($url){

$iframe=sprintf(

'<iframesrc="%1$s"width="%2$s"height="%3$s"frameborder="0"allowfullscreen="true"></iframe>',

$url,$this->mobile_width,$this->mobile_height);

return$iframe;

}

publicfunctionadmin_menu(){

add_plugins_page('Smartideo设置','Smartideo设置','manage_options','smartideo_settings',array($this,'admin_settings'));

}

publicfunctionadmin_settings(){

if($_POST['smartideo_submit']=='保存'){

$param=array('width','height','mobile_width','mobile_height');

$json=array();

foreach($_POSTas$key=>$val){

if(in_array($key,$param)){

$json[$key]=$val;

}

}

$json=json_encode($json);

update_option('smartideo_option',$json);

}

$option=get_option('smartideo_option');

if(!empty($option)){

$option=json_decode($option,true);

}

if(empty($option['width'])){

$option['width']='100%';

}

if(empty($option['height'])){

$option['height']='500';

}

if(empty($option['mobile_width'])){

$option['mobile_width']='100%';

}

if(empty($option['mobile_height'])){

$option['mobile_height']='250';

}

echo'<h2>Smartideo设置</h2>';

echo'<formaction=""method="post">

      <tableclass="form-table">

<trvalign="top">

          <thscope="row">播放器宽度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="width"value="'.$option['width'].'"></label>

            <br/>

            <pclass="description">默认宽度为100%</p>

          </td>

</tr>

<trvalign="top">

          <thscope="row">播放器高度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="height"value="'.$option['height'].'"></label>

            <br/>

            <pclass="description">默认高度为500px</p>

          </td>

</tr>

        <trvalign="top">

          <thscope="row">移动设备播放器宽度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="mobile_width"value="'.$option['mobile_width'].'"></label>

            <br/>

            <pclass="description">手机、平板等设备访问时,默认宽度为100%</p>

          </td>

</tr>

<trvalign="top">

          <thscope="row">移动设备播放器高度</th>

          <td>

            <label><inputtype="text"class="regular-textcode"name="mobile_height"value="'.$option['mobile_height'].'"></label>

            <br/>

            <pclass="description">手机、平板等设备访问时,默认高度为250px</p>

          </td>

</tr>

      </table>

      <pclass="submit"><inputtype="submit"name="smartideo_submit"id="submit"class="button-primary"value="保存"></p>

    </form>';

}

}

3d走势图免费 乐鱼体育怎么装 九游会误乐城 买球官网在线 博亚医院地址 2020年3d南方双彩走势图 bet365真的合法吗 银河游戏上下分客服 万博九游会娱乐官方网站 亚博下载彩票开奖大全 众博地办公地址 体彩大乐透开奖一等奖 体育教研室工作总结 ME体育大会公众 广交会体育展
展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/11/12 15:19
欢闹春节拼图游戏是一款比较有难度的拼图游戏,也是需要耐心来玩的,采取了中国几张具有代表意义的图片,让没一个在外漂泊的人,也能感受到家的温暖。欢闹春节拼图介绍每一...

支持( 80 ) 盖楼(回复)

2025/11/19 21:24
打造教育社交新时代,菲花教育app界面操作流畅,课程表功能特别好用,给大家提供了一个交流的平台,大家可以自由的进行探讨。软件介绍我们希望通过教育,连接世界各个角...

支持( 136 ) 盖楼(回复)

2025/11/19 23:53
复古怀旧风格的粘液大作战,史莱姆大乱斗(smismiio)中是大家熟悉的吞噬玩法,卡通的画面,节奏超快,玩家将操作粘液也就是史莱姆去战斗,吞噬其它的玩家,扩大自...

支持( 84 ) 盖楼(回复)

2025/11/07 09:56
如果你经常性有多个优酷视频需要上传,那么推荐下载使用优酷视频批量上传工具。让你快速完成优酷视频上传工作。软件支持多账号导入,支持设置标题、简介、分类等,非常实用...

支持( 53 ) 盖楼(回复)

2025/11/18 17:52
快苗app是一款帮助苗木种植户提供线上交易的平台,增加种植户的业务范围,是为满足互联网时代的绿化苗木商人用户需求而提供信息化服务,以整个绿化行业为着眼点,通过互...

支持( 129 ) 盖楼(回复)

2025/11/01 23:43
热血群英传礼包版是为玩家们提供的最低充值折扣版本,轻松有趣的三国策略卡牌,还有丰富完整的游戏地图,各种真实的地形,独特的天气系统,让你可以置身于一个全新的三国世...

支持( 174 ) 盖楼(回复)

2025/11/17 08:35
索尼克跑酷大冒险是一款画风超赞的动作跑酷游戏。以同名pc端游移植,高度还原了端游的玩法内容,更加入了一些有趣的玩法元素。在精彩刺激的平台关卡中奔跑、跳跃、冲刺或...

支持( 177 ) 盖楼(回复)

2025/11/11 16:20
之寓公寓app是一个最新推出的公寓出租平台,这里为用户带来了丰富优质房源信息,可预约看房,非常方便!之寓APP简介之寓是湖北科投旗下的长租公寓品牌,致力于集中式...

支持( 185 ) 盖楼(回复)

2025/10/24 01:02
遗忘之山外科手术是一款恐怖惊悚类解密逃脱游戏,游戏中你莫名其妙的躺在一家医院,这个医院怎么看都不正常,要快点从这家医院逃走,不然会有很恐怖的事情发生,祝你好运!...

支持( 116 ) 盖楼(回复)

2025/11/09 01:51
蓝牙侠是一款智能遥控软件,借助蓝牙技术可将手机转变为全能控制终端。它支持一键切换键盘、鼠标、手柄模式,能精准操控电脑、电视等设备,还可轻松调节系统参数。其创新的...

支持( 157 ) 盖楼(回复)

2025/10/24 13:40
Python3.2.3官方文档翻译,python3.2更改方法了,并不向下兼容。Python开发者的哲学是“用一种方法,最好是只有一种方法来做一件事”。在设计P...

支持( 31 ) 盖楼(回复)

2025/10/27 18:01
BattleShootSurvival是一款全新的射击大逃杀类型的游戏,模拟真实的游戏战场,在一个岛上和其他玩家进行对战,击杀对手,努力是生存下去。Battle...

支持( 85 ) 盖楼(回复)

2025/11/09 15:07
搞笑表情包app是一款聚合微信、微博、QQ表情大全的搞笑表情包软件,想斗图没有表情包?下载搞笑表情包app,你就能拥有海量斗图表情包,该表情包完全免费使用,喜欢...

支持( 170 ) 盖楼(回复)

2025/11/14 13:56
林允儿写真卖萌图片大全是小编整理的林允儿图片壁纸,专为林允儿粉丝朋友挑选,高清大图,非常精美,喜欢的粉丝赶紧来下载吧!林允儿写真图片更多高清大图,请下载查看!林...

支持( 136 ) 盖楼(回复)

2025/10/29 14:39
GachaClub官方版是一款画风很可爱的角色养成手游,游戏画面制作非常精美,而且游戏中的角色一个比一个好看,玩法自由度比较高,限制很少,感兴趣的小伙伴快来东坡...

支持( 63 ) 盖楼(回复)