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.

AttachmentSize
javascript-and-nodecomment.patch6.29 KB

#1

Michelle - June 20, 2009 - 01:37

Can I bow down and worship you for a while? LOL! I have been wanting this forever!

Michelle

#2

neclimdul - June 22, 2009 - 17:00

coolness. think you forgot to include the quote.js file though.

#3

merlinofchaos - June 22, 2009 - 19:08

Whoops. Forgot to fakeadd it. Try this one.

AttachmentSize
javascript-and-nodecomment.patch 8.2 KB

#4

neclimdul - June 22, 2009 - 20:00

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

neclimdul - June 22, 2009 - 21:27

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).

AttachmentSize
javascript-and-nodecomment.patch 7.38 KB

#6

Eidolon Night - July 10, 2009 - 01:26

Downloaded the dev, applied the patch just fine (quote.js is there), but the javascript stuff isn't working.

#7

neclimdul - July 13, 2009 - 16:22

JS Works great for me. Any more information you can give? information from your js error log, browser you used, etc.

#8

Michelle - November 2, 2009 - 19:34
Status:needs review» reviewed & tested by the community

#5 works just fine for me.

Michelle

#9

Michelle - November 11, 2009 - 19:13
Status:reviewed & tested by the community» needs work

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

 
 

Drupal is a registered trademark of Dries Buytaert.