Coolfilter 0.5

中文说明 http://www.kylinx.net/node/113
I have published coolfilter modules 0.5 at http://drupal.org/project/coolfilter
Introduce
Installation& config
Usage
Demonstration
Download
Introduce
It offers two tags in drupal's filter system , [ coolplayer] and [ coolcode]. With [ coolplayer] tag people can easily add A/V media in their blog or podcasting or any drupal power website,which can be seem not only in IE but also in FireFox & Opera, while [ coolcode] can add syntax highlight to almost all the common use programming languages, and ship together with an on fly code download function.
[ coolplayer] supports those types of files: rm, rmvb, ra, rv, ram, smil, smi, rtsp, rpm, asf, wm, wma, wmv, wax, wvx, ogg, ape, avi, mid, midi, wav, mms, m3u, asx, mov, qt, mqv, m4v, m4a, m4b, mpeg, mpg, m1s, m1v, m1a, m75, m15, mp2, mpm, mpv, mpa, flc, fli, cel, aiff, aif, aifc, cdda, bwf, rts, 3gp, 3gpp, 3g2, 3gp2, au, snd, ulw, smf, kar, qcp, sdv, gsm, amr, caf, amc, mp4, sdp, pdf, fdf, xfdf, xdp, xfd, gif, jpg, jpeg, bmp, png, xpm, dir, dxr, dcr, cst, cct, cxt, w3d, fgd, swa, swf, spl, mp3, flv, rtmp, rbs, xml, rss, xspf, atom.
[ coolplayer] also supports video online such as: YouTube, Ifilm, VSocial, TuDou Video, atomFilms, BrightCove, YoQoo, 5 Show, 6Room, Mofile TV, GameTrailers.com, Evil Chili, Wildko, Yikers Videos & Games, Red Balcony Videos & Games, Live Video, Odeo Audio, Revver, MetaCafe, MySpace, GoEar, Break, Stupid Videos, Viddler, DailyMotion, I’m Vlog, RockYou, SevenLoad, MyVideo.de, Clipfish.de and Google Video.
This module doesn't work with any WYSIWYG editor right now.
Installation& config
If you like have a try about coolfilter, follow the steps below.

Update your drupal to 4.7.x or 5.x

Download coolfilter and upload the whole coolfilter/ directory to /path/to/drupal /modules/

Change coolplayer_config.php(5.x) coolplayer.js(4.7.x) and coolcode.php can be written by php,chmod 777 modules/coolfilter/coolplayer_config.php chmod 777 modules/coolfilter/coolcode.php

Enable coolfilter modues in ?q=admin/modules(4.7.x) or ?q=admin/build/modules(5.x).

Go to admin/settings/coolfilter and follow the instruction to finish the installtion(4.7.x only).

Change coolcode.php and coolplayer_config.php back to right permit mode

Go to ?q=admin/filters/add(4.7.x) or ?q=admin/settings/filters/add(5.x) to add a input format named "coolfilter", with coolfilter and other filter modules you wanted, now it can not work well together with "Line break converter", so donot chose "Line break converter" . If you also use "bbcode filter" ,make sure that the "Weight" of coolfilter is bigger than of bbcode. Unless you have carefully configured "HTML filter" , donot use it with "HTML filter".

Turn off "Smart paragraph and line breaks" of bbcode, if you use it.

If you have installed coolfilter before or the absolute path, where drupal installed, on the server filesystem has been changed, please go to Home > Administer > Site configuration > Coolfilter, and make configure for coolfilter. Follow the information at that page and reinstall Coolfilter. As it show in pics.


If you install coolfilter for multisite on drupal, there will be an error when you install the module, saying like Can not open /home/web/site/modules/coolfilter/coolplayer.js. Please go to Home > Administer > Site configuration > Coolfilter. Choose "Install coolfilter on drupal multisite" and reinstall your coolfiler(5.x only).

Now you can use it when you create content , donot forget change "Input format" to coolfilter.


If rpc server still doesnot work on your website,which means your web server doesnot support php mbstring & sockets extension and cannot connect the other web site directly, change
$coolplayer_rpcurl = '...';
in coolplayer_config.php to (will be slower)
$coolplayer_rpcurl ='http://kylinx.net/modules/coolfilter/rpc.php';
or
$coolplayer_rpcurl ='http://coolcode.cn/wp-content/plugins/coolplayer/rpc.php';
Usage
Syntax of coolfilter:
If you want to insert video or music into drupal node, input code as below:
If you want to see video in firefox under linux, install mplayer,vlc,realplay and their plug-in first.
Many files in one window, one file per line

[coolplayer width="640" height="480" charset="GBK" autoplay="off" loop="on" download="on"]
<a href="http://video.google.com/videoplay?docid=8807904280485126995">Display Google Video</a>
<a href="http://www.vsocial.com/video/?d=5255">Bugs bunny cartoon on family guy</a>
<a href="http://www.youtube.com/w/funny-as-hell?v=rPw-BwnW7Qs">Funny as hell</a>
<a href="http://www.bindows.net.cn/documentation/download/Bindows Manual.pdf">Bindows Chinese hand book</a>
/url/path/in/your/own/server/v.wmv
http://url/a.mp3
http://url/rm/video.rm
[/coolplayer]

One file in one window

[coolplayer]
http://url/v2.rm
[/coolplayer]

All the parameters above have default value at coolplayer_config.php, you can change it. And they are all optional.The attributes can use within the coolplayer tag:
width : the width of the player window.
height : the height of the player window.
charset : the charset of the url. default is GBK.
autoplay : enable or disable autoplay.
loop : enable or disable loop.
download : show or donot show the download link.
Syntax of coolcode:
All the options below are optional.

[coolcode lang="language" linenum="off" download="filename.extensionname"]
programming code here
[/coolcode]

linenum: display line number or not
lang=[cpp| css| diff| dtd| html| java| javascript| mysql| perl| php| python| ruby| sql|xml]
But you can define your own languages' highlight by adding it's extension name to coolcode.php

$acceptable_lang = array('php', 'cpp', 'css', 'diff', 'dtd',
'javascript', 'html', 'mysql', 'perl', 'python', 'ruby', 'sql', 'xml', 'java');

then make your own hl file according to http://pear.php.net/package/Text_Highlighter and put it to modules/coolfilter/PEAR/Text/Highlighter/ on your sever.
Demonstration
Try out a demonstration: http://www.kylinx.net/node/112
Screenshot.png

Download
Download and feature description: http://drupal.org/node/61357
Since all of Drupal CVS is licensed under the GPL, so if you checkout coolfilter from cvs.drupal.org, please put swf and PEAR files in
coolfilter extra package for 4.7.x or
coolfilter extra package for 5.x
to your installed directory by hand, or you can get pear of php from
http://pear.php.net/package/XML_Parser and http://pear.php.net/package/Text_Highlighter ,
then install them to /path/drupal/modules/coolfilter/pear/ (4.7.x) or /path/drupal/modules/coolfilter/PEAR/ (5.x) and flashmediaplayer at http://www.jeroenwijering.com/?item=Flash_MP3_Player and http://www.jeroenwijering.com/?item=Flash_Media_Player by yourself.
Of course, you can simply download stable tar package for 4.7.x at http://www.kylinx.net/files/coolfilter.tar.gz
,or package for 5.x at http://kylinx.net/cgi-bin/cvsweb.cgi/coolfilter/coolfilter.tar.gz?tarball=1
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值