
类型: 金融理财 版本: V10.9
大小: 669.4 时间: 2025-11-21





<?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插件怎样安装WordPress插件安装方法]棋牌试玩攻略达人棋牌
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、华数、乐视等热门网站的视频。
熊猫赚钱软件是真的
191.3M
这是一款类似于纪念碑谷的迷宫逃脱类型手游,玩法比较多样化,你可以选择不同的颜色和关卡进行挑战,十分考验玩家的思考能力,最终找到迷宫出口!游戏介绍迷宫人是一款很赞...
天龙八部如何挣钱快
605.9M
自动点击器经过修改,软件能所有功能永久免费,支持各种模式可供使用使用,用户能自己设置连点的频率、屏幕位置等,适用于各种场景,有需要的朋友们快来东坡下载吧!自动点...
用家族祠堂赚钱
1,906.5M
刚刚看到这个名字的时候还以为是个新游戏 ,汗。。。。。。。。。隐秘任务2就是我们最熟悉的雷电II的一个副本。隐秘的任务2,全新的关卡设计,绝对让你直呼...
兼职微信群加入
992.8M
寂伤音效是一款功能丰富的营销软件,主持音效电音基调查询主播控场,提供了喊麦,搞笑,游戏,生活等音效,在直播中活跃气氛。使用方法直接选择音效点击使用将自己的音效文...
招财猫棋牌网址
1,070.9M
魂斗罗2028简体中文免安装硬盘版是目前最新的魂斗罗游戏,采用全新的场景设定和完美的场景移植,让你整个人都沉迷其中无法自拔,而且还有很多让你开心的内容玩到爽为止...
如何利用手机兼职赚钱
14.8M
智慧树艾滋病性与健康是智慧树网络课程中的一门课,期末到了,同学们都在找智慧树艾滋病性与健康期末考试答案,小编带来了2017年智慧树艾滋病性与健康期末考试答案完整...
饿了么推广赚佣金
1,332.8M
给大家介绍一款小游戏--锤子任务中文版,这款游戏简单好玩,轻松上手,游戏已经汉化,喜欢的网友赶紧来下载吧!锤子任务中文版游戏介绍锤子任务中文版是一款简单好玩的小...
卡卡付信用卡提现失败
525.4M
实况足球2018多特蒙德边卫耶雷米·托利安面部补丁是实况足球这款游戏的一个专用补丁软件,可以把游戏里的人物脸部换成多特蒙德边卫耶雷米·托利安!补丁介绍实况足球2...
三维solidworks兼职
1,637.6M
AutoCADLT2019拥有非常强大的专业绘图功能,满足您的专业绘图需求。以真正的DWG文件格式创建图纸,提高数据的稳定性和兼容性,以便与客户和同事顺利沟通。...
可赚钱的手游戏有哪些
639.0M
平安+PLUS手机版是一款由中国平安官方为客户打造服务软件手机版,方便客户随时了解平安集团最新资讯,参与平台线上线下的活动,参与平台的调研活动,方便你更好的反馈...
郑州兼职司机招聘信息
959.7M
这是一款非常好用的汽车资讯指南软件,这里提供各种车型,行业最新新闻资讯,最新的汽车价格变动,汽车的全面评测等等,非常好用!软件介绍汽车指南是一款非常不错的汽车资...
福州名城豪生大酒店-棋牌室怎么样
375.2M
章鱼云手机app是一款虚拟机应用,帮助你实现游戏云端挂机功能,为您省电省流量,省钱更省力,我们遵从不关机不锁屏,24小时云端在线,让您手机效率翻番!章鱼云手机a...
财务顾问兼职月薪
739.9M
100弹跳球是一款魔性的弹跳球游戏,有丰富的弹球,玩家需要接住弹球使其回到U型的起点,不断的循环,知道最后一个小球掉出来。100弹跳球玩法游戏中拥有多种个性化的...
北海365招聘网周末兼职
33.6M
三国志战略版国际服就是可以和全世界的玩家在一个服务器对拼,国际服就是外国人数量很多,在这里一寸山河一寸血,捍卫我们的三国领土,我们需要团结起来一起战斗吧少年们。...
红包定制 免费拿样广州粤锦
888.3M
崩坏学园2崩坏前线手游是一款以二次元为主题的射击类游戏,崩坏学园2推出的全新版本崩坏前线有着大量的祈福活动,在游戏中只要你挑战胜利成功后就可以获得奖励,并且在抽...
副业赚钱app下载
2025/10/26 00:47
乐赚官方网站
2025/10/28 08:57
现货代理怎么赚钱吗
2025/11/11 03:19
小涵兼职是真的吗
2025/11/08 13:42
手机一单一结的兼职
2025/11/08 11:30
湖南棋牌平台制作
2025/10/31 04:56
金融投资怎样赚钱
2025/10/26 06:53
手机星空棋牌青墩
2025/11/02 14:30
抖音金币怎么赚
2025/10/28 08:18
万载赚钱项目
2025/10/26 19:01
可乐赚提现支付宝错了
2025/10/28 11:18
开心棋牌污版下载
2025/10/31 08:51
明星怎么赚钱的
2025/10/25 02:45
金融公司好赚吗
2025/11/06 20:47
网络彩票赚钱项目
2025/10/23 12:17
网络彩票赚钱项目
2025/10/23 12:17更新
地铁模拟器3d重庆版是一款模拟游戏,玩家可以通过这款软件来进行模拟地铁的运行,游戏中玩家可以驾驶各国的地铁列车,感受驾驶的快感,享受各个城市的不同地铁的驾驶美丽...
支持 ( 63 ) 盖楼(回复)
支持 ( 29 ) 盖楼(回复)
支持 ( 92 ) 盖楼(回复)
支持 ( 10 ) 盖楼(回复)
支持 ( 172 ) 盖楼(回复)
支持 ( 53 ) 盖楼(回复)
支持 ( 179 ) 盖楼(回复)
支持 ( 76 ) 盖楼(回复)
支持 ( 37 ) 盖楼(回复)
支持 ( 181 ) 盖楼(回复)
支持 ( 66 ) 盖楼(回复)
支持 ( 108 ) 盖楼(回复)
支持 ( 133 ) 盖楼(回复)
支持 ( 172 ) 盖楼(回复)
支持 ( 30 ) 盖楼(回复)
支持 ( 97 ) 盖楼(回复)
支持 ( 32 ) 盖楼(回复)
支持 ( 135 ) 盖楼(回复)
支持 ( 161 ) 盖楼(回复)
支持 ( 82 ) 盖楼(回复)