Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
extension request: comments displayed as a tree
This must look familiar to you:
suppose I start a discussion and that "someone" answers, and that other answers follows. I'd like to see something like:
I have some ideas for the implementation and UI but I just needed some advice and extra features from the community.
Or maybe this extension already exists...
This is what this discussion produced
general stuff
suppose I start a discussion and that "someone" answers, and that other answers follows. I'd like to see something like:
--+-- grahackaccording to who answers who.
+-- someone1
+-- grahack
+-- someone2
+-- someone1
+-- someone3
+-- grahack
I have some ideas for the implementation and UI but I just needed some advice and extra features from the community.
Or maybe this extension already exists...
This is what this discussion produced
general stuff
- the creator of a discussion (if allowed by the admin) can decide if his discussion will be threaded or not
- the discussion displays as usual AND we display the tree at the beginning of the discussion
- we could collapse away an offtopic branch of a discussion when clicking on the tree, the list of comments would update through AJAX
- an "answers to" linking inside the page to see the comment this comment is refering to, a "see answers" that popups links of the same type, with the nick of the member who answered
- when threaded, in fact we don't have the good old "one post per page" UseNet style
- a reply button on each comment, popping the form for the answer with "in reply to post #12 by TheGuy"
- the comment box at the end: lots of solutions will it ONLY serve as replying to the thread (well in fact to the first post), or will not be there for threaded discussions, or the user could decide to answer to any post through a drop down list...
- clicking another "reply to" doesn't close the previous one, the "Add your comments" button that each answer form has will decide which one will be sent to the server
0
Comments
My thoughts on the UI would be... have a reply button on comments (obviously) but this when clicked, through the magic of AJAX pulls a new reply box out from underneath the comment. This new reply box which slides out is your entry box to reply to a specific comment and will reinforce that this is the case. The comment box at the end will serve as replying to the thread as normal (or to the last comment?) or will not be there at all.
Perhaps after a few minutes of inactivity the reply box can hide itself (though this could be awkward if you go for a cup of tea), and if you click reply twice on two different comments, the first comment's reply box can hide itself.
I think that the threaded comments paradigm can be a little difficult to understand, but if you reinforce it with a "threaded" UI, then it might make more sense to the unwitting user.
My $0.02. I look forward to seeing what you come up with.
Adam.
- normal reply box shouldn't be there anymore, or would reply to the first post only
- no timeout for the boxes is needed (except if you give me a good reason)
problem is: AJAX is not my kingdom at all, but let's continue to think about UI and features...
- let's forget the ugly tree for the moment
- imagine that the display of the discussion is as usual, sorted by time of the comments, but that two links (if needed) are added to comments like in Comment Links.
an "answers to" linking inside the page to see the comment this comment is refering to,
a "see answers" that popups links of the same type, with the nick of the member who answered
this could be smooth and won't break the timeflow
I thought about such a dropdown (with the # of comments of the discussion) near the whisper box, but found angelic_venus idea better. Anyway, they don't exclude each other, though it's quite handy to see the comment we're answering near where we type.
First, note that the page will display as usual so we can see the real timeflow, and won't be reloaded (we'll use internal links).
If a comment #ans is an answer to comment #qst, let's display a simple link (like "block user", "block comment", how is called this area?) in comment #ans that drives us to comment #qst.
If a comment #c leads to at least one answer: let's say comment #stash1, comment #grahack and comment #stash2, let's display in comment #c a more complex link like in Comment Links, that will drive us to the right comments.
Those options don't exclude each other, and if there is only one answer to a comment, the link for it can be simple.
Is it clearer ?
so like "angelic venus in reply to [-Stash-]", then it notifies the user that you are replying to, that they have a reply to their message. I can see where you want to go with this, grahack, having that "in reply to" as a link to the comment it is in reply to.
You should make sure it integrates well with quoting and stuff, the idea is sound.
Adam.
I'm realy sorry, there are no more threaded forums out there. Would be nice if vanilla could be on of the view "good" ones.
And no think about it with the power of ajax: you can just collapse away an offtopic branch of an discussion, if you don't like it!
bye
Tiggr (aka Marcus)
I would be interested in the "in reply to" kinda deal that we're also discussing though
I could start something but I'd be happy if someone could point me to a very simple addon that uses new tables in the db (never done this yet).
I'm also not sure how to structure the new table(s). Things like building trees can need A LOT of resources if badly implemented.
For the javascript part, I'll look at "comment links" and -?- (write here an extension that pops up a form). Also, the Postback things is still obscure to me, and I guess I'll need it.
Note that I don't really need this but I find it very interesting, so I don't plan the first serious release in 2007.
Read the following articles in sequence
Storing Hierarchical Data in a Database.Simple theory, PHP code and Mysql queries to make it all work. Examples include Adjacency List Model and Modified Preorder Tree Traversal
Managing Hierarchical Data in MySQL. Awesome simple explanation, with all MYsql query to get you a jump start. Examples include Adjacency List Model and Modified Preorder Tree Traversal
Once you have read both you will know what are the draw backs of both of these models and why Adjacency List Mode (used by wordpress for comment thread) is slow. Modified Preorder Tree Traversal is better, Fetching a tree is simple and really fast but editing a tree requires the whole tree to be edited making editing costly. Perfect for a Subcategory extension, where you will create a tree once and hardly every change it. There is a NSTREES library to do preorder tree traversal. Another problem with PreOrder tree traversal is that you have to LOCK the table when you are making edits.
I still have to read up this page.
Working with Graphs in MySQL
Combining edge list and "nested sets" algorithms provides a clean solution.
Work as been done on data structure and browsing only.
As you can see, a tree is displayed at the top of the discussion with some infos. What you can't see is that answering to... and see answer from... links lead us to the relevant comment on the same page.
This is a link to my draft.here is a better version
Since you can't reply to a particular comment at the moment, you'll have to enter the test hierarchy manually. But you'll have to install the extension BEFORE tweaking your DB of course.
On a fresh install you'll have to create a first discussion and several comments.
When having enough comments:
UPDATE LUM_Discussion set NoetherThreaded=1 WHERE DiscussionID=1; UPDATE LUM_Comment set NoetherParentCommentID=0 WHERE CommentID=1; UPDATE LUM_Comment set NoetherParentCommentID=1 WHERE CommentID=2; UPDATE LUM_Comment set NoetherParentCommentID=1 WHERE CommentID=3; UPDATE LUM_Comment set NoetherParentCommentID=3 WHERE CommentID=4; UPDATE LUM_Comment set NoetherParentCommentID=4 WHERE CommentID=5; UPDATE LUM_Comment set NoetherParentCommentID=1 WHERE CommentID=6;
Now that the fun part was done, I wonder if dealing with pagination problems, ajaxing the comment form or reordering the posts in the grid will be difficult or very difficult...
Now a silly question, except 'ThreadedDiscussions', I don't have a nice name. I went in Noether street on wednesday and thought it could be a nice one...
Tunnel, I don't know if you're still there but I need some testers.
Sorry, there is no fancy ajaxy stuff. It's quite raw but it seems to work.
Now good night and thanks for all advice given here!
Anyway, I still want to have linear mode (but still with 'reply to' possibility) as default and threaded mode only as an option for a user.
Only some users want the threaded mode. I'm not sure if your add-on allows this, but I'll see when I test it
My addon currently doesn't allow user-based choice, choice is only left to the creator of the discussion.
Known issues: pagination: clicking a link in the index or a search page can lead to weird pages...