vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Who was online today [available in english & german] (https://vborg.vbsupport.ru/showthread.php?t=34014)

Mystics 01-10-2002 10:00 PM

Hack Name: Who was online today
Hack Version: 1.0.2
For vB Version:: 2.x
Originally Created by: genial @ Skats Board (Contact)
Documentation, Translation, a few changes and posted by: Mystics

Description:
This Hack adds something like the "Currently Active Users:"-Feature of vBulletin.
The difference is, instead of showing the users, who are currently online, it shows
all Users, who were online on a day and it also displays "Most users ever online on a day".

Summary of the Features:
  • Shows "Number of Active Users Today"
  • Shows "Most users ever online on a day"
  • Shows last online time for each User while pointing the Mouse Cursor on it's name (=mouseover) in the list
Important: The Hack only works 100% correct, when each member is in the same time zone as the Server!

Files to edit: index.php
Templates to edit: forumhome
New Templates: forumhome_todayloggedinusers, forumhome_todayloggedinuser

I have attached the Install Instructions in a Text File.
The Instruction is in English and in German.

I will attach a Screenshot in a Reply to this Thread!

Post any Questions into this Thread!

Updates in 1.0.1: Inserted the two new templates into the template precaching (first step)

Updates in 1.0.2: Fixed a little Bug with the "Most users ever online on a day"-Count
(Replace '$maxusers[2] = $todayonline;' with '$maxusers[2] = $numbertodayonline;' in index.php)

Info: You can find an other version of this Hack here. In this other version the usernames of the members, who were already online today, are not shown on the Forum-Mainpage; the names are shown in an extra File (like online.php), onlinetoday.php (Screenshot).

So, depending on which version of the Hack you prefer, you have to download this:
Version with usernames on the main Site of the Forum

or this:
Version with usernames on extra site (onlinetoday.php)

Regards,
Mystics

Mystics 01-11-2002 12:08 PM

And here is a Screenshot of the Hack (attached to this Posting).
It starts with "Number of Active Users Today".
At the bottom in the middle you can see the "Last Online Time" of the User 'alsdorfer' while the Mouse Cursor is pointing on his Name.
(Info: I have censored most of the User Names with a black line :rolleyes: )

Mystics 01-11-2002 12:28 PM

....and here is a Screenshot of the German Version of this Hack.
------------------
....und hier ist ein Screenshot der deutschen Version des Hacks.

MrLister 01-11-2002 12:56 PM

Great! Thanks for the hack. It seems really good

KarateKid 01-11-2002 03:18 PM

nice hack!

THX :)

eva2000 01-11-2002 03:40 PM

1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:

2. how come most ever visited on my forum is not the same and higher number than my most ever visited today ? trying to figure out how i can have more members currently on my forum that i have had for an entire day ? --- never mind about this one now i understand :)

3. Last online time seems to take the server's time and not the member's GMT offset time

TaP 01-11-2002 04:17 PM

Nice work , I will test it out to see how it works! Thanks

Mystics 01-11-2002 04:22 PM

Quote:

Originally posted by eva2000
1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:
I will try to do this ;)
Quote:

Originally posted by eva2000
2. how come most ever visited on my forum is not the same and higher number than my most ever visited today ? trying to figure out how i can have more members currently on my forum that i have had for an entire day ? --- never mind about this one now i understand :)
Ok, when you understand it :rolleyes:
Quote:

Originally posted by eva2000
3. Last online time seems to take the server's time and not the member's GMT offset time
No, it doesn't take the server's time, the time is displayed according to the Users' Offset time.

Martz 01-11-2002 06:20 PM

Wow excellent hack, its great! 1 thing I've noticed was that when I was logged in as the admin, I could see all of todays users and invisible users - when I logout, i can only see the normal users, but the count doesn't include the invisible one?

Get what I mean? Was 202, and when I logout its 150, as 52 of my members today use invisible mdoe.

Again, fantastic :)

genial 01-11-2002 06:35 PM

Quote:

Originally posted by Martz
Get what I mean? Was 202, and when I logout its 150, as 52 of my members today use invisible mdoe.
this is intended, because the members must not need to know how many invisible members logged in the board today. ;)

Lesane 01-11-2002 06:43 PM

Great hack, i luv it :D Thanks

Martz 01-11-2002 06:57 PM

Quote:

Originally posted by genial
this is intended, because the members must not need to know how many invisible members logged in the board today. ;)
Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :)

genial 01-11-2002 07:11 PM

Quote:

Originally posted by Martz
Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :)
sorry about that, because in our board, the currently online users is modified to show invisible users for members as guests and so it is in our board consistant.

Mystics 01-11-2002 07:17 PM

Quote:

Originally posted by Martz
Well, the Currently Online Users figure includes invisible users when you are logged out, so it would be nice to keep it consistant. :)
You just have to edit the new template 'forumhome_todayloggedinusers':

