![]() |
Another dbstructuring help..
Hi!
I tried like.. some months ago and code my first forum. Turned out pretty well. Very.. newbish, but nevertheless it worked. I'm about to create a more advanced now, like a version 2. And I'm wondering how you guys would set up your db to maintain an easy way of accessing categories(and noticing the difference between a regular forum and a category), threads, posts, and ofcourse users. I'm looking for some basic functionality here, but still kindof advanced. So.. any suggestions? |
A forum system is a very huge thing.
You would need several tables: as a very basic setup, you would need the following tables accounts forums forum_posts Forums is your categories, forum_posts contains the data or text posted by the users. It really depends on what you are trying to do. You can make these extremly advanced or extremly small. |
Yea, but I meant like.. how about columns? And stuff.. ?
|
lol. Well, we need to know what you want to do. If i were to put an extremly basic setup on my site for a forum system, I would have it like the following:
forums: forum_id, forum_name, forum_description, forum_lastpost, forum_lastpost_author_id, forum_order, forum_active forum_posts post_id, forum_id, post_title, post_content, post_created, post_updated, post_author_id |
Mmm, I was thinking something like this:
Code:
-forumsJust wondering how I could add permissions to each usergroup though... |
Ah see, now were getting somewhere. You even made a seperate table for the threads, nice!
One thing that I point out is that if you are going to make a ACL, you wouldn't have is_banned in the user table. You would simply have them assigned to the 'banned' usergroup, which would restrict access to everything. Trying to make an ACL (Access control list)? Good luck with that! I have made but very little, highly unflexiable ACL's before. Try googleing around for ACL tutorials though, there are several tutorials out there for storing and managing ACL's. This is something I need to do myself... I've always used a pretty basic ACL (incremental), but for a forum system you need something far more complicated then that. |
Quote:
Okay :O I'll search for it, thanks!! |
| All times are GMT. The time now is 08:53 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0