• 06/01/2009 - 13:58

    ie6, the bane of our existence

    There's an infinite amount of posts all over about how to 'tame the beast', as it were... Despite this, here's a few ways I've dealt with browser specific quirks and general unpleasantness, to make my designs cross browser friendly and client friendly (...

  • 05/11/2009 - 12:28
    <?php 
    	if($node->type == 'story') {
    		$nodetype_class = 'story';
    	}
    	elseif($node->type == 'blog') {
    		$nodetype_class = 'blog';
    	}
    	elseif($node->type == 'page') {
    		$nodetype_class = 'page';
    	}
    ?>
      <body class="<?php print $nodetype_class; ?>">
    

    This looks...

  • 05/11/2009 - 12:17

    For Drupal 5

    Adding the following to template.php allows files named page-nodetype.tpl.php to override the base page.tpl.php. This way, nodetypes can have their own design or blocks without relying on the general template.

    
    function...
  • 03/25/2009 - 16:12

    Snippet to change the node created on date for use in story nodes:

    In node-story.tpl.php or other node tpl:

    <?php print format_date($node->created, 'custom', 'F jS, Y'); ?>

    Prints:

    March 25th, 2009

    Check out...

  • 03/05/2009 - 17:22

    This is a handy bit to know when you get a db dump and don't know the admin password that's been setup. (And are too impatient to wait for an email response? :P )

    update users set pass=md5('kittens') where uid=1
    

    Replace kittens with desired password. This effects User ID 1 (...

  • 03/05/2009 - 14:35

    Recently I needed to update a Drupal 5 site to Drupal 6 that used views. The old views from 5 weren't showing up after the update, I couldn't find much information on this strangely. If you're having problems finding out where your views went they...

  • 02/25/2009 - 20:11

    Looking to override the breadcrumb separators? Add the following to template.php-
    Replace 'kitten' with something like > or » or even an image.

    function phptemplate_breadcrumb($breadcrumb) {
      if (!empty($breadcrumb)) {
        return '<div class="breadcrumb">'. implode('...
  • 10/28/2008 - 16:36

    Continuing the story of ditching TextMate, after switching over to Vim, I was still using textmate's search project function, which I found helpful searching through hundreds of module folders and theme folders for larger projects. But, heh, besides the fact that my trial was expired, it is...

  • 10/23/2008 - 18:04

    By divider I mean the '|' that I currently have on my site's titlebar. Now, this is all fine, to have $site_name and $title appear with a | separator, but It kind of looks weird on the front page when there is no page title.

    It's pretty easy to just have it called differently when you...

  • 10/22/2008 - 16:24

    Tabled Layouts.. what are those? Oh Right! That ancient practice that is now shunned. But, I mean tables have their purpose to display data, so we all are still styling them right?

    After recently being thrown into the old, unsophisticated world of HTML Emails...