Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Fully threaded
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 5

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 20 January 2002 :  17:59:36  Show Profile  Visit Gremlin's Homepage
take a look at www.dynamicdrive.com for tree scripts they have a couple there. The list browser compatability next to each script.

HALO - an www.eq-halo.com" target="_blank">EverQuest and www.daoc-halo.com" target="_blank">Camelot Guild
Go to Top of Page

Spooky
Development Team Member

New Zealand
320 Posts

Posted - 20 January 2002 :  20:22:02  Show Profile  Visit Spooky's Homepage
Theres not much there actually. The closest Ive found is one on DHTML.com which is ie/nn4, but I dont really like that one :)
Has anyone actually considered the logic to expand and collapse multiple threads? man, talk about brain implosion.....
threads within threads within threads..... sheesh :)

===============
www.frontpagewebmaster.com
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 20 January 2002 :  20:34:04  Show Profile
I have done collapsing/expanding when implementing Groups Mod. The tricky part in that was to get post counts at different levels

With Threads in Threads in Threads ... it can rally get to wits...

Groups at forumsquare

Threads in Progress

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Spooky
Development Team Member

New Zealand
320 Posts

Posted - 20 January 2002 :  23:36:57  Show Profile  Visit Spooky's Homepage
The logic Im using at the moment, is first to locate a child post.
I use <div ID> to mark this as a thread group.
Then loop forward till it locates the last post of the thread group and mark an array value for the row as a closing </div>

This </div> is then applied when the row is processed

The tree structure was similar. I retain connected trees exactly the same as windows explorer. To keep them connected vertically, each position needs to be placed in an x,y array. Thats a fun bit of code in itself :)

===============
www.frontpagewebmaster.com
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 20 January 2002 :  23:52:17  Show Profile
I am using bookmarks.
I loop through the recordset and
Check if the post has a child.
if it does then Book mark the location
After reading the next recordset
I move to the child recordset and
move forward from the child recordset until no child is found.
This completes the depth of the thread
then move in reverse order checking (child parents)if they had more than one child and it goes mind twisting...



www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 21 January 2002 :  13:39:19  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
Um... honestly...

I think the most efficient threading technique would be as follows:

add a single new column to the "Reply" table called "REPLY_TO" and in it store the "REPLY_ID" of the post that was replied to... if this field contains a Zero or Null value, it would be a reply to the actual post.

Ordering would be done by the date/time stamp of the server, and the reply to would stack them appropriately in the "thread"

and to do this right, you don't want to make a new "topic_thread.asp" file, you want to alter the logic in the current "topic.asp" to say if there is a variable passed to it that says "Thread it" then show it threaded, otherwise show it flat.

This would be a cool permanent addition to the product, keeping in mind that many of our compeditors have this option in their base package as well (I still have yet to look at any source code from any other forum/bbs package, so I don't know what their solution was)

Bless!

Reinsnitz (Mike)
><)))'> Need a Mod?
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 21 January 2002 :  13:54:49  Show Profile
That is mostly I have done

Added a new Column to table Reply named is Thread_ID
Default value for this field is Zero


quote:
Ordering would be done by the date/time stamp of the server, and the reply to would stack them appropriately in the "thread"



Difficulty starts here

Each reply to reply can have its own threads and then again threads within threads within threads




www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Reinsnitz
Snitz Forums Admin

USA
3545 Posts

Posted - 21 January 2002 :  14:06:59  Show Profile  Visit Reinsnitz's Homepage  Send Reinsnitz an AOL message  Send Reinsnitz an ICQ Message  Send Reinsnitz a Yahoo! Message
a properly written function would handle this easily.

it's a matter of doing the SQL statement properly to sort them by that.

Reinsnitz (Mike)
><)))'> Need a Mod?
"Therefore go and make disciples of all nations,..." Matthew 28:19a
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 21 January 2002 :  14:29:56  Show Profile
I have been able to do an extent and have used some functions to do all this

You may have a look here

Threaded


www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 23 February 2002 16:26:20
Go to Top of Page

Spooky
Development Team Member

New Zealand
320 Posts

Posted - 21 January 2002 :  14:40:13  Show Profile  Visit Spooky's Homepage
I still dont see something that needs the database open to build the thread as a viable alternative GauravBhabu?
You really need to have a sorted string (preferably with getrows) presented to the display logic.
Anything else is too intensive when using access as a database.
Sort when posting!

===============
www.frontpagewebmaster.com
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 21 January 2002 :  14:50:36  Show Profile
quote:

I still dont see something that needs the database open to build the thread as a viable alternative GauravBhabu?
You really need to have a sorted string (preferably with getrows)



It can be converted to getrows. I open the database only once and move back and forth for checking the threads, Yeah It can get intensive. I will use the getrows once I sort out issues

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 23 February 2002 :  16:23:24  Show Profile
Finally Got the Threads to display correctly. Whole thing is wrapped up in about 15 lines of main code and two main subs basically for next loops (both about total 25 lines of code) plus one function (about 5 lines of code) and four subs for layout ( all about 40 statements)

Though I made a new file threads.asp to test it, It should not be difficult to make the topic.asp to work for both Flat view and threads view.

Used GetRows to get all the replies from the database once and that is it.

Addition of one field in the Replies table.

Still to be done:

Show the message in the thread when the message is selected in the Thread ladder.



Demo Here

Check out for any errors and suggestions.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.

Edited by - GauravBhabu on 23 February 2002 16:24:32
Go to Top of Page

GauravBhabu
Advanced Member

4288 Posts

Posted - 23 February 2002 :  21:05:58  Show Profile
Now that the threads are showing correctly in order, I am on to the next level which will allow expanding/collapsing all or an individual thread.

Still looking for any feedback or suggestions.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.
Go to Top of Page

Xstream-PT
Starting Member

45 Posts

Posted - 30 March 2002 :  10:41:32  Show Profile
quote:

Now that the threads are showing correctly in order, I am on to the next level which will allow expanding/collapsing all or an individual thread.

Still looking for any feedback or suggestions.

www.forumSquare.com - GauravBhabu - It is difficult to IMPROVE on Perfection, There is no harm in Keep Trying.




You still working on this?

X

Go to Top of Page

Xstream-PT
Starting Member

45 Posts

Posted - 18 April 2002 :  19:29:39  Show Profile
Here's what I have so far: http://www.wargamer.com/pie4foo/about/xstream/dev/index.asp?mode=show

It's threaded, and you can mark topics as read, and if someone replies to a topic that you've marked read, the code will display the thread. I'm working on threading our snitz board.

What do you guys think?

X



Edited by - xstream-pt on 18 April 2002 19:32:15
Go to Top of Page
Page: of 5 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07