Author |
Topic |
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 04 January 2002 : 04:57:58
|
Has anyone tried to fully thread Snitz? What are the issues for and against?
Im thinking theres not actually much to it when using getrows. Ive run some rudimentary tests, and its quite effective
The basic logic (and its quite a departure from the current model) is to only have a "topic" table and no reply table
Parent threads use TopicID as the identifier and then child threads use ThreadId, which is TopicID-ChildID
eg
12345 - Parent 12345-00001 Child 1 12345-00002 Child 2 12345-00001-00001 Child 1 of 1 12345-00001-00002 Child 2 of 1 etc
This would allow threads up to 40ish deep As the query would order by ThreadID / Date, the results would be in order
12345 - Parent 12345-00001 12345-00001-00001 12345-00001-00002 12345-00002
This would allow the array to look forward + 1 to see if a child exists and display levels until no child exists, then move to the next topic.
Obviously, this is simplistic, but the only real issue, is keeping track of the actual parent ID to each child when posting. Display isnt an issue at all.
But as its a major departure from the current system, is it worth even considering?
=============== www.outfront.net |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 04 January 2002 : 05:05:58
|
I'm pretty sure there is a threaded view MOD available.
I don't think joining the TOPIC and REPLY tables into one table would be such a good idea, and you don't really need to, since it is the replies that are threaded not the topics. I have thought about it, because it would be very simple, but to be honest I prefer forums which are not threaded.
|
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 04 January 2002 : 05:12:25
|
If anyone can point me in the direction of that mod it'd be appreciated :)
The reason Id use one table, is that the information would be similar - eg the option of adding a subject is needed. Mainly its a way of simplifying the ordering and updates. But Im sure both ways would work :)
=============== www.outfront.net |
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 04 January 2002 : 05:15:42
|
I agree that this format is relatively easy to follow. Using replies table as we do now, it may be easily possible to switch between thread mode and this view. The only differnce, would be an additional page to display the selected topic/reply and its position in the thread.
I love simplifying things :)
=============== www.outfront.net |
|
|
Doug G
Support Moderator
USA
6493 Posts |
|
bjlt
Senior Member
1144 Posts |
Posted - 04 January 2002 : 22:45:23
|
a link to the mod could be found in w/o code forum. find it here.
http://forum.g4systems.net/babygate/
Edited by - bjlt on 04 January 2002 22:52:11 |
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 04 January 2002 : 23:29:36
|
Cool, thanx!
Apart from the snow, I love the design of that forum too, quite nicely done
=============== www.outfront.net
Edited by - Spooky on 04 January 2002 23:31:47 |
|
|
xstream
Junior Member
242 Posts |
Posted - 05 January 2002 : 00:34:12
|
I would love to see something like this. I'm trying to make something similar to what we have currently at Ezboard. When you click on a table, you get all the discussions in threaded form. Do you think this would be hard to do?
X
|
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 05 January 2002 : 00:39:35
|
They have a download there of the current forum, it just seems to be disabled at present.....
=============== www.outfront.net |
|
|
Doug G
Support Moderator
USA
6493 Posts |
Posted - 05 January 2002 : 00:47:07
|
The guy that did the mod hasn't been here for months.
====== Doug G ====== |
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 05 January 2002 : 01:53:13
|
Got a copy - but Im not a fan of something that opens an rs for each leg of the thread - thats quite a few rs's To make it fast, I think youll need to do something like the numbering sequence below. Then its just a normal query - ready ordered. The hardest part I see is coding a return of the autonumber for each new post so the ThreadID can be numbered correctly. Not a biggie, just a pita for different databases :)
=============== www.outfront.net |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 05 January 2002 : 03:14:31
|
My thoughts for a simple approach would be just to add a parent_id to the reply table, then when you reply to a topic, assign the topic_id as the parent_id, if you reply w/quoute add the reply id as the parent, that way you can geta simplistic threaded few without changing the database or recoding the post forms very much.
|
|
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 05 January 2002 : 13:23:35
|
I think it could be a bit of a n2 approach.
If each reply had a parent, then each reply to a reply was a parent and the reply to that reply of the reply ...... :)
The SQL would need to be able (in one hit) pull out and order the replies and topics fast. Im not sure if its possible that way?
Get topic > Get replies >(Any replies to this reply?) If yes, loop > this reply till no more If no > Get replies (loop) etc
You couldnt order by [topicid][replyid][threadid] as the replyid wont be sequential.
=============== www.outfront.net |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 05 January 2002 : 17:15:10
|
Yes. I see your point, in your scenario, how would you keep track of what child number you are ?
|
|
|
Doug G
Support Moderator
USA
6493 Posts |
|
Spooky
Development Team Member
New Zealand
320 Posts |
Posted - 05 January 2002 : 19:16:35
|
Thats an excellent example Doug, Ill check it out - looks like the same logic (for threadID) as mine above.
eg hierachial threadID for fast sorting:
1.1.1 1.1.1.1 1.1.2
Ill have a read and see if its usable in a mixed database scenario though :)
=============== www.outfront.net |
|
|
Topic |
|