Topic: A list of users who have logged in today?

Is there a way to list the users who have logged in 'today'? I would like to put this list under the 'currently active' list.

FREE web hosting: www.subnixus.com

Re: A list of users who have logged in today?

make minor changes in uselist.php, it is easy

3

Re: A list of users who have logged in today?

druvans wrote:

make minor changes in uselist.php, it is easy

there is a good possibility that if he is asking its becauce he does not know how

4 (edited by druvans 2005-04-27 19:28)

Re: A list of users who have logged in today?

Ataxy, u r killing me man, Here's a quick hack

http://www.gotoguide.org/userlist2....

It works in firefox, I dont see any reason why it shouldnt work on other browsers.

Here is what it do

1 - restricts user list access only for mods and admins
2 - shows a filtered user list based on  todays log ins

My changes are between line 150 and 190

5

Re: A list of users who have logged in today?

ok ill kill you a bit more
i get this error with you code
Fatal error: Call to undefined function: idate() in /home/vhost/d-vault.peerforces.com/html/forum/userlist.php on line 166

Re: A list of users who have logged in today?

line no: 166
$today = idate('U', mktime(23, 59, 59, date("m")  , date("d")-1, date("Y")));

cahnge to
$today = date('U', mktime(23, 59, 59, date("m")  , date("d")-1, date("Y")));

idate is a PHP version 5 function, I am not sure why I used it.

hope this fixes it

7

Re: A list of users who have logged in today?

thx it did work it does a nice job but i will try to see how to keep the standard user list at the same time
but i like this option:
restricts user list access only for mods and admins

8 (edited by druvans 2005-04-14 05:20)

Re: A list of users who have logged in today?

easiest way is to keep userlist.php as it is, then provide a new link to uselist2day.php for filtered user list

in admin->options->additional menu
10=<a href=http://www.xxx.com/userlist2day.php>Todays visitors</a>

9

Re: A list of users who have logged in today?

thx but how can i make it so that the userlist stays unaccesible to guest to

10 (edited by druvans 2005-04-15 05:00)

Re: A list of users who have logged in today?

Add the following lines to userlist.php

To give permission only to admis and mods

if($pun_user['g_id']  != PUN_ADMIN || $pun_user['g_id'] != PUN_MOD)
    message($lang_common['No permission']);

or use this, to give access only to logged in people.

if ($pun_user['is_guest'] )
        message($lang_common['No permission']);

Add either of the code blocks just above this line. (line no 33 - 34  range)

// Load the userlist.php language file
require PUN_ROOT.'lang/'.$pun_user['language'].'/userlist.php';

11

Re: A list of users who have logged in today?

cool thx druvans

Re: A list of users who have logged in today?

I created a revised version, which fixes the numbering and search for the same. I renamed the file as today.php

http://jobs.gotoguide.org/today.zip