Drupal Page Specific visibility settings
Show block only to logged in user:
global $user;
if ($user->uid){
return true;
} else {
return false;
}
Show block only on specific node type:
$match = FALSE;
if (arg(0) == 'node' && is_numeric(arg(1))) {
$nid = arg(1);
$node = node_load(array('nid' => $nid));
$type = $node->type;
if ($type == 'story') {
$match = TRUE;
}
}
return $match;