<?php

$undesired_types = array('book');
if ( arg(0) == 'node' && is_numeric(arg(1)) ) {

  $node = menu_get_object();
  return !in_array($node->type, $undesired_types);
}

$path = $_GET['q'];
$unwanted_paths = array('/apachesolr_search/', 'serc-big-table');
foreach ($unwanted_paths as $unwanted) {
    $pos = strpos($path, $unwanted);
     if ($pos !== FALSE) {
        return FALSE;
     }
}
return TRUE;
?>