Forum Moderators: coopster

Message Too Old, No Replies

Forum Member and Guest Tracking

         

rysolag

4:06 am on Sep 6, 2004 (gmt 0)

10+ Year Member



Hi All,

I am currently try to implement a forum from scratch. I think the most difficult part will be implementing the tracking of members and guests. i.e., on most phpbb and vbulletin forums there are stats on the bottom of the home page of the forum: total number of users currently viewing the forums, how many are membes and how many are guests, a list of the ones that are users. Also, I want the user to be able to check auto-login so that when they come back to the site they don't need to login every time.

Can anyone outline the session and database implementation that enables this tracking? Do you know of any tutorials for this?

thanks all

mincklerstraat

4:40 pm on Sep 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Rysolag,

This is a pretty complicated topic that probably requires more than just a tutorial. I'd go through the section on sessions at php.net. If you really want to track both the number of logged-in and non-logged in users, you'll want to have fields for each of these, so you'll be in for more than just plain sessions. If you just want to the number of all users, one quick 'n dirty way would be to save the session variables in db table that's just for your forum sessions, and do a count query on it. If you only want logged-in users, drop a cookie if they log in, and only start sessions if they've got the cookie.

Btw., if you need help on this point, why don't you just use one of the great forum boards that's already out there?