[WordPress插件怎样安装WordPress插件安装方法]VariCAD Viewer(cad浏览查看打印软件)1.0 免费版
在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
WordPress视频播放插件(Smartideo)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.
在插件管理页面中激活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>';
}
}
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
展开内容
Oicqhack密码破解工具1.2 最新版
全网漫画大全官方免费下载-全网漫画大全app2.0 安卓版
吉电好车app下载-吉电好车app1.9 安卓版
异世界传说礼包版-异世界传说公测版1.0最新版
送菜哥app-送菜哥买菜APP1.0 官方免费版
中财期货博易大师-中财鑫管家博易大师5.5.17.0官网最新客户端
安卓云盘密码助手软件下载-云盘密码助手app1.0 免费版
云端问仙台服下载-云端问仙台服版2.0.17 安卓手机版
画吧app下载-画吧7.5.5 安卓版
666配送端官方版-666配送端3.1.7 最新版
快播伦理电影种子资源搜索工具V2.4 按F3进入
哇咔英语app-哇咔英语同步辅导app1.8.8 人教版
jo生活管家官网下载-JO管家1.4.3 官方私人管家版
鸭鸭云搜索解析软件-鸭鸭浏览器1.3.0 手机版
websocket压力并发测试工具-websocket压力测试工具1.0.2 绿色免费版
斗罗大陆零游戏官方下载-斗罗大陆零手游1.1 最新版
斑马图记最新版官网下载-斑马图记最新版3.6.0 安卓手机版
魔王的简易用法游戏下载-魔王的简易用法手机版0.1 免费版
废墟物语游戏下载-废墟物语游戏1.02 安卓版
角斗士的故事游戏-角斗士的故事(Story of a Gladiator)硬盘版
wwwjxjd627con优课优信下载-优课优信预防登陆平台wwwjxjd627com苹果手机版
花光所有钱游戏下载-花光所有钱安卓版1.0 最新版
盛世美图app3.0.0 安卓最新版
VC反编译工具2.2 最新版
方言语音库下载-超级语音聊天(方言聊天)6.3.23语音全能王
全能小毒妻游戏下载-全能小毒妻手游3.1 安卓版
墨点识字app下载-墨点识字免费版1.0.6安卓版
可视铃声工具下载-可视铃声制作软件1.0 PC绿色版
压力山大新浪邮箱注册机下载-压力山大新浪邮箱注册机1.0 加强版
动动壁纸下载-动动壁纸app4.8.1 免费版
灰色按钮激活器-天天按钮激活工具3.3 绿色免费版
桌面萌宠下载-桌面萌宠Desktop Pet1.8.1 安卓版
UC免费WiFi(WiFi共享软件)1.2.0.715 绿色免费版
10.0/875.5M
UC免费WiFi是一款基于PC无线网卡应用的无线共享功能。开启后,将PC变成无线路由器,让WiFi手机及PAD等具备无线上网功能的设备实现免费共享上网。使用方法...
玩家密无忧(玩家Game帐号密码保护神)V7.0.7 官方安装版
8.0/531.8M
由玩家互联与武汉凡高程序联手推出的“玩家密无忧”反盗号程序,是目前市场上唯一一款通过国家信息安全中心认证的反盗号程序,其特殊的密码保护方法已经成功申请了国家专利...
8.1/540.2M
演员圈是一个可以在上面竞选做演员的APP,喜欢的朋友可以直接下载然后注册查看近期的演员的招募,参加竞选角色,只用手机就能争当演员。演员圈功能特色演员的专业档案演...
8.9/433.4M
黄金阅app是一款可以免费的听各种音乐和视频的软件,你可以通过这个软件分享你的视频,或者是免费的查看众多内容!黄金阅app使用起来非常的简单,可以为大家带来爽快...
天下秀虹宇宙app下载-虹宇宙(honnverse)v4.1.9 官方版
8.0/242.5M
天下秀虹宇宙app是一款虚拟社交手游,玩家可以在这里创建属于自己的虚拟角色,各种元素的设定都非常自由,然后体验与现实生活中无异的游戏生活,现在上线了最新的数字藏...
罗纳德历险记(Ronald adventure)1.0 安卓版
7.7/1,444.5M
罗纳德历险记是一款好玩的冒险闯关游戏,玩家需要控制角色挑战关卡,游戏操作简单,关卡设计精美,你可以在关卡中收集金币,击杀小怪物!罗纳德历险记游戏玩法1、左边方向...
9.7/996.3M
不一样的手机购物就会给我们带来不一样的体验!新蛋商城Android客户端就是给你带来全新的购物体验,你需要的商品在这里可以最便宜,最优惠的价格抢的到,心动就来看...
7.9/801.5M
大嘴吧拼读app是一款好用的英语学习软件,科学的英语拼读学习方法帮助用户高速的学习英语,智能词根让你的发音更加准确,轻松学英语。软件介绍大嘴吧英语学习系列之——...
8.9/127.2M
券公主app是一款可以搜索领取各类网购平台大额优惠券的软件。有了它,你可以每次网购的时候都去搜一搜,领一些平常你看不到的券,成功帮你省钱!每天省一点,快乐无边!...
9.8/1,346.1M
这是一款免费的手机文件加密以及浏览软件,软件可以帮助用户将手机中所有的文件进行加密保护隐私,你只需设置密码导入即可。私盒app简介私盒为用户主要提供文件加密服务...
9.5/34.2M
中国的诗经、楚辞、魏晋、南北朝、唐诗、宋词、元曲等一直都受到人们的喜欢,很多人从小就开始背诵这个了,现在你还记得多少,还喜欢这些东西吗?想给自己的孩子启蒙吗?就...
9.7/1,377.5M
天地决是一款大型魔幻战斗rpg手游大作。游戏有着丰富剧情内容,为玩家展现了一个真实绚丽的魔幻世界。以及超热血的PVP竞技系统,细腻的操作,真实的打击感。还有坐骑...
9.4/1,868.5M
一款针对学龄前儿童的创意美术启蒙的app,培养儿童的创新的意识,该平台支持中英发音!让还一边玩,可以做出4的效果能一边学习,喜欢的朋友,可以下载试试!AR涂涂秀...
碧海连天1.95版攻略-魔兽地图碧海连天【隐藏英雄密码】2.1 最新免费版
9.0/870.7M
各位游戏玩家注意了,碧海连天2.1版已经发布,这次新版的地图增加了宠物随机获取选择英雄、自动排泄系统和单位死亡自动删除等功能,想知道还有哪些变化吗?来下载体验魔...
8.8/1,908.0M
跳跃吧表情包是一款暴走表情包手机休闲趣味小游戏,这款游戏需要考验玩家的敏捷,玩家要不间断的跳跃到达顶点之上,快来下载试玩吧!简介操纵兵库北、金馆长,还有欧皇非酋...
reelshort国际版美版下载-reelshort海外版1.5.05 英文版
8.1/1,725.8M
这是国内的厂商【中文在线】旗下的海外公司【NewLeafPublishing】开发的一款专门针对海外市场的手机短剧APP,和国内的短剧差不多,各种各样的短剧内容...
9.6/1,973.3M
现在有玩仙剑奇缘这款不错的手机游戏的朋友,小编就给你们带来了一款功能强大的游戏必备神器--仙剑奇缘必备神器,各种各样的攻略以及礼包都可以在里面找得到!仙剑奇缘必...
连锁大学堂APP下载-连锁大学堂APPv3.0.36-release官方安卓版
9.4/294.1M
连锁大学堂是一款餐饮学习软件,帮助餐饮人开连锁店,从线上和线下两个方面入手,帮助用户的餐饮店做起来,做连锁,这就是这个软件的功能,打造连锁餐饮店,根据用户的店铺...
9.4/635.0M
番茄轻断食是一款帮助大家通过控制饮食的减肥软件,软件能为大家制定详细的减肥计划,精细到一日三餐的具体饮食,只要按照计划,大家都能理想中的减肥效果,而且本软件还能...
9.6/1,063.0M
疯狂猜图王是一款休闲小游戏,拥有多种游戏模式,简单好玩,还有趣味问答,拥有排行榜,喜欢的网友可以来一起挑战!疯狂猜图王游戏介绍“疯狂猜图王”智商炫耀,挑战大脑极...
步步高vivo X6/X6plus救砖教程-步步高vivo X6/X6plus官方线刷救砖包PD14
8.7/1,265.8M
这是为大家带来的一个步步高vivoX6/X6plus官方线刷救砖包,专门的为vivoX6/X6plus的用户们准备,大家的vivo手机遇到一些问题步伐开机或者变...
9.8/1,180.0M
Web服务管理器用于监控由IIS或Apache创建的Web服务器。当服务器死机时,自动重起。当被黑客破坏时,自动恢复。电脑装机必备软件,下列有详细介绍,喜欢的朋...
智慧萧山ios客户端下载-智慧萧山客户端4.1.3 官网ios苹果版
9.0/671.1M
智慧萧山ios客户端是一款城市生活服务软件,为市民朋友提供航班查询、公交查询等信息,需要的朋友可以来下载使用!智慧萧山ios客户端介绍“智慧萧山”手机门户是萧山...
7.8/962.5M
好物好价app是一个大牌优质商品购物平台,专业分享优质好货,每周还有免费抽奖机会,丰富折扣商品,轻松帮你省钱!软件介绍一款帮助用户花更少的钱,买到一线国内外品牌...
8.4/68.4M
自由之战这款手游在如今是很多的朋友都是非常的喜欢玩的,当然更多的朋友也是需要一款不错的游戏辅助攻略助手来帮助你的,现在就给你推荐官方推出的自由之战官方助手!自由...