Gossamer Forum
Quote Reply
Activity Globals...
VB has a nice pair of globals...

Currently Active Users (474): 201 members and 273 guests.

...and...

1233 different members have logged in over the last 24hrs.

How would these be re-created in GForum?


moog
-- I've spent most of my money on beer and women... the rest I just wasted.
Quote Reply
Re: [kooSH] Activity Globals... In reply to
Quote:
Currently Active Users (474): 201 members and 273 guests.
This is already available in the "Online Users" menu.


Quote:
1233 different members have logged in over the last 24hrs
This is nice idea. I think this would be solved easily, as this needs just a simple counter, which is reset each 24 hours.

However, if we want to display the 24 hour relatively to the current time, we would need to log each login & guest access in the last 24 hour, so we would able to count them.
This would need a new table to log the accesses, or at least a new column into the gforum_online table.

Yeah, it seems it would not a quite difficult task to implement this small feature, but the question is, if this is worth to put the time into it, or not.
I think users of the forum will tell, what they think about this.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] Activity Globals... In reply to
Nah. You would just to a count on the database and select users who have logged in within the last 24 hours.

- wil
Quote Reply
Re: [Wil] Activity Globals... In reply to
Wil,
Yep, true. Your solution is the optimal solution. Wink

EDIT: But your solution also require a new column in the User table, isn't?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: May 22, 2002, 10:31 AM
Quote Reply
Re: [webmaster33] Activity Globals... In reply to
Nope no extra column required, just add a global:

sub {
return $DB->table('User')->count( GT::SQL::Condition->new('user_last_seen', '>', time - 86400) );
}

(86400 is number of seconds in a day).

Cheers,

Alex
--
Gossamer Threads Inc.