If you've ever written a module before you must be familiar with the "drupal_set_message" function in core. It's a nice way to write messages to the screen (either as notices, errors or warnings). But say you want to print an array to the screen and see the values, can't really be done that easily (unless you use a print_r but who wants to do that). With the Devel module, you gain a function called dsm() (short form for drupal_set_message). Not only is it shorter to type, but you can put arrays, objects, whatever as a parameter and using the Krumo library. So things come out in nice blocks that you can drill down into. Here's how.
What you'll need: Devel module
How to do it:
Now you can look at your arrays and objects in style!
Inevitably during your development process, the client is going to want to see how things are going. And typically in these cases you don't want to demo on the actual development environment. So you setup a test site to demo everything which may or may not contain all those lovely Drupal development modules (i.e. coder, devel, etc...). And if that's true, what if there are stray 'dsm' calls in your committed code? I mean it's safe to assume you grabbed a copy from your repo which is still under active development so it's safe to assume there's some dev code in there. And that code will cause critical errors with those dev modules missing. The last thing you want is to show big error pages during a demo!
Now I know this is a lot of if's but it could happen (trust me...). Here's how to avoid it:
What you'll need: Your fingers and cooperative developers
Tired of hunting down dead links manually? Well this module may be just what you need. Link Checker automatically checks all links in all nodes and repots on those that are broken. It even tells you why you can't reach the link (i.e. 404 File not found, 500 Internal server error, -101 Connection Timeout, etc...)
What you'll need: Link Checker Module, cron configured
How to do it:
This isn't so much a quick tip as much as it is an ad for the phenomenal Admin module which I've recently discovered. It adds inline content editing, views administration, block editing, a newer and much improved administration section layout and a great toolbar at the top of all pages. Here's how to setup it up:
What you'll need: Admin module
A while ago, Mat posted a blog entry regarding running multiple commands on the same line. While queuing up commands like that is an invaluable feature of any shell, what do you do if you want to run commands that depend on each other?
As an example, imagine a program that operates on the current working directory, so you want to change to the target directory, then run the script.
cd /var/www/html/mysite/tmp; /usr/bin/my-script
But what if something went wrong? What if the directory didn't exist or you didn't have permissions to enter it? Your script would be run, but not in the directory you intended.
Luckily for us, there is '&&'. Like ';', '&&' allows you to run multiple commands at once, but it only runs the next command if the current one exited successfully.
So instead you could run:
cd /var/www/html/mysite/tmp && /usr/bin/my-script

System Architect