any plans for porting this module to D7?

Comments

betarobot’s picture

Maybe there is not so much need for this module anymore. In D7 you can easily display form above comments by adjusting your comment-wrapper.tpl.php:

<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
  <?php if ($content['comments'] && $node->type != 'forum'): ?>
    <?php print render($title_prefix); ?>
    <h2 class="title"><?php print t('Comments'); ?></h2>
    <?php print render($title_suffix); ?>
  <?php endif; ?>

  <?php if ($content['comment_form']): ?>
    <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
    <?php print render($content['comment_form']); ?>
  <?php endif; ?>

  <?php print render($content['comments']); ?>

</div>

Just don't forget that comment.tpl.php should be also present in this theme/subtheme.

nikita petrov’s picture

StatusFileSize
new790 bytes

Here is D7 module for this task.
When module is enabled, it simply overrides standart comment-wrapper.tpl.php for whole site.

alliax’s picture

Thank you for this quick module that does the trick in D7!

BeaPower’s picture

I get this error after installation: Warning:

include(/home/content/89/*/html/sites/all/themes/adaptivetheme/at_core/templates/sites/all/modules/comment_form_above_comments/comment-wrapper.tpl.php) [function.include]: failed to open stream: No such file or directory in theme_render_template() (line 1495 of /home/content/89/*/html/includes/theme.inc).
Warning: include() [function.include]: Failed opening '/home/content/89/*/html/sites/all/themes/adaptivetheme/at_core/templates/sites/all/modules/comment_form_above_comments/comment-wrapper.tpl.php' for inclusion (include_path='.:/usr/local/php5_3/lib/php') in theme_render_template() (line 1495 of /home/content/89/*/html/includes/theme.inc).

pradyumnahpt’s picture

Hi betarobot,

Thank you for posting the solution,Actually I tried your solution,its working correct,but when I sort the comments in "newer first" format,the newly added comment is pushed last, so sort order is not working.It will become correct only after refreshing the page.Is there any fix for it ?.

Thank You

betarobot’s picture

@pradyumnahpt: My code sample should not affect sorting or any other functionality. You have to look for something else in your theme. Maybe some CSS that make comments float right or something like that.