Download & Extend

Comment form above comments

03.08.png

Adds option to place comment form above the comments thread.

Installation

1. Enable module.
2. Go to your content type and set Location of comment submission form to Display below post, but before comments.
3. Check your node. If form present — celebrate, otherwise proceed to next step.
4. Paste this code to your theme's template.php file:

/**
* Allow themable wrapping of all comments.
*/
function phptemplate_comment_wrapper($content, $node) {
  if (!$content || $node->type == 'forum') {
    return '<div id="comments">'. $content .'</div>';
  }
  else {
    return '<div id="comments"><h2 class="comments">'. t('Comments') .'</h2>'. $content .'</div>';
  }
}

5. Clear Drupal's cache. Check your node. Celebrate.

Caution: If your theme contains comment-wrapper.tpl.php file, do not perform step 4. Just add

<?php
print $form;
?>
to this template in place where you want to see the form.

Project Information

  • Module categories: Content Display
  • Maintenance status: Unknown
  • Development status: Unknown
  • Reported installs: 461 sites currently report using this module. View usage statistics.
  • Last modified: August 3, 2009

Downloads

Version Downloads Date Links
6.x-1.1 tar.gz (8.4 KB) | zip (11.22 KB) 2009-Aug-04 Notes

Maintainers for Comment form above comments

  • neochief - 4 commits
    last: 2 years ago, first: 2 years ago

Issues for Comment form above comments

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports
Oldest open issue: 4 Aug 09