Drupal tips, tricks, tutorials

Generating Apache style .htaccess redirects from Drupal's Path Redirect module

The "Path Redirect" module for Drupal 6 (http://drupal.org/project/path_redirect) is an excellent way to set up redirects from one URL to another. This module can be used for any purpose where you want the HTTP request for URL's on a Drupal website to automatically redirect to another URL. For example :-

  • you might want to have a nice URL to promote for some excellent product (example.com/excellent-camera) that lands on a merchant website while hiding the complexity of the merchant URL (making sure to include the affiliate link).

Is Drupal's complexity turning people off? Hurm...

Ben Buckman asked a question that struck deep into a dissatisfaction that's been growing in me about Drupal. He spoke it from the perspective of someone who's spending a lot of time inside the code, but I have a different perspective and take on it because I prefer to stay at the admin screens. He talked about the API complexity, stuff that isn't working that used to work, modules not conforming to long-standing practices, modules not using core Drupal features when arguably they should, and so forth.

Potential and fix for Drupal xmlsitemap module to not index nodes

I want to share the solution for a problem I (and it seems others) have had with the Drupal xmlsitemap module. The problem results in zero nodes being indexed in the sitemap which, of course, is an undesired result because the purpose of xmlsitemap is to reliably inform search engines of the nodes on your site so they can more easily index your site. Telling the search engine "I have no nodes" is a kiss of death in terms of getting traffic, that is until the search engine spiders your site and finds everything that way. But they don't spider sites every day.

Make your own tiny URL service in Drupal with Shorten or ShURLy modules

Short (or tiny) URL's are great for sharing links on various social media services. Twitter's 140 character limit places a premium on bytes better used for words than URL's, e-mail clients get hinky with long URL's, and so on. It's possible to use services like tinyurl.com or bit.ly to create your short links, but as Drupal users we have a powerful platform at our fingertips. Maybe it can do the short URL natively or maybe it can be programmed to automatically retrieve short URL's from the existing services.

Make your own tiny URL service in Drupal with Shorten or ShURLy modules

Short (or tiny) URL's are great for sharing links on various social media services. Twitter's 140 character limit places a premium on bytes better used for words than URL's, e-mail clients get hinky with long URL's, and so on. It's possible to use services like tinyurl.com or bit.ly to create your short links, but as Drupal users we have a powerful platform at our fingertips. Maybe it can do the short URL natively or maybe it can be programmed to automatically retrieve short URL's from the existing services.

Dramatic performance effect of enabling the Block Cache Alter module on Drupal 6 websites

I have my websites hosted on Dreamhost VPS's and the other day decided to consolidate some of my sites onto one server. Using the Munin monitoring I've installed (see Use Munin to monitor a Dreamhost MySQL VPS) I could see the CPU utilization on the server was very low - below 15% - indicating that the server had CPU capacity. But a different performance issue showed up after consolidating the sites on one server. Namely the memory allocation had to be increased to 3GB when that server previously ran well at 1.2GB of memory.

The future of the RSS Remote Enclosure module for Drupal

I know that Drupal has minimal support out-of-the-box for podcasting (simply use file upload, upload a media file, and it becomes an Enclosure tag in the RSS feed) and that modules like File Field Podcaster are supposed to do excellent things for podcasting with Drupal. However for podcast's I've done, I've used the RSS Remote Enclosures module. Around a year ago, due to some patches I'd made to the module, the then-current maintainers handed me the reins of the module but I've done very little with it.

Save your server! Detect taxonomy term loops in Drupal 6!

I dunno exactly how I did this, but the taxonomy hierarchy on one of my sites had a taxonomy loop. That server has been having periodic load overload that kills performance and eventually I realized an issue is this taxonomy loop. In taxonomy.module the function taxonomy_get_parents_all can get tripped up if your taxonomy hierarchy has a loop. I'd found one looped term by hand, and just wrote a little script to detect others.

Review: Drupal 7 First Look

Drupal 7 is in the RC phase, so it's time to begin thinking about your upgrade from 6 to 7. (My condolences if you're having to think about a 5 to 7 upgrade) I wish to present to you my thoughts on a new book which will prove rather helpful in upgrading your thinking to the new hotness of Drupal 7.

Drupal 7 is as different from Drupal 6 as that one was from Drupal 5. Making the upgrade seems to involve not just the technical stuff of the upgrade process, but also understanding what's new and how things are different. This book will give you a very good grounding in that newness.

Pages