WebDAV on Apache2

Posted on 四月 23rd, 2009 in Linux | No Comments »

本来应该很简单,参考debian administration的操作,结果作下来后,发现没有些权限写。最后才发现是当前目录的父目录有一个word press生成的.htaccess文件,正是这个文件导致了问题的产生。

解决办法:拷贝父目录下的.htaccess文件,然后注释掉里面有影响的句子。

bcSpamBlock插件:防止垃圾留言

Posted on 十一月 3rd, 2007 in Blog | 2 Comments »

垃圾留言大多是由程序自动产生的,而bcSpamBlock插件就能有效的阻挡机器的留言,而使用浏览器的留言则感觉不到任何区别,若是禁止了javascript,则需要手工拷贝一个字符串。具体的原理请参考官方的说明。

而目前的1.1版本同时也阻挡了trackback和pingback,因此我进行了一些修改,使其不阻挡trackback和pingback。那如何防止pingback/trackback的垃圾呢?这就可以使用另外一个插件来进行处理:Simple Trackack Validation,同时要注意,这个插件默认只支持对trackback进行处理,我也作了简单地修改,使其能处理pingback。

效果:未使用bcSpamBlock插件之前,我每天将近有3000个spam留言,而使用了这个插件之后,到现在为止,一个漏网的都没有!

bcSpamBlock 1.1 modify by wlx
Simple Trackback Validation 2.1 wlx modified version

启用Quotmarks Replacer插件

Posted on 十一月 3rd, 2007 in Blog | No Comments »

我原来一直都是使用Code Markup来解决全角/半角的问题,今天无意中发现这个插件Quotmarks Replacer,感觉不错。

解决 WordPress 的全角引号问题,将全角的单引、和双引号和省略号替换成半角的格式,使后台输入的引号、省略号格式与前台读者浏览的引号格式保持一致。

不过,我也是一直不清楚为何WP要作这种显示的转换。

wordpress mu 1.3中的编码问题

Posted on 十一月 3rd, 2007 in Blog | No Comments »

发现wordpress mu 升级到1.3版本了,对应到wordpress 2.3系列。其中,显著的功能就是默认的TAG支持了。但是升级后发现中文乱码,这时因为我的mysql数据库目前默认的编码还是latin1,而wordpress mu目前默认的编码是采用utf8了,因此需要进行修改。

有两种办法处理:
1、修改wordpress mu的代码
找到wp-inlcudes/wp-db.php文件,注释掉这两行:

// if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )
// $this->query("SET NAMES '$this->charset'");

2、修改数据库编码,使其和你的wordpress编码相对应
比如,可以修改数据库的编码为utf8。
首先导出:

mysqldump --default-character-set=latin1 -uroot yourdb > yourdb.sql

然后修改此文件,替换所有的latin1为utf8,并在文件头添加:

SET NAMES utf8;
SET CHARACTER_SET_CLIENT=utf8;
SET CHARACTER_SET_RESULTS=utf8;

然后保存为yourdb-utf.sql,在进行数据库的导入工作:

mysql -uroot
mysql>drop database yourdb
mysql >create database yourdb
mysql -uroot yourdb<yourdb-utf.sql

此处的转换方法参考:转换论坛:webwiz 7.9 -> phpBB3

我为了以后升级的方便,选择了第二种方法进行处理。

code markup插件的使用

Posted on 四月 2nd, 2007 in Linux | 1 Comment »

wordpress里默认是无法显示html部分内容的内容,需要使用第三方插件才可以显示,我这使用的是code markup插件。
若需要严格的HTML内容显示,应该这样使用:
<code allow="none">
具体的使用方法如下:
* <code> or <code allow="default"> allows common HTML tags to be rendered, and displays everything else exactly as written.
* <code allow="none"> displays content exactly as written — no markup allowed.
* <code allow="all"> renders content as HTML — all markup is allowed.
* <code allow="em strong a"> allows only <em>, <strong> and <a> tags to be rendered as HTML — everything else is displayed exactly as written. You can put whatever tags you like in the allow attribute, separated by spaces. As a special case, you can include the comment tag — this means that HTML comments <!-- like this --> will be “rendered” as normal HTML comments (i.e. not displayed).
* <code lang="html"> or
<code lang="xhtml"> displays content exactly as written, the same as <code allow="none">.

