php forum
php mysql forum
php mysql smarty
 
Topic Options
#219148 - 06/17/02 02:37 AM "Maximum Online Ever was:"
yors Offline
Member

Registered: 10/09/01
Posts: 152
Can someone find a way to display "Maximum Online Ever was:" in the Who's Online page? Additionally date and time stamp would be great!
_________________________
Yors Truly

Who? Me? Worry?

Top
#219149 - 06/18/02 09:13 AM Re: "Maximum Online Ever was:" [Re: phill]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
As used in UBB.Classic - I am guessing this would be fairly simple as the WOL would have to match the current figure to a variable, and if the figure was higher overwite the lower one, and display that variable. I guess the date/time could be passed at the same time.<br /><br />I am not good at starting hacks - but if I get a chance, i will see if it can easily be done, unless I am beaten to it <img src="/forum/images/icons/wink.gif" alt="" /><br /><br />Ian
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#219150 - 06/18/02 09:18 AM Re: "Maximum Online Ever was:" [Re: Gorlum]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I think this was done once already? I seem to recall it being done but perhaps that was a while back in the perl days.
_________________________
~Dave
ChattersOnline.com

Top
#219151 - 06/20/02 12:36 AM Re: "Maximum Online Ever was:" [Re: sjsaunders]
yors Offline
Member

Registered: 10/09/01
Posts: 152
As far as I could search, I couldnt find anything like that for v6 <img src="/forum/images/icons/frown.gif" alt="" /><br /><br />Me too, not very good at starting a hack but given a framework, can develop.
_________________________
Yors Truly

Who? Me? Worry?

Top
#219152 - 06/24/02 10:10 AM Re: "Maximum Online Ever was:" [Re: phill]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
I'll add this to my list then. It's not that hard of a hack. I should have it out tonight. <img src="/forum/images/icons/smile.gif" alt="" />
_________________________
~Dave
ChattersOnline.com

Top
#219153 - 06/29/02 09:00 PM Re: "Maximum Online Ever was:" [Re: phill]
JustDave Offline
That 70's Guy

Registered: 06/24/01
Posts: 4097
Ok, here goes... <br /> <br />In your ubbthreads.php script find this: <br /> <br /><pre><font class="small">code:</font><hr> <br />// ----------------------- <br />// Grab the total # online <br /> $query = " <br /> SELECT O_Type,COUNT(*) <br /> FROM w3t_Online <br /> GROUP BY O_Type <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> while(list ($type,$count) = $dbh -> fetch_array($sth)) { <br /> ${$type} = $count; <br /> } <br /> <br /> if (!$a) { $a = "0"; } <br /> if (!$r) { $r = "0"; } <br /></pre><hr> <br /> <br />and change it to this: <br /> <br /><pre><font class="small">code:</font><hr> <br />// ----------------------- <br />// Grab the total # online <br /> <br /> $LastOn = $html -> get_date() - 600;// back 10 minutes <br /> <br /> $query = " <br /> SELECT O_Type,COUNT(*) <br /> FROM w3t_Online <br /> WHERE O_Last > '$LastOn' <br /> GROUP BY O_Type <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> while(list ($type,$count) = $dbh -> fetch_array($sth)) { <br /> ${$type} = $count; <br /> } <br /> <br /> $onNow = $a + $r;// part of "Maximum Users Online" hack <br /> <br /> if (!$a) { $a = "0"; } <br /> if (!$r) { $r = "0"; } <br /> <br /> <br />// -------------------------------- <br />// Get and Set Maximum Users Online <br /> $query = " <br /> SELECT U_PostsPer,U_Registered <br /> FROM w3t_Users <br /> WHERE U_Number = '1' <br /> "; <br /> $sth = $dbh -> do_query($query); <br /> list ($maxOn,$When) = $dbh -> fetch_array($sth); <br /> if ($onNow > $maxOn) { <br /> $date = $html -> get_date(); <br /> $date_q = addslashes($date); <br /> $onNow_q = addslashes($onNow); <br /> $query = " <br /> UPDATE w3t_Users <br /> SET U_Registered = '$date_q', U_PostsPer = '$onNow_q' <br /> WHERE U_Number = '1' <br /> "; <br /> $dbh -> do_query($query); <br /> $maxOn = $onNow; <br /> $When = $date; <br /> } <br /> $When = $html -> convert_time($When,$user['U_TimeOffset']); <br /></pre><hr> <br /> <br /> <br />Now in your ubbthreads.tmpl template file find this: <br /> <br /><pre><font class="small">code:</font><hr> <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br /><br /> <br /></pre><hr> <br /> <br />and change it to this: <br /> <br /><pre><font class="small">code:</font><hr> <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br /><br /> <br />Maximum Users Online was <strong>$maxOn</strong> on $When <br /><br /> <br /></pre><hr> <br /> <br />And that should do it. <img src="/forum/images/icons/smile.gif" alt="" /> <br /> <br />I have it working at my test site: <br />http://www.chattersonline.com/test/ubbthreads.php?Cat= <br /> <br /> <br />Edit Note: I have added some code so this hack will only count those that have been online in the last 10 minutes. This is the same amount of time the "Who's Online" page uses so the information matches. I think that this will also make .threads extra information match my "Who's Online" box. <img src="/forum/images/icons/smile.gif" alt="" />


Edited by JustDave (06/29/02 09:35 PM)
_________________________
~Dave
ChattersOnline.com

Top
#219154 - 06/30/02 12:19 AM Re: "Maximum Online Ever was:" [Re: sjsaunders]
Aglavalin Offline
Enthusiast

Registered: 06/18/02
Posts: 394
Loc: Southern California
This looks to be working fine for me so far <img src="/forum/images/icons/smile.gif" alt="" /><br /><br />Thanks!

Top
#219155 - 07/01/02 04:11 AM Re: "Maximum Online Ever was:" [Re: sjsaunders]
yors Offline
Member

Registered: 10/09/01
Posts: 152
Works fine Justdave!! Thanks a ton!! You are Da Maan <img src="/forum/images/icons/grin.gif" alt="" />
_________________________
Yors Truly

Who? Me? Worry?

Top



Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks