Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#9 | comment_form_above_comments2.tar_.gz | 1.37 KB | sachbearbeiter |
Comments
Comment #1
jcmarco CreditAttribution: jcmarco commentedThe 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."
Comment #2
neochief CreditAttribution: neochief commentedjcmarco is 100% right
Comment #3
troyl CreditAttribution: troyl commentedUse 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
Comment #4
bflora CreditAttribution: bflora commentedThanks 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.
Comment #5
troyl CreditAttribution: troyl commentedthere you go,
http://drupal.org/project/comment_form_above_comments
Enjoy :-)
Comment #6
bflora CreditAttribution: bflora commentedThanks, 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.
Comment #7
troyl CreditAttribution: troyl commentedWhat 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...
Comment #8
hey_germanoI 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:
Comment #9
sachbearbeiter CreditAttribution: sachbearbeiter commentedGabor 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
Comment #10
rjbrown99 CreditAttribution: rjbrown99 commented#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 -
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.
Comment #11
sachbearbeiter CreditAttribution: sachbearbeiter commented@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 ...
Comment #12
AaronMcHaleThis 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
Comment #13
jcmarco CreditAttribution: jcmarco commented@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.
Comment #14
AaronMcHale@jcmacro - :)!
Aaron
Comment #15
vkapas CreditAttribution: vkapas commented#9: Many-many thanks! It's work for me! )
Drupal 6.20, AJAX Comments 6.x-1.8, Sky theme.
Comment #16
yngens CreditAttribution: yngens commented#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.
Comment #17
blogers CreditAttribution: blogers commentedDrupal 7 and drupal 8 module ?=
Comment #18
qzmenkoIssue is closed because 6.x version is unsupported. Feel free to open new issue for 7.x or 8.x versions of module.