Author Archives: Hana

Varnish 3 on Nginx for Drupal 7

After playing around Nginx, php-fpm for Drupal with AWS, today I tried Varnish – one of the best caching tool (see this) works great with Drupal 7.

Nginx + PHP-FPM for Drupal 7 on AWS EC2

Yesterday my dedicated hosting service with WHM/CPanel in Taiwan slapped me in the face by getting hacked seriously. Although it’s not all the server provider’s fault but I couldn’t really improve the server structure as WHM/CPanel limited me while giving me conveniences to manage the server via web admin pages. I’ve been learning Linux

Drupal Multilingual guide (i18n): Language detection by IP

By default, Drupal’s i18n provides 5 ways to detect user’s preference of language:

Drupal’s webform integrates with token since 7.x-4.0

Since Webform 7.x-4.0, it supports tokens! It’s not a news but there aren’t any detailed document about how to use it. So here’s my quick note on how to use token on webform default fields.

t() : Usage of T Function in Drupal 7

t function is one of the most useful functions in Drupal core, it makes multi-lingual sites so easy to maintain. This is t(). t($string, array $args = array(), array $options = array()) A very basic example We have a title string “Backyard Garden” that we want it to be translatable, we simply do this. t(’Backyard [...]

Using Sass and Compass in Drupal 7

When it comes implementing a none-Drupal technic in Drupal, sometimes things can get complicated. There are so many solutions flying out there to confuse people so when I was thinking using SASS and Compass in my Drupal 7 theme, I hesitated. But then I see the blue sky again.

Migrate Contents from Drupal 6 to Drupal 7 Using Migrate 2

I wouldn’t have thought that one day I’ll need this, but when I decided to rewrite Bounty Hunter with Drupal 7, learning Migrate 2 – the migration framework for Drupal – became my destiny. But trust me, you wouldn’t regret as it’s so flexible and powerful. With this you can turn all the sites to [...]

Enable/Disable all non-core modules using Drush

It happens when I’m developing Drupal sites, writing custom modules and get a “502 Bad Gateway – nginx”. It can be hard to debug as 502 errors are usually

SSH Login Without Password Using Keys on Mac

It feels better and gains desire to code when it’s easy to access your server via SSH with no IP limitation and password. Using public/private keys is a good way. And it’s easy! Let’s say we have a Linux as a server and a Mac as a client where you do your work.

Calculate Field Values Using Computed Field in Drupal 7

Background I usually don’t install too many modules as it slows down my site, but I’d like to recommend computed_field.module. There are some other similar modules but this is the only good one. I’m running a contest event aggregator site using Drupal 7, and this post is a simple guide to show how to use [...]