module
Once & Only Once: The Conversion To Drupal 7's FieldAPI
Submitted by joachim.noreiko on Tue, 06/04/2010 - 15:06I'm not a fan of repeating myself, or of doing the same work twice. So when I first got a look at FieldAPI back at DrupalCon Paris, my thought after 'Wow this is going to change everything,' was 'Every module that converts its custom data storage to this is going to be doing the same work, over and over'.
Drupal 7 Cheat Sheet: The Database
Submitted by greg.harvey on Tue, 30/03/2010 - 10:29This is a quick post while it's fresh in my head, regarding porting your contributed modules to the Drupal 7 API. This post specifically focusses on database manipulation and provides the like-for-like changes. If anything here is wrong, or could be done better, please let me know!
First up, individual results:
<?php
/*
* Remember this?
*/
$value = db_result(db_query("SELECT some_field FROM {some_table}"));
/*
* Forget it! It now looks like this:
*/
$value = db_query("SELECT some_field FROM {some_table}")->fetchField();
?>Scared Of Features? Don't Be!
Submitted by greg.harvey on Fri, 26/03/2010 - 13:55I'm an experienced Drupal developer. I've been embedding stuff in code for ages now. Views, Panel pages, ImageCache presets, even putting CCK content type exports in to hook_install() implementations just to try to keep stuff in code. Many of you are probably in the same boat. Keeping stuff in the database brings all sorts of ugly deployment and performance issues, so we avoid like the proverbial plague.
Altering A Views Query: Tackling The Node Type Filter Bug
Submitted by greg.harvey on Mon, 12/10/2009 - 18:53I happened across a wee bug in Views 2 today. I think I've noticed it before, and I'd be a monkey's uncle if it isn't already in the queue, but this is a synopsis:
If you expose the Node Type filter in Views 2 and set it to "Optional", but also with "Limit list to selected items" checked, you might expect it to continue to restrict the results to the selected items it refers to, right? (Well I did.) It does not. If your use selects the "< Any >" option from the resulting UI they will get *everything*
Doh!!
Cleaning Up Node Edit Forms
Submitted by greg.harvey on Mon, 12/10/2009 - 10:16Every time you build a new application in Drupal you *always* have to carefully govern the number of options available to normal site editors, or their heads will explode. (Literally. I've seen it.)
Almost every module you install will put something more on the node forms, until you end up scrolling forever just to reach the Save button. Not to mention most of this stuff you won't want them playing with anyway.
FFMPEG And FlashVideo For Fedora (Or CentOS)
Submitted by greg.harvey on Thu, 07/05/2009 - 12:22Good news for all you people who want to process their own video on their Drupal website. While FFMpeg is a "forbidden" application as far as the Fedora project guys and gals are concerned (not sure why - usually because of some legal issue), the ATrpms repositories contain FFMpeg, the Linux command line video encoding tool you need to install to use the FlashVideo module:
http://atrpms.net/
Specifically, here is the Fedora 10 repository:
http://atrpms.net/dist/f10/
Getting Drupal Airborne
Submitted by greg.harvey on Sun, 29/03/2009 - 22:21I have finally put pen to paper on my germinating ideas surrounding a Drupal module for publishing Drupal content and applications via Adobe AIR.
CCK Gallery Is Usable
Submitted by greg.harvey on Thu, 05/02/2009 - 17:41Or at least, I think it is. My new module. I managed to release a dev snapshot last night which answers some of the bigger issues with it. There are already new features backing up to be implemented (and at least one already done) but, for now, CCK Gallery is hot to trot! =)
I've even created some half-decent documentation, in the form of an FAQ on the project page. Quick summary:
Installing ImageCache Presets From Your Drupal Module
Submitted by greg.harvey on Thu, 22/01/2009 - 14:46For those of you unfamiliar with the ImageCache module, get familiar here:
http://drupal.org/project/imagecache
It's pretty useful, allowing you to define preset image sizes that will be automatically generated whenever an image is uploaded to your site (providing the module doing the upload supports ImageCache which, fortunately, most do - including the Image module and the frighteningly useful ImageField CCK module).
Flexiforum Released
Submitted by greg.harvey on Tue, 06/05/2008 - 17:40I have created a project page on Drupal.org for Ben's module, Flexiforum:
http://drupal.org/project/flexiforum
It's a great little alternative to the core forum which I sincerely hope will go from strength to strength. Please do download it and try it out. It should work with BBCode and Node Comments as well as supporting forum search and reply with quote - neat features. =)

