Author Topic: list the recent members?  (Read 24305 times)

0 Members and 1 Guest are viewing this topic.

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
list the recent members?
« on: February 12, 2003, 10:02:41 AM »
Is there a way to display how many users have come to the gallery for the last day or like     Visitors Today:Jason,Sara,Jack   list users that have been logged in within the last 24 hours?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
list the recent members?
« Reply #1 on: February 13, 2003, 01:50:33 AM »
without DB modification (add new field) u only can show how many MEMBERS visited the gallery.

if that's ok with u, then try this:

1.
In index.php just before //----Print out---- add this code:
Code: [Select]
$sql = "SELECT ".get_user_table_field("", "user_id")." , ".get_user_table_field("", "user_name")."
        FROM ".USERS_TABLE."
        WHERE ".get_user_table_field("", "user_id")." <> ".GUEST." AND ".get_user_table_field("", "user_lastaction")." >= ".(time() - 60 * 60 * 24 * 1)." AND ".get_user_table_field("", "user_invisible")." = 0
        ORDER BY ".get_user_table_field("", "user_lastaction")." DESC";
$result = $site_db->query($sql);
$today_users = $site_db->get_numrows($result);
$today_users_list = "";
while ($todayusers = $site_db->fetch_array($result)){
  $today_users_list .= (($today_users_list) ? ", " : "")."<a href=\"".ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$todayusers[$user_table_fields['user_id']]."\">".$todayusers[$user_table_fields['user_name']]."</a>";
}
$site_template->register_vars(array(
  "today_users" => $today_users,
  "today_users_list" => $today_users_list
));
then in home.html or whos_online.html add {today_users} - to display number of members and/or {today_users_list} - to display usernames of members visited in last 24 hours.
« Last Edit: December 13, 2005, 11:56:45 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
users on memberlist page
« Reply #2 on: February 13, 2003, 02:19:08 AM »
Heyb thanks V@no, would I need to change anything for it to work on the Memberlist Pages instead of the main page?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
list the recent members?
« Reply #3 on: February 13, 2003, 02:26:45 AM »
no, just use this code in any "main" files (index.php, members.php, details.php, so on) and insert {...} tags in templates that belog to those files.

P.S. I just updated the code, so it doesnt count/show "invisible" users.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline yellows

  • Newbie
  • *
  • Posts: 39
    • View Profile
list the recent members?
« Reply #4 on: February 13, 2003, 02:58:36 AM »
any chance u can have the total to include guests as well so you would have for example

online today - 12 members and 50 guests

would be much apprieciated.

james

Offline Jasondavis

  • Full Member
  • ***
  • Posts: 157
    • View Profile
list the recent members?
« Reply #5 on: February 13, 2003, 03:28:05 AM »
Quote from: yellows
any chance u can have the total to include guests as well so you would have for example

online today - 12 members and 50 guests

would be much apprieciated.

james



I think it might not work to well... A lot of people go to the gallery, and then login so they would be counted as a guest, then counted as a member to...I'm not sure just my theory

Offline Uno1

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: list the recent members?
« Reply #6 on: April 13, 2005, 04:57:31 AM »
any chance u can have the total to include guests as well so you would have for example

online today - 12 members and 50 guests

would be much apprieciated.

james

im with u :) good idea...to have it like that..coOL!

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: list the recent members?
« Reply #7 on: May 08, 2005, 09:48:49 AM »
Hi there,

is there a way that the Mod reseted a midnight???

Now at midnight it rset to 0 and then they count the members for the day.
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: list the recent members?
« Reply #8 on: May 08, 2005, 10:22:46 AM »
Hi there,

is there a way that the Mod reseted a midnight???

Now at midnight it rset to 0 and then they count the members for the day.
try to replace
Code: [Select]
        WHERE ".get_user_table_field("", "user_id")." <> ".GUEST." AND ".get_user_table_field("", "user_lastaction")." >= ".(time() - 60 * 60 * 24 * 1)." AND ".get_user_table_field("", "user_invisible")." = 0 with:
Code: [Select]
        WHERE ".get_user_table_field("", "user_id")." <> ".GUEST." AND ".get_user_table_field("", "user_lastaction")." BETWEEN ".mktime(0,0,0,date("n"),date("j"),date("Y"))." AND ".time()." AND ".get_user_table_field("", "user_invisible")." = 0(not tested)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: list the recent members?
« Reply #9 on: May 08, 2005, 10:35:23 AM »
hello great addition ,
 but can i block guests from clicking the members names and looking at there profile , i would like this for registered users only, can it be a global thing aswell so all members names wherever seen , only registered users can see this info

Thanks
RT

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: list the recent members?
« Reply #10 on: May 08, 2005, 01:39:32 PM »
Quote
(not tested)

OK, i will test it :) At midnight i see if it reset...  :mrgreen:

hello great addition ,
 but can i block guests from clicking the members names and looking at there profile , i would like this for registered users only, can it be a global thing aswell so all members names wherever seen , only registered users can see this info

Thanks
RT

Check this -> http://www.4homepages.de/forum/index.php?topic=7675.0

Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: list the recent members?
« Reply #11 on: May 08, 2005, 02:33:23 PM »
thanks jen but how do i put it in the code  :oops: {if user_loggedin} on this mod i have tried putting the tag in home.html but does not work  :(
thanks
RT

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: list the recent members?
« Reply #12 on: May 08, 2005, 03:40:10 PM »
It must be shown so...

{if user_loggedin} - the text for Members, not for guests - {endif user_loggedin}

I have this for the New Pics since last visit and it works for me. Now Members can see this.
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline JensF

  • Addicted member
  • ******
  • Posts: 1.028
    • View Profile
    • http://www.terraristik-galerie.de
Re: list the recent members?
« Reply #13 on: May 09, 2005, 12:16:00 AM »
Hi V@no,

now it works. At midnight it reseted and count from 0. Thanks!!!!
Mit freundlichem Gruß
Jens Funk



-> Sorry for my bad English <-

Offline waleed

  • Jr. Member
  • **
  • Posts: 71
    • View Profile
Re: list the recent members?
« Reply #14 on: December 13, 2005, 07:50:00 PM »
hey veno can u fix that code am using 4images_vb35_integration