You are here

function forum_prepare in Drupal 5

Same name and namespace in other branches
  1. 4 modules/forum.module \forum_prepare()

Implementation of hook_prepare; assign forum taxonomy when adding a topic from within a forum.

File

modules/forum/forum.module, line 405
Enable threaded discussions about general topics.

Code

function forum_prepare(&$node) {
  if (!$node->nid) {

    // new topic
    $node->taxonomy[arg(3)]->vid = _forum_get_vid();
    $node->taxonomy[arg(3)]->tid = arg(3);
  }
}