I know that hook_filter do filtering every time I edited the page.
But I need a filter-like function to be performed every time I load some specific node.

How can I do that?

Comments

wolv3rin3’s picture

when your hook_filter get called with the $op to 'no cache' return TRUE

.
function hook_filter($op, $delta = 0, $format = -1, $text = '') 
{
  switch ($op)
  {
  	case 'list':
  		//do something
  	case 'description':
         	//do something
  	case 'no cache':
         	return FALSE;
      	case 'prepare':
         	//do something
      	case 'process':
         	//do something
      	default:
      	      	return $text;
  }
}

you can need to disable and re-enable your filter for your Input formats to have the hook_filter called with the 'no cache' argument

--
Rock it,
oyoaha

kitchen.oyoaha.com