Threaded View January 26, 2014, 06:34:07 pm (Transferred from here.)Now that MyBB et al. are removing the Threaded View from the core and many people are stating that they'll miss it, maybe ElkArte should add it?
Re: Threaded View Reply #1 – January 26, 2014, 07:43:44 pm If there's a need. I think I can count on one hand how many people I've seen ask for this feature over the years using SMF. But first you have to find someone who wants it, and can start working on it.
Re: Threaded View Reply #2 – January 26, 2014, 07:46:50 pm Maybe most people have never used it, else they'd know its advantages.
Re: Threaded View Reply #3 – January 26, 2014, 08:09:57 pm Quote from: forumsearch0r – January 26, 2014, 07:46:50 pmMaybe most people have never used it, else they'd know its advantages. I'm pretty sure people have heard of sites like reddit and can see how horrible it is to read it.
Re: Threaded View Reply #4 – January 27, 2014, 01:34:23 am Me use MyBB since many years. Threaded View never come to be deployed. Will not be missed.It is not worth the trouble.
Re: Threaded View Reply #5 – January 27, 2014, 01:54:52 am yep, agree.. "Threaded view" would require lots of changes.. 1) modify the database structure in order to reflect replies to Messages2) rewrite (and duplicate) the template.3) modify the topic / message actions (merge, split and such stuff) -> move reply x to reply y inside a single topic and such things.I think the MyBB folks do have a good reason why it was removed.
Re: Threaded View Reply #6 – January 27, 2014, 05:27:14 am Quote from: TE – January 27, 2014, 01:54:52 am1) modify the database structure in order to reflect replies to MessagesAdd one int column.Quote from: TE – January 27, 2014, 01:54:52 am2) rewrite (and duplicate) the template.Just extend the existing one. You do that all the time.Quote from: TE – January 27, 2014, 01:54:52 am3) modify the topic / message actions (merge, split and such stuff) -> move reply x to reply y inside a single topic and such things.Why? It already does what it should.
Re: Threaded View Reply #7 – January 27, 2014, 08:31:37 am Not to sound like a dick, but if it is that easy, do it.Some big questions which arise immediately: if you have 10 posts per page, what if a post has 1000 sub-posts? If you do ?msg=X where X is a threaded message, you have to get all of its parents and children. Do threads have multiple levels? How do you find all of those levels?
Re: Threaded View Reply #8 – January 27, 2014, 08:34:28 am Quote from: groundup – January 27, 2014, 08:31:37 amNot to sound like a dick, but if it is that easy, do it.I'm short on time. Maybe later.Quote from: groundup – January 27, 2014, 08:31:37 am if you have 10 posts per page, what if a post has 1000 sub-posts?Use collapse/expand functionalities.Quote from: groundup – January 27, 2014, 08:31:37 amIf you do ?msg=X where X is a threaded message, you have to get all of its parents and children. Do threads have multiple levels? How do you find all of those levels?Recursion.
Re: Threaded View Reply #9 – January 27, 2014, 08:41:44 am A recursive query? So a thread with 100 levels would result in at least 100 queries. Of course that is extreme and you would probably want to have some setting to limit the number of levels. Still, say you set that to 10. You are then adding 10 queries to that page. It would be per level since you would get the first level, then do SELECT ... FROM messages WHERE id_parent IN($parents);Even if with collapse/expand, you are getting all of those queries. Unless it uses AJAX to get the rest of them? I am pretty sure that Elk follows the SMF model of all functionality working with JS turned off, so that wouldn't work.
Re: Threaded View Reply #10 – January 27, 2014, 08:47:26 am Quote from: groundup – January 27, 2014, 08:41:44 amElk follows the SMF model of all functionality working with JS turned off, so that wouldn't work.The German heise community has threaded views with pagination without JavaScript IIRC.
Re: Threaded View Reply #11 – January 27, 2014, 08:53:01 am Then if you have a post with 1000 sub posts you need to get those 1000 sub posts. Unless the posts per page is applied to the sub posts. Then your pagination needs to be rewritten.
Re: Threaded View Reply #12 – January 27, 2014, 08:56:12 am Quote from: groundup – January 27, 2014, 08:53:01 amThen if you have a post with 1000 sub posts you need to get those 1000 sub posts. So does the linear view, at least counting them.
Re: Threaded View Reply #13 – January 27, 2014, 08:59:45 am Huh? You only need one query to get the posts on the page. Without looking it is something like "SELECT ... FROM messages WHERE id_topic = $topic AND id_msg > $id_msg_start AND approved = 1 LIMIT $posts_per_page"