Drupal 6.x: The Story Continues...

Phil's picture

I've always been a bit perplexed by the relatively short lifespan of any given Drupal version, particularly when big changes, such as API modification, always rear their heads. I first began Drupal development back when things were still 4.6 and 4.7 was a whisper in darkened corners of run-down bars. When Drupal 4.7 finally came out I had just gotten a handle on how 4.6's APIs worked, and here I was, having to unlearn what I had learned. Thankfully, it was a quick process, and forms API turned out to be much more of a help than a hindrance.

About a year and a half later, we're on the verge of a stable release of Druapl 6.x, and I'm looking forward to this one much more than I was for 4.7. So, in celebration of that fact, I figured I'd run down a few elements of Drupal 6.x that I'm excited about.

  • Theming for JS functions
    What it does:
    Allows customized JS output.
    Why it's cool:
    In the past, this stuff has all been hard-coded, but now, you can wrap your output functions in Drupal.theme('function_name','...') to get them to process out via either your custom theme, or via the default. From Drupal.org,
    "JavaScript theme functions are entirely free in their return value. It can vary from simple strings, up to complex data types like an object containing in turn several jQuery objects which are wrapped around DOM elements. See the original (default) theme function to see what your custom theme function should return."
  • Actions!
    What it does:
    Allows for configurable Drupal-y things to occur after being triggered by some other Drupal-y thing.
    Why it's cool:
    Let's say that you want a custom email to fire off to a node author whenever it's moved from moderation to published. In previous versions of Drupal, you'd have to write a helper module to get this to happen. Now, you can use Actions, which can take default or user-defined functions, and run them after a user-defined event occurs.
  • Versioning Support to Node Terms
    What it does:
    Versions taxonomy terms so that renaming a term doesn't overwrite the actual term all the nodes associated with that term with the newer term.
    Why it's cool:
    This adds dimension to terms, and also helps those of us with red foreheads from too many irreversible mistakes.
  • scripts/drupal.sh - command-line Drupal!
    What it does:
    Allows shell scripts to execute Drupal functions
    Why it's cool:
    I can see this being really useful for initial site configuration, as well as less intensive cron runs.
  • URL Alias Filtering in Admin
    What it does:
    Sorts alphabetically the URL Alias list on the admin screen like so: A (10 items) B (0 items) C (15 items) etc etc.
    Why it's cool:
    Because it's a real pain to have to page through a site with 500 path aliases, especially when the site may have 5 pages of aliases starting with 'A' but only two starting with 'B.'
  • Language Support Improvements
    What it does:
    Among other things, allows for nodes to have language revisions
    Why it's cool:
    If you've got a site with a lot of content in multiple languages, it stops making sense to have individual nodes for those languages, and makes more sense to have a sort of meta container as the 'page' but with different content per language. Also, this will probably make autotranslation a lot easier.
  • PHP Input Filter changed
    What it does:
    Keeps the PHP input format as a separate, disable-able module
    Why it's cool:
    One of the biggest exploits in Drupal occurs, surprise surprise, because of user error. PHP input formats are really awesome for building out customized pages or blocks, but if you forget to disable them for anonymous users, you're opening the door to malicious code. Keeping PHP input format as a separate module ensures that 1. if you don't need it, you can turn it off, site-wide and 2. if you -do- need it, you get an extra layer of authentication, to keep the w33 b34stie5 at bay.
  • Theme Registry added
    What it does:
    Modules no longer have to write theme_ functions; they can directly provide .tpl.php files.
    Why it's cool:
    This will allow module developers to provide template files for their modules straight out of the box, so that, instead of writing callbacks or customized theme functions, themers can pull these module-specific tpl.php files and edit them just like they would page.tpl.php or any other standard phpTemplate file.
  • Improved Installer
    What it does:
    Simplifies and themes up the setup process
    Why it's cool:
    The improvements to the installer are mostly cosmetic, but still: after putting D6.dev on my local box and running through the installer, it definitely seemed much more clean and professional than previous installers had been. I think this'll turn more people on to Drupal in the future.
  • HTML Corrector
    What it does:
    Looks for unclosed HTML tags in comments and posts, and closes them.
    Why it's cool:
    Sometimes, when people use HTML, they forget to close tags. Used to be, if a commenter or poster on your site forgot to close a tag, a tag, for instance, not only would the rest of the post be bold, but any content following that, until a tag, would be bold as well. HTML correcting had been available as an add-on before, but now it's core.
  • Update status module
    What it does:
    Automatically checks for updates to modules and core
    Why it's cool:
    Security holes are found every day. I read somewhere that someone did a survey of all the WordPress sites out there, and only one site was using the latest version; all the other sites were potentially vulnerable thanks to some form of security flaw. Now, thanks to Update status module, if there's a new update available for any module you're using, or for Drupal Core, you'll be updated, and can get it fixed.

Well, that's a lot to cover for one post, so I'll stop here. If you've got any questions, or just wanna chat, shoot me an email at phil (at) echoditto (dot) com.

Comments

Benjamin Kudria's picture

Phil,

Isn't Actions available as a module for 5.x? You seem to suggest it has been moved into core, other than that, what has changed?

Is scripts/drupal.sh a spin-off/fork/inclusion of DruSH, the Drupal Shell module? Or is it something new entirely? Is it Unix/Linux only?

Finally, like Actions, isn't the Update Status available as a contrib module in 5.x? Has it been just moved into core, or are there substantial features/changes?

Thanks,
Benjamin Kudria

Phil's picture
Member since:
12 April 2007
Last activity:
2 years 37 weeks

Hey Ben,

As far as Actions and Updated Status, you're correct - they've basically been moved into core.

For Update Status:
Basically, all that happened was it was moved into core. But there are people out there that didn't know about this functionality previously, and now they're made aware of it. No substantial changes have been made, as far as I'm aware.

For Actions: My understanding is that there was never any easy integration that would make it easier for people to actually perform said actions. In Drupal 6, it's now a -lot- easier to set them up, so in a way it's going to be new to a lot of people.

Now, on to your question about drupal.sh - it's not a fork of DruSH, my understanding (thanks Jeff Eaton) is that "DruSH is a complete package someone's building for a variety of tasks."

As far as getting it to run on a non-*nix environment, that's a good question. The script itself uses the shell's php command interpreter (apologies if that makes no sense, my understanding of Teh Shell is not as good as it should be), so presumably, if you can run PHP from the command line, you can run this stuff.