Index: discussthis.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/discussthis/discussthis.module,v retrieving revision 1.7 diff -u -p -r1.7 discussthis.module --- discussthis.module 25 Jun 2008 14:20:44 -0000 1.7 +++ discussthis.module 23 Dec 2008 00:52:58 -0000 @@ -124,6 +126,15 @@ function discussthis_nodeapi(&$node, $op } elseif ($node->type == 'forum') { switch ($op) { + case 'view': + $default_body = 'Following is a discussion on the [node-type-name] item titled: [node-link]'. + '.
Below is the discussion so far. Feel free to add your own comments!
'; + $forum_body = variable_get('discussthis_newtemplate', $default_body); + $node->content['discussthis'] = array( + '#weight' => 0, + '#value' => token_replace($forum_body, 'discussthis', $node), + ); + break; case 'delete': // drop db row for this forum nid $sql = 'DELETE FROM {discussthis} WHERE topic_nid = %d'; @@ -480,9 +491,7 @@ function _discussthis_new_topic($nid) { $values['name'] = variable_get('discussthis_author', $admin->name); $values['title'] = token_replace(variable_get('discussthis_newsubject','[node-title]'), 'discussthis', $node); - $default_body = 'Following is a discussion on the [node-type-name] item titled: [node-link]'. - '.
Below is the discussion so far. Feel free to add your own comments!
'; - $values['body'] = token_replace(variable_get('discussthis_newtemplate',$default_body), 'discussthis', $node); + $values['body'] = ''; $values['taxonomy'][1] = $tid; $values['status'] = 1;