You are here

function notifications_ui_nodeapi in Notifications 6.3

Same name and namespace in other branches
  1. 6.4 notifications_ui/notifications_ui.module \notifications_ui_nodeapi()
  2. 6 notifications_ui/notifications_ui.module \notifications_ui_nodeapi()
  3. 6.2 notifications_ui/notifications_ui.module \notifications_ui_nodeapi()
  4. 7 notifications_ui/notifications_ui.module \notifications_ui_nodeapi()

Display a button + js overlay

From http://groups.drupal.org/node/17779

File

notifications_ui/notifications_ui.module, line 396
User Interface for subscriptions modules

Code

function notifications_ui_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
  global $user;
  static $form_instance_id = 0;
  if ($op == 'alter' && notifications_ui_node_options($node->type, 'subform')) {
    if ($options = notifications_ui_subscribe_options($user, 'node', $node)) {
      $node->body .= drupal_get_form('notifications_ui_options_form_' . $form_instance_id, $options, TRUE, TRUE);
      $form_instance_id++;
    }
  }
}