Hide block for certain content type in Drupal 6
<?php$match = TRUE;$types = array(‘library’ => 1);if (arg(0) == ‘node’ && is_numeric(arg(1))) {$nid = arg(1);$node = node_load(array(‘nid’ => $nid));$type = $node->type;if (isset($types[$type])) {$match = FALSE;}}if (drupal_is_front_page()) {$match = FALSE;}return $match;?>
When editing a block, paste this in the box on the bottom of the page and chose “show only if the following php-code returns ‘true’.” Then the block will show on every content type except the “library”-one, and neither on the frontpage. Of course you can change the “library” to whatever content type you want. As you see, a little lower in the code you find this: if (drupal_is_front_page()), that means that we hide it also on the frontpage. Remove that line and the two under it if you don’t want to use that function.
You like posts about Drupal? Then, read also my post about how to create quicktab blocks with cck fields inside.