function forum_prepare in Drupal 4
Same name and namespace in other branches
- 5 modules/forum/forum.module \forum_prepare()
Implementation of hook_prepare; assign forum taxonomy when adding a topic from within a forum.
File
- modules/
forum.module, line 406 - 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);
}
}