FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Users Online hack
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Users Online hack [message #5833] Tue, 24 September 2002 19:25 Go to next message
Sauce14 is currently offline  Sauce14   Canada
Messages: 3
Registered: September 2002
Karma: 0
Junior Member
Is there any way to display the most number of users ever online? Hopefully be able to include at the bottom of the main forum page with the other Users Online stats.

If anyone has any ideas or code that they have used that would be great. Please keep in mind that I have next to know knowledge about PHP. But I could probably understand what you're talking about because I have worked with other scripting languages.
Re: Users Online hack [message #5834 is a reply to message #5833] Tue, 24 September 2002 19:30 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
There is no particularly easy way to do it, since it would require another table with counts that would be updated whenever a user visits.

FUDforum Core Developer
Re: Users Online hack [message #5835 is a reply to message #5834] Tue, 24 September 2002 19:32 Go to previous messageGo to next message
Sauce14 is currently offline  Sauce14   Canada
Messages: 3
Registered: September 2002
Karma: 0
Junior Member
can it be done though? like how hard would it be? it's just a counter right? and when the count exceeds the table then the table increases by 1?
Re: Users Online hack [message #5836 is a reply to message #5835] Tue, 24 September 2002 19:37 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Certainly it can be done, however it is not quite as simple as you make it out to be.
During the session initialization code, you would need to see if this user was previously logged in today and based on that increment the counts table.
The counts table would need to look something like this:

date (timestamp) reg_users (integer) anon_users (integer)

So, for each date you'd have a value inside that table, so to get the maximum number of registered users you'd simply run SELECT MAX(reg_users) FROM visitor_counts_table;

Something to this effect.


FUDforum Core Developer
Re: Users Online hack [message #5837 is a reply to message #5836] Tue, 24 September 2002 21:14 Go to previous messageGo to next message
Sauce14 is currently offline  Sauce14   Canada
Messages: 3
Registered: September 2002
Karma: 0
Junior Member
Damn, I have no idea how to do this. I know next to nothing in PHP. Would anyone be able to write a script for me?
Re: Users Online hack [message #5838 is a reply to message #5837] Tue, 24 September 2002 21:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
FUDforum's Development team does do commercial work related to the forum such as customizations, installation and support. If you are interested send an email to sales(at)prohost(dot)org with the spec of what you would like to have done.

FUDforum Core Developer
Re: Users Online hack [message #5967 is a reply to message #5834] Sat, 28 September 2002 22:33 Go to previous messageGo to next message
valiant is currently offline  valiant   Switzerland
Messages: 80
Registered: September 2002
Location: Zurich
Karma: 0
Member
phpBB 2 has a configs table and is storing there data like
records and al config data (key: config position, value: config value).
you know, i can't view your FUDForum code 'cause of the zlib thing, but don't you have a similar place for configs? or do you store the config data in flat files?

cheers - andy
Re: Users Online hack [message #5972 is a reply to message #5967] Sun, 29 September 2002 00:42 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can view the source via the WebCVS (read the CVS thread).
As for config file there is 1 include file that contains various forum settings, the file is called GLOBALS.php and is found inside the include directory.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: More Information for registration
Next Topic: Fortune Cookies.
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 19:30:22 GMT 2024

Total time taken to generate the page: 0.01857 seconds