Drupal 5

Tags Vocabularies Without The Pitfalls

Submitted by Bevan Rudge on December 3, 2008 - 1:10am

Drupal's tagging vocabularies are really useful when webmasters and admins can not anticipate what categories or terms content authors and editors are going to need. The pitfall however, is that it is too easy for content editors to make a mess of the vocabulary by creating duplicate terms that are spelled wrong, similar to or synonymous of existing terms. And a "dirty" vocabulary such as this can be rather difficult to clean up and can be a real problem if content needs to be structured.

The alternative is to create a fixed vocabulary which can only have terms added through the taxonomy admin UI. This avoids building a messy vocabulary, but does away all of the advantages of a folksonomy, or tags vocabulary.

I recently learned a technique that offers most of the best parts of both worlds. Here's the recipe;

Light Fantastic; Backporting A Great Drupal 6 Contrib Theme To Drupal 5

Submitted by Bevan Rudge on September 29, 2008 - 9:14pm

UPDATE: Buddhika Amila Sampath created the Light Fantastic theme, not Joshua Brauer. Joshua is the maintainer.

Screenshot of lightfantastic theme I recently searched on Themebot for a great contributed Drupal flexible-width theme for DrupalSouth.net.nz and found Light Fantastic. Joshua Brauer maintains the awesome Light Fantastic theme, which was created by Buddhika Amila Sampath as part of the Google Summer of Code 2007.

Screenshot of Light Fantastic on the DrupalSouth website:
Screenshot of Light Fantastic on DrupalSouth.net.nz
See a larger image.

Customizing "View More" Links In Views 1 For Drupal 5

Submitted by Bevan Rudge on August 19, 2008 - 11:55pm

A short, quick and easy tip for views theming and customization.

To customize the text or the destination path/url of a 'view more' link in Views. Add this to template.php in your phptemplate theme and add cases.

<?php
/**
* Override theme_views_more() to set custom link texts and destinations.
* @param $path String
*   The destination of the more link.
*/
function _phptemplate_views_more($path) {
 
$text = 'more';
  switch (
$path) {
    case
'foo/bar':
     
$text = 'doh';
      break;
  }
  return
"<div class='more-link'>" . l(t($text), $path) . "</div>";
}
?>

How To Rebuild The Menu In Drupal 6

Submitted by Bevan Rudge on August 19, 2008 - 7:17am

To rebuild the menu in Drupal 6 you have to go to admin/build/modules.

In drupal 5 the menu is cached in the cache_menu table, so it is easy to invoke a menu-rebuild by emptying the table with a simple mysql command like TRUNCATE cache_menu;. (I have a handy script that empties all tables starting with cache_).