
类型: 小说阅读 版本: V10.2
大小: 1,085.7 时间: 2025-11-22





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

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

在wordpress上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。权力的游戏怎样赚钱
不用本金的赚钱项目
507.9M
这款动作游戏拥有超吸引人的元素,让你自由体验,开始你的狩猎之旅,与顽固的鹿进行战斗。如果你是这款游戏的粉丝,那么确实,在第二部分中,你会发现更多有吸引力的游戏模...
友玩广西棋牌挂
1,331.1M
七彩时光app帮助各位家长更好的了解到孩子的学习情况,孩子在校的情况以及成绩报表都会直接在七彩时光app中进行显示,提供各项功能,学校缴费相关项目直接在平台上就...
媳妇嫌我挣钱少
1,761.3M
鸭咪语音APP其实是非常有意思的语言聊天互动开黑软件,软件可以带给用户诸多趣味玩法,它不仅为玩家提供了便捷高效的开黑组队渠道,更为玩家打造了一个充满活力与趣味的...
视频号变现平台源码
911.5M
主要考验玩家空间想象力的游戏,视窗(Viewportthegame)推出了完整汉化版,玩家在游戏中可以发挥你独特的想象力看到物体的多个面,它有丰富的关卡,玩法不...
拆迁了还用挣钱吗
1,684.1M
软媒文件大师是从软媒最新发布的魔方电脑大师6测试版中提取出来的一个文件管理软件,具有文件检验、文件解锁、文件分割合并、文件粉碎以及图片种子合成等多个功能。魔方电...
火车采集器兼职
520.8M
诗歌是一种传递情感的语言,但是写一篇好的诗歌也是有一定的难度的。为你写诗这款安卓应用能够帮助用户写一首好诗哦,感兴趣的小伙伴赶快来下载吧为你写诗app特点1、可...
微信的小程序能赚钱吗
1,710.1M
印尼“健康码”PeduliLindungi被改造为公民健康数据库SatuSehat(一个健康)平台。这个软件不仅限于开展疫苗接种活动,通过该应用程序跟踪儿童疫苗...
牵手棋牌可靠吗
1,046.5M
Flash.io是一款有着黑暗画面风格制作的角色扮演类动作游戏,在游戏中有着多种不同的人物角色设计,特色的玩法模式,支持在线多人进行对战,各色的武器装备使用,在...
贝贝棋牌手机签到
1,696.6M
我看阅读器是一款小巧简洁的小说阅读器。喜欢看小说的小伙伴福利来了,这款软件可以任意调整窗口大小,支持自定义透明度。很适合在办公室等地方使用哦,一键就可以隐藏和显...
哪个平台可以顶帖赚钱
69.3M
在锁IE疯狂的年代,强烈建议收藏此批处理程序,一般的反流氓软件都对锁IE束手无策的。1.完美解决桌面出现双IE删不掉的问题,针对目前流行的双IE删不掉,一般运行...
如东求职网兼职招工
1,073.7M
配配汽车用品(PP)是爱优配汽车后市场专为中国汽配用品汽车后市场用户量身定做的一款免费交流软件,致为汽车后市场经销商、服务店(汽车美容店、4S店、修理厂等)提供...
赚金币广告
61.9M
总是不明白为什么别人能够当上经理,而自己就是不能,不是技术、学问问题,是什么让你离经理的位置越来越远的了?想知道就可以下载这款思酷经理荟帮你圆经理梦吧!软件介绍...
爱上消消消能赚钱
1,305.6M
我的爱豆男友游戏是一款在抖音中火起来的装扮类型的游戏,超级可爱的画风,有各种服饰,装扮,玩家可以自由的给小人进行装扮。我的爱豆男友游戏玩法1、可以自由的选择一个...
订制手机棋牌游戏平台要多少钱
157.8M
放屁模拟器2018是一款像素风格的单机游戏,相信现实生活中很多小伙伴都不好意思明目张胆的放屁,游戏中玩家需要用屁去攻击超市里的路人,游戏玩法奇葩,攻击的路人越多...
左右棋牌下载最新版
1,527.5M
是一款非常好玩的策略类游戏,游戏采用简约的画面风格打造,玩家在游戏中需要抵抗各种怪物的入侵,并且升级自己的英雄做一个勇敢的防守者!梦想守护者简介是时候去参观你困...
火星棋牌机器人杀分
2025/11/12 18:42
吉祥棋牌德惠麻将
2025/11/13 04:45
巴适棋牌怎么进不了
2025/11/14 18:48
小游泳池多少钱投资
2025/11/19 21:12
百度提现解绑银行卡
2025/11/16 19:35
新葡京网上棋牌游戏
2025/11/15 18:07
2978棋牌游戏中心官网
2025/11/15 03:45
58怎么写兼职简历
2025/11/22 20:59
保健品自助店赚钱吗
2025/11/09 13:34
猜歌挣钱软件
2025/11/17 10:27
侠侣亲子游如何赚佣金
2025/11/23 02:24
苏州大学生兼职群
2025/11/22 09:03
游戏辅助赚钱项目
2025/11/05 15:25
开什么加工厂挣钱吗
2025/11/17 11:26
手机 挣钱兼职
2025/11/21 20:45
手机 挣钱兼职
2025/11/21 20:45更新
全民72变手游是一款奇幻西游题材的游戏,恢宏壮阔的游戏世界观,想要与主角一起西行取经吗?一路斩妖除魔,手持神装利器,释放技能还能感受碎屏效果,快来试试吧!全民7...
支持 ( 72 ) 盖楼(回复)
支持 ( 32 ) 盖楼(回复)
支持 ( 96 ) 盖楼(回复)
支持 ( 11 ) 盖楼(回复)
支持 ( 38 ) 盖楼(回复)
支持 ( 88 ) 盖楼(回复)
支持 ( 180 ) 盖楼(回复)
支持 ( 194 ) 盖楼(回复)
支持 ( 119 ) 盖楼(回复)
支持 ( 129 ) 盖楼(回复)
支持 ( 176 ) 盖楼(回复)
支持 ( 103 ) 盖楼(回复)
支持 ( 35 ) 盖楼(回复)
支持 ( 145 ) 盖楼(回复)
支持 ( 27 ) 盖楼(回复)
支持 ( 96 ) 盖楼(回复)
支持 ( 16 ) 盖楼(回复)
支持 ( 65 ) 盖楼(回复)
支持 ( 140 ) 盖楼(回复)
支持 ( 52 ) 盖楼(回复)