Fog Creek Software
Discussion Board

How do I make a forum like this one?

I'm favorably impressed with the architecture of the present discussion forum.  I believe such scheme would suit a quite small forum I'd like to get started,  I wondered which of the free web based forum implementation services would allow me to most closely emulate the Joel on Software forums.  Should such prospect be impossible, which tools would help me get the job done?

Many thanks,


Antonio J. Galvan
Thursday, March 13, 2003

Over in this thread

there is a discussion of free forum software.

Thursday, March 13, 2003

Just one PHP script and some space on a MySQL server:

Frederic Faure
Thursday, March 13, 2003

Create a table of users (email, full name, survey, date added, status, source ip, cookie)
Create a table of forum listing ( questionid, forum question, forum owner first name, forum owner last name, date added)
Create a table of storing the non-branchable threads (questionid, answer, full name, email addr,

Use the users table to automatically flag jerks for easier moderation.
Use the forum listing to list the questions at the beginning and to store the questions
when users pick a question to see the stream of thoughts
just do:

select full name, email, answer from table answers order by date added where questionid = question id of the quesetion picked

To ensure people don't see your email just use an emailid and reference a emailid -> emailaddr table

It won't be as pretty as this forum right away.. but that's probably how you would do it at first try.

Li-fan Chen
Thursday, March 13, 2003

Additional features provided by this discussion forum is the
ability to disable messages or even entire question/answer associations to keep the chats on topic.

So you just need an inactive/active status flag

I don't know if this feature exist or is even useful, but I suspect that there's a karma count for this forum engine.

Internally for reporting purpose you might have a karma
count which is calculated from who gives really good answers so in a administration enabled page moderators
can mark a thread as good question.. and any given answer as good answer.. and your karma point increases internally.. that way a new moderator would know who is okay to ban or not.

Other features that make this forum non-trivial is
an ability to automatically flag troublesome posts..

there need to be a way to determine whether people
are just trolling and causing trouble (otherwise the moderator would have to read every post) I guess you could write a little bayasian filter to highlight trolls automatically...

You need to clean up the input to prevent answers from popping up ads for readers..and other stupid stuff like that.. without making it too difficult for user to submit legimate data like programming code and URLs..

So if you want to successfully replicate this forum, YMMV

Li-fan Chen
Thursday, March 13, 2003

There has to be some anti-idiot proofing too, you have to ensure that you don't accidently allow reclicks (click back, click submit again) to cause duplicate messages to be submitted in response tot he same question. Okay, I made my point.. it's both easy and hard to get it working exactly like fog creek's. But the hardest part is having enough people show up. The net's filled with trillions of very very very quiet forums... even those forums backed by thousand dollar award winning software..

Li-fan Chen
Thursday, March 13, 2003

"Create a table of users (email, full name, survey, date added, status, source ip, cookie)"

What is the field "survey" used for? Also, Discuss@JoS doesn't seem to associate any status with users. User details are transient and coupled tightly to the post so there is little need for a user table.

Hence, wouldn't it be better just to have two tables -
topics and messages?

Thursday, March 13, 2003

you only need one table, for "posts". Some posts have parents (those are replies). Posts without parents are top level posts.

Joel Spolsky
Thursday, March 13, 2003

Not being a database guy, I've always wondered something - do you store the actual text of the post in the database as well? If you do, how do you define the field so that you aren't arbitrarily limited on the length of posts? Or do you just set some limit with VARCHAR(1024) or whatever?

Chris Tavares
Thursday, March 13, 2003

most databases have a variable-length, long text data type. In Access it's called MEMO, in SQL Server it's called TEXT. The record only stores a pointer to a separately managed area of disk.

Joel Spolsky
Thursday, March 13, 2003

It's really gross but some people join up the varchars with limits.

So a really long 8000 char message would store as
8 rows in a varchar(1000) field. And you use a helper function that grabs them all and join up the function.

It's another way.

Joel thanks a question table is unnecessary for this simple example :)

Li-fan Chen
Thursday, March 13, 2003

EmailIds -> Emailaddrs are also unnecessary if the session remembers the userid.. this is only useful for multiple emails and the like..

Li-fan Chen
Thursday, March 13, 2003

...but it's the, erm, interesting mix of posters who really make a board. Amazon should sell them prepackaged. "Grow your own forum pack - includes in variable quanities: Jaded Programmers, Rush Limbaugh Listeners, Out Of Their Depth Schoolkids, Semantic Argument Bores, European Lurkers..."

Thursday, March 13, 2003

...and unnamed trolls with axes to grind.

Thursday, March 13, 2003

damn, you got me!

Saturday, March 15, 2003

A little late with the post, but here's one more example of a message board, that's similar to this one. The explanation is part of a three-part "At the Forge" series by long-time Linux Journal contributor, Reuven Lerner.

He used to have a working example of the message board and the source code on his website, but he says he's making changes to his site right now.

Monday, March 17, 2003

as the title says HOW do i make a forum like this?? Please respond.

kyle atusuel
Tuesday, July 8, 2003

mkae your own forum?

Wednesday, September 10, 2003

*  Recent Topics

*  Fog Creek Home