Jump to content

Forum Software Help


Recommended Posts

personally i'd go with the adding of a new field - i.e, parent_id - and keep all the forums and subforums in the same table. This way, if you decided (for example) to add a 'forum description', or perform a restructure, then you're only handling a single table and not two.

 

Also when it comes to dealing with stuff like posts/topics/forum permissions, etc, having a single, consistent table will be much easier to code for.

 

id
active (ENUM, y or n)
parent_id
title
description
...etc...

Link to comment
https://forums.phpfreaks.com/topic/41185-forum-software-help/#findComment-199694
Share on other sites

  • 3 weeks later...

personally i'd go with the adding of a new field - i.e, parent_id - and keep all the forums and subforums in the same table. This way, if you decided (for example) to add a 'forum description', or perform a restructure, then you're only handling a single table and not two.

 

Also when it comes to dealing with stuff like posts/topics/forum permissions, etc, having a single, consistent table will be much easier to code for.

 

id
active (ENUM, y or n)
parent_id
title
description
...etc...

 

I agree with this, just assign a parent_id of 0 to all top level forums, then all others can use the unique id as their parent id. One of my big projects right now uses XMB forums and that's the way they do it. I have also used it for a simplified structure for a resource browser that uses a directory structure.

 

The subforum table is very discouraged, because what happens if you want to create sub-sub-forums, or sub-sub-sub forums. Then you are multiplying your workload.

Link to comment
https://forums.phpfreaks.com/topic/41185-forum-software-help/#findComment-211318
Share on other sites

  • 4 weeks later...

yea, creating one table for all the forums i would think is the most efficient way of doing this.  I will mostly likely be build my own forum system for my project management system and that is the way i would ever consider doing the forum table.  This way you don't limit yourself on how many subforums you can have and does make coding easier besuase you will only have 1 table to deal with wether is it a top level forum and a sub forum.

Link to comment
https://forums.phpfreaks.com/topic/41185-forum-software-help/#findComment-227060
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.