So often there are very simple tasks that never make it into a proper module. Today the need arose for one of these tasks and I decided to take the small amount of time to do it right.
drupal
Overheard in IRC
Posted by roger on Nov 20, 2008 | Filed under drupal, irc, quotes
the good thing abt poll and one of the main reasons they keep it in core is that it always breaks
- suzi
Operator precedence gets me every time!
Posted by roger on Nov 19, 2008 | Filed under drupal, php
While working on a module last night, I couldn't figure out why I couldn't get caching to work. I have done object caching at least a dozen times before but I couldn't figure out why I was not able to get the cached object back. Here's the code I was using:
<?php
if($cache = cache_get($cid, 'cache') && $cache->data) {
dsm('Cached!');
return $cache->data;
}
?>I finally realized that cache_get() was indeed returning a cache object, but the code inside the if statement was never executing.
Keep It Simple
Posted by roger on Nov 10, 2008 | Filed under drupal, StyleShout.com, theme
I'm always on the lookout for a high-quality html/css template. I found StyleShout.com after reading Walkah's post about building a Drupal theme out of the VectorLover template. That's where I found KeepItSimple, a simple, clean and full-featured template.
Time sensitive data caching
Posted by roger on Jul 1, 2008 | Filed under cache, drupal, Drupal 5
I've been working on this rather large project that must make several REST based web service calls for each page generation. Each call can be cached for a different amount of time, ranging anywhere from 1 minute to 1 hour depending on the method being called. So I set out to make sure that the results of all of these calls were being cached for the appropriate amount of time.
theme_username woes
Posted by roger on Jun 30, 2008 | Filed under drupal, theming
I got an email the other day informing me that a blog author on a site I had build could not post comments on his own blog. Authenticated users were not having the same problem, just the blog author. So using devel, I switched to his user account and tried it myself.
"You have to specify a valid author."

