Archive for the ‘互联网应用’ Category.

Drupal网站升级操作步骤

这是一个备忘帖。每次看到Drupal放出新的release时候都有升级的冲动。虽然一再告诫自己,升级是有风险地,也不一定有必要啊,是不是还有模块不能适应新版本啊?等等等等顾虑。不过升级还是在所难免的,如果错过了好几个重要版本,搞不好都不支持老版本了。下面列出了Drupal网站的升级步骤(来自Drupal台湾tky的帖子):

Continue reading ‘Drupal网站升级操作步骤’ »

OsCommerce installation and Multilanguage support

Install OsCommerce in cPanel is a piece of cake. However, only several western languages are shipped with the release package. Once install some eastern language package, such as Chinese, one my encounter character display problem. The source pack uses iso-8859-1 (latin1) charset while connecting to the database, which is compatible with all the western languages. The Chinese language pack on the official site is in GB2321 encoding, and it is quite old, developed in 2006. In addition, the database itself also uses some encoding method, which is utf8 in my case. Therefore, three charsets are used by the source, the language pack and the database. God! You must be extremely lucky if you have no trouble with these.

Continue reading ‘OsCommerce installation and Multilanguage support’ »

用Drupal的multisite机制重新部署网站

Drupal社区十分强大且活跃,使得本人不在考虑使用其他的CMS建立网站了。

由于前期的几个网站都是用drupal单独创建的,因此更新维护起来比较麻烦,因此考虑把几个网站重新部署,共用一个代码库。这里不得不提到Drupal支持的multisite机制简直就是太cool了。(其实Drupal在CMS设计理念上的创新还有很多,不是一般的CMS可比的)

Multisite就是很多网站被部署在一个Drupal代码库下,但是站点相对独立。只要改动或升级这份代码库,所有的网站功能都会改变,极大的节省了维护成本,同时还能满足各个站点独特的要求。

安装多站点大概分为两种:一种是在一个网站下全新建立几个新的独立站点;另一种情况是将已有的几个站点合并到一个Drupal系统中。很显然,本人需要做的是第二种情况。

Continue reading ‘用Drupal的multisite机制重新部署网站’ »

为Drupal添加两个新的模块

不用多介绍啦,都是最优秀的。:)

一个是coolfilter。在WP系统上就用过,名字叫coolplayer。Drupal上的这个是在coolplayer基础上开发的,因此功能也更强。几乎通吃所有已知媒体格式!更为可喜的是还支持多种代码加亮!的确够cool。

另一个是Captcha。随着成员数增加,发现有一些恶意注册的。目前还是Captcha是最有效的方法。

使用.htaccess防止盗链

注释:本文摘自网络。

目的:使用.htaccess文件保护服务器上的特定目录或者特定文件类型,不允许外部链接直接访问。
.htaccess防盗链原理及设置

防盗链原理:

http标准协议中有专门的字段记录referer
一来可以追溯上一个入站地址是什么
二来对于资源文件,可以跟踪到包含显示他的网页地址是什么。
因此所有防盗链方法都是基于这个Referer字段

Continue reading ‘使用.htaccess防止盗链’ »

Integrate SMF and Tinyportal

There is no much to say. Tinyprotal is developed as a mod of smf. So the installation should be very straightforward. Simply go to the back-end and upload the zip package then apply it. Everything should be fine except the WYSIWYG editors.

 Tinyportal is shipped with two 3rd party WYSIWYG text field editor, the famous FCKeditor and WhizzyWig. Both look nice and powerful. However, the default installation of Tinyportal on my smf 1.1.4 site doesn’t work very well. Once I clicked “insert” image button on their tollbars, I should be able to upload image from local HD. But this failed. Some error message like “XML request error: internal error 500″. I donno what happened there. After checking on internet, I found many people had the same problem with FCKeditor, although they were not using Tinyportal but some other CMS or forum webware. No confirmed answer available for the specific problem on a specific system. You have to try the different solutions. Fortunately I succeeded at the first run. I simply chmod -R 755 FCKeditor/ under my site’s root dir. Then it worked! I did this also for the other editor’s folder. (It also had a uploading problem.) Everything became wonderful then.

在Drupal上安装 TinyMCE和IMCE,可视化编辑器的绝佳组合

Upgrading my websites

Too many different CMS or blogging system existing! To reduce the work of upgrading my several website, I limited myself to use only three system, WordPress for blogging, Drupal for common website and SMF for advanced forum. Beleive me these three are excellent. You don’t need more than these to start your own website.

Now the developpers of these three software have made the upgrade very easy. Plus the commercial web hosting service, like Hostmonster, you need to do nothing more than just few clicks.

Continue reading ‘Upgrading my websites’ »

个人Blog防范垃圾评论最有效的方法

几乎每个Blog程序都会提供防范垃圾评论的方法。最简单的一种是允许非注册用户发表评论,但是要经过管理员审核才能显示在主页。其实这种方法并不好,因为大多数垃圾信息都是用软件自动发送的,可以产生随机的邮件地址,网页地址,经常有数百条垃圾评论等待审核,这样岂不是成为管理员每天的必修课?
还有一个办法是只允许注册用户评论,可以有效制止垃圾,但是如果一个访问者不愿注册或嫌麻烦,他就不会发言了。

其实目前最好的办法还是使用Captcha,也就是利用人类可以辨识但是机器很难辨识的图片来阻挡垃圾评论,很有效。即使发现一种图片不能有效防范,也很容易换用更难机器理解的算法。

Continue reading ‘个人Blog防范垃圾评论最有效的方法’ »

如何改变Google calendar的默认语言设置?

有一天忽然发现我的google calendar界面都变成荷语的了!但是我其他google服务的界面还是英文的。很奇怪。

我想肯定和google服务的自动语言检测有关,因为calendar里面并没有可以设置语言的地方。而我所在的区域是比利时,所以自动设置成荷语。就好像我虽然把IE主页设置成www.google.com,但是会被自动导向www.google.be.

解决办法:

Continue reading ‘如何改变Google calendar的默认语言设置?’ »