Renmiri
07-27-2006, 10:00 PM
A request (https://vborg.vbsupport.ru/showthread.php?p=1039329) that I happened to need ASAP so I did my first hack (be gentle!)
Inspired on vBExternal (https://vborg.vbsupport.ru/showthread.php?t=83005&page=24) and live stats on header (https://vborg.vbsupport.ru/showthread.php?t=95493)
1. Add the plugin to set the value of $onlineusers
2. Edit header template to add $onlineusers
If you want to put it under the logo, the same place the live stats on header (https://vborg.vbsupport.ru/showthread.php?t=95493) puts it, do this:
In the header template:
Find: (ususally at the end of the template file)
<!-- content table -->
$spacer_open
$_phpinclude_output
Add Above:
<!-- Currently Active Users in Header Template -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="left"><span class="smallfont"><a href="online.php$session[sessionurl_q]"><b>Online: </b> $usersonline</a>
</span></div>
</td>
<td align="left" width="20%"> </td>
</tr>
</table>
<!-- Currently Active Users in Header Template -->
Check it out (I put mine by the site logo)
http://sinsdawn.ffproject.net/index.php
Note: If your forum is very active (lucky you), your current online string gets too big. The plugin stops the gathering of user names when the string reaches 80 charaters. If you want more than that, just edit the plugin and at the bottom find
while($User = $db->fetch_array($UsersOnline) and strlen($Data)<80){
and change the 80 to your preferred size
Inspired on vBExternal (https://vborg.vbsupport.ru/showthread.php?t=83005&page=24) and live stats on header (https://vborg.vbsupport.ru/showthread.php?t=95493)
1. Add the plugin to set the value of $onlineusers
2. Edit header template to add $onlineusers
If you want to put it under the logo, the same place the live stats on header (https://vborg.vbsupport.ru/showthread.php?t=95493) puts it, do this:
In the header template:
Find: (ususally at the end of the template file)
<!-- content table -->
$spacer_open
$_phpinclude_output
Add Above:
<!-- Currently Active Users in Header Template -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div align="left"><span class="smallfont"><a href="online.php$session[sessionurl_q]"><b>Online: </b> $usersonline</a>
</span></div>
</td>
<td align="left" width="20%"> </td>
</tr>
</table>
<!-- Currently Active Users in Header Template -->
Check it out (I put mine by the site logo)
http://sinsdawn.ffproject.net/index.php
Note: If your forum is very active (lucky you), your current online string gets too big. The plugin stops the gathering of user names when the string reaches 80 charaters. If you want more than that, just edit the plugin and at the bottom find
while($User = $db->fetch_array($UsersOnline) and strlen($Data)<80){
and change the 80 to your preferred size