vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Who Was Online Today on forums (https://vborg.vbsupport.ru/showthread.php?t=59579)

SnowBot 01-07-2004 03:43 AM

What's Going On?https://vborg.vbsupport.ru/external/2004/01/6.gif Currently Active Users: 5 (1 members and 4 guests) https://vborg.vbsupport.ru/external/2004/01/6.gifMost users ever online was 44, 15th October 2003 at 7:25.
Snowy

https://vborg.vbsupport.ru/external/2004/01/6.gif Number of Active Users Today: 1 Most users ever online on a day was 1 on 7th January 2004. | The following members have already visited the forums today:
Snowy






hhhmmm they dont match up, how can i fix this?

Gary King 01-07-2004 12:47 PM

Quote:

Originally Posted by SnowBot
What's Going On?https://vborg.vbsupport.ru/external/2004/01/6.gif Currently Active Users: 5 (1 members and 4 guests) http://www.synergyforums.com/forum/i...forum_link.gifMost users ever online was 44, 15th October 2003 at 7:25.
Snowy

https://vborg.vbsupport.ru/external/2004/01/6.gif Number of Active Users Today: 1 Most users ever online on a day was 1 on 7th January 2004. | The following members have already visited the forums today:
Snowy






hhhmmm they dont match up, how can i fix this?

What do you mean by that..?

It looks fine when I visited http://www.synergyforums.com/forum/ (correct URL?)

Rids 01-07-2004 02:27 PM

Installed and working well :)

SnowBot 01-07-2004 03:38 PM

Quote:

Originally Posted by Gary W
What do you mean by that..?

It looks fine when I visited http://www.synergyforums.com/forum/ (correct URL?)

ok, well on the original What's Going On
Most users ever online was 44, 15th October 2003 at 7:25.

On your hack it says (at time of posting this)
Most users ever online on a day was 14 on 7th January 2004

I know thats from when i installed your hack but is there anyway to sync them as untill i get 44 users back in 1 day they dont match up and look silly.

The Quibbler 01-07-2004 04:09 PM

*clicks install*

Great hack, worked perfectly for me :)

Zeitgeist 01-07-2004 06:14 PM

For those who want to remove the space between the username and the following "," open the template "forumhome_todayloggedinuser" and delete the last invisible line at the bottom of the text.

idwf 01-07-2004 06:30 PM

using it. thanks :)

SnowBot 01-08-2004 12:43 AM

Why are some of the user titles bold and others are not, i mean the ones in the same usergroup?

Kewl 01-08-2004 09:31 AM

Great hack! I have been wanting this one

One question though
now that in vb3 you gotta run an install script for some hacks if you decide you want to unistall how do you do that?

Thanks

dumb question though

I can't figure how to add a template in vb3

I bet I am looking right at it but can't find it

Davey-UK 01-08-2004 01:02 PM

Originally Posted by Davey-UK
Would it be difficult to integrate this into a non-Vb page?

Quote:

Originally Posted by Gary W
Non vB, or just a separate page by itself like the original hack for vB 2 was able to? (But still a part of vBulletin)?


How could it be done with an include on my sites homepage? (Not VB).

I managed it with the 2x version, but have since lost the file.

ogden2k 01-08-2004 02:59 PM

How do you uninstall this?

Zelda-King 01-08-2004 04:34 PM

Quote:

Originally Posted by Kewl
dumb question though

I can't figure how to add a template in vb3

I bet I am looking right at it but can't find it

It's in the style option dropdown menu. You need to scroll up to see 'Add Template'.

gmarik 01-08-2004 05:40 PM

This is the one we all love.

Gary King 01-08-2004 07:20 PM

Quote:

Originally Posted by ogden2k
How do you uninstall this?

There is an uninstall option in the installer.

Zeitgeist 01-08-2004 10:18 PM

Sorry, but hack is not working correctly. It resets the most online users on a day-statistic always at midnight. But in vB2 which is nearly the same code it works perfectly. What's the reason for this?

Gio Takahashi 01-08-2004 10:20 PM

It WAS working correctly for me, Zeit. Explain more.

Kewl 01-08-2004 11:12 PM

Quote:

Originally Posted by Gary W
There is an uninstall option in the installer.

