Jump to content

Creating A Forum System


tdub311

Recommended Posts

I am creating a forum system with php and mysql and one of the things that I can't think of a way to do is show members which posts are "new" to them and which posts are "old".Does anyone know a good way of doing this?

Link to comment
Share on other sites

You just need a way to keep track of which posts a user has read and maybe the last time they read them. There are a lot of ways to do that but many are inefficient. You might want to look through the code and database structure for some other forums and see how others are doing it.

Link to comment
Share on other sites

Correct me if I'm wrong, because I'm not the best at PHP, but couldn't you just use a user's cookies for that?I don't have very much experience with PHP cookies and all but I think it might be able to work.

Link to comment
Share on other sites

Correct me if I'm wrong, because I'm not the best at PHP, but couldn't you just use a user's cookies for that?I don't have very much experience with PHP cookies and all but I think it might be able to work.
You could, but if someone deletes their cookies / uses another computer their read post count would be reset. For a consistent user experience a server-side solution is needed.
Link to comment
Share on other sites

Again, cookies won't work, because they are stored client-side and so are not transferred between machines and can be deleted by the user.The best solution is as JSG says, using a database on the server.

Link to comment
Share on other sites

You need a server side solution for this. Client side scripting by storing cookie won't help you (as mentioned above) since it can be deleted by users. What you can do is that create a seperate table for storing users info in your database or you can club it with your login table by creating additional fields. And you must also create a database of all your forum posts containing info such as date and time of the forum post, unique forum post id and a field containing its url (I think you must be already having this). After that you can compare the time when a particular user last login(ed) :) and display a list of all the forum threads which have been posted after that (by comparing date-time info) or just a new forum 'counter'.

Link to comment
Share on other sites

just curious...but dont most sites just use a forum thats already been created and configure it with the settings and look they want? A forum sounds like a lot of work to make esp since its a common thing used.

Link to comment
Share on other sites

just curious...but dont most sites just use a forum thats already been created and configure it with the settings and look they want? A forum sounds like a lot of work to make esp since its a common thing used.
Yes, they do.
Link to comment
Share on other sites

  • 3 weeks later...
just curious...but dont most sites just use a forum thats already been created and configure it with the settings and look they want? A forum sounds like a lot of work to make esp since its a common thing used.
Yes you are right. There are some very good open source forum solutions available. phpBB is one such example. :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...