Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Version 0.1.2 Released
judgej
✭
Fixed bug where a comment added at the end of a discussion occasionally went to the front.
Fixed some tree building issues.
Tidy up the tree on deleting comments, moving child comments to the parent of the comment about to be deleted.
Removed declaration of the settings page, so you don't get a "settings" button, with a subsequent error page, in the plugins admin page.
Fixed some tree building issues.
Tidy up the tree on deleting comments, moving child comments to the parent of the comment about to be deleted.
Removed declaration of the settings page, so you don't get a "settings" button, with a subsequent error page, in the plugins admin page.
0
Comments
It is a good point about limiting the attachments to earlier comments only, although the tree will handle reattachments to any earlier or later comments without any problem.
Also the ability to take a comment out of the tree completely, which would leave it tagged onto the the discussion at the top level (taking post date into account automatically).
Edit: thinking about it, how often would this kind of feature be needed? I'm sure it would be nice, but just weighing up the cost/benefits, it is not something that I am likely to spend any time on. I'll be happy to look at any code that anyone would like to provide, or it could even be provided as a separate plugin that extends this one.
Fatal error: Call to undefined method Gdn_MySQLDriver::SetCase() in /home/myusername/domain/forum/plugins/ReplyTo/class.replyto.plugin.php on line 199
I looked all thru the GDN libraries and couldn't find "SetCase" so should that be Set?
I changed it to Set, which you use everywhere else, which has the same variables in the same order… and the reply was created without errors, but it appeared at the end of the thread instead.
This is on Vanilla 2.0.11.
I really, really, really want to be able to use this feature since the amount of traffic on my forum is about to explode. I would gladly pay you for your time to fix this since I'm so eager to have it (and give back to the community
Oh dear - that sounds like an extension I added in my installation to add a bit of missing functionality to the SQL driver. Details are here, raised as a feature request:
http://github.com/vanillaforums/Garden/issues/issue/601
If you use the cost posted there for now to try this plugin out, I'll work out a way around it (any suggestions welcomed). Sorry about that.
Add this code:
public function SetCase($SetField, $Field, $Options) { $CaseOptions = ''; foreach ($Options as $Key => $Val) { if ($Key == '') $CaseOptions .= ' else ' . $Val; else $CaseOptions .= ' when ' . $Key . ' then ' . $Val; } $this->Set($SetField, 'case ' . $Field . ' ' . $CaseOptions . ' end', FALSE); return $this; }
to the bottom of library/database/class.sqldriver.php just after the SelectCase() method. I just have not worked out how to extend the core database classes from a plugin yet.
It IS showing up right after the parent comment, though!
What the change to the theme does, is apply the classes to the comments that are supplied by the plugin. If the script is not in your current theme, then it can be copied from the core into the theme and then modified. The instructions are in there and should hopefully be simple to follow.
The classes do feel a little long-winded to me, and perhaps a better approach would be to provide data that allows the theme to decide how to create its own classes or markup changes. Any suggestions appreciated.
Similarly, there is an issue with edited comments - the AJAX replacement comment loses all the indenting. My initial thought was to use JS to add the classes back onto the updated comment once it gets inserted into the DOM, but I am not sure how to go about that, i.e. what triggers to hook into. I've got halfway there - the classes of a comment are saved away when the user starts to edit an existing comment. I just don't know how to get it back onto the updated comment. Perhaps there is a completely different approach? See what you think.
themes/{theme-name}/vanilla/views/discussion/helper_functions.php
If that file does not exist in your theme, then create it as a copy from:
applications/vanilla/views/discussion/helper_functions.php
Locate the line that contains this markup (around line 29 in function WriteComment() in Vanilla 2.0.11):
<div class="Comment">
Add the classes to that line:
<div class="Comment<?php if (!empty($Object->ReplyToClass)) echo ' ' . $Object->ReplyToClass; ?>">
The condition is there to prevent errors if the plugin gets disabled or removed.