Support for nodecomment module, plus javascript quoting and multi-quoting
merlinofchaos - June 20, 2009 - 00:13
| Project: | Quote |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
This patch adds support for nodecomment module (it's automatic and will not interfere if nodecomment is not enabled). It also adds javascript (which can be disabled) that will make the quote link simply add the quote directly to the comment if the comment input textarea is on the same page.
The DruBB project requires both quote and nodecomment, and will need this patch in order for quoting to be valuable. I think this patch generally improves the usability of quote.module, so I hope you'll accept it.
| Attachment | Size |
|---|---|
| javascript-and-nodecomment.patch | 6.29 KB |

#1
Can I bow down and worship you for a while? LOL! I have been wanting this forever!
Michelle
#2
coolness. think you forgot to include the quote.js file though.
#3
Whoops. Forgot to fakeadd it. Try this one.
#4
On pages with a lot posts we're creating a lot of duplicate onload code. I wonder if this would be better fit in a settings variable that could be parsed as needed or as a ahah/ajax callback.
I've talked to merlin about using settings and he feels its "six of one, half a dozen of the other" so I'm going to play with putting it in a settings array since I think it will lower the amount of js added to a page.
#5
Here's a version that uses the Drupal.settings object.
It also internalizes some of the code using some javascript namespace voodoo.
On a page with 3 replies(4 posts) that where fairly short, the page was just under 1k smaller(911 bytes).
#6
Downloaded the dev, applied the patch just fine (quote.js is there), but the javascript stuff isn't working.
#7
JS Works great for me. Any more information you can give? information from your js error log, browser you used, etc.
#8
#5 works just fine for me.
Michelle
#9
I just found a problem with this. It doesn't work with WYSIWYG. I realize that's not a problem for DruBB, which is what this is coming from, but it's a problem in that normal functionality is broken when using a WYSIWYG. Not only does the javascript not work, but then you've lost the old way of it going to a new page with the reply. So the quote button is there but does nothing.
Ideally, this would be made to work with WYSIWYG but I don't have the skills to pull that off. :( If that's not possible, could it be made to detect WYSIWYG and not attempt to use the javascript in that case? Failing all those, I guess it could be set back to RTBC with a note that the javascript option needs to be turned off if you use WYSIWYG but I'm crossing my fingers someone with javascript skills will make it work. :)
Michelle