Replace $todayonline with $numbertodayonline

Martz 01-11-2002 08:02 PM

Ahh great, worked it out. Thanks again. :)

Mystics 01-11-2002 08:58 PM

Quote:

Originally posted by eva2000
1. is it possible to have the list of usernames visited today in a popup linked to the Number of active users today text ? my list page would be too long with 200 - 500 currentyly active + the list of users visited today :eek:
OK, now I have finished the changes you wanted.

I have attached the Instructions and a new PHP-File in a ZIP File to this Posting. Please let me now if it's that, what you wanted.

Info: My attachment does not only contain the changes to the Original Hack....it's a complete new Hack, so it will be the best, you remove the other version of the hack.

[UPDATE]
I have forgotten something in onlinetoday.php (Moderators have not been highlighted), thanx to genial for the Fix!

I have replaced the Attachment with the new version.

[UPDATE2]
Max users and date are now showing correct.

[UPDATE3]
Fixed problem with the "Most Users"-Count
(Replace '$maxusers[2] = $todayonline;' with '$maxusers[2] = $numbertodayonline;' in index.php & onlinetoday.php)

[UPDATE4]
Fixed the Query within onlinetoday.php and index.php
(includes now the User's Timezone)

FWC 01-11-2002 09:44 PM

This is such a cool hack! :cool: I installed the new version with the screen for Who Was Online. I love it. I do have one small problem. The other admin and myself are showing up as bold and italic on that page. But, the moderator on the page isn't bold for some reason. I'll see if I can figure it out. But, any help would be appreciated. :)

I fixed it. I just added user group 7 to the or statement in the highlighting section in onlinetoday.php. :)

genial 01-11-2002 09:58 PM

Quote:

Originally posted by FWC
But, the moderator on the page isn't bold for some reason. I'll see if I can figure it out. But, any help would be appreciated. :)
sorry about mystics, he has forgotten the moderator-query in onlinetoday.php.

search for:
PHP Code:

if (!$usergroupdef['canwhosonline']) {
  
show_nopermission();


and place under:
PHP Code:

  $forummoderators=$DB_site->query('SELECT user.userid,user.username,moderator.forumid
                                  FROM moderator
                                  LEFT JOIN user
                                  ON (moderator.userid=user.userid)
                                  ORDER BY user.username'
);
  while (
$moderator=$DB_site->fetch_array($forummoderators)) {
    
$imodcache["$moderator[forumid]"][] = $moderator;
    
$mod["$moderator[userid]"] = 1;
  }
  
$DB_site->free_result($forummoderators);
  unset(
$moderator); 

but i have not tested this modification. ;)

Shenlong 01-11-2002 10:37 PM

Nice hack, I really enjoy it

Erwin 01-11-2002 10:44 PM

Great hack, works well!

eva2000 01-12-2002 02:36 AM

Quote:

Originally posted by Mystics
OK, now I have finished the changes you wanted.

I have attached the Instructions and a new PHP-File in a ZIP File to this Posting. Please let me now if it's that, what you wanted.

Info: My attachment does not only contain the changes to the Original Hack....it's a complete new Hack, so it will be the best, you remove the other version of the hack.

[UPDATE]
I have forgotten something in onlinetoday.php (Moderators have not been highlighted), thanx to genial for the Fix!

I have replaced the Attachment with the new version.

off to add it now :)

eva2000 01-12-2002 02:57 AM

great it works perfectly.. screen cap of today so far :)

eva2000 01-12-2002 03:07 AM

another request... how would you allow

registered and guest users to view the onlinetoday.php page ? right now i have online.php only mod and admin viewable and it seems onlinetoday.php is the same..

i'd like

online.php to retain it's normal mod /admin only viewing

but

onlinetoday.php to be viewabe by guest and registered users as well as mods/admin

FWC 01-12-2002 03:30 AM

Quote:

Originally posted by eva2000
another request... how would you allow

registered and guest users to view the onlinetoday.php page ? right now i have online.php only mod and admin viewable and it seems onlinetoday.php is the same..

i'd like

online.php to retain it's normal mod /admin only viewing

but

onlinetoday.php to be viewabe by guest and registered users as well as mods/admin

Eva, I commented the following out at line 15 of of onlinetoday.php and it did what you wanted:
PHP Code:

