第一个WordPress插件 Fallen Media Filter
发现ActiveX控件在网页中嵌入方式的统一形式后,就有写一个统一的多媒体插件的想法,晚上参考Flashifier的解析格式,写了个能在Blog里插入大部分常见格式的电影的插件,自己装上试了一下,本来只是自己写着玩,方便我平时在Blog里插入电影,后来觉得效果不错,就写的规范一点,发布出来。
这个插件只是单纯地标识解析,没有任何数据库操作,不修改任何文件,要卸载,只要解除它就行了,请放心用啦!
已经放到http://www.wp-plugins.net,点这里访问
名字 Name:
现行版本 Version:
修正了不能在firefox下禁止自动播放的bug,只是NO AutoPlay的改动,谢谢binaryechoes!
fix the no-autoplay in firefox,Thank to binaryechoes!
Download the V0.14 NO AutoPlay Version
用途描述 Description:
-
[ACT]http://where/is/your/movie/***.***(file URL),width(NUM),heightNUM)[/ACT]
-
Example
-
[ACT]http://eiart.net/blog/wp-content/media/bassbang.wmv,320,240[/ACT]
-
支持格式 Support:
浏览者能正常观看的条件 Requirement for viewers:
因为是插入ActiveX 控件,所以需要观看者本身有能播放这些东西的播放器,这个插件所做的只是把媒体插入到网页里
Because this is an insert ActiveX, it requires viewers already have a player .
安装 Install:
-
[ACT]http://where/is/your/movie/***.***(file URL),width(NUM),heightNUM)[/ACT]
-
Example,you can copy these code to your post, and have a try! 你可以把下面的代码拷贝到你的文章中,发表一下就可以看到效果了!
-
[ACT]http://eiart.net/blog/wp-content/media/bassbang.wmv,320,240[/ACT]
-
接下来是可选的 Option:
-
[ACT]http://where/is/the/flvplayer/flvplayer.swf?file=http://where/is/your/flvmov/***.flv,width,height[/ACT]
-
其中,如果要显示播放器控制条(有播放,暂停,音量)的话,width要比原电影宽大10,height要比原电影高大50,如果不想显示,按原大小就可以了!
Example
下面是一个直接可以试的例子,直接引到我的站上,原电影尺寸:320*240 我的flvplayer.swf就是和flv文件放在一起的,调用起来就方便。
-
[ACT]http://eiart.net/blog/wp-content/media/flvplayer.swf?file=Darkly.flv,330,290[/ACT]
-
把这段拷到你的文章,发布一下,就可以看了!
If you want to add the "Media" to quicktag,do the following:
1,进入“你的wordpress安装目录/wp-admin/”,找到quicktags.js,用你喜欢的文本编辑器打开。
更新:2.x版的WP的quicktag.js在:wordpress\wp-includes\js
Enter the "wordpress/wp-admin/" find "quicktags.js".
Updata: new "quicktag.js" at "wordpress\wp-includes\js"
2,在末尾或中间添加以下代码,并根据你的情况修改:你惯用的放媒体的http://where/is/your/media的路径,400,300可以改成你惯用的width,height的具体值。以后只要在文章中写出电影文件名(包括后缀.mov .wmv....),定义起来,按“Media”就可以了。
Add these codes in the end of "quicktags.js", you can modify the url"http://where/is/your/media" , the width"400" and the height"300".
-
edButtons[edButtons.length] =
-
new edButton('ed_media',
-
'media',
-
'[ACT]http://where/is/your/media/',
-
',400,300[/ACT]'
-
);
If you want to add the "FLV" to quicktag,do the following:
1,进入“你的WordPress安装目录/wp-admin/”,找到quicktags.js,用你喜欢的文本编辑器打开。
更新:2.x版的WP的quicktag.js在:wordpress\wp-includes\js
Enter the "wordpress//wp-admin/" find "quicktags.js".
Updata: new "quicktag.js" at "wordpress\wp-includes\js"
2,在末尾或中间添加以下代码,并根据你的情况修改:你flv播放器的路径http://where/is/the/flvplayer/,400,300可以改成你惯用的width,height的具体值。如果你把播放器和flv文件放在同一个目录的话,以后只要在文章中写出flv电影文件名(包括后缀.flv),定义起来,按“FLV”就可以了。如果不同目录,就要输入flv文件的绝对路径了。
Add these codes in the end of "quicktags.js", you can modify the url"http://where/is/your/media" , the width"400" and the height"300".
-
edButtons[edButtons.length] =
-
new edButton('ed_flv',
-
'flv',
-
'[ACT]http://where/is/the/flvplayer/flvplayer.swf?file=',
-
',400,300[/ACT]'
-
);
版权 License:
下载 Download:
疑问 Question:
Technically, this is not a question. But yes, my english sucks, I'm not a native english speaker. I'm trying to do my best, though.
历史 History:
- 可以播放rm文件 .rm is ok now!
- 所有视频自动播放 AUTOSTART = "true"
- 修正了无法通过XHTML检验的问题,由于我粗心,给大家照成的麻烦很抱歉!谢谢lemonhall!请从新下载,先在后台解除原来V0.11,然后覆盖掉原来的文件,再激活即可!给大家照成的麻烦实在抱歉!
- 以前说还没支持mp3,其实本来就可以放mp3,我一时傻掉了,非用flash来放,今天才想起来,下面是一个直接可以试的例子,直接引到我的站上的mp3。
-
[ACT]http://eiart.net/blog/wp-content/media/girl.mp3,280,40[/ACT]
-
把这段拷到你的文章,发布一下,缓冲一下,自动会开始放。

