Take Control of Your PHPTemplate Variables

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.

ONLamp.com Drupal/CiviCRM mention

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.

Simon Willison's Slidecast on OpenID

OpenID LogoI'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.

Evil Ben and MenaWilson 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!

Configuring a single AWStats site for multiple domains on Dreamhost

AWStats LogoAWStats is one of the more popular free open source statistics packages available. Dreamhost doesn't make it automatically available, you need to install it yourself. Dreamhost has a number of good wiki articles on installing AWStats, but they presuppose installing in a website subdirectory. In my case, I wanted a dedicated statistics website for displaying statistics from other websites.

The following are notes I made while installing AWStats. AWStats isn't intended for install exactly the way I did it, but this configuration does work. Ostensively I'm making them available so they will benefit others, but in reality I'm posting them here so I can find them again if I need them! :-)

The source information came from the Dreamhost wiki articles. These are listed in the Reference section at the end of this article.

Easily Mispronounced Domain Names

Tagged:

This made me laugh, though it's also a cautionary tale. 'Ware your choice of domain name:

http://www.grupthink.com/topic/22

Audio Investigation

Finding out intermediate level audio recording information is time consuming and a little daunting! Having recently entered the world of podcasting for Mad About Movies I'm researching the gear needed for great audio. There's lots of basic information out there that goes something like: plug any old microphone into your computer and record with GarageBand or Audacity. And this works, to a point.

If you want to go to the next level, information gets a little harder to find. Take microphones. You can spend anywhere from $10 to $5000. How does a person with no experience know the appropriate amount to spend? If you have more than one person on your podcast you quickly conclude multiple microphones would be very nice. Again, options for mixing microphones start at $40 and go over $10,000. And when you've finally made a decision on the gear you think you want, where the heck is the best place to buy it in Canada?

What follows are my research results, so far. Turns out one of best sites, Transom, comes from the world of radio. If there's one thing I've learned after following Todd Maffin, radio people are just short of fanatical about sound!

More Lullabot Article Goodness: Forums & CCK

Lullabot

A shout-out to the folks at Lullabot for their latest articles:

Notes from Mack Hardy's Drupal Talk

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:

Post Carbon Graphic

One Laptop Per Child Project

Have you heard about the initiative to provide a notebook/laptop computer for every child in the world? They're One Laptop Per Child (OLPC), and their stated goal is:

One Laptop Per ChildTo provide children around the world with new opportunities to explore, experiment and express themselves..

If this sounds interesting, I recommend reading: Can the "$100 Laptop" Change the World?, by Laurie Rowell.

I think this project will change the world, maybe in the ways they predict, and definitely in ways they can't. The OLPC project is breaking away from the current market definition of what a notebook computer is, and how much you pay for it. Having a self-powered $100 computer will lead to a wave of first world application experiments, both software and hardware. Consider what experimenters have done with XBoxes, PDAs, and $100 broadband routers. Consider what a cheap, self-powered, grid-networked, semi-rugged notebook might do in a disaster relief situation, to name just one possible alternate application. At that price point, trying something out is very easy.

James Gosling named to Order of Canada

James Gosling, the head of the team that created the Java programming language and arguably it's biggest cheerleader, was named to the Order of Canada. Details in this CBC article: Java creator named to Order of Canada.

In other news, James Gosling is a Canadian!

Pages

Subscribe to Group 42 RSS