php forum
php mysql forum
php mysql smarty
 
Topic Options
#249763 - 06/09/03 05:54 AM Maximum Users Online...
yors Offline
Member

Registered: 10/09/01
Posts: 152
Someone made me a little mod for 6.1 which added a line in the Main Index Page, showing "Maximum Users Ever Online: xxx".<br /><br />can someone suggest what to do in 6.2.3 please.<br /><br />Thanks in advance.
_________________________
Yors Truly

Who? Me? Worry?

Top
#249764 - 06/09/03 09:03 AM Re: Maximum Users Online... [Re: phill]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
IIP (Integrated Index Page) will keep track and store this info. You can find it at the top of "Forum Design Integration". <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#249765 - 06/09/03 10:32 AM Re: Maximum Users Online... [Re: Daine]
yors Offline
Member

Registered: 10/09/01
Posts: 152
Josh, we tried IIP earlier, but wasnt too much of a success in our forum. Everyone was bookmarking and directly landing into the main forums <img src="/forum/images/graemlins/smile.gif" alt="" /> <br /> <br />Anyway, I found the hack among the depths of my hard disk. Can someone please tell me if it will work with 6.2.3? Thanks in advance <br /> <br />
Code:
 <br />Ok, here goes... <br /> <br />In your ubbthreads.php script find this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <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 -&gt; do_query($query); <br />   while(list ($type,$count) = $dbh -&gt; fetch_array($sth)) { <br />      ${$type} = $count; <br />   } <br /> <br />   if (!$a) { $a = "0"; } <br />   if (!$r) { $r = "0"; } <br /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />and change it to this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <br />// ----------------------- <br />// Grab the total # online <br /> <br />   $LastOn = $html -&gt; get_date() - 600;// back 10 minutes <br /> <br />   $query = " <br />      SELECT O_Type,COUNT(*) <br />      FROM   w3t_Online <br />      WHERE  O_Last &gt; '$LastOn' <br />      GROUP BY O_Type <br />   "; <br />   $sth = $dbh -&gt; do_query($query); <br />   while(list ($type,$count) = $dbh -&gt; 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 -&gt; do_query($query); <br />   list ($maxOn,$When) = $dbh -&gt; fetch_array($sth); <br />   if ($onNow &gt; $maxOn) { <br />      $date = $html -&gt; 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 -&gt; do_query($query); <br />	  $maxOn = $onNow; <br />	  $When = $date; <br />   } <br />   $When = $html -&gt; convert_time($When,$user['U_TimeOffset']); <br /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br /> <br />Now in your ubbthreads.tmpl template file find this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br />&lt;br /&gt; <br /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />and change it to this: <br /> <br /> <br />code:-------------------------------------------------------------------------------- <br />{$ubbt_lang['C_ONLINE']} $r {$ubbt_lang['C_ONLINE2']} $a {$ubbt_lang['C_ONLINE3']} <br />&lt;br /&gt; <br />Maximum Users Online was &lt;strong&gt;$maxOn&lt;/strong&gt; on $When <br />&lt;br /&gt; <br /> <br /> <br />-------------------------------------------------------------------------------- <br /> <br /> <br />And that should do it. <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. <br />


Edited by JoshPet (06/19/03 10:41 PM)
_________________________
Yors Truly

Who? Me? Worry?

Top
#249766 - 06/09/03 08:49 PM Re: Maximum Users Online... [Re: phill]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
They don't have to visit IIP to be counted. It counts users that are logged-on and anywhere within your Threads site.
_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#249767 - 06/10/03 08:42 AM Re: Maximum Users Online... [Re: eslmix]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
Something isn't right with that on my site. If you go to http://www.vhfans.com/boards/index.php and look at Max Online the count is off. I have seen 12 members and 18 guests on at one point and it only shows 5 and 1.

