|
Posted by Rik Wasmus on 01/31/08 13:04
On Wed, 30 Jan 2008 15:18:18 +0100, salmobytes
<Sandy.Pittendrigh@gmail.com> wrote:
> I'm shopping around for php based forum/bulletin board software.
> PhpBB is (obviously) popular. But I don't like the linear way its
> topic threads
> are presented.
>
> In the old days, the earliest forums were files based. File-naming
> schemes
> could be used so threads could be presented as indented, hierarchical
> post lists,
> where it was visually obvious that post number 5 was a direct response
> to
> post number 3, etc. In all the mysql-based forums I've seen so far
> each thread is presented as a linear line of responses to a head topic
> listing,
> where the individual response-to-which-response hierarchy is lost.
>
> Perhaps this has something to do the difficulty sql has in modeling
> hierarchical
> structures. Regardless, are there any php/mysql based forums out
> there, that start off
> by presenting a topic list, *BUT WHERE* individual thread histories
> are presented
> as an indented hierarchy? Maybe I'm just blind. I've looked at
> several and haven't found
> it yet.
I'm not aware of any packages that do this out of the box, howeve, I've
seen comment's which do. So maybe widen your search to check wether you
can alter a comments script which does thread to become a forum.
Technically, it's not that difficult, unless you want to be able to delete
intermediate posts. Just have a table messages (I would choose the
adjacency model, nested sets are not suited for fast/frequent alterations):
id message parent-id
1 foo NULL
2 bar 1
3 foz 1
4 baz NULL
5 fox 2
6 bax 5
7 foy 3
8 bay 3
Resulting in:
1
--2
-----5
--------6
--3
-----7
-----8
4
The main difficulty is displaying: if you want fully 'expanded' thread,
you can't escape a resursive function or procedure (either in the script
or at the database side). If you choose to show only a certain level of
threads, a bunch of self joins as needed are enough.
--
Rik Wasmus
Navigation:
[Reply to this message]
|