Closed (fixed)
Project:
AJAX Comments
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Oct 2010 at 20:28 UTC
Updated:
26 May 2011 at 01:01 UTC
Jump to comment: Most recent
Comments
Comment #1
dgastudio commentedsubscribe
Comment #2
David Latapie commentedsubscribe too
Comment #3
Nick Robillard commentedsubscribe
Comment #4
chriz001 commentedsubscribing
Comment #5
v.zhakov commentedsubscribe
Comment #6
zarudnyi commentedSubscribe
Comment #7
denisanokhin commentedSubscribe
Comment #8
endrus commentedSubscribe
Comment #9
matt.robinson1 commentedsubscribe
Comment #10
endrus commentedExaminer.com runs D7 and it has ajaxified comments, similar to what this module does. Makes me wonder whether the module was already ported but the code was not shared. Or maybe there's some other solution for D7 available?
Comment #11
dgastudio commentedi didn't see any ajax in examiner.com
for example:
http://www.examiner.com/beatles-in-national/paul-mccartney-says-he-went-...
Comment #12
Anonymous (not verified) commentedHi all the best for all
It is an great module
I'm using D7 and i have audio playing... from my www.cameratanovnorte.eu ....
on sametime, and it is in private users, for avaliate each concert, the "submit" "stops" the music.
Subscribe
Best regards
ArchGalileu
www.gasparsantos.eu
www.quartetodouro.eu
www.cameratanovnorte.eu
Comment #13
damienmckennaSubscribe.
Comment #14
damienmckennaSo, anyone have suggestions on how this would be done?
Comment #15
jwilson3From just looking at the forms_api_reference.html, it looks like what was #ahah in D6, is now #ajax in D7.
Without looking at this module's D6 code at all, I'd venture to propose a really superficial guess to get things started:
* Implement a hook_form_alter (or the d7 equivalent) that adds in an #ajax attribute to the comment form submit button element.
* Create a custom callback function to handle form submissions from ajax (as opposed to the regular form submit). In D6 this might have been handled by a form_submit handler override), but now looks like you can just create your own callback -- MUCH cleaner -- me likey.
* Then create a couple special lines of js to handle / format what is returned in place. (This might be even possible without any additional coding in the submit button #ajax handler 'wrapper' and 'method' parameters. (See the example linked above in the fapi#ajax documentation).
something like:
This would be how to get started by /only/ ajaxifying the comment form submission. Not sure what else could be done with this, or what else the d6 module does itself that would need to be replicated using the new ajax d7 system.
Comment #16
acouch commentedI started to play with this and got the basic structure for how the new D7 ajax stuff would work. I created a sandbox since there is not a 7.x version here: http://drupal.org/sandbox/acouch/1137212
The goal would be to recreate the functionality in this module and get it committed to this module, though I started from scratch and am trying to work back.
I will probably have enough time next weekend to get this usable for folks as of right now it just does grabs the form submission and pastes it on the page as well as overrides the 'reply' link and offers the comment form under the reply link.
I haven't added the logic for placing the comments in the right place though that wouldn't take too much more work.
Comment #17
webankit commented+1
Comment #18
olofbokedal commentedSubscribing
Comment #19
acouch commentedI've put some more work into this and have the base functionality working: http://drupal.org/sandbox/acouch/1137212
This is a little more light-weight implementation of the module as the ajax_command framework in D7 makes things easier.
I've included the ability for administrators to decide which content types to include. However this is a performance drain as it has to check for every comment view and use of the reply button. I'm not sure how to alleviate this (to not check _comment_view and comment_form_alter) for every comment especially for node types not selected to use this. It almost seems better to leave this off but would like to hear from users first.
I didn't include the blinking feature. D7 core comments are only oldest to newest (the option to reverse was removed) so the comment always appears where the form was. I've also added a message that shows that the comment was posted successfully.
I haven't gotten a chance to add the row count and reply row counts to the admin but will.
TODOs:
Again my preference is to get this in this module so will contact the maintainer if one of them isn't listening already.
Comment #20
yugongtian commented+++
Comment #21
acouch commentedneochief was gracious enough to give me commit access to this project.
I've created a 7.x branch and committed my initial work.
Please open issues for this dev branch. It is working but needs more work to get to a stable release. Thanks.
Comment #22
rogical commented+1