December 16th, 2006 at 10:02 pm
Hello!
Thank you for answer. I checked if I misstyped something, but the movie is right there: http://babarum.hu/movie/HappyNewYear.wmv
In the post I wrote:
[ACT]http://babarum.hu/movie/HappyNewYear.wmv,400,350[/ACT]
Unfortunatelly it doesnt work.
Did I missed something?
Thanks
Babarum
December 19th, 2006 at 7:21 pm
Babarum:
Your URL is wrong, you can try:
“http://babarum.hu/movie/HappyNewYear.wmv,400,350″
December 20th, 2006 at 1:46 pm
I checked again if I misstyped something, but the movie is right there: “http://babarum.hu/movie/HappyNewYear.wmv” (”http://” disappeared in the comment)
In the post I wrote:
“[ACT]http://babarum.hu/movie/HappyNewYear.wmv,400,350[/ACT]”
(”http://” disappear here)
I tried with another movie (avi) too, without succes.
What is the problem?
Thanks
Babarum
December 20th, 2006 at 8:33 pm
Babarum:
sorry, I just find that ”http://” disappeared in the comment. If you url is right, I ready don’t know what’s wrong. Many user can make it work , may be some other plugins couse this.
March 10th, 2007 at 3:31 pm
takeit1z:
链接加好了,看来你也是厦大的
March 12th, 2007 at 4:04 pm
你的插件很好用 先谢谢你一下 但请问一下 可不可以将视频的长宽自适应啊 即自动调用视频的长宽值 而不用每次都要自己手动输入长宽值?
March 12th, 2007 at 11:22 pm
davinci:
谢谢你的建议,你说的自适应是指自适应BLOG的宽度吗?或者是自适应视频原始宽度?BLOG的宽度是可以取得的,但我现在还不知道怎样用脚本取得视频的原始尺寸(也可能真的没办法取得),所以也没办法按比例放缩视频。但如果你总是用同一规格的视频,如400*300,那在按钮按出来的代码里就是默认400*300的,也就是说你把它改成你最常用的比例就不用每次输了。
May 6th, 2007 at 10:55 am
不错哦
May 21st, 2007 at 9:35 pm
No auto play 在FF下还是会自动播放
这个该怎么办啊
~??
May 25th, 2007 at 6:08 pm
hanyee :
你好,不好意思,这两天空间商在换IP,不能及时回复。
这个问题已经在V0.14解决了呀,我测试过,也没有人在反映相关问题。 不知道和你的FF有没有关系?
July 29th, 2007 at 10:24 pm
你好,你说的在wp-admin 目录下的 quicktag.js 貌似2.x后没有了? 没有找到,方便给个详细说明吗?谢谢
July 30th, 2007 at 8:05 am
bssn:
新版的WP的quicktag.js在:wordpress\wp-includes\js,抱歉,忘了及时更新。
August 7th, 2007 at 12:18 pm
请问如何让FLV文件重复播放?
August 7th, 2007 at 10:53 pm
RobinQu:
抱歉,这里提供的player没有,没有留这个接口,但现在的flv player很多,肯定有能实现重复播放的,你可以用那个swf替换掉本来的。
August 8th, 2007 at 6:58 pm
我用的是yo2的,怎么使用你的插件啊?联系我的邮箱cheng_nuan@qq.com谢谢啦!!!
August 9th, 2007 at 6:05 pm
暖:
这个yo2在我这里很慢,一直“504 Gateway Time-out”。连注册一下都不容易,不知道它有没有开发插件系统,我没有用过这个社区,你最好问问那里的其他用户,如果有开发插件系统,你完全可以按我文中讲的安装,如果没有,恐怕也没办法。
October 19th, 2007 at 5:23 pm
[...] Visit [...]
October 28th, 2007 at 3:57 pm
thank you!-
November 11th, 2007 at 1:18 am
Very nice work, admin
Good luck!
June 12th, 2009 at 6:59 am
Great, thanks!