Little question here.
Quite a while ago, I asked how the jumpbox was able to categorize the forums into pretty looking indents. I have since read the source and am now completely confused.
So here's my question: what do the right_id and left_id fields in the database do?
Thanks,
Will
How the subforums work
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
How the subforums work
-----BEGIN GEEK CODE BLOCK-----
GCS d- s:- a---- C++++ UL++++ P+ L+++ E- W+++ N+ o K+ w---
O- M+ V-- PS+++ PE-- Y+ PGP t 5 X R tv-- b++ DI+ D+
G e-- h! r-- y
------END GEEK CODE BLOCK------
GCS d- s:- a---- C++++ UL++++ P+ L+++ E- W+++ N+ o K+ w---
O- M+ V-- PS+++ PE-- Y+ PGP t 5 X R tv-- b++ DI+ D+
G e-- h! r-- y
------END GEEK CODE BLOCK------
Re: How the subforums work
Have a search for the field names in the source code, then you might be able to see what the code is doing.
Re: How the subforums work
I've only skimmed through the phpBB 2.1 code, but it looks like they're using a tree structure to store and retrieve the forum categories.
This article on SitePoint explains how tree structures work in conjunction with databases.
Hope this helps. I was wondering about how subforums work, too.
This article on SitePoint explains how tree structures work in conjunction with databases.
Hope this helps. I was wondering about how subforums work, too.
Re: How the subforums work
I've read the article I referred to in the previous post, and I've looked at the phpBB code.
God I love this new forum/subforum implementation. It uses something called the Modified Preorder Tree Traversal algorithm. You pay a higher insert perfomance penalty, but new forums/subforums will only be created seldomly. Plus, the administrator will be the only person inserting new forums/subforums, and
On the other hand, selecting forums and their ancestors will be used far more often. In phpBB 2.2, it's fast, requiring only one, simple query (*stops to marvel at the developer's choice to use a tree structure, why didn't I think of that?*).
phpBB 2.2's forum/subforums implementation also allows for an unlimited subforums, and allows for the forums to go as in deep as you can imagine.
Compared to vBulletin 3.0, phpBB's implementation is much cleaner. vB 3.0 does not employ a tree structure to store forum categories. Instead, each forum/subforum keeps a comma seperated list of parent forums in a varchar(250) field, and a list of a comma seperated list of child forums in a varchar(250) field. Eww... it's really unclean.
IPB 1.3 does not support subforums. It's only in IBP 2.0 that subforums are supported, but that version is only in its alpha phase. I haven't looked at IPB's implementation yet.
God I love this new forum/subforum implementation. It uses something called the Modified Preorder Tree Traversal algorithm. You pay a higher insert perfomance penalty, but new forums/subforums will only be created seldomly. Plus, the administrator will be the only person inserting new forums/subforums, and
On the other hand, selecting forums and their ancestors will be used far more often. In phpBB 2.2, it's fast, requiring only one, simple query (*stops to marvel at the developer's choice to use a tree structure, why didn't I think of that?*).
phpBB 2.2's forum/subforums implementation also allows for an unlimited subforums, and allows for the forums to go as in deep as you can imagine.
Compared to vBulletin 3.0, phpBB's implementation is much cleaner. vB 3.0 does not employ a tree structure to store forum categories. Instead, each forum/subforum keeps a comma seperated list of parent forums in a varchar(250) field, and a list of a comma seperated list of child forums in a varchar(250) field. Eww... it's really unclean.
IPB 1.3 does not support subforums. It's only in IBP 2.0 that subforums are supported, but that version is only in its alpha phase. I haven't looked at IPB's implementation yet.
-
- Registered User
- Posts: 1546
- Joined: Wed Apr 09, 2003 8:44 pm
- Location: London, United Kingdom
Re: How the subforums work
I can assure you it does, but only to a limited number of levels.hasten wrote:IPB 1.3 does not support subforums. It's only in IBP 2.0 that subforums are supported, but that version is only in its alpha phase. I haven't looked at IPB's implementation yet.
Rob
Re: How the subforums work
Oh. Thanks for the correction.Roberdin wrote:I can assure you it does, but only to a limited number of levels.
Re: How the subforums work
Wow.
When I'm done implementing this in my blogger, I'm putting a psoTFX worship in a comment block.
When I'm done implementing this in my blogger, I'm putting a psoTFX worship in a comment block.
-----BEGIN GEEK CODE BLOCK-----
GCS d- s:- a---- C++++ UL++++ P+ L+++ E- W+++ N+ o K+ w---
O- M+ V-- PS+++ PE-- Y+ PGP t 5 X R tv-- b++ DI+ D+
G e-- h! r-- y
------END GEEK CODE BLOCK------
GCS d- s:- a---- C++++ UL++++ P+ L+++ E- W+++ N+ o K+ w---
O- M+ V-- PS+++ PE-- Y+ PGP t 5 X R tv-- b++ DI+ D+
G e-- h! r-- y
------END GEEK CODE BLOCK------
Re: How the subforums work
You best put an Ashe comment too I came up with the approach but Ashe was the one who then put the basic code in place.