calendarsignup_nodeapi

Versions
6
calendarsignup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL)

hook_nodeapi implementation

Code

contrib/event/contrib/calendarsignup/calendarsignup.module, line 22

<?php
function calendarsignup_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
  if (variable_get('event_nodeapi_'. $node->type, 'never') != 'never') {
    switch ($op) {
      case 'view':
        if (arg(0) == 'event' && _signup_needs_output($node)) {
          // Store the data into the content array, for default display.
          module_load_include('inc', 'signup', 'includes/signup_form');
          $node->content['calendarsignup'] = array(
            '#value' => drupal_get_form('calendarsignup_form_'. $node->nid, $node, 'auth', TRUE),
            '#weight' => 10,
            );
        }
    }
  }
}
?>