Drupal tips, tricks, tutorials

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.

Using views to publish both full and partial feeds in Drupal

There's a long standing debate over the content of RSS feeds. For the greatest convenience of your readers the full RSS feed is great, because they can read your articles in their feed aggregator. However as a publisher who needs to earn a living from my writing I only want to publish a teaser so that the reader will feel incentivized to visit my site. For me the feed is a lure to bring people to my site, and I cannot do justice to others' viewpiont.

Using Views 2 in Drupal 6 to replace the Tracker module

The core Tracker module is a convenient way to look at recent traffic on a Drupal site. It shows a list of recently posted (or modified) nodes along with useful data items for each node. However with Views 2 there is a more flexible way to implement the same functionality, without enabling another module.

The task is really pretty simple. Just download and enable the Views module, then in the Views configuration interface enable the Tracker view. Yup, coming bundled with the Views module is a predefined view which does every task the Tracker module does.