I see what you're saying. There are a few differences between these two plugins, and several reasons why I felt it was needed.
Working on the VanillaPorter it became evident that we needed to be able to support existing quote content in posts that came from vBulletin and other forums, using BBCode and possibly other formats.
For that reason, I designed my plugin to tie into the Garden.InputFormat and the GDN_(Discussion|Comment).Format field and parse for quotes at render time, rather than inserting HTML into the table directly.
Additionally, we needed a very simple, straightforward quote plugin the worked exactly like the quote features on other forums. Your plugin is very clever, and I can see how Quote Selection is useful, but we aimed this feature at the mainstream user who is used to one-click quoting.
Finally, one of our design goals is to make Vanilla work reasonably well in a no-javascript environment. We don't always get it right, but something fundamental like quoting really needed to be able to work with javascript turned off, so that is something I built into this plugin as well.
I promise I'm not trying to step on your toes at all!
I have a problem with the 0.2 release. I used the vanilla1 importer, my data seams to be ok without the quote plugin activated. When I enable it, I click on a imported discussions and I see that all the message body are empty. I'm able to quote it and magically the data are ok in the quote, but this is strange the imported comments are just empty. I tried to create new comments to see if it will be empty too but no, the new created comments are ok, I see it well with the quote plugin enabled.
I thin I found the problem. This is related to BBCode comments types. My imported comments are tagged with the BBCode type and there is a bug in the quote plugin code that clear each bbcode message body.
One more thing about the chosen background color. I think #595959 is too dark, contrast with black font is bad and it integrates badly with the default vanilla theme (I think...).
Here is a patch to have a less dark grey for the background color of the quote blocks: http://pastebin.com/Mj9qCLdV
Here is another patch to fix a bug when a discussion has 3 pages or more. To reproduce the bug: -> open a discussion with 3 or more pages -> click on the "xxx older comments" -> then try to quote a message that was loaded You can observe that: - the javascript QuotesPlugin.Quote(...) is not applied on the href of the quote button - the href is wrong : the DiscussionID is empty
* Fixed bug where using the MorePager would result in unclickable quote buttons * Fixed bug where MorePager-loaded comments would have missing discussion IDs (thanks @kerphi)
I reviewed 0.2.2 and I noticed you didn't integrated one part of my patch (http://pastebin.com/6Udi4A1T) about the onmouseover event. Could you explain why ? For me it is better for the user experience because with this patch when the user quotes a old comment (loaded by ajax) he stay in the current page and can continue to write his comment and quote other texts from other comments. Without the patch, he is redirected to a new page to write his comment without any comments history, that's not nice from my point of view.
I looked at your fix and I see what you tried to do. I went one step further and if you look at the end of quotes.js, you'll see 2 new event bindings: CommentPagingComplete and CommentAdded.
When the MorePager is clicked, those comments' URLs are now properly parsed and javascript-ized so that the same functionality applies to these new comments as applied to the ones that were initially loaded.
Does that make sense? The mouseover way was kind of a hack to accomplish the same thing.
Thanks for your explanation, I didn't know these events exist. That's a lot cleaner than my ugly onmouseover. Is there a documentation about all the available javascript events in vanilla2 ?
Unfortunately there isn't at the moment. I went looking in discussion.js and I was going to add an event if it didn't exist. As it stands, they were bound improperly and I had to modify them to get it working.
This kind of documentation is something Vanilla2 needs, and something we're setting as a goal for after V2 Official is released.
Comments
P.S: that's weird, Vanilla developers have integrated/rewritten all my plugins. Kinda odd feeling.
I see what you're saying. There are a few differences between these two plugins, and several reasons why I felt it was needed.
Working on the VanillaPorter it became evident that we needed to be able to support existing quote content in posts that came from vBulletin and other forums, using BBCode and possibly other formats.
For that reason, I designed my plugin to tie into the Garden.InputFormat and the GDN_(Discussion|Comment).Format field and parse for quotes at render time, rather than inserting HTML into the table directly.
Additionally, we needed a very simple, straightforward quote plugin the worked exactly like the quote features on other forums. Your plugin is very clever, and I can see how Quote Selection is useful, but we aimed this feature at the mainstream user who is used to one-click quoting.
Finally, one of our design goals is to make Vanilla work reasonably well in a no-javascript environment. We don't always get it right, but something fundamental like quoting really needed to be able to work with javascript turned off, so that is something I built into this plugin as well.
I promise I'm not trying to step on your toes at all!
Vanilla Forums COO [GitHub, Twitter, About.me]
* Fixed translation codes (added them)
Vanilla Forums COO [GitHub, Twitter, About.me]
When I enable it, I click on a imported discussions and I see that all the message body are empty. I'm able to quote it and magically the data are ok in the quote, but this is strange the imported comments are just empty.
I tried to create new comments to see if it will be empty too but no, the new created comments are ok, I see it well with the quote plugin enabled.
Any idea ?
Here is a patch to fix the problem :
http://pastebin.com/3CLRkTkf
Here is a patch to have a less dark grey for the background color of the quote blocks: http://pastebin.com/Mj9qCLdV
Vanilla Forums COO [GitHub, Twitter, About.me]
To reproduce the bug:
-> open a discussion with 3 or more pages
-> click on the "xxx older comments"
-> then try to quote a message that was loaded
You can observe that:
- the javascript QuotesPlugin.Quote(...) is not applied on the href of the quote button
- the href is wrong : the DiscussionID is empty
Here is a patch to fix the two problems.
http://pastebin.com/6Udi4A1T
Notice :
I'm not sure about the way to get the DiscussionID, I used $Sender->Data['Discussion']->DiscussionID.
Please correct me if I'm wrong.
* Fixed bug where using the MorePager would result in unclickable quote buttons
* Fixed bug where MorePager-loaded comments would have missing discussion IDs (thanks @kerphi)
Vanilla Forums COO [GitHub, Twitter, About.me]
* Prevent guests from seeing 'Quote' button (thanks @Tudor)
Vanilla Forums COO [GitHub, Twitter, About.me]
I reviewed 0.2.2 and I noticed you didn't integrated one part of my patch (http://pastebin.com/6Udi4A1T) about the onmouseover event. Could you explain why ? For me it is better for the user experience because with this patch when the user quotes a old comment (loaded by ajax) he stay in the current page and can continue to write his comment and quote other texts from other comments.
Without the patch, he is redirected to a new page to write his comment without any comments history, that's not nice from my point of view.
I looked at your fix and I see what you tried to do. I went one step further and if you look at the end of quotes.js, you'll see 2 new event bindings: CommentPagingComplete and CommentAdded.
When the MorePager is clicked, those comments' URLs are now properly parsed and javascript-ized so that the same functionality applies to these new comments as applied to the ones that were initially loaded.
Does that make sense? The mouseover way was kind of a hack to accomplish the same thing.
Vanilla Forums COO [GitHub, Twitter, About.me]
Thanks for your explanation, I didn't know these events exist. That's a lot cleaner than my ugly onmouseover.
Is there a documentation about all the available javascript events in vanilla2 ?
This kind of documentation is something Vanilla2 needs, and something we're setting as a goal for after V2 Official is released.
Vanilla Forums COO [GitHub, Twitter, About.me]
Not able get enable quote