By sammyman on
What is the difference between a hook and a module?
I am trying to use hook_calais_preprocess to auto tag posts with custom tags that I define, but I have no idea how to implement this. Do I create a hook or a module? And what is the difference so I start on the right foot? Thanks
Comments
From the documentation
Hooks are the functions that quote is talking about. Start reading here --> Creating modules - a tutorial: Drupal 6.x
but the function
but the function calais_preprocess has already been created in the calais module. So now I have to implement it. Do I have to modify the code in calais module, or create my own module?
Hooks have names of the form
Hooks have names of the form hook_somename, for example, hook_nodeapi. The 'hook' part is replaced with the name of the module that implements the hook. hook_preprocess is a theming hook (see http://drupal.org/node/223430) and calais_preprocess is an implementation of the hook. You can write your own module that implements hook_preprocess which does additional preprocessing.
Ok thanks. I think I now
Ok thanks. I think I now understand the nomenclature....