I like this module a lot. My one complaint, though, is that the comment form shows up way down at the bottom of the list instead of above the comments. If anyone knows how to patch this module to make it happen, I'm willing to pay you for your time (provided the patch works, of course.) Contact info should be on my profile.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jcmarco’s picture

The Ajax Comments development version now depends on Comment Bonus API, this module allows theming each element.
Just take the comment-wrapper.tpl.php from comment bonus api directory,
change the order on the template and copy your new version to your theme templates directory.
Now you just need to clear the theme registry cache and it should work. I have tested here and it works.

If that works for you, just follow the link from the Ajax Comments and buy some books to the author.
"If you like this module very much, you can support the development by buying me some books."

neochief’s picture

jcmarco is 100% right

troyl’s picture

Use page-manager from CTools you can change the position of comments to anywhere you want have a granular control over the display of the node /comments

http://www.drupal.org/project/ctools

and enjoy

bflora’s picture

Thanks for the advice, guys but that didn't work.

I copied the file over to my theme directory, but it doesn't seem to be getting "picked up" by my site. When I delete or add stuff to the file or move things around, it has no impact on my comments layout. I've cleared my cache several times and see no change. What could be causing this?

My offer still stands. I will pay someone a reasonable rate to make this work for me so I don't have to spend hours trying to figure this out on my own. Thanks.

troyl’s picture

bflora’s picture

Thanks, troyl.

I installed the module and followed the installation directions. It did not appear to work properly.

Problems:

1. The comment form it generated was using a different input format from what my comment form usually does.
2. When I posted a few test comments using the new form, I would receive an error message saying the comment field needed to be filled in. Also, the cool ajax effect where you actually see the comment being written on the page was not happening.

I looked in the issue queue for the module and it looks like others are having similar issues without any posted fixes.

troyl’s picture

What are your requirements, what exactly are you trying to do, which node type or content type needs to have comment form on top,

Give me these details and I can help you with it...

hey_germano’s picture

Title: Will pay someone to patch module so comment form appears above comments. » Output the comment form above comments
Version: 6.x-1.8 » 6.x-1.x-dev

I copied the template as suggested by jcmarco in comment #1, and that worked - the comment form does appear above the comments now (thanks!!). However, when I save a new comment using this module, the new comment appears above the form. Ideally, the form would remain on top.

Is there a way I could get the new comment to appear below the form when it's up on top like this? I feel like the answer is somewhere in the ajax_comments_insert_new_comment function in ajax_comments.js, or maybe line 67 of ajax_comments.pages.inc (where the comment-new-success div comes from), but I'm having a tough time adapting either of those to work right for this case. Any ideas?

I changed the title of the thread because I can't pay for help here, but if somebody points me in the right direction, I bet I could write a patch.

I'm using the latest dev release of this module, Drupal 6.19 and Zen theme. My comment-wrapper.tpl.php looks like this:

<?php if ($comment_form): ?>
  <h2 class="title"><?php print t('Post new comment'); ?></h2>
    <div>
      <?php print $comment_form; ?>
    </div>
<?php endif; ?>
<div id="comments" class="<?php print $classes; ?>">
  <?php if ($node->type != 'forum'): ?>
    <h2 class="comments"><?php print t('Comments'); ?></h2>
  <?php endif; ?>
  <?php print $comments; ?>
  <?php print $pager; ?>
</div>
sachbearbeiter’s picture

Status: Active » Needs review
FileSize
1.37 KB

Gabor Horvath wrote a small module for us ... thanks to him + please test ...

"Installation: as usual.
Configuration: please go to Administer > Content management > Content Types, click edit of the content type with comments, and change the setting of "Location of comment submission form" to "Display below post, but before comments". [...] it checks the order of the comments (newest first or oldest first), and the new comment is placed in the first or in the last position, depending on the order."

sachbearbeiter

rjbrown99’s picture

#9: Is this module specifically coded to work with ajax_comments, or is it more applicable to Drupal comments in general? I'm asking because this module makes some assumptions about the page location of certain elements, such as the h2 title tag. I'm not sure if a generalized solution would work for ajax_comments.

If your module is designed to work with ajax_comments, I'd encourage you to instead submit the functionality as a patch to this module. That would make it reviewable for inclusion in the ajax_comments module itself.

#8: You are on the right track - ajax_comments_insert_new_comment is the place where the module determines where new comments are inserted. If you wanted a proper implementation of this, you might -

  • Edit ajax_comments.admin.inc to add a new variable for where the new comments appear. If you want to be really slick you could hook_form_alter() the node_type_form and save the setting per defined content type.
  • In ajax_comments_insert_new_comment, check if your variable exists (similar to init_form). If it does, insert the comment according to that setting.

You might want to have a look in the jQuery docs at .before(), .after(), and .next() as they are what will control where the comment appears.

sachbearbeiter’s picture

@10 it was a fix for a running project - so i think it will work for a lot of use cases, but it's not a general solution ...

AaronMcHale’s picture

This module and the Comment Form About Comments modules do not work together, this needs to be fixed, it would be good if the developers of both modules could work together to fix this and implement the fix in the next releases of these modules.

Aaron

jcmarco’s picture

@aaronmchale it seems you are trying to hijack this issue, the best is that you open a new issue in both modules and try to explain better what is not working.

AaronMcHale’s picture

@jcmacro - :)!

Aaron

vkapas’s picture

#9: Many-many thanks! It's work for me! )

Drupal 6.20, AJAX Comments 6.x-1.8, Sky theme.

yngens’s picture

#9 works fine, however comment form does not show on the new node. In other words it appears on any node that already have comments. The patch in Issue #678972: Comment form does not show on the new node takes care for comment_form_above_comments module, but comment_form_above_comments2.

blogers’s picture

Issue summary: View changes

Drupal 7 and drupal 8 module ?=

qzmenko’s picture

Status: Needs review » Closed (outdated)

Issue is closed because 6.x version is unsupported. Feel free to open new issue for 7.x or 8.x versions of module.