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

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

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

类型:娱乐影音 系统:macOS

备案号:备案号:苏2W-201997951-21C
简介 相关 评论(7)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

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

WordPress视频播放插件(Smartideo)安装方法

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

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

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

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

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插件代码预览

<?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插件安装方法]

展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/11/01 03:55
至尊星辰变是一款大型玄幻冒险修真rpg手游。游戏画风很棒,完美还原了真实小说剧情。熟悉的角色和内容,玩家将拿着神器进行冒险。体验小说主角的修真旅途,细腻的操作,...

支持( 116 ) 盖楼(回复)

2025/10/31 15:53
怡玩app是一个玩游戏交朋友的平台,帮助你找到附近的好朋友,一起玩游戏,一起开黑,拥有经典的狼人杀游戏,还有趣味双人小游戏,非常适合一起玩!怡玩app亮点1、趣...

支持( 53 ) 盖楼(回复)

2025/10/23 10:49
专为减肥健康锻炼所打造的小助手软件,在线打卡健身,记录健身时间,可以跟着系统推荐的健身步骤开始锻炼,体重体质指数计算器记录你的体重变化,健康减肥饮食计划可以帮助...

支持( 59 ) 盖楼(回复)

2025/10/23 14:22
小智找房,真房源找二手房、找新房、找店铺。数据为一体的真实房源平台,选了相关性强、专业程度高和服务质量优的经纪人,以确保客户得到优质的服务,无论是买房还是租房都...

支持( 122 ) 盖楼(回复)

2025/10/30 23:12
SmartVizor可变数据印刷和批量数据打印软件是为企业和事业单位实现可变数据印刷和批量数据打印解决方案。批量打印和可变数据的出版物对任何企业和事业都非常重要...

支持( 77 ) 盖楼(回复)

2025/10/26 06:56
工资掌上记app是一款非常好用的计算工资的软件。在这里,你可以对你本月的工资进行非常高效的核算,可以把任何细节的内容都算进去,不会漏掉一丝一毫,非常的精准!软件...

支持( 38 ) 盖楼(回复)

2025/11/03 13:35
完美推出的广告对战平台已经正式来了,如果你喜欢玩csgo或者是dota2的话那么这个平台不要错过哦!完美对战平台可以完美的屏蔽作弊掉线!感兴趣的可以使用!完美对...

支持( 187 ) 盖楼(回复)

2025/11/05 18:44
邻居模拟游戏(PlayNeighbors)是一款经营模拟的手游,从一个小房间开始,装饰漂亮的房间,在这个这区进探索,购物,交易和工作,和邻居进行互动,玩法非常的...

支持( 176 ) 盖楼(回复)

2025/10/21 15:37
饥荒联机版CY的黑店MOD是一款可以让你快速的在游戏中建造一个黑点的存档,让你可以想买什么久买什么,看起来也是非常的炫酷,需要的下载吧。饥荒联机版CY的黑店MO...

支持( 149 ) 盖楼(回复)

2025/10/25 01:00
可以看日漫和韩漫的热门女生漫画APP,如果你喜欢男主漫画的话就可以下载这个APP,需要注意的是,软件并不是免费看全部漫画的,部分章节免费,后续都是付费观看的,注...

支持( 97 ) 盖楼(回复)

2025/10/22 13:59
聊天猫这款应用可以为用户修改输入的英语句子中出现的错误,对于学英语并且想和英语使用者交流来说是个不错的应用,还可以增强自己的记忆,是您学习英语的好帮手。感兴趣的...

支持( 66 ) 盖楼(回复)

2025/11/01 21:27
万能播放器是一款集视频、音频、图片等多媒体播放功能于一身的应用程序。它支持多种主流的视频和音频格式,让用户能够方便地观看和聆听各种类型的媒体内容。万能播放器亮点...

支持( 50 ) 盖楼(回复)

2025/11/04 06:45
小学作业答案软件最新学期版本,是提供小学全部教材和作业的答案软件,用户可以通过扫描,甚至是直接选择对应的出版社和年级,就可以全部解锁所有小学作业的题目和答案,使...

支持( 117 ) 盖楼(回复)

2025/10/25 12:07
护苗开学第一课观后感2021针对各类安全知识更快了解不同有网络安全以及交通安全方面的信息,而且还有校园暴力等教育知识。护苗开学第一课观后感2021大全护苗开学第...

支持( 98 ) 盖楼(回复)

2025/10/22 12:04
喜欢更换手机壁纸的朋友,小编今天给你们推荐一款很不错的安卓手机动态壁纸,让你们的手机无时不刻的在变幻!心动了吗?那还不赶快下载安卓动态壁纸看看效果如何!安卓动态...

支持( 111 ) 盖楼(回复)