Top
#249768 - 06/10/03 12:18 PM Re: Maximum Users Online... [Re: BlarC]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Have you had more than 6 online?<br /><br />I think the issue is that in order to "update" or store the total - somebody needs to load the Index Page which captures the newer number.<br /><br />If nobody goes to that page - then the information will never get updated.<br /><br />I haven't played with the hack you posted above to see if it works... because most of use IIP and/or the sidebar like here.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#249769 - 06/10/03 12:57 PM Re: Maximum Users Online... [Re: Daine]
ericgtr Offline
Junior Member

Registered: 05/12/03
Posts: 1109
Thanks for pointing that out Josh, yes I have had several more than that at one time. I was just going off of what AKD96 said above, you explained it though <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#249770 - 06/19/03 11:07 AM Re: Maximum Users Online... [Re: Daine]
yors Offline
Member

Registered: 10/09/01
Posts: 152
[]JoshPet said:<br />I think the issue is that in order to "update" or store the total - somebody needs to load the Index Page which captures the newer number.[/]<br /><br />Exactly my point. End of the day, we removed the entrance page bcos not many were using it.
_________________________
Yors Truly

Who? Me? Worry?

Top
#249771 - 06/19/03 10:30 PM Re: Maximum Users Online... [Re: phill]
Dalar Offline
Member

Registered: 04/22/02
Posts: 231
Loc: Hamilton, Ontario, Canada
how did this thread get so wide?
_________________________
Dalar
Legends of Tacendia
[]http://legendsoftacendia.com/forumimages/icons/troll.gif[/]

Top
#249772 - 06/19/03 10:42 PM Re: Maximum Users Online... [Re: beatdown]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
There was a big huge long line inside the code tag above. <img src="/forum/images/graemlins/mad.gif" alt="" /> <br /><br />I edited it and now it seems back to normal.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#249773 - 06/19/03 10:44 PM Re: Maximum Users Online... [Re: Daine]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
Way to go PetJosh!! <img src="/forum/images/graemlins/wink.gif" alt="" />
_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#249774 - 06/20/03 02:01 AM Re: Maximum Users Online... [Re: Daine]
Dalar Offline
Member

Registered: 04/22/02
Posts: 231
Loc: Hamilton, Ontario, Canada
Do code tags not do wordwrapping then? Hmm...
_________________________
Dalar
Legends of Tacendia
[]http://legendsoftacendia.com/forumimages/icons/troll.gif[/]

Top
#249775 - 06/20/03 08:51 AM Re: Maximum Users Online... [Re: beatdown]
DLWebmaestro Offline
Member

Registered: 08/08/00
Posts: 1753
Loc: California, MD
That is the sole-purpose of them.
_________________________
Webmaster
Drumlines.org

Drumlines.org UBBThreads

Top
#249776 - 06/20/03 02:29 PM Re: Maximum Users Online... [Re: beatdown]
Rick Offline
Guru

Registered: 05/11/99
Posts: 8372
Loc: Olympia, WA
Nope, no word wrapping. It's basically like the html pre tag. I was going to use the php wordwrap() function in there but there is an exploit with wordwrap() in a range of php versions.
_________________________
StogieSmokers.com

Top
#249777 - 06/21/03 01:16 AM Re: Maximum Users Online... [Re: Daine]
yors Offline
Member

Registered: 10/09/01
Posts: 152
[]JoshPet said:<br />There was a big huge long line inside the code tag above. <img src="/forum/images/graemlins/mad.gif" alt="" /> [/]<br /><br />Sorry for that
_________________________
Yors Truly

Who? Me? Worry?

Top
#249778 - 06/21/03 01:28 AM Re: Maximum Users Online... [Re: phill]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
No problem. <br /><br />I used to do it all the time, and Dave_L used to smack me for it all the time. <img src="/forum/images/graemlins/grin.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top


Who's Online
0 registered (), 23 Guests and 12 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Wisdom needed
by Gizmo
Today at 10:54 AM
How to hide sub forums from summary page
by blaaskaak
Yesterday at 09:54 AM
Spell Check [beta]
by Bill B
12/01/08 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
12/01/08 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
12/01/08 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
12/01/08 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
Truth, David DelMonte, nick1, Begbie, cenk
13364 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks