What is a Forum?

Grizzly

Bear
Contributor
What is a forum?

Id like to know what is behind a forum, what drives it.. Is it simply a database? like an on-line SQL system? how does it work? what are its fundamentals?

I imagine a tree structure.. with a root that the sub-forums branch from, threads branch again, and posts are nodes or just entries in a table? Our posts, are they simply the text we input with some simple formatting code?

So, Bro, put the baby bottle down and tell me whats what :coffee:
 
An SQL database (comprised of tables) is part of a forum but it still requires software to make it work.

So on the server we have the software which is composed of directories and various files; php, css, html, etc.
These files contain all the structural data for the forum, including the layout, design, etc.

Then there are certain files which read from and write to the SQL database whenever certain actions are performed such as reading a thread, creating a new post, etc.
The posts table for example is a single table which contains the data related to every post on the forum.
It is currently 71.1 MB and growing.

In addition to the forum software and tables though, we have our own files and tables related to the home page, database page, gallery, etc.

If you want to see the backend of phpBB and the Admin CP, then you can try a demo board here: http://www.try-phpbb.com/30x/
Username and password are administrator/administrator.
Once logged in click on Administration Control Panel at the bottom.


P.S. I split the post and moved it here as this is a better forum for it.
 
Thanks Brogan

Quote - "whenever certain actions are performed such as reading a thread" ...completely neglected to think of that. Even a simple action such as reading a thread creates a change to the database....

There's a lot happening isn't there!
 
Brogan said:
The posts table for example is a single table which contains the data related to every post on the forum.
It is currently 71.1 MB and growing.

Right, makes sense. so its all dumped in one table with an ID. Does my computer access the table and take what it needs to show me the thread, or does it just make the request, and your computer/server sends out what i need to see?

Off to play with try-php!
 
Grizzly said:
Right, makes sense. so its all dumped in one table with an ID. Does my computer access the table and take what it needs to show me the thread, or does it just make the request, and your computer/server sends out what i need to see?
The posts table has over 25 fields, things like post_id, topic_id, forum_id, poster_id, etc.

Only the files on the server access the database in response to actions you do such as clicking on a thread, updating your signature, etc.
So it's mostly server-side processing with a little bit of client-side stuff such as javascript, etc.

Hopefully gribbli will see this thread as I know very little and he's the code monkey :D
 
It doesnt really get much more simple than a forum, especially the typical functionality.

If you think of it like a system of entities, you will usually find that there is a database table that exists to reflect each entity level. So typically you would have user, forum, threads, posts etc tables. Then, as you eluded to above these tables are linked together using single or multiple keys e.g. Id.

So a typical example is this very thread page you will notice on the end of the address bar the '?f=61&t=2097', which is a query string. This simply equates to a query that request all posts in forum 61 thread 2097.

The php script on the server would then loop through the results of that database query and generate the html you see on the page returned to you.

Theres all sorts of css & javascript fun and games that go on as well but I wont bore you with the details :D
 
gribbli said:
Theres all sorts of css & javascript fun and games that go on as well but I wont bore you with the details :D
Oh please do.
You've bored me enough over the last few years LOL
 
Back
Top Bottom