sugree's blog

How to display image field inline in Drupal

Drupal is one of the greatest CMS right now. It is possible to build a site in minutes and a few days for customization without changing single line of existing codes. That means upgrading is painless. CCK is very powerful for customizing existing content types such as blog to have inline image per node using image field. However, default behavior is to display the image separately. It is not nice so I have to customize myself.

How to make menu by pure CSS

I was asked to find a solution for making a horizontal dropdown menu in HTML. I don't know how to do it but I'm sure it is possible especially in Firefox. After searching in Google, I found a good tutorial.

How to convert DVD video structure to AVI using Mencoder

Sometimes I have videos in DVD structure. It is a suitable format for burning to DVD disc directly. However, I don't want this high quality format. AVI is enough to reduce disk space usage. My tool is Mencoder again.

I have just installed the latest 's project called . It works with perfectly. Anyway, I have some problem with internet connection during in on-line mode. As a result, javascript was corrupted but Google Gears didn't realize this problem. Even though I moved to better internet connection, the broken javascript was not redownloaded again. I also tried to clear cache in Firefox with no luck. Eventually, I found that Google Gears have its own cache.

How to decode incorrect character encoding in e-mail using Python

Sometimes character encoding sent via e-mail are incorrect. The most often scenario is as follow.

  • Actual encoding is TIS-620.
  • Header indicates ISO-8859-1.
  • The e-mail reader displays contents in UTF-8.

As a result, it is very difficult to recover the failure. However, it is possible to solve this problem using Python.

How to fake referer in Firefox

At present, there are so many free image hosting on the wild. Since these service providers usually earn income from advertisements, e.g., , the most scary thing for them is hot link. Hot link means to embedding the hosted image directly to other sites. As a result, there is no chance to display the advertisements. Most providers have to reduce hot links to decrease useless traffics by detecting referer.