Fix for Example Block Filter

  1. <?php
  2. $match = FALSE;
  3. $url = request_uri();
  4. $types = array('mycontenttype' => 1);
  5. if (arg(0) == 'node' && is_numeric(arg(1))) {
  6.   $nid = arg(1);
  7.   $node = node_load(array('nid' => $nid));
  8.   $type = $node->type;
  9.   if (isset($types[$type])) {
  10.     $match = TRUE;
  11.   }
  12. }
  13. return $match;
  14. ?>

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.