Blogs
Avoiding Loops In Preprocess Hooks
Submitted by greg.harvey on Thu, 02/07/2009 - 18:55I've just released a new module (fanfare) which seems to work pretty well. I have a couple of silly bug fixes to put up tonight (knew I should've called it "beta") but other than that it works great. It's called Node Reference Variables:
http://drupal.org/project/nodereference_variables
All it does is present a load of stuff (depending on other contrib modules installed and some admin options) via the hook_preprocess_node() preprocess hook for themers to use to do cool theming stuff with Node Reference CCK fields. Main feature I'm using is the jQuery UI tabs it provides.
Integrating Video With Emfield And Media: Brightcove
Submitted by greg.harvey on Fri, 19/06/2009 - 12:51Firstly, hello Planet Drupal (or Drupal Planet... or Drupal folks, generally). *waves*
This is my first post since http://www.drupaler.co.uk was added to the list over there, so hopefully at least some of you will find it useful/interesting/both. Thanks to Robert Douglass for the addition.
Naming Form Items In Drupal
Submitted by greg.harvey on Mon, 15/06/2009 - 12:38There is an issue with the Drupal Forms API in Drupal 5.x. It assumes there is one form on a page so it does not handle duplicate form IDs very well (read, at all!) - as such, if your forms are loaded in blocks or you just drupal_get_form() to load extra forms on a page in Drupal 5.x, you might well find yourself with several submit buttons all with an ID of id="edit-submit". Which sucks!
Validating & Submitting Forms To Other Websites With Drupal
Submitted by greg.harvey on Wed, 10/06/2009 - 10:49So you've got a client who wants to have a Drupal form send something off to another website. In my case my client wanted to manage their newsletter from the SalesForce CRM (which they doubtless paid gazillions of dollars for, so they'd better bloody well use it, etc.) so newsletter sign-ups needed directing there.
Filtering Search Results On CCK Fields
Submitted by greg.harvey on Wed, 03/06/2009 - 15:01This is a quick HOWTO on altering the core Search module's database query in Drupal 5.x and 6.x. I think this will be different in 7.x, as there seem to be new, better hooks for manipulating queries, but we're not there yet.
For now, the hook you need is hook_db_rewrite_sql(). This allows you to add JOINs and WHERE clauses to existing SQL queries being generated by other Drupal modules.
Using Views To Create DMOZ-Style Sub-Categories
Submitted by greg.harvey on Mon, 01/06/2009 - 12:31This is a quick Drupal 6.x, Views 2.x blog tutorial about creating the classic DMOZ-style sub-categories plus node listings above/below. Something Drupal does not do out of the box, but is fairly easily achieved.
(Thanks to longwave in #drupaluk on IRC for suggesting this approach.)
Database Download Script
Submitted by greg.harvey on Fri, 29/05/2009 - 12:21Just thought I'd throw this one up there. It's a Linux bash shell script I wrote this morning. You know when you want to take a copy of your production database down to localhost for testing? Not rocket science, but a bit of a pain. This dramatically speeds things up.
In the past I've copied and pasted an old shell script that's been kicking around on my hard disk for years, changed the details and run it. Well this morning I thought "Enough!" I tidied it up so it accepts arguments and even has a --help argument response. This is the code:
if [ $1 = "--help" ];
And We're Back, You Can Be Too
Submitted by greg.harvey on Tue, 26/05/2009 - 16:36So comments are back up and running. I still need to migrate all the old Node Comments to core Drupal comments, but at least it is now a properly moderated mechanism so it should get rid of the spam. The rest can happen when it happens.
Also some other major changes. You may have noticed the right-hand menu has changed, as has some of the peripheral text. Well that's just fluff, but I've added user profile support, opened Twitter integration up to regular users and done a few other bits and pieces in readiness for letting other authors loose on the system.
IE7 And Apache File Type Gotcha
Submitted by greg.harvey on Fri, 08/05/2009 - 15:48Firstly, thanks for Russ at Manta Ray Media for doing the Google leg-work on this one.
Apparently the new(ish) Microsoft Office .docx file extension (in fact, all the new .foox file extensions) is read by Internet Explorer 7/8 as a Zip file when being served by an Apache web server. This is because the sent headers from Apache are incomplete and IE gets confused and thinks it is receiving a zipped archive, not an Office document. (Isn't it wonderful that only Microsoft's browser gets confused by Microsoft's file formats!)
Evolution And Auto-Complete
Submitted by greg.harvey on Fri, 08/05/2009 - 11:40I didn't know how to get Evolution's auto-complete feature to behave, so I Googled around. The most useful HOWTO was here:
http://www.sigmundvoid.com/2007/07/evolution-mail-client-and-auto-comple...
But it's down for now. Google still has a cache of the page, so I thought I'd take it while I still can. It's too useful to die!
Evolution mail client and auto complete addresses.
Evolution is a wonderful mail client based around Gnome, you can think of it as the Outlook alternative for Linux users, it can even connect to Microsoft Exchange server.
