User login

Drupal Theming

Base themes to build sites with



WSF2008 promotional banners

could Dan start working on a few proposals for Banners. They could be generic for now, we are working on the text: "Jan. 26th, 2008 - Another world is possible" - "Participate to the Global day of action", etc.

[I also though that it would be great if we could make some kind of widget that "counts down" the days to the 26th of Jan and that can be used as a banner]


The latter would be a graphic that Drupal has to update, and is hosted on our server. I'm sure there are PHP scripts for this if nothing else.

The easiest way to do CCK teasers!

So, if you're reading this then you've most likely followed this ( excellent guide written by my esteemed colleague Ben, and now you've got yourself some kick ass custom themed cck nodes.

Imagecache not showing images

Oh my god that was SOOOOOOOO annoying. We spent a simply silly amount of time trying to figure out why imagecache images would not display at all.


Even though Agaric Design's site is now on Drupal 5, we hadn't changed the .htaccess file in the Drupal files directory since it was a tender young 4.7.

And therein lay the problem.

To quote from the imagecache modules page itself (a moral of this story is to always go there first-- in this case the answer was right on the front page before we could even look in the issue queue)

Showing available variables in a theme and making new ones

Together these will get us there (creating the variable) but I have the feeling it already exists-- how do I see it?

function _phptemplate_variables($hook, $vars) {
  switch ($hook) {
    case 'page':
      if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == '') {
        $vars['content_is_node'] = TRUE;
  return $vars;

Path to theme

Looking for the drupal path to your current theme? It can be helpful if you're making a theme and, for a change, you want to link directly to

print theme('stylesheet_import', base_path() . path_to_theme() ."/modules.css");

For our purposes, something like:

<img src="<?php echo base_path() . path_to_theme() . "/sample.png"; ?>" />

Now I'm not sure that "." in echo will work. Feel free to test it out for us!

Syndicate content