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.5 Released

judgejjudgej
edited November 2010 in Vanilla 2.0 - 2.8
No special upgrade instructions - just copy the new files over the old..

This version carries the indenting levels across pages in a multi-page discussion.

Additions I am thinking about would be options for a user to turn nesting on and off.

Also it has occurred to me that an event to allow users to be notified that one of their comments has been directly replied to, would be useful. I would rather hook into the existing notifications system than send out emails directly from this plugin, just to keep the amount of code and functionality duplication down.

There are no forward-links implemented yet, linking comments to their child comments where the child comment is not on the current page (and can be assumed to be on a later page). The idea would be a link "replies continue [here]" kind of thing.

Comments

  • Cool! Upgraiding...
  • You could replace separate ancestor queries with single one that would select level for all nested comments having no root comment on a page.

    Also this could be done with DB:
                $depthstack = array_pad(array(), count($Ancestors), $MaxTreeRight);
  • The ancestors method was handy to use for this functionality, but you are right, it probably results in more queries than is necessary. I'll replace it with a single query that fetches direct counts of ancestors for multiple comments.

    As it is now, it's not a massive resource hog, so still works fine.
  • judgejjudgej
    edited November 2010
    0.1.6 released - this replaces the ancestor lookup queries (which could be many for a multi-page discussion with a break in the middle of a heavy thread across pages) with a single and much simpler query.

    Functionally this is the same as 0.1.5, but will be marginally more efficient in heavy servers with short page lengths and lots of nested comments in long discussions. If nothing else, it shows the power of the Nested Set Model - not so good for frequent updates of extremely large trees, but great for selecting (i.e. viewing) properties and sections of the trees very easily.
  • I haven't tried this plugin with a continuous page theme yet, i.e. one where pages of comments are just tagged onto the bottom of the page when you click "next page" or scroll down, rather than jumping to a new page URL. In theory it ought to work fine and nest correctly now.
  • Just a small change request: your js file name is discussion.js, which is a bit confusing, when you use developer tools that show only file name. Could you change it to replyto.js or something like that?
  • Yes, fair enough. I see how Firebug only shows a small part of the file name, and you cannot even widen the field to show more. I'll change that in the next release.
  • There is a bug I think. When there are some nested comments and you open a thread, there is a relative anchor, that focuses on the last unread comment. Now it focuses not on the last one, but on comments that already read.
  • judgejjudgej
    edited November 2010
    When you first view a discussion, Vanilla jumps to the last posted comment on the page (or perhaps in the discussion?). The last posted comment is not necessarily the bottom comment, so yes, you could be left half-way up the page.

    I'm not sure whether this still happens when a discussion goes over one page, and the last posted comment on that discussion is not on the last page. I'm going to have to run a few tests, and then decide what the desired functionality actually is.

    So - what do people expect to happen when you first click a discussion to view? Do you want to be taken to the bottom of the last page, or to the last comment (whether that happens to be on the last page or not)?

    If the aim is to go to the bottom of the last page, then perhaps the fragment should be #Item_Last rather than #Item_N?
  • I see, it is more complicated than that. Vanilla keeps track of which comments you have read, and so will jump to the last comment on the page that you have read (assuming that comment is on the page). If a whole page of comments have been written since you last visited that discussion, then I assume it will just jump to the top of the last page, because the last comment you read will not be found on that page, so fragment #Item_N won't exist.

    So far as I can see...
Sign In or Register to comment.