
类型: 游戏辅助工具 版本: V7.3
大小: 904.7 时间: 2025-11-20





[WordPress插件怎样安装WordPress插件安装方法]
<?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>';
}
}
WordPress视频播放插件(Smartideo)安装方法
你可以在后台插件管理页面中直接搜索Smartideo并安装.

或者上传文件夹smartideo至/wp-content/plugins/目录.
在插件管理页面中激活Smartideo.

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。
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
学生党赚钱小游戏
1,592.8M
封门村手机版是一款中式恐怖题材的剧情解谜游戏,玩法内容上比较偏于常规,就是解谜玩法,游戏会有一些恐怖,但是主要还是解谜元素比较多,比较有中国文化的感觉,挺有趣的...
棋牌社怎么样经营
1,510.5M
新心云盘app是一款非常强大的网盘工具,是云盘精灵的最佳搭档,用户通过这款软件能直接搜索你喜欢的资源,软件小,不占内存,打开任一链接自动复制密码,经常用云盘下载...
支付宝每天领红包图片
165.4M
齐韵拍卖手机客户端是专业的文玩拍卖平台,拍卖的艺术品类型丰富多样,一起感受古典文化的魅力,绝对是广大藏友们的福音,不同的时间段还有大型拍卖活动,能够让你购得更加...
怎样成为咨询师兼职呢
644.0M
网络歌词搜索神器,歌词搜索app的界面超级简单,能快速搜索你想要的歌词信息,中文,韩文和日文都能支持人,没有广告,完全免费使用,喜欢唱歌的朋友必备。软件特色1、...
手机界面设计可赚钱吗
152.8M
bcdboot引导修复工具是一款非常实用的PE引导修复工具,你很多windows操作系统中不可缺少的.dll文件一样,BCDboot是快速设置系统分区或修复系统...
问卷调查兼职排行榜
458.3M
相同颜色可以通过,不同颜色便是毁灭!这就是这款游戏的终极规则! 在游戏里,玩家需要时刻控制小球的位置,当小球的颜色和障碍物相同时,不失时机地冲过去,从...
做什么赚钱最容易
845.7M
上汽荣威是荣威MARVEL的一款官方手机app,在这里可以看到最新的荣威MARVEL产品信息,还可以线上与客服直接取得联系,更有在线订车功能帮你省去了不少购车麻...
棋牌室归什么部门管辖
5.9M
柜台租赁合同范本打印是一份免费的柜台租赁合同,有详细的条款规则,甲乙签订合同后具有法律效益,大家相互准守。合同介绍柜台租赁合同是商店柜台出租方将其柜台交给承租方...
正规网络免费兼职平台有哪些
284.8M
很多时候,我们需要对一些文件进行修改名称,但是如果需要修改的文件多了,如果全部使用手工修改的话,程序就会变很很繁琐,很耗时耗力。那么有一款软件叫做 凌...
有什么用手机赚零用钱
1,732.8M
项目年度工作汇报ppt模板是一款适合项目负责人来对项目进行总结汇报的ppt模板,可以很好的将整个项目的情况通过ppt展现出来,让观众可以更好的了解项目情况!项目...
投资咨询公司怎么赚钱
726.7M
lua脚本编译者是一款实用的编译软件,操作简单,支持lua脚本编译反编译和luajit脚本编译,支持批量化操作,可以保证脚本源代码的安全。功能介绍单脚本选择单一...
做建材生意怎么赚钱
1,896.9M
2015年的清明节马上就要到来了,对于制作关于清明节ppt的朋友来说,收集一些清明节ppt背景图片是很有必要的,下面小编整理了清明节ppt背景素材合集,主要有放...
比较好赚钱的方法
1,159.1M
97T/210T/230T/350T是一款带全数字伺服或三相混合式步进电机的普及型数控系统。控制电路采用16位高速微处理器,超大规模可编程逻辑器件和表贴元件、多...
怎样在澳门年赚百万元
1,086.1M
小巧好用的手机录屏软件,apowerrecapp可以录制各种视频、游戏,固定横向纵向录制,很灵活,操作简单,非常的棒。apowerrec屏幕录制软件功能Apow...
创业加盟好赚钱
1,884.5M
看着大家每次的修电脑时都需要下载很多的修复工具,小编就给你们带来win10电脑维护工具箱,这里面集合了大家最常用的电脑修复软件,其中包括断网急救箱、设备管理器等...
手绘墙兼职
2025/10/20 16:25
贵州做什么小生意好
2025/11/06 08:54
手机兼职打字员 招聘
2025/11/07 23:20
怎么获得电商的佣金
2025/10/22 17:03
大学生兼职办卡
2025/10/22 04:53
哪种手机赚钱软件好用
2025/11/05 03:34
微头条搬砖怎么赚钱
2025/10/26 13:50
自动看书挣钱的阅读器
2025/11/10 00:33
如何在家自己挣钱
2025/11/03 20:28
博旅理财怎么赚钱
2025/11/05 08:05
珍珠复刻赚钱
2025/10/26 11:31
复利赚钱的方法
2025/10/26 20:13
2018合伙搞钱的
2025/11/02 21:13
有免费手机赚钱软件
2025/11/10 16:47
比赛的棋牌游戏
2025/11/02 00:28
比赛的棋牌游戏
2025/11/02 00:28更新
EASEUSTodoBackupAdvancedServer是一款非常不错的硬盘备份、还原工具。功能十分强大。有需要的可以来东坡下载使用!EASEUSTodoB...
支持 ( 81 ) 盖楼(回复)
支持 ( 81 ) 盖楼(回复)
支持 ( 55 ) 盖楼(回复)
支持 ( 165 ) 盖楼(回复)
支持 ( 95 ) 盖楼(回复)
支持 ( 161 ) 盖楼(回复)
支持 ( 74 ) 盖楼(回复)
支持 ( 51 ) 盖楼(回复)
支持 ( 155 ) 盖楼(回复)
支持 ( 70 ) 盖楼(回复)
支持 ( 187 ) 盖楼(回复)
支持 ( 156 ) 盖楼(回复)
支持 ( 62 ) 盖楼(回复)
支持 ( 194 ) 盖楼(回复)
支持 ( 172 ) 盖楼(回复)
支持 ( 72 ) 盖楼(回复)
支持 ( 190 ) 盖楼(回复)
支持 ( 108 ) 盖楼(回复)
支持 ( 123 ) 盖楼(回复)
支持 ( 164 ) 盖楼(回复)