中文说明 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
分享到:
相关推荐
毕设和企业适用springboot企业健康管理平台类及活动管理平台源码+论文+视频.zip
本项目为基于layui框架开发的省市复选框组件设计源码,集成了115个文件,涵盖75个GIF动画、23个JavaScript脚本、6个CSS样式表、2个PNG图片、1个许可证文件、1个Markdown文档以及多种字体文件。该组件旨在提供一套便捷的省市多选解决方案,适用于各类需要地区选择的场景。
labview程序代码参考学习使用,希望对你有所帮助。
毕设和企业适用springboot社区服务类及互联网金融平台源码+论文+视频
毕设和企业适用springboot企业协作平台类及网络营销平台源码+论文+视频
毕设和企业适用springboot商城类及风险控制平台源码+论文+视频
立方体、球体、金字塔检测26-YOLO(v5至v11)、CreateML、Paligemma、TFRecord、VOC数据集合集.rarRobodog-V4 2023-06-21 11:41 PM ============================= *与您的团队在计算机视觉项目上合作 *收集和组织图像 *了解和搜索非结构化图像数据 *注释,创建数据集 *导出,训练和部署计算机视觉模型 *使用主动学习随着时间的推移改善数据集 对于最先进的计算机视觉培训笔记本,您可以与此数据集一起使用 该数据集包括255张图像。 立方体以创建格式注释。 将以下预处理应用于每个图像: *像素数据的自动取向(带有Exif-Arientation剥离) *调整大小为640x640(拉伸) 应用以下扩展来创建每个源图像的3个版本: * 0到4.75像素之间的随机高斯模糊 *将盐和胡椒噪声应用于5%的像素
毕设和企业适用springboot社交互动平台类及数据智能化平台源码+论文+视频
labview程序代码参考学习使用,希望对你有所帮助。
毕设和企业适用springboot人工智能类及企业数字资产管理平台源码+论文+视频
毕设和企业适用springboot社交互动平台类及跨境电商管理平台源码+论文+视频
毕设和企业适用springboot实验室类及文化旅游信息平台源码+论文+视频.zip
毕设和企业适用springboot汽车管理类及消费品管理平台源码+论文+视频
毕设和企业适用springboot实验室类及音频处理平台源码+论文+视频.zip
毕设和企业适用springboot企业数据管理平台类及直播流媒体平台源码+论文+视频
毕设和企业适用springboot企业云存储平台类及无人驾驶系统源码+论文+视频
labview程序代码参考学习使用,希望对你有所帮助。
labview程序代码参考学习使用,希望对你有所帮助。
毕设和企业适用springboot企业知识管理平台类及供应链优化系统源码+论文+视频
毕设和企业适用springboot汽车管理类及网络营销平台源码+论文+视频