`
atomoptics
  • 浏览: 92395 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

更新drupal模块coolfilter-0.5

阅读更多
English Readme .
Update(2007-2-15):有这个标记的表示表示不再有效,请注意标记后的新的说明。
经过一番修改在这里发布coolfilter这个drupal插件。使用drupal才一两个星期,由于还不太熟悉drupal的API,我的这个第一个插件手工安装可能比较麻烦,另外仓促间,文档有些乱。下载地址coolfilter(for drupal4.7)或coolfilter(for drupal5.1)
CoolFilter移植了andot的coolcode和coolplayer两个wordpress插件,使用的是2月14日取得的最新版本,安装完成之后使用方法和功能完全一样。2月中旬drupal4.7和4.5cvs的安装方法如下:将coolfilter-x.x.tar.gz解压到drupal的modules目录,如果需要,将所有文件的设置成正确的权限将downcode.php复制到drupal的根目录备份includes/common.inc文件确定"includes/common.inc,modules/coolfilter/coolplayer.js, ,modules/coolfilter/coolplayer_config.php, modules/coolfilter/coolcode.php"这几个文件可写,属性777
激活coolfilter模块即可,到setting/coolfilter填写服务器端文件系统中drupal的绝对路径,(会有一个默认值,一般是正确的,不用改),选择服务器的类型,钩上First/re install,点保存设置,就会开始安装没看到什么错误信息安装就完成了(这时First/re install的钩会被自动去掉,除非你知道自己在干什么,否则不要再点了)进入admin/filters输入格式设置,选择添加输入格式,填入名称,选好给予权限的角色,然后在过滤器列表中选择coolfilter。你还可以选择bbcode和其他的过滤器,但是最好不要选换行器,因为那样,排版会比较难看,可以手工输入<p>来替代。如果你选了HTML过滤器,请确保Filtered HTML不过滤
< coolcode>,和< coolplayer>
标签如果你原来装过coolfilter的久版本,或者drupal在服务器上的绝对地址变了,到Home > Administer > Site configuration > Input formats选择 reinstall ,按照提示操作。如图所式:


禁用bbcode的自动换行功能,确保bbcode过滤器的使用顺序值小于coolfilter。最好不要选择html过滤器

现在你就可以使用了,如果仍然不能工作就手工把coolplayer_config.php中的
$coolplayer_rpcurl = '...';改成
$coolplayer_rpcurl = 'http://kylinx.net/modules/coolfilter/rpc.php';
或者$coolplayer_rpcurl = 'http://coolcode.cn/wp-content/plugins/coolplayer/rpc.php';但是,速度会慢一些,也不能使用相对路径引用你自己服务器上的媒体文件。
另外如果你也可以使用手工安装,见README文件,如果你使用drupal4.6可能0.3的版本会不兼容,请下载coolfilter-0.1.tar.gz,这个版本的coolcode缺少下载功能。
下载:coolfilter.tar.gz
效果见 http://www.kylinx.net/?q=node/112
使用方法:
&lt;coolplayer width="640" height="480" charset="GBK" autoplay="false" loop="true"&gt;
&lt;a href="http://video.google.com/videoplay?docid=8807904280485126995"&gt;Display Google Video&lt;/a&gt;
&lt;a href="http://www.vsocial.com/video/?d=5255"&gt;Bugs bunny cartoon on family guy&lt;/a&gt;
&lt;a href="http://www.youtube.com/w/funny-as-hell?v=rPw-BwnW7Qs"&gt;Funny as hell&lt;/a&gt;
&lt;a href="http://www.bindows.net.cn/documentation/download/Bindows Manual.pdf"&gt;Bindows Chinese hand book&lt;/a&gt;
/url/path/in/your/own/server/v.wmv
http://url/a.mp3
http://url/rm/video.rm
&lt;/coolplayer&gt;

上面 width,height,charset, autoplay 和 loop 五个参数都是可选的。默认值 width = 480,height = 380,charset = &ldquo;GBK&ldquo;,autoplay=&rdquo;false&rdquo;,loop=&rdquo;false&rdquo;。你可以根据情况调整插件中这些默认值,也可以在使用时明确指定这些选项。

其中, width、height 为宽和高的像素值,不要加单位。charset为url的编码。autoplay 和 loop 取值为&ldquo;on&rdquo;、&rdquo;yes&rdquo;、&rdquo;true&rdquo;、&rdquo;1&Prime; 时,分别表示自动播放和循环播放,否则为禁止自动播放或循环。

另外,你可以同时指定多个媒体文件,而且每个媒体文件可以是不同的类型,多个媒体文件之间用换行符分割。
&lt;coolcode lang="language" linenum="off" download="filename.extensionname"&gt;
programming code here
&lt;/coolcode&gt;

所有的参数都是可选的,如果要加亮具体的语言,可以用 lang 属性来指定程序设计语言,包括cpp,css,diff,dtd,html,java,javascript,mysql,perl,php,python,ruby,sql,xml。如果不需要行号,可以使 linenum 属性为off。如果希望可以直接以文件下载代码,可以使用 download 属性来指定&ldquo;文件名.扩展名&rdquo;
The Readme below is out of date. Please see http://www.kylinx.net/node/118
Download Code: README.txtDrupal coolfilter.module README.txt
==============================================================================
&nbsp;
The Drupal coolfilter.module adds a CoolFilter filter to Drupal. This allows you
to use HTML-like tags as an alternative to HTML itself for adding almost any type of media
to your posts. CoolFilter is easier to use than HTML and helps to prevent
malicious users from disrupting your site's formatting.
&nbsp;
The media type include: Google video, Youtobe Video, vSocial Video, ASF, ASX, WM, WMA, WMV, WAX, WVX, OGG, APE, AVI, MID, MIDI, WAV, SWF, SPL, MP3, FLV, RM, RMVB, RA, RV, RAM, SMIL, PDF, FDF, XFDF, XDP, XFD, MOV, QT, MQV, MPEG, MPG, M1S, M1V, M1A, M75, M15, MP2, MPM, MPV, MPA, FLC, FLI, CEL, RTSP, RTS, 3GP, 3GPP, 3G2, 3GP2, SDV, AMC, MP4, SDP, GIF, JPG, BMP, PNG, XPM.
&nbsp;
The insert media not only support IE or windows browsers, but also support Firefox, Opera those Linux/Unix browsers.
&nbsp;
you can insert several mediae at one time and switch them to play with out reloading the page. it give you a download url following the media window. you can enter a media url to play when you double click the download bar.
&nbsp;
This plugin can pass XHTML validation!!
&nbsp;
and CoolFilter can also add syntax highlighting and line number to your code, base on PHP:PEAR:Text_Highlighter.
&nbsp;
See the help screen of the module (or the code) for information on which
tags and variants are supported. This implementation is not necessarily the
same as the original CoolFilter implementaion.
&nbsp;
Note that this filter also recognizes and converts URLs and email addresses
to links automatically.
&nbsp;
Installation
------------------------------------------------------------------------------
&nbsp;
&nbsp; - Unpack coolfilter.tar.gz to modules/
&nbsp; - Copy downcode.php to the root drupal path
&nbsp; - Backup includes/common.inc first
&nbsp; - Make sure that files: &quot;includes/common.inc, modules/coolfilter/coolplayer.js, modules/coolfilter/coolcode.php&quot; is writeable by php, otherwise chmod 777 those files.
&nbsp; - Enable the module as usual from Drupal's admin pages.
&nbsp; - Go to setting/coolfilter pages, fill some variable, and check &quot;First / Re Install&quot;.
&nbsp; - Save setting, the module will be install automatically, then you can use it.
&nbsp; - Do not install it twice.
&nbsp; - You can also install it by hand.
--copy modules/coolfilter/common.inc-cvs2006_2_20-patch2006_2_24.patch to includes/.
--cd includes/ and patch -p0 &lt; common.inc-cvs2006_2_20-patch2006_2_24.patch.
--change coolplayer_rpc.use_service('modules/coolfilter/rpc.php'); in modules/coolfilter/coolplayer.js to fullpath, which behide &lt;a href=&quot;http://www.yoursite.com&quot;&gt;http://www.yoursite.com&lt;/a&gt;. For instance if your drupal's $base_url is &lt;a href=&quot;http://www.yoursite.com/drupalsite&quot;&gt;http://www.yoursite.com/drupalsite&lt;/a&gt;, then you can change 'modules/coolfilter/rpc.php' with '/drupalsite/modules/coolfilter/rpc.php'.
--change $pear_dir = &quot;/home/www/modules/coolfilter/pear&quot;; in modules/coolfilter/coolcode.php to absolute path. For instance if your drupal is install on /var/www/htdocs/drupal, then you can change &quot;/home/www/modules/coolfilter/pear&quot; with &quot;/var/www/htdocs/drupal&quot;.
&nbsp;
Configuration
------------------------------------------------------------------------------
&nbsp;
&nbsp; - You can use coolfilter filter by enabling it in an input format
&nbsp; - You should not enable Automatically lines break,HTML filter, or enable many tags such as &quot;&lt;span&gt;,&lt;object&gt;...&quot;in it.
&nbsp;
Credits / Contact
------------------------------------------------------------------------------
&nbsp;
This module is ported from two wordpress-plugins by Liu Kan, who can be reached at k.kylin[at]gmail.com or &lt;a href=&quot;http://kylinx.net&quot;&gt;http://kylinx.net&lt;/a&gt;
The original author of the two wordpress-plugins is Ma Bingyao, who can be reached at &lt;a href=&quot;http://wp-plugins.net/author/andot/&quot;&gt;http://wp-plugins.net/author/andot/&lt;/a&gt;
&nbsp;
LICENSE
------------------------------------------------------------------------------
coolplayer is LICENSEd under CC, while coolcode is under GPL.

PS:武汉今天下了多年未遇的一场雪,瑞雪兆非年
1 2 Loading...
分享到:
评论
1 楼 renopeng 2008-04-01  
很专业的工作分享哦! 请问coolfilter主要是用于交互论坛BBS的系统嘛?

相关推荐

Global site tag (gtag.js) - Google Analytics