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)

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 04:06 AM.

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.01395 seconds
  • Memory Usage 1,771KB
  • 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_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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