if (!$usergroupdef['canwhosonline']) {
  
show_nopermission();



eva2000 01-12-2002 03:43 AM

Quote:

Originally posted by FWC
Eva, I commented the following out at line 15 of of onlinetoday.php and it did what you wanted:
PHP Code:

if (!$usergroupdef['canwhosonline']) {
  
show_nopermission();



thanks :D

FWC 01-12-2002 06:01 AM

Quote:

Originally posted by eva2000
thanks :D
You're welcome. :)

SgtSling 01-12-2002 06:34 AM

for some reason my

Most users ever online was 35 on 01-12-2002 at 08:31 AM.

keeps changing to whatever I have on at that given time

here is the code I am using for that

<tr id="cat">
<td bgcolor="{categorybackcolor}" colspan="6"><a href="online.php?s=$session[sessionhash]"><normalfont color="{categoryfontcolor}"><b>Currently Active Users</b></normalfont></a><normalfont color="{categoryfontcolor}"><b>: $totalonline</b></normalfont></td>
</tr>
<tr>
<td bgcolor="{firstaltcolor}" colspan="6"><smallfont>
<nobr>There are currently $numberregistered members and $numberguest guests on the boards.</nobr> |
<nobr>Most users ever online was $recordusers on $recorddate at $recordtime.</nobr><br>
$activeusers
$birthdaybits</smallfont></td>
</tr>

Any clues?

FWC 01-12-2002 08:07 AM

I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number. I looked at Eva's board and it's doing the same thing. I've been tinkering with the code. I've managed to break it several times, but I haven't gotten it right yet. :)

eva2000 01-12-2002 09:03 AM

Quote:

Originally posted by FWC
I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number. I looked at Eva's board and it's doing the same thing. I've been tinkering with the code. I've managed to break it several times, but I haven't gotten it right yet. :)
yeah noticed that on my forums too :(

waiting for a fix :)

genial 01-12-2002 11:04 AM

in the near future i will make a new release of this hack. ;)

the new release includes all existing features and an extra todayonline-page in "who is online"-style. the display on forumhome will be dis- or enabled in admin-cp options. and specially guests will be counted. :)

Mystics 01-12-2002 11:10 AM

Quote:

Originally posted by FWC
I found a slight problem with onlinetoday.php when the day changed. Max users and date is fine on forumhome, but it's showing todays information on onlinetoday.php instead of the max number.
Sorry for that. While waiting for the new Hack of genial, download the new onlinetoday.php to fix it.

Download in old posting above...or use this link:
https://vborg.vbsupport.ru/attachmen...&postid=212603

Frank 01-12-2002 12:47 PM

Uhm could we have the latest files in the 1st post of the thread please, I'm confused as to all the different versions of this hack?

Cheers.

Mystics 01-12-2002 12:52 PM

Quote:

Originally posted by Frank
Uhm could we have the latest files in the 1st post of the thread please, I'm confused as to all the different versions of this hack?
The first post already got updated. The original Hack (with all usernames on the Main Page) is attached there in the most recent version.

In the first post is also a link to the other version of the Hack, this link directly points to the download of the actual version (https://vborg.vbsupport.ru/attachmen...&postid=212603)

So, depending on which version of the Hack you prefer, you have to download this:
Version with usernames on the main Site of the Forum

or this
Version with usernames on extra site (onlinetoday.php)

Greetz,
Mystics

SgtSling 01-12-2002 03:39 PM

| Most users ever online was 43 on 01-12-2002 at 05:38 PM.

Why does my record for online users keep changing to the number that is currently online?

is something not gettig updated?

$recordusers seems t just point to whatever number I currently have online now.
how can I fix this .
I posted my code for loggedinusers on page 2
Sarge

Mystics 01-12-2002 04:10 PM

Quote:

Originally posted by SgtSling
| Most users ever online was 43 on 01-12-2002 at 05:38 PM.

Why does my record for online users keep changing to the number that is currently online?

Hm, that has nothing to do with the hack I posted.....you are talking about the "Current Active Users". The "Who was online today"-Hack does nothing change at $recordusers....maybe the number is changing at your board, because there are more and more users online than ever before?

FWC 01-12-2002 04:48 PM

Quote:

Originally posted by Mystics
Sorry for that. While waiting for the new Hack of genial, download the new onlinetoday.php to fix it.
Thanks, that fixed it. :)

Shenlong 01-12-2002 05:17 PM

great hack! thanx

Lionel 01-12-2002 09:14 PM

After I installed today, vb's time got offset by + 6 hours. I am in Florida and all my settings, personal and admin are set to -5 from gmt. Now it is 6:00 PM, I show 12:00 AM. Anyone else noticed?

genial 01-12-2002 09:16 PM

today i have found a little bug in this hack, by showing the today-record-user count for members.

to fix it, replace from the hack in index.php and, if you have in mystics onlinetoday.php, following line:
PHP Code:

$maxusers[2] = $todayonline

in this line:
PHP Code:

$maxusers[2] = $numbertodayonline


Mystics 01-12-2002 09:43 PM

Thx genial, have updated the instructions.


All times are GMT. The time now is 04:49 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02425 seconds
  • Memory Usage 1,853KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_php_printable
  • (18)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete