icodemonkey

Block display control by node type

Snippet from here: http://drupal.org/node/115419

<?php
  
// Only show if $match is true
  
$match false;

  
// Which node types
  
$types = array('event''anothernodetype' );

  
// Match current node type with array of types
  
if (arg(0) == 'node' && is_numeric(arg(1))) {
    
$nid arg(1);
    
$node node_load(array('nid' => $nid));
    
$type $node->type
    
$match |= in_array($type$types);
  }

  return 
$match;
?>

!!!!!

Might have better luck with the below, to avoid possible complicated problems that falsely appear to come from ACL

http://www.feike.biz/weblog/2008/01/07/drupal-using-node-and-user-inform...

if (arg(0) == 'node' && is_numeric(arg(1)) && (arg(2) == '' || arg(2) == 'view')){