How do I use hook_nodeapi()? I found an example on the Internet: Transform CCK field to body content. 

function riddle_nodeapi(&amp;$node, $op, $teaser, $page) {
  if ($node-&gt;type == "historia") {
    switch ($op) {
      case 'view':
        if ($node-&gt;field_svar[0]['value'] != "" AND $page == 1) {
          $svar = '&lt;form&gt;&lt;fieldset class="collapsible collapsed"&gt;
            &lt;legend&gt;Svar&lt;/legend&gt;
            &lt;div&gt;'.$node-&gt;field_svar[0]['value'].'&lt;/div&gt;
            &lt;/fieldset&gt;&lt;/form&gt;';

          $node-&gt;content['riddle'] = array(
            '#value' =&gt; $svar,
            '#weight' =&gt; 0,
          );

          if (is_array($node-&gt;content['field_svar'])) {
            unset($node-&gt;content['field_svar']);
          }
        }

        break;
    }
  }
}


I don't know what the purpose of the following code is. Why should I use it?

 if (is_array($node-&gt;content['field_svar'])) {
   unset($node-&gt;content['field_svar']);
 }


What's the use of the hook_nodeapi() arguments $a3 and a4?
If in the case of a view operation, I set the $a3 to true or 1, will the body only effect on the node teaser? Am I right?
The following code is used because the module is already rendering the CCK field, and wants to avoid that Drupal renders the content of that field.

if (is_array($node-&gt;content['field_svar'])) {
  unset($node-&gt;content['field_svar']);
}


Without using that code, the field content will appear twice: once inside a field set, and once outside that field set.

The last parameters used for hook_nodeapi() are described from the documentation as:


  $a3 
  
  
  For "view", passes in the $teaser parameter from node_view().
  For "validate", passes in the $form parameter from node_validate().
  
  
  $a4
  
  
  For "view", passes in the $page parameter from node_view().
  


It means that, when the operation is "view," $a3 is TRUE when Drupal is displaying the teaser (and FALSE when Drupal is displaying the full node content), and $a4 is TRUE when the node is being displayed alone in a page (and FALSE when the node is being displayed together other nodes in the same page).
To understand the meaning of the different values given to $a4, $a4 is TRUE when Drupal is displaying, for example, the page http://example.com/node/1 (where the same page displays only a node); its value is FALSE when Drupal is visualizing the front page and there are more than one node promoted to the front page.