Submitted by Dale on April 23, 2007 - 8:21am
For your templating pleasure Drupal's PHPTemplate engine makes available a cast of variables, including such favourites as $title, $content, and $node. Modules also contribute: CCK adds CCK specific template variables as well as fields to the node object, and the comments module adds an entry to the $links variable. But what happens when something isn't formatted the way you or your customer wants, or you have a project specific variable you want to add?
Introducing the _phptemplate_variables function!
The _phptemplate_variables function lives in your theme's template.php file and is called by the PHPTemplate engine after the various modules have done their thing, and before PHPTemplate actually renders your node into HTML. _phptemplate_variables provides a single, common location to all .tpl.php files for adding or changing variables.
Submitted by Dale on March 17, 2007 - 10:36am
Drupal/CiviCRM gets a prominent mention in this ONLamp.com blog post: Top Drupal & CiviCRM Gotchas
Seven of his ten points are good to know for any LAMP based system, and some are aimed squarely at the new (e.g., do backups). Great information for someone starting out, but given the general nature of the information the post is a little misnamed.
Submitted by Dale on March 15, 2007 - 12:54pm
I've been hearing a lot about OpenID the last six months, probably because Sxip and Bryght have a local presence. It's a cool technology solving a problem I certainly deal with day-to-day. But will it rise from the primordial idea soup into mainstream acceptance? According to Simon Willison, yes:
When Bill Gates stands up at a security conference in America and spends seven minutes on stage talking about a technology, it's not really a niche proposition anymore.
Wilson recently gave a talk that was converted into a "slidecast": http://simonwillison.net/2007/Mar/12/slidecast/. It does an excellent job, the best I've seen to date, of explaining OpenID and the problems it's meant to solve. I appreciated his inclusion of a "What's wrong with it?" section. And it's not without humour, we're introduced to the evil alter egos of Ben and Mena Trott!
Submitted by Dale on March 12, 2007 - 12:53pm
A shout-out to the folks at Lullabot for their latest articles:
Submitted by Dale on March 10, 2007 - 1:03am
This month the Vancouver PHP Association and Vancouver League of Drupallers had a combined meeting. Mack Hardy of the Post Carbon Institution spoke on how the Post Carbon Institute was using Drupal to meet their organization's goals.
Mack has promised to post his slides, and hopefully there will also be a video of this presentation available. My summary forgoes the more involved details. Please check the slides for those.
Mack started with an overview of the Post Carbon Institute:
Submitted by Dale on February 20, 2007 - 12:10pm
Submitted by Dale on February 10, 2007 - 12:25am
Another Drupal website released into the wild:
The Firefly/Serenity fan group is organized via the Vancouver Firefly/Serenity Meetup Group. The Meetup website has many advantages the group does not want to give up, but Meetup has a rigid format which doesn't lend itself to some kinds of content. In particular, announcements for charity events/sales are awkward because of HTML markup limitations and cumbersome URLs that don't lend themselves to publishing. The group wanted to enhance their web presence without creating a split personality.
The Drupal based Browncoats.ca site displays Meetup information via RSS feeds, leaving the group's two-way membership interaction with Meetup. People visiting the new site can see what's happening at the Meetup site and if they're interested are directed back to Meetup. The Browncoats.ca site provides a location for content that doesn't work well on Meetup as well as providing a nicer URL for promotional purposes.
Submitted by Dale on February 7, 2007 - 5:45pm
Serendipity is great, or maybe this is karma. I've been catching up on my Drupal mailing list reading. Caught an issue in the support forum I knew something about and my have been able to help someone, then saw the answer to a question I'd been meaning to investigate! Cool.
My personal/play site, Digital Doodles, has a custom theme, so I'm on the hook for updating it. When I upgraded to Drupal 5 I didn't get the AJAX goodness. I was fairly positive it was something simple I needed to add, and so it was. All I needed was:
<?php print $scripts ?> in the head tag of page.tpl.php.
Submitted by Dale on February 4, 2007 - 10:34pm
[Update 2007-Apr-29: Please also see the article Theme Variable Total Visibility]
Have you ever wanted to know what variables the phptemplate engine made to the node or page templates? "Use the source, Luke" (Couldn't resist). The way of finding the definitive answer was discussed in Drupal Dojo today.
Submitted by Dale on February 2, 2007 - 4:23pm