Module is enabled but none of the hooks work I have created this simple module (named "youtube"):



echo 'outside function';

function youtube_view($node, $view_mode) {
   echo 'inside function&lt;br /&gt;';

    return $node;
  }


I can only see the echo outside of the function. I've tried numerous hooks and I can't get any of them to work. The only thing different is that I am a new user to Drupal 7 and this is created on a multi site.

My structure for this module is:

sites/customsites/modules/youtube

And the site can see it fine as I have enabled it in the backend.

Do you have any idea on why this happens?
Hook implementations are cached in Drupal 7. After adding a new hook, you need to clear the cache for example using the devel block or drush cc all.

Also, hook_view() is not actually a hook. It is callback that is only invoked for the module which provides the given node type.