Drupal tips, tricks, tutorials

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.

Could Storify be implemented in Drupal?

I've been exploring Node.js recently (long story, which will see a book come out of it reasonably soon) and one site I've come across is Storify. It first caught my eye because it's supposedly implemented using Node.js, but once I got there some of the functionality really caught my eye. The site appears to still be in a private "beta" but they have some examples published that shows fantastic integration with social networking sites.

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.

Using "drush make" to maintain the source tree for a Drupal site, and avoid killing kittens

To avoid killing kittens through hacking Drupal core I've been maintaining a source tree using Mercurial (see: How to use Mercurial to hack Drupal Core without killing kittens). But, I had an inspired idea recently to see how well "drush make" could take care of the job and maybe stop using a private source tree. One of the key required features would be to maintain a set of local patches. I'm pleased to report some positive success and it looks like a useful method for a D6 to D7 upgrade.

Blocking an undesired item while using the Amazon Store module for Drupal

The other day I was contacted by a lawyer about an improper use of their trademark. Unfortunately the improper use stemmed from a product listing controlled by the "Amazon Store" module, and is in data retrieved from amazon.com using their affiliate product web services API. The "Amazon Store" module implements something like the "aStore" feature supported by amazon.com, but hosted on a Drupal site. Because all the data comes direct from amazon.com there is little control over how it is displayed.

Pages