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

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

大小:626.6M 语言: 中文

类型:教育学习 系统:macOS

备案号:备案号:京8Z-200656819-76S
简介 相关 评论(8)
热门游戏 竞技游戏 枪战游戏 枪械游戏大全

WordPress插件安装方法

[WordPress插件怎样安装WordPress插件安装方法]口袋喵喵送vip13会员版-口袋喵喵送10000个扭蛋券1.2.2手游版

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

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

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

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

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

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上播放在线视频要怎么设置呢?有了这款Smartideo视频插件就简单多了,它可以帮助你快速在wordpress添加在线视频,支持手机、平板的HTML5播放,它支持优酷、搜狐视频、土豆、56、腾讯视频、新浪视频、酷6、华数、乐视等热门网站的视频。

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

bet操作视频 pc蛋蛋秒回群 请输入下注金额 贝博网站合法吗 平博网球
展开全部
应用信息
用户评论 跟帖评论

热门评论

最新评论

2025/11/27 06:56
东方小书童app是专为幼儿小朋友们所提供的一个简单的英文语言学习软件,软件中的所有内容都是以孩子们比较喜欢的动画风格所打造,能够更好的引导孩子们进行学习,还有专...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 187 ) 盖楼(回复)

2025/12/16 06:26
零街baby(母婴社区)是一款便捷实用的手机电商平台,用户通过本软件能够获得各种最新的母婴商品信息,通过手机开一个小店,打造自己的母婴商品门店,有需要的可以下载...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 55 ) 盖楼(回复)

2025/12/02 15:10
澄城同城是一款非常实用的同城生活服务软件。涵盖了本地丰富得生活资源,每天都有一些新闻推送,还有吃喝玩乐购等功能,大大的提高了你的日常生活质量。还有同城跑腿、信息...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 100 ) 盖楼(回复)

2025/12/14 19:06
商易财务软件完全适合最新的财务会计制度。高度集成凭证管理、账簿报表、期末处理、工资管理、固定资产、出纳管理等功能,有需要的赶紧来下载使用吧。商易财务软件简介高度...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 135 ) 盖楼(回复)

2025/12/04 19:02
英皇兰婷app是一款专门卖面膜的购物商城,自创的品牌,不同的面膜有不同的效果,可以直接的免费领取到体验装,觉得不错后再下单。平台介绍英皇兰婷是苏州英皇兰婷网络科...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 122 ) 盖楼(回复)

2025/11/24 23:33
这款软件是一款功能非常强大的微商神器,包含了众多不同的微商功能,可以直接用来管理软件,快速的进行群发操作,并且还有直接加群等!微商新奇迹介绍微商新奇迹app是一...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 109 ) 盖楼(回复)

2025/12/03 16:42
好玩的休闲找茬配对游戏,游戏之中只需要把相同的道具进行合适的匹配即可,通过快速的搭配轻松获得分数达到消除的目的,游戏玩法还是非常简单的,不过十分需要考验你的手速...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 143 ) 盖楼(回复)

2025/12/10 00:38
蒸菜菜谱大全app是一款生活实用做蒸菜菜谱大全软件,最新最好吃的菜谱做法大全,每道菜都有详细的图解,还有视频教程,让你一看就会,喜欢做菜的朋友赶紧下载吧内容提要...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 69 ) 盖楼(回复)

2025/12/12 03:01
法律裁判文书软件拥有全面的法律法规与庞大的裁判文书,提供免费的法律法规、裁判文书的高级检索,以及司法计算工具,诉讼费用计算案件受理、申请费用一目了然。法律裁判文...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 100 ) 盖楼(回复)

2025/12/02 21:36
蓝光云手机免费版极为好用的手机系统优化软件,能够大幅提升用户的手机性能,解决玩游戏时电池电量低、卡顿、内存不足等一系列问题,一键安装快速为你的手机进行检测,秒杀...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 14 ) 盖楼(回复)

2025/11/30 18:13
智能停车场Pro2018(SmartCarParkingPro2018)是一款真是好玩的模拟停车游戏,游戏将在不同的停车场内完成任务,逼真的驾驶场景,真实的停车...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 12 ) 盖楼(回复)

2025/12/01 06:42
露水动态壁纸,一款超高清的电脑桌面壁纸软件哦!下载下来后,轻轻一按,就可以选择成为高清的露水桌面壁纸哦!十分的好用呢!快来东坡下载使用吧!露水动态壁纸简介一款出...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 65 ) 盖楼(回复)

2025/11/26 11:59
视频剪辑Pic是一款非常好用的剪辑软件,不管是视频剪辑,还是图片剪辑,这款软件都能轻松办到,它能还原用户心中的美好世界,更有海量剪辑模版可以参考,软件操作起来也...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 17 ) 盖楼(回复)

2025/12/11 04:48
喵天气app是一款非常干净没有任何广告的天气应用软件,软件中所有的天气数据都来源于中央气象台,保证用户看到最准的天气信息,用户可上滑出现详细信息,左右切换城市进...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 106 ) 盖楼(回复)

2025/12/13 01:49
音悦达人是一款音乐节奏游戏,一款真正的以跳舞为主题的音乐休闲手游,梦幻般的舞台,还有各种二次元形象的小姐姐,每个人物都刻画的相当逼真,当音乐响起你就在舞台上尽情...

/www/wwwroot/shequn/wp-admin/css/colors/red/template4.php on line 145
">支持( 52 ) 盖楼(回复)