Page 1 of 1

Creating a Forum from Scratch

Posted: Fri Oct 22, 2004 6:57 pm
by grahamd
For those of you unfortunate to stumble across my previous post relating to a problem with my uni project login system - this is kind of a tag-along - my next question for you guys is do any of you have any advice/code/magic tricks for getting a forum or threaded message board up and running which I could intergrate into my existing login system?

Thanks for your time peeps! :D

Posted: Fri Oct 22, 2004 10:31 pm
by kettle_drum
Its hard to know what you want here as you could do several things.

1) Use your login system to protect the pages that show any forum - i.e. change an open source forum to have an if statment at the top of each page that uses your login system to check to see if your logged in.

2) Remove the forums own authencation, and put yours in there - would be hard unless you had a good knowledge of that forum.

3) Code your own simple forum - its pretty much just a case of a submit form, and something to show those posts. Pass an id along in the submit if its a reply to a thread - or if there isnt one its a new post. Display them accordingly.

So choose what method you would want and im sure we can help you further.

Posted: Sat Oct 23, 2004 7:35 am
by grahamd
I'll be developing my own forum from square 1 - the uni regulations don't permit me to take existing packages and modify them unfortunately! I am, however, allowed to get advice and code from people who I request assistance from (i.e. you guys) so that'll be my crutch to lean on!

I'm just about to start work on the form for post submission. I'm going to allow members and unregistered users alike to browse the forums, but only registered members can post. I may incorporate an unregistered user thread so they can post in there if they really don't want to register!

My thinking so far is I'll require the following fields in SQL:

TopicID - auto incrementing identifier for posted topics
Topic - a topic's name
Created - 'NOW()' function for posts and topics
PostID - auto incrementing identifier for posted topics
Username - read from my existing login system if logged in, else "anonymous" if I choose to have the unregistered user topic!
Email - as above
Postsubject - subject of a post
Posttext - the body of a post


I haven't begun to look at the admin side of things yet, but does this look reasonable as a foundation point? Could you offer any advice for improvements? Thank you!