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.

ReplyTo Version 0.1.8 Released

edited March 2011 in Vanilla 2.0 - 2.8
This version fixes a bug where the text of a reply was being overwritten in certain circumstances by a "mention" of the user being replied to.

The "mention" feature can now be turned on and off in the plugins dashboard by the administrator. It defaults to "off", to avoid any surprises in fresh installs and upgrades.

If you have already upgraded to 0.1.7, then you should upgrade to this version.


  • The next version will include a slight change to the text added to prefix the "mention", because the current prefix string could not be properly translated into Japanese.
  • Mention works great on my site, but I don't see the tree-view or any sort of indented change whatsoever. I don't even see a different CSS class being called, right now. I assume that's how you're handling the views?
  • @drummingpariah have a read of the readme.txt in the plugin. There is a step needed to add the classes to the relevant theme template (there are no standard hooks yet to inject the class names from the plugin). Let me know if it is not clear.
  • judgejjudgej
    edited May 2011
    Just for completeness, this is the step that is required:
    + Most of this plugin is self-contained. There is just one thing that                                +
    + needs to be added to the theme: the indentation classes of the comments +
    + in the comments lists. +
    + +
    + This is done in applications/vanilla/views/discussion/helper_functions.php +
    + Look around like 26 for the 'BeforeCommentDisplay' event call, that should look like this: +
    + +
    + $Sender->FireEvent('BeforeCommentDisplay'); +
    + +
    + Add the following line just before it, allowing the event handler to change the CSS class of +
    + the coment: +
    + +
    + $Sender->CssClassComment =& $CssClass; +
    + +
    + Note that you may already have helper_functions.php over-ridden in your theme. If not +
    + I would recommend copying it to your theme anyway to allow product upgrades without +
    + losing this customisation. The theme path to copy the templat to is: +
    + themes/{theme-name}/vanilla/views/discussion/helper_functions.php +
    I've raised this as a Vanilla feature request, so with a little luck it will make it into a future version and not require this manual modification.
  • carlokokcarlokok New
    edited May 2011
    Having an odd issue with this (0.1.8), if I have multiple comments, and reply to the first one they get embedded under the last one:

    all the ones under "or maybe not" are supposed to go under the top one, as they're replies to that. (mention is off)
  • I'll have a peek later today. Which version of Vanilla is it?
  • judgejjudgej
    edited May 2011
    I just get a "page not found" on your link now. Did you fix the problem?

    Edit: okay, I see your screen-shot now. We need to try and replicate this. Is there any chance you could go through the same steps again and see if you get the same results?
  • @drummingpariah have a read of the readme.txt in the plugin. There is a step needed to add the classes to the relevant theme template (there are no standard hooks yet to inject the class names from the plugin). Let me know if it is not clear.
    Makes perfect sense, I just didn't do my due diligence. That explained everything I needed to know, and we're up and running with nice, nested comments on my forum now. Thanks!
  • I just get a "page not found" on your link now. Did you fix the problem?

    Edit: okay, I see your screen-shot now. We need to try and replicate this. Is there any chance you could go through the same steps again and see if you get the same results?
    Yep; found out why too; It doesn't work together well with "voting".

    This is the screenshot without voting:

    this is with:

    (any chance of a "limit to two levels, like so has btw?)
  • judgejjudgej
    edited May 2011
    Ah, voting also messes around with the order of the comments, and so I guess one is over-riding the other. I don't think there is going to be a way around this - you either want to display the comments in hierarchical order, or in voting order; the two simply don't mix.

    A hybrid order could work from a user POV, but it would have to order by voting only within each level of the tree, i.e. just reorder siblings at any branch on the tree according to votes, and I cannot think of a way to do that in a database query ORDER BY clause. It would also make sense if votes on any branch were added up for all descendant comments to give whole branches a higher level of importance according to what people like deep inside the nested comments.

    With the limiting of the levels, do you want to prevent people from replying to any second-level comment, i.e. have the "reply" link disappear from those? I think that could potentially be a bit confusing for users, unless you do some fancy formatting to show the levels more clearly (so it could work).
  • I've added a note about compatibility to the addon description.
  • judgej: I want to have it like stack overflow; make the 2nd level comments smaller, and not able to reply to those on a sub level; I suppose I'll be modifying the voting to only show for the top level ones then:
  • Okay, I could provide a config item that limits the number of levels to any arbitrary level. You could set the levels to "2" and get a SO type of thing. How the levels look would then be down to whatever you put in the stylesheets and templates.

    Ordering by votes and hierarchy would still be an issue though. When the tree is ever rebuilt for comments against a discussion, the vote can be used in place of the posting date, so that way the tree is built with the vote count taken into account. However, when a new vote is added (or removed) it would be necessary to rebuild the tree again. The tree absolutely defines the order in which the comments are displayed, so if a vote changes the order in which you *want* the comments to be displayed, then the tree would need rebuilding to reorder the comments. If there is a hook in the voting plugin that lets the replyto plugin rebuild each time a vote is made, then it ought to be possible to do.

    The voting plugin would also have to be told *not* to reorder the comments. So the replyto module sets the order of the comments by looking at the parent/child relationships, the voting levels and finally the posting date. The voting module would just provide the data for replyto to use, but would not attempt to do anything more with it (I think it would need a hack, or an option added to say "capture votes, but don't change the display order").

    I am also guessing it could be an idea if these configuration settings could apply differently to different categories.
  • i have no need for the different categories settings but yeah,t hat'd be cool
  • Added it to my site, and it's awesome. Thanks!
  • weird.. it used to work, but i've installed the latest vanilla and it doesn't anymore
  • @daniel_siq Sorry, I didn't get a notification that you had posted.

    I'm not following the very latest Vanilla updates closely, so am getting left behind with many of the updates. Did you fix this issue in the end, or discover what was causing it? Looking at your links, the indenting classes are not on the comments, so perhaps there is a template change that still needs making?
  • Some feature requests:

    1. I like the way the comment box pops up right below the comment you clicked reply to, but I don't like that the reply stays there after posting messing up the original order of comments. There should be an option in the plugin settings like: 'keep the order of comments'.

    2. When clicking reply, username is added to the comment as a mention. Then, when the reply post shows up, the link of the mentioned username should point to the comment for which you replied to, not to the user profile. This way, it would be easier for the reader to jump to the post for which one replied to instead the current way when you have to scroll and find the link 'in reply to' spending seconds with it thus maybe losing the 'line' of the conversation.
  • @Csabbencs I think these two requests are linked. Firstly you would like the comments to be ordered as a flat list in date order, instead of structured by replies. Then you need to be able to add a link to the replies to help you find the parent comment that the reply is for (since the reply would no longer appear immediately below the comment being replied to).

    At the moment, if the comment is replying to a comment that is off the top of the page, then it does link back to that parent comment (the "In Reply To" link takes you there). If on the same page the link does not appear.

    I would be reluctant to add the link back to the source comment in the reply comment body, because it would be pretty redundant if the comments are structured by reply. However, since the parent comment ID is stored along with each reply, such a link could be added to the comment headers regardless of whether the parent is on the same page or not.

    I'm trying to add this plugin to github (getting git working under Windows is a real pain with authentication, so I need to get over that problem first) so I can do some more development, but the option to either structure the replies, or keep them flat but with links showing the structure, would be a straight-forward addition.


    -- Jason
  • @judgej
    Thanks for the reply, just take your time on adding the options.

    Regarding adding the link to comment body or header... imagine the following reply:

    Hey guys, I like some of your ideas, but some of them not: @A: I like you idea, it's really cool. @B: I like you idea, but I'm not joining. @C: I don't like your idea, you're mad.

    Now, you have 3 parent comments.
    Adding them to header takes a lot of space on the page. @A, @B and @C are already included in the comment body, I think the best way is to add them as a link to the 3 different parent comments.
Sign In or Register to comment.