Thanks did not know that

hack works GREAT!

Kewl 01-08-2004 11:12 PM

Quote:

Originally Posted by Zelda-King
It's in the style option dropdown menu. You need to scroll up to see 'Add Template'.

Thanks got it

Kewl 01-09-2004 07:42 AM

I noticed 2 things from last hack

1- Most ever on-line resets everyday and starts over . Am I doing something wrong?
2- In the ver for 2.0 if you highlighted the person it showed what time they were last there also

Thanks

Zeitgeist 01-09-2004 11:40 AM

Quote:

Originally Posted by Kewl
1- Most ever on-line resets everyday and starts over . Am I doing something wrong?

That's the same problem I'm having, too. The hack isn't working! Didn't the author noticed that? Where's the bug? :ermm:

eXtremeTim 01-09-2004 12:00 PM

Quote:

Originally Posted by Zeitgeist
That's the same problem I'm having, too. The hack isn't working! Didn't the author noticed that? Where's the bug? :ermm:

I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.

Zeitgeist 01-09-2004 12:08 PM

Quote:

Originally Posted by eXtremeTim
I have the same problem as them. The most users ever online in a day resets at midnight.

I will look and see if i can figure out what is going on in a little while.

Thanks, extreme. I think you can compare the code from the vB 2.x.x hack with this new hack and so you might be able to find the wrong code in this hack.

Jean147 01-09-2004 12:30 PM

was looking for that. Thx a lot. :top

eXtremeTim 01-09-2004 12:31 PM

Fixed it.

Here are my changes

Find:
PHP Code:

