UBB.Dev
Posted By: ericgtr Total Users Online - 10/12/2003 12:30 AM
I am using the WOL box hack (not sure who it's by) and I was thinking that it would be neat to have it display a total of both members and guests all in one number. Is there something for this?
Posted By: AKD96 Re: Total Users Online - 10/12/2003 1:55 AM
You'll need to edit pals/onlinepal.php

Look for:
Code
 <br />	if ($TotalMembs) { <br />		if ($TotalMembs == 1) { <br />			$MembsOnline = str_replace("<<TOTALMEMBS>>","<strong>$TotalMembs</strong>",$pal_Online[1]); <br />		} <br />		else { <br />			$MembsOnline = str_replace("<<TOTALMEMBS>>","<strong>$TotalMembs</strong>",$pal_Online[2]); <br />		} <br />


and replace it with:
Code
 <br />	$Totally = $TotalMembs + $TotalAnons; <br /> <br />	if ($Totally) { <br />		if ($Totally == 1) { <br />			$MembsOnline = str_replace("<<TOTALMEMBS>>","<strong>$TotalMembs</strong>",$pal_Online[1]); <br />			$MembsOnlineText = "There is <strong>$Totally</strong> person online.<br /><br />"; <br />		} <br />		else { <br />			$MembsOnline = str_replace("<<TOTALMEMBS>>","<strong>$TotalMembs</strong>",$pal_Online[2]); <br />			$MembsOnlineText = "There are <strong>$Totally</strong> total people online.<br /><br />"; <br />		} <br />


Next, look for:
Code
 <br />	$whosOnline .= "$MembsOnline $AnonsOnline {$pal_Online[7]}"; <br />


and replace it with:
Code
 <br />	$whosOnline .= "$MembsOnlineText $MembsOnline $AnonsOnline {$pal_Online[7]}"; <br />


That should do ya!
Posted By: AKD96 Re: Total Users Online - 10/12/2003 1:58 AM
Here's an example of what its output looks like.

Attached picture 96794-online.gif
Posted By: ericgtr Re: Total Users Online - 10/12/2003 3:50 PM
DL, I tried to work this into JustDave's WOL hack (attached) but it's a little over my head.

Attached File
96811-wol-box.6.2.setup.txt  (55 downloads)
Posted By: AKD96 Re: Total Users Online - 10/14/2003 4:29 PM
It looks like you would...

##
## Find:
##

Code
<br />	if ($VisMembersOnline) {<br />		if ($TotalVis == 1) {<br />			$VisMembsOnline = "<strong>$TotalVis</strong> visible member $vismemberList";<br />		}<br />		else {<br />			$VisMembsOnline = "<strong>$TotalVis</strong> visible members $vismemberList";<br />		}<br />


##
## Replace with:
##

Code
<br />$Totally = $TotalVis + $TotalInv + $TotalAnons;<br /><br />	if ($VisMembersOnline) {<br />		if ($TotalVis == 1) {<br />			$VisMembsOnline = "<strong>$TotalVis</strong> visible member $vismemberList";<br />		}<br />		else {<br />			$VisMembsOnline = "<strong>$TotalVis</strong> visible members $vismemberList";<br />		}<br />


##
## Find:
##

Code
<br />	$whosOnline = "$InvMembsOnline$VisMembsOnline$AnonsOnline have been online with in the last 10 minutes.";<br />


##
## Replace with:
##

Code
<br />	$whosOnline = "There are $Totally people online.<br />$InvMembsOnline$VisMembsOnline$AnonsOnline have been online with in the last 10 minutes.";<br />


This might work. I don't have this mod installed, so I can't test it.
© UBB.Developers