Archive for the ‘WebDev’ Category.

Print view for any web page with firefox web developer plugin

Not all websites have links to “printable version” like wikipedia. Although many websites have stunning  look, it is really ugly when you try to print them. Some parts of the pages will be missing or the format is totally a mess. Instead of waiting the website owner realize this and prepare printer friendly pages for you, you can try to use the “web developer” firefox plugin to solve this problem. Just install the plugin,  then on the web page you would like to print, right click your mouse and find the menus shown in the following picture, choose display CSS only for printer. The web page will become fluid and ready to be printed. Continue reading ‘Print view for any web page with firefox web developer plugin’ »

Memory use error while updating WordPress

When I update WP automatically at backend, I often get an error
“Fatal error: Allowed memory size of …”
to say the memory usage is beyond a limit. The solution is simple. SSH to the server and edit the wp-config.php as following,

Continue reading ‘Memory use error while updating WordPress’ »

Sideways Google

I didn’t put the following picture mistakenly. It’s a snapshot of a true website where the Google search page gets rotated 90 degree anticlockwise. It’s said this will help you to prevent trouble of your neck.

Continue reading ‘Sideways Google’ »

WordPress plugin: Contact form 7

It’s easy to use and powerful. You can build a complex form in minutes. However, it took me some time to understand the “Mail” function on the form building page. In fact it is used to define the format and contents of email that sent to the form owner once somebody submits it. The keywords used in the mail template are the same as defined in the above form design. You can also add additional help texts into the email contents to clearly inform you what the exact information is. For example, I built a form with two check boxes, by default only the text of the checked box(es) will be inserted in the email. It’s hard to know their meaning.

Continue reading ‘WordPress plugin: Contact form 7’ »

ReCAPTCHA技术

不得不说这是一个很好很有用的创意!

CAPTCHAs是一种恼人的技术,据资料统计,全球用户每天要完成1亿次 CAPTCHA 测试。ReCAPTCHA是 Carnegie Mellon 大学启动的一个项目,目的是借助 CATPTCHA 技术将那些残旧图书数字化,据估计,该技术每天可以完成160本书。

该项目目前已经在40000家网站上部署了 ReCAPTCHA 技术,ReCAPTCHA 的基本原理是,对光学字符识别(OCR)软件来说,它们的辨识能力是有限的,尤其是那些印刷不清晰的旧书或残书,而人类可以凭借自己的阅读经验,轻松识别 那些 OCR 无法识别的文字。对这样的文字,人类的识别成功率可以达到99%,而OCR软件只能达到80%。
Continue reading ‘ReCAPTCHA技术’ »

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’ »

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.

Continue reading ‘Integrate SMF and Tinyportal’ »

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’ »

Test a PHP directory listing script

The name of the script is ‘linker’, written by a korean. On hotscripts.com you can find tons of similar PHP scripts. What made me choose it is it has all the features I need and it’s free.

The description on hotscripts is

Linker is a category indexing program which allow you to easily create a yahoo like site. Features: Template and Database driven; flexible, fast and stable structure; URL validation; review and comment; poll; Image and file upload; Mailling list; Keyword search; category tree like explorer,Vote codeview, Top10 site, Multiple language support. theme support; Related categories; Multiple languages; User definable fields and more. Linker can be used for any type of category-driven sites such as image list, yellow page and so on.

Continue reading ‘Test a PHP directory listing script’ »

Color scheme for garland theme disappear in Drupal

I found a strange thing when I wanted to change the color scheme of the
garland theme shipped with Drupal 5.1. If I change the file system
setting to “private” (let Drupal control the file download, the color
dial in the garland theme setting will not show). It’s really weird so
that I can only think of a bug in the source. I don’t know if it has
been reported. Maybe I should do it. :)