if ((int)$maxusers['maxonline'] <= $totalonline)
{
    
$time time();
    
$maxloggedin "$totalonline " $time " " $maxusers['maxonline'] . " " $maxusers['maxonlinedate'];
    
$maxusers[0] = $totalonline;
    
$maxusers[1] = $time;


Replace with:
PHP Code:

    if (intval($maxusers['maxonline']) <= $totalonline)
    {
        
$maxusers[0] = $totalonline;
        
$maxusers[1] = TIMENOW;
    } 

Now Find:
PHP Code:

if ((int)$maxusers[2] <= $numbertodayonline) {
    
$time time();
    
$maxloggedin $maxusers[0] . " " $maxusers[1] . $numbertodayonline " $time;
    
$maxusers[2] = $numbertodayonline;
    
$maxusers[3] = $time;


Replace with:
PHP Code:

    if (intval($maxusers['maxonline']) <= $totalonline) {
    
$maxloggedin $maxusers[0] . " " $maxusers[1] . $numbertodayonline " TIMENOW;
    
$maxusers[2] = $numbertodayonline;
    
$maxusers[3] = TIMENOW;
    
$DB_site->query("REPLACE INTO " TABLE_PREFIX "datastore (title, data) VALUES ('maxloggedin', '" addslashes(serialize($maxusers)) . "')");



Zeitgeist 01-09-2004 01:33 PM

Sorry, it doesn't work. It resets the date to 01-01-1970 and hides the most users ever online on a day completly.

eXtremeTim 01-09-2004 01:51 PM

This hack only works if whosonline is on so make sure that you have it turned on.

eXtremeTim 01-09-2004 02:07 PM

I have not been able to recreate your problem I have check all the code im using and this looks like the only parts i changed. Check and make sure you did the replaces correctly.

Zeitgeist 01-09-2004 06:15 PM

That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*

eXtremeTim 01-09-2004 06:35 PM

Quote:

Originally Posted by Zeitgeist
That's a screenshot of my forum after replacing the variables with yours. I'm 100% sure that I've made exactly what you've posted. Who's online is enabled and I haven't made any other changes to index.php *confused*

Mind posting the whole whosonline block of code you have? I will compare it to mine and see if there are anymore differences. That way i can see if you messed up or if i left something out or if its working becuase of some other change i have done on my board. Seing as my board is already heavily modified. You can check it out on mine running the code i have posted. http://www.extremechatforums.com/forum/index.php

Zeitgeist 01-09-2004 06:48 PM

That's the whole code of the hack:
Code:

// ### WHO WAS ONLINE TODAY ########################
        if (intval($maxusers['maxonline']) <= $totalonline)
{
                $maxusers[0] = $totalonline;
                $maxusers[1] = TIMENOW;
}
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, options FROM ".TABLE_PREFIX."user
          WHERE lastactivity > " . (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . "
          ORDER BY username");
         
while ($todayuser=$DB_site->fetch_array($todayusers))
{
 $todayuser['options'] = intval($todayuser['options']);
 foreach($_USEROPTIONS AS $optionname => $optionval)
 {
  $todayuser["$optionname"] = iif($todayuser['options'] & $optionval, 1, 0);
 }
 $numbertodayonline++;
 $invisibleuser = '';
 $userid = $todayuser['userid'];
 $lastactivetime = vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
 
 if ($todayuser['invisible']==1 and $bbuserinfo['usergroupid']!=6)
 {
  $numbertodayonlineinvisible++;
  continue;
 }
 if ($todayuser['invisible'] == 1)
 { // Invisible User but show to Admin
  $invisibleuser = '*';
 }
 $username = fetch_musername($todayuser);
 
 if (!$todayloggedinuser)
 {
eval("\$todayloggedinuser = \"".fetch_template('forumhome_todayloggedinuser')."\";");
}else{
eval("\$todayloggedinuser .= \", ".fetch_template('forumhome_todayloggedinuser')."\";");
}
}
$DB_site->free_result($todayusers);
if ($bbuserinfo[usergroupid] == 6) {
 $todayonline = $numbertodayonline;
} else {
 $todayonline = $numbertodayonline - $numbertodayonlineinvisible;
}
        if (intval($maxusers['maxonline']) <= $totalonline) {
        $maxloggedin = $maxusers[0] . " " . $maxusers[1] . " $numbertodayonline " . TIMENOW;
        $maxusers[2] = $numbertodayonline;
        $maxusers[3] = TIMENOW;
        $DB_site->query("REPLACE INTO " . TABLE_PREFIX . "datastore (title, data) VALUES ('maxloggedin', '" . addslashes(serialize($maxusers)) . "')");
}
$todayrecordusers = $maxusers[2];
$todayrecorddate = vbdate($vboptions['dateformat'],$maxusers[3]);
eval("\$todayloggedinusers = \"".fetch_template('forumhome_todayloggedinusers')."\";");


Zeitgeist 01-09-2004 08:46 PM

I've used another hack from vBulletin.nl now(http://www.vbulletin.nl/community/showthread.php?t=1475). At the moment it's working perfectly. I'll see what will happen if we reach 0:00 ... This hack here resets the statistics every day on this time.

eXtremeTim 01-09-2004 11:29 PM

Quote:

Originally Posted by Zeitgeist
I've used another hack from vBulletin.nl now(http://www.vbulletin.nl/community/showthread.php?t=1475). At the moment it's working perfectly. I'll see what will happen if we reach 0:00 ... This hack here resets the statistics every day on this time.

are you on vb3 rc2???

Spencer F. 01-10-2004 04:36 AM

I got this error when installing:

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: INSERT INTO phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, 0, 'last_online_at_x', 'Last online at {1}', 1)
mysql error: Duplicate entry 'last_online_at_x-0-1' for key 2

mysql error number: 1062

Date: Saturday 10th of January 2004 12:35:53 AM
Script: http://www.musicbanter.com/test/admi...php?do=install
Referer: http://www.musicbanter.com/test/admi...php?do=install
Username: admin
IP Address: ***

But I think it worked? Is this normal?

P.Jackson 01-10-2004 10:16 AM

works for me good job

Kewl 01-10-2004 03:11 PM

Quote:

Originally Posted by Zeitgeist
Sorry, it doesn't work. It resets the date to 01-01-1970 and hides the most users ever online on a day completly.

hmmm same thing for me

did this get fixed? or does it fix itself at midnight?

doesn't give a total either

thanks

Zeitgeist 01-10-2004 03:26 PM

Quote:

Originally Posted by eXtremeTim
are you on vb3 rc2???

Yes, why?

Gary King 01-10-2004 04:40 PM

Quote:

Originally Posted by Spencer F.
I got this error when installing:

Database error in vBulletin 3.0.0 Release Candidate 2:

Invalid SQL: INSERT INTO phrase (phraseid, languageid, varname, text, phrasetypeid) VALUES (NULL, 0, 'last_online_at_x', 'Last online at {1}', 1)
mysql error: Duplicate entry 'last_online_at_x-0-1' for key 2

mysql error number: 1062

Date: Saturday 10th of January 2004 12:35:53 AM
Script: http://www.musicbanter.com/test/admi...php?do=install
Referer: http://www.musicbanter.com/test/admi...php?do=install
Username: admin
IP Address: ***

But I think it worked? Is this normal?

No that shouldn't happen, and as for the problem with counting the most users online on one day record, I will see what I can do to fix this :)

eXtremeTim 01-10-2004 06:49 PM

try this who was online today code.

This is the exact code from my index.php file for it so.

PHP Code:

// ### WHO WAS ONLINE TODAY ########################
// $maxusers = unserialize($datastore['maxloggedin']);
 
if (intval($maxusers['maxonline']) <= $totalonline)
 {
  
$maxusers[0] = $totalonline;
  
$maxusers[1] = TIMENOW;
 }
$todayloggedinusers "";
$numbertodayonline 0;
$numbertodayonlineinvisible 0;
$todayusers=$DB_site->query("SELECT userid, username, usergroupid, lastactivity, options FROM ".TABLE_PREFIX."user 
       WHERE lastactivity > " 
. (mktime(0,0,0,date("m"),date("d"),date("Y")) + (($bbuserinfo['timezoneoffset']-$timeoffset)*3600)) . 
       ORDER BY username"
);
       
while (
$todayuser=$DB_site->fetch_array($todayusers))
{
 
$todayuser['options'] = intval($todayuser['options']);
 foreach(
$_USEROPTIONS AS $optionname => $optionval)
 {
  
$todayuser["$optionname"] = iif($todayuser['options'] & $optionval10);
 }
 
$numbertodayonline++;
 
$invisibleuser '';
 
$userid $todayuser['userid'];
 
$lastactivetime vbdate($vboptions['timeformat'], $todayuser[lastactivity]);
 
 if (
$todayuser['invisible']==and $bbuserinfo['usergroupid']!=6)
 {
  
$numbertodayonlineinvisible++;
  continue;
 }
 if (
$todayuser['invisible'] == 1)
 { 
// Invisible User but show to Admin
  
$invisibleuser '*';
 }
 
$username fetch_musername($todayuser);
 
 if (!
$todayloggedinuser)
 {
  eval(
"\$todayloggedinuser = \"".fetch_template('forumhome_todayloggedinuser')."\";");
 }
 else
 {
  eval(
"\$todayloggedinuser .= \", ".fetch_template('forumhome_todayloggedinuser')."\";");
 }
}
$DB_site->free_result($todayusers);
if (
$bbuserinfo[usergroupid] == 6) {
 
$todayonline $numbertodayonline;
} else {
 
$todayonline $numbertodayonline $numbertodayonlineinvisible;
}
 if (
intval($maxusers['maxonline']) <= $totalonline) {
 
$maxloggedin $maxusers[0] . " " $maxusers[1] . $numbertodayonline " TIMENOW;
 
$maxusers[2] = $numbertodayonline;
 
$maxusers[3] = TIMENOW;
 
$DB_site->query("REPLACE INTO " TABLE_PREFIX "datastore (title, data) VALUES ('maxloggedin', '" addslashes(serialize($maxusers)) . "')");
}
$todayrecordusers $maxusers[2];
$todayrecorddate vbdate($vboptions['dateformat'],$maxusers[3]);
eval(
"\$todayloggedinusers = \"".fetch_template('forumhome_todayloggedinusers')."\";"); 


Kewl 01-10-2004 07:02 PM

strange still same thing

]

eXtremeTim 01-10-2004 07:57 PM

Quote:

Originally Posted by Kewl
strange still same thing

here is the link if you want to see what it is doing

http://www.pcinnovations.com/forum/index.php?s=

Is that code i put right after the whos online tracking code? Hmm this is strang :-/


All times are GMT. The time now is 09:41 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.01862 seconds
  • Memory Usage 1,892KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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