I found this hack somewhere here on the VB boards, but can't remember where exactly.
I made a file called online.php which consists of the following:
-----------------------------------------------------------------------
<?php
chdir($DOCUMENT_ROOT . "/forums");
require($DOCUMENT_ROOT . "/forums/global.php");
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0");
$guests=$loggedins[sessions];
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0");
$members=$loggedins[sessions];
echo "There are currently $members forum members and
$guests guests online. <a href=/forums/index.php>Join us!</a>";
?>
-----------------------------------------------------------------------
I uploaded this to the forums directory. Then I inserted the following into my header file on my non-vb pages (I use SSI)
<!--#include virtual="/forums/online.php3"-->
I don't know if it includes ALL guests, but it does appear to include all members. If they are anywhere within my site, their user name shows in the who's online on the main forums page.
Hope this does the trick for you!
|