Show Block for Specific Content Type (my case is thai)
<?php
$node = node_load(arg(1));
$type = $node->type;
return in_array($type,array('thai'));
?>
Hide Block for Specific Content Type (thai)
<?php
$match = TRUE;
$types = array('thai' => 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;
}
}
return $match;
?>
More inform, see here: http://drupal.org/node/115419
The above codes are used for Kawaii Kindergarten sites to control English and Thai menus.See here: http://ibc.ac.th/kk
Show Block for Specific Content Type in Drupal 5
<?php
if (arg(0) == 'thai') {
return TRUE;
}
if (arg(0) == 'node' && ctype_digit(arg(1))) {
$node = node_load(arg(1));
if ($node->type == 'thai') {
return TRUE;
}
}
return FALSE;
?>