Skip to main content
gamedev.net
🔒 Locked

[web] developing a forum

Started by Jinx3d1 1 reply 950+ views
Original Post
Jinx3d1
Jinx3d1
I can code html, css, xml and &#106avascript and I'll probably go ahead and pick up asp here pretty soon. Anyway, I am developing a personal web site right now and I want to have a message forum. I first considered using free forum software, however, I would really like to develop it my self to simply gain the experience and have some fun. I have never really attempted anything like this, so I spent alot of today reading about databases, asp, php, mysql. There are so many choices that it's making it hard for me to decided which route to take. I figure that basically on the outside, a forum is simply dynamically generated html based on user input. However, for a site like this, I would imagine you would need a database (my guess is that they use mysql or maybe a 30k rational dbase server) to store user data such as to keeo track of messages, personal messages, etc. So a site like this, I would imagine has: a database, asp for generating html and accessing the dbase, the server(s) of course, and finally, the html. In summary, a server system with some dbase software, asp, css, xml and html. Sorry, I was just starting to realise something there (I sorta just visualized the relationships in a large site like this). Anyway, all I want to have is a user log in system, a couple of forums (coding, gaming whatever...) etc. Can anyone give me some pointers or tips on developing my own? Should I worry about data bases? Oh and what is IIS exactly? Thanks a lot and sorry for the length of this thread.
evolutional
evolutional
First thing you need to do is look at what technology is accessible to you. As you said, you'll more than likely want to use a Database server (MySQL, SQL Server, or even MS Access will do for tiny sites). You could use a flatfile solution (XML, CSV or another bespoke format) but it's likely you'll have performance and access problems. Database access drivers will handle transactions and file locking for you, if you go the flatfile way you'll probably need to create this sort of thing in software yourself. If I recall, there should be a CSV ODBC driver on most windows systems so at a push you could use a series of CSV files as a database approximation - but again, it'll be a lot slower in performance terms.

Anyway, I've sort of gone off on a slight tangent so I'll bring it back to your question. You'll also need a way of programming the server to perform your database queries and display your pages from the results. For this you'd probably use ASP, ASP.NET or PHP (there are of course other server-side scripting methods, but these are the most popular). Again, you'll need to assess which technology is available to you and on your web server - your post leads me to believe you're using ASP so the decision is probably fairly easy ;)

From here, you'll design your database structure on paper (or the computer if you have the software) to develop your forum structure (Users, threads, posts, etc). You'll then need to design your application layer in which you work out how your forum will access the database; you'll need a way of logging in and managing users, a way of creating threads and posts as well as a way of actually viewing all that information back. A really easy way of doing this is to design a single threaded message-board type system. Users will log in and post, the softare will display these posts back to you in an ordered form. From here, you could expand the system by adding access permissions to create moderators or superusers and then add threading to the board (this is easier if you design the original structure with this in mind).

It's not too difficult to do and can be quite fun. A good way of learning is to take a look at an existing forum such as Snitz Forums. You can download and look at the code and work out how it all pieces together.

I hope this little ramble was useful for you - a few people here have designed their own forums so if you have any specific questions or just ideas you want to throw around then drop another post in the Web forum :)

-Oli
jumpjumpjump
jumpjumpjump
http://www.morrowland.com/apron/tut_asp.php
Look at the bottom for an asp forum tutorial.
http://www.morrowland.com/apron/tutorials/web/php/forum/index.php
There is a php forum tutorial.

None of those tutorials teach you how to filter html out of the, posts, titles, names etc, so it can be potentially dangerous. Also, I would suggest instead of just outputting the html from the code, that you use a template system instead.

Here is a little sample of removing html
//////////////////////////////////////////removehtml()//removes html from string passed to it/////////////////////////////////////////function removehtml($text){		$htms = array("<", ">", '"');		$keys = array("<", ">", """);		$temp = str_replace($htms, $keys, $text);		return $temp;}

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.