cailin's blog
ode to my home town two
my father just emailed me this photo, and i can't help myself - it has to be taken public. this phrase adorned the mcdonalds sign in thunder bay, ontario, canada from the morning of saturday, june 1st, through the afternoon of sunday, june 2nd - at which point somebody finally informed the management.
now what i'm dying to know is :
1. did it take more than 24 hours for somebody to notice?
2. did people notice, but not want to spoil the joke?
3. did people notice, but were too embarassed / polite to tell the restaurant staff?
my home town seems to be prone to buttocks related public relations bloopers. one of my favorite strange-but-true tales is of a former mayor, walter assef (no, not a joke) who patted the behind of none other than queen elizabeth.
- 1 comment
- 241 reads
travel tips for toddlers on an airplane
i'm sure their are toddlers who travel on airplanes more often than my daughter - but she gets around her fair share. she's 21 months old now and i believe she's been on at least 10 journeys that included more than 6 hours of total flight time in a day. our last flight (at age 21 months) was such a breeze that i thought i'd take a moment to share the current secrets of my success.
here are the various gadgets that we bring along . . .
best baby and toddler books
my favorite picks for reading to kids aged 0-2 years. check out related posts on best baby gadgets and best baby and toddler toys. if you're curious about the inspiration behind the list, visit ava's blog.
best baby and toddler toys
my favorite picks for keeping the little one entertained. check out related posts on best baby gadgets and best baby and toddler books. if you're curious about the inspiration behind the list, visit ava's blog.
- add new comment
- read more
- 214 reads
best baby gadgets
a quick list of the most useful gadgets for keeping the little one clean, fed, and comfortable. for entertainment and education, check out related posts on best baby and toddler toys and best baby and toddler books. if you're curious about the inspiration behind the list, visit ava's blog.
- add new comment
- read more
- 764 reads
cck witch - multi-page cck forms for drupal
the blessing and curse of cck is the ability to quickly create very complex node types within drupal. it doesn't take very long before the input form for a complex node type has become unmanageably long, requiring your user to do a lot of scrolling to get to the bottom of the form. the obvious solution is to break your form into multiple pages, but there is no easy way to do this. there do exist two proposed solutions to this, the cck wizard module and a drupal handbook entry. however, the well-intentioned cck wizard module doesn't seem to work, and the example code in the drupal handbook becomes tedious to repeat for each content type. to fill the void, i bring you cck witch
cck witch is based on the same premise as the handbook entry : the most natural way to divide a cck form into pages is to use field groups. from there, however, cck witch diverges, taking a relatively lazy, yet effective approach to the problem of multi page forms: on every page we render the entire form, but then simply hide the fields and errors that do not belong to the current step. it also offers an additional feature : when the form is complete and the node is rendered, an individual edit link is provided for each step - allowing the user to update the information only for a particular page in the form, without having to step through the entire wizard again.
if you've now read enough to be curious to see the goods, then please, be my guest and skip straight to the live demo.
- 11 comments
- read more
- 4291 reads
log4drupal - a logging api for drupal
if your career as a developer has included a stay in the j2ee world, then when you arrived at drupal one of your initial questions was "where's the log file?". eventually, someone told you about the watchdog table. you decided to try that for about five minutes, and then were reduced to using a combination of <pre> and print_r to scrawl debug data across your web browser.
when you tired of that, you learned a little php, did a little web research and discovered the PEAR log package and debug_backtrace(). the former is comfortably reminiscent of good old log4j and the latter finally gave you the stacktrace you'd been yearning for. still, separately, neither gave you quite what you were looking for : a log file in which every entry includes the filename and line number from which the log message originated. put them together though, and you've got log4drupal
log4drupal is a simple api that writes messages to a log file. each message is tagged with a particular log priority level (debug, info, warn, error or emergency) and you may also set the overall log threshold for your system. only messages with a priority level above your system threshold are actually printed to your log file. the system threshold may changed at any time, using the log4drupal administrative interface. you may also specify whether or not a full stack trace is included with every message. by default, a stack trace is included for messages with a priority of error and above. the administrative options are illustrated below :
- 12 comments
- read more
- 2351 reads
better css for the drupal hovertip module
don't get me wrong, i'm a happy customer of the drupal hovertip module. everything worked out of the box, and i've enjoyed using it to cram even more pictures into my website. however, the included default css leaves a little to be desired for the following reasons :
- it's too specific. it assigns a very particular look and feel to your tooltips, complete with background colors, fixed widths and font sizes. sure, in theory, you can override all that in your theme css. but if css specificity is not your thing, you're going to be tearing your hair out trying to figure how to do it.
- the ui element chosen to indicate "hover here" is non-standard. the "hover here" directive is admittedly fairly new, but the emerging standard seems to be the dashed-underline (certainly not the italic font used in the drupal hovertip module).
- the clicktip css does not work on ie6. the link to close the clicktip has mysteriously gone missing.
you can download a more generic, flexible version of the necessary hovertip module css that solves all these issues here. here are some examples of how to use it.
- read more
- 2089 reads
advanced drupal views access control
out of the box, the views module allows you to specify access to the view according to user role. this is a critical feature, but sometimes it's not enough. for example, sometimes you may want the view access to depend on the arguments to the view.
specifically, let's suppose that we have implemented facebook-style threaded mail, and we want to use a view to display all the messages in a thread. the thread id is an argument passed to the view. we only wish to allow the view to be accessed by one of the authors of the thread, or users with the 'administer messages' permission.
here's a three step approach to resolving this dilemna :
implementing hook_access for cck content types
previously, we discussed implementing all of the node hooks for CCK content types except hook_access. unfortunately, there is no access op for hook_nodeapi. adding this to drupal core is the topic of much discussion on drupal.org. so far a resolution to the issue has failed to be included in drupal 5 and drupal 6, and is now on deck for consideration in drupal 7.
- add new comment
- read more
- 688 reads







