tip

Easy Multi-Site install for Drupal

This post may be a little bit premature - there may be more multisite issues lurking - but given that the Drupal documentation seems to go out of its way NOT to be helpful, here's a quick tip for installing multiple Drupal-powered domains:

- don't use the 'default' site - it'll just confuse you. leave sites/default empty so that if a site falls through, it gives an error
- keep a copy of the original settings.php from your Drupal install lying around
- when you want to create a new site, put a fresh copy of the original settings.php into sites/default

Easy Private Forums for Drupal

So, I'm trying to migrate a phpBB-based forum to Drupal, so that I have a "integrated" software that provides more than just forums (blogs, pages, etc). When I hit a road block: Drupal out-of-the-box has no equivalent of phpBB's "private" forums!

Luckily, if all you want is phpBB-like private forums, there is a fairly easy solution:
1) Install the "tac_lite" (Taxonomy Access Control Lite) module, from http://drupal.org/project/tac_lite.
2) Activate the module

Drupal Tip: User Pictures in Forums Only

At http://drupal.org/node/127104 is a code snippet so that user pictures in Drupal only show up in the forums, not on other pages (ex: front page, books) where they might look out-of-place.

Briefly (in case the link dies), the trick is to edit your node.tpl.php to not display pictures at all (comment out/remove the print $picture part) yet keep it in your node-forum.tpl.php. This is assuming you have a node-forum.tpl.php, of course.

GCC tip: get a list of built-in macros

Apple's QA1424 has a quick tip to dump out all the predefined macros in the gcc compiler. I haven't tried it, but I suspect it works for all gcc's, not just the one on Mac. Here's the script:

gcc -arch ppc -dM -E - < /dev/null | sort

NetBSD day one

So I decided to experiment with NetBSD (i386, the 'stable' 3.1 version). So far... eh. Not that impressed, especially since I encountered two issues just trying to get it installed and bootable:

Drupal Tip: Forcing cron to get un-stuck

I just wasted the better part of an hour trying to troubleshoot a "cron run failed" error on one of my Drupal sites (oddly, only one of four was affected). Trying to run cron manually from the status page gives a "cron run failed" error, and looking at the "Recent log entries" (aka watchdog, apparently) showed a message "Attempting to re-run cron while it is already running".