Drupal tips, tricks, tutorials

A simple way to create a 'related posts' block using Views 2 in Drupal 6

Looking at the traffic data google Analytics collects on my web sites I see a high "bounce" rate which means many visitors leave right away. It means they come to the site, then look only at the one page, presumably to go elsewhere. I've been pondering what might be a good way to entice them to stay and look around. After all, my websites exist to instruct people, so the more pages they look at on my sites the more instruction I'm able to impart. Oh, and there's a higher chance they'll click on an ad or something.

Adding Custom Breadcrumb for Drupal nodes

Shows how to add custom breadcrumbs in Drupal

How to use Mercurial to hack Drupal Core without killing kittens

In the Drupal community there's a paradigm that every time you hack core you kill a kitten. And who would want to kill a kittens? The point is that any time you hack core (modify the Drupal core files) it becomes a nightmare to forward-migrate your changes as Drupal core is updated. The Drupal team does routinely update Drupal (about every 2 months) and it's best to keep your Drupal installation up-to-date especially as many of the fixes are for security bugs.

Use a 'Sources' vocabulary to categorize the blog directory

Define a vocabulary, Sources, and assign it to the Feed content type. You can configure the vocabulary any way you like. Mine are configured as 'Tags' vocabularies but if your user base doesn't grok specifying good quality keywords perhaps you should use a predefined vocabulary and set up some terms.

Building a blog & podcast directory in Drupal using FeedAPI

Blog directories are simply a list of sites, characteristics of each site, and a listing of the recent blog posts on the site. They are very useful in helping people find blogs of interest. When a blog directory is focused on a specific topic it helps to build better awareness of that topic area. It's relatively easy to build a blog and podcast directory in Drupal using FeedAPI.

Reducing bandwidth use, decreasing page load times, for better Drupal user experience

One of my sites has a high traffic load (2000 visits per day, over 6000 page views per day) and has been using up the bandwidth allotment on the shared hosting account where it's hosted. Concerns are that a large download per page would turn off visitors due to a long page load time, and also the environmental impact of excessive bandwidth usage. Initially the only measurement tool I had was the realtime bandwidth statistics provided by the hosting provider (see the screenshots below) and it was only later when Firebug became functional on firefox 3.5 and YSlow was then usable.

Cure for FAIL when using RedirectMatch with clean URL's on Drupal

I've had a problem with use of RedirectMatch on some of my sites which causes a FAIL in combination with Drupal's reliance on mod_rewrite to provide clean URL's. Over the years I've used different technologies to build sites and on occasion have converted a site built with static web pages into one driven with Drupal. This has meant a web of .htaccess files listing redirects for the old URL into a new URL. The goal is to help your readers continue to access the pages you wrote even when the location (URL) of the page changes.

Pages