安装wordpress 1.0 mu到UBUNTU SERVER

Posted on 十二月 27th, 2006 in Linux | No Comments »

前面我提到如何安装wordpress mu 1.0,这次在ubuntu edgy server版上安装就轻车熟路了。
首先要确保ubuntu server上安装了apache2, php, mysql。
然后要激活rewrite mod。

sudo a2enmod

创建westgis.ac.cn的vhost文件:

<VirtualHost *>
ServerAdmin wlx@mygis.org
ServerName westgis.ac.cn
ServerAlias westgis.ac.cn *.westgis.ac.cn
DocumentRoot /var/www/westgis.ac.cn

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/westgis.ac.cn/>
Options Indexes FollowSymLinks MultiViews
AllowOverride FileInfo Options
Order allow,deny
allow from all
</Directory>

ErrorLog /var/log/apache2/westgis.ac.cn-error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/westgis.ac.cn-access.log combined
ServerSignature On

</VirtualHost>

激活这个vhost就可以了,注意AllowOverride部分和默认是不同的。

wordpres mu 1.0的安装

Posted on 十二月 11th, 2006 in Linux | 1 Comment »

Wordpress mu 1.0版本发布已经很长时间了,这次正好凑着转移DNS的机会,也尝了一把鲜。 Read the rest of this entry »

A very nice plugin to preserve html format

Posted on 四月 17th, 2005 in Blog | 1 Comment »

Thank you, I had searched this tool a long time and now find it.
It is very nice.

http://www.coffee2code.com/archives/2005/03/29/plugin-preserve-code-formatting/

什么是TrackBack

Posted on 十二月 9th, 2004 in Blog | 1 Comment »

在dark的BLOG上看到了,终于了解了BLOG和其他系统的最大区别。

TrackBack最早是Movable上的一个小功能。可以说就是这个小功能在blog界却掀起了一场革命。

TrackBack为将全世界无数个blog连接起来的功能。例如,当你读了某个网站的文章,想对此写下自己的感想。这个时候利用网站准备的讨论功能进行投稿是很最常见的做法。但这样只是把自己的评论意见写下来向别人的网站投稿,而你自己手里却什么也没留下。

TrackBack 则与之有很大的区别。可以把评论写到自己网站上。然后向刊载原始文章的服务器发送该网页的URL及标题、部分正文、网站名称等信息(注)。尽管这一过程只是称之为“发送TrackBackPing”,但通过这种办法,在原始文章的地方就留下了你的评论的URL、标题等部分信息。当然别人也可以向原始文章发送TrackBack Ping,所以在原始文章中就将包括你的TrackBack Ping在内的所有评论都记录了下来。

此外,如果你在自己网站上也设置了TrackBack Ping功能的话,那么谁都可以通过TrackBack Ping来发表针对你的意见了。这样,多家网站就通过相关话题而联接起来。各种评论在因特网上就像网眼一样联接起来。这样就创造出了与日记网站完全不同的文化。

注:发送地址采用原始文章指定的URL,这一URL就称为“TrackBack Ping URL”。最后的“128”为原始文章的专用数字,称为“TrackBack ID”。另外,TrackBack的技术标准刊登在“LowLife.jp”的blog网站上。

欢迎测试

Posted on 十一月 13th, 2004 in Blog | 2 Comments »

使用wordpress建立的blog系统,这是1.2.1版本,最新的CVS版本有点问题.
目前,已经知道的BUG:
EMAIL发表不能用中文,只能用english.