The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
how do i include active user info on this page http://www.animeboards.net
something like Currently xx members and xx guests viewing this forum and to have the words member and guest hyperlinked to forums/index.php#active [Edited by eva2000 on 08-25-2000 at 05:12 PM] Show Your Support
|
Comments |
#2
|
|||
|
|||
pretty please....
|
#3
|
|||
|
|||
I'll help you - contact me via ICQ:73902680 or AIM: phpBulletin
|
#4
|
|||
|
|||
thanks i sent you an email cause my ICQ doesn't connect properly anymore
|
#5
|
|||
|
|||
well i still need a bit of help... thanks to shri who sent me this code which works at
http://animeboards.net/activeusers.shri.php3 Code:
<? require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php"); chdir("/home/usr1/www.animeboards.net/htdocs/forums"); require("/home/usr1/www.animeboards.net/htdocs/forums/global.php"); if ($displayloggedin==1) { $datecut=time()-$cookietimeout; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session"); $totalonline=$loggedins[sessions]; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0"); $numberguest=$loggedins[sessions]; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0"); $numberregistered=$loggedins[sessions]; $numbervisible=0; $loggedins=$DB_site->query("SELECT DISTINCT user.userid,username,location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 AND usergroupid<>3 ORDER BY username"); if ($loggedin=$DB_site->fetch_array($loggedins)) { $numbervisible++; $userid=$loggedin[userid]; $username=$loggedin[username]; $location=$loggedin[location]; eval("\$activeusers .= \"".gettemplate("loggedinuser")."\";"); while ($loggedin=$DB_site->fetch_array($loggedins)) { $numbervisible++; $userid=$loggedin[userid]; $username=$loggedin[username]; $location=$loggedin[location]; eval("\$activeusers .= \", ".gettemplate("loggedinuser")."\";"); } } $numberinvisible=$numberregistered-$numbervisible; eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";"); } echo $loggedinusers; ?> (don't know php just comparing other code from other stuff) and it works like how i want to at http://animeboards.net/activeusers.root.php3 Code:
<? require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php"); chdir("/home/usr1/www.animeboards.net/htdocs/forums"); require("/home/usr1/www.animeboards.net/htdocs/forums/global.php"); if ($displayloggedin==1) { $datecut=time()-$cookietimeout; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session"); $totalonline=$loggedins[sessions]; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0"); $numberguest=$loggedins[sessions]; $loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0"); $numberregistered=$loggedins[sessions]; $numbervisible=0; $loggedins=$DB_site->query("SELECT DISTINCT user.userid,username,location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 AND usergroupid<>3 ORDER BY username"); if ($loggedin=$DB_site->fetch_array($loggedins)) { $numbervisible++; $userid=$loggedin[userid]; $username=$loggedin[username]; $location=$loggedin[location]; eval("\$activeusers .= \"".gettemplate("loggedinuser")."\";"); while ($loggedin=$DB_site->fetch_array($loggedins)) { $numbervisible++; $userid=$loggedin[userid]; $username=$loggedin[username]; $location=$loggedin[location]; eval("\$activeusers .= \", ".gettemplate("loggedinuser")."\";"); } } $numberinvisible=$numberregistered-$numbervisible; eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";"); } echo "<FONT FACE=\"Verdana, Arial, Helvetica, sans-serif\" SIZE=\"1\">Currently $numberregistered <A HREF=\"http://animeboards.net/forums/index.php#active\">member(s)</A> and $numberguest <A HREF=\"http://animeboards.net/forums/index.php#active\">guest(s)</A> are on the forums.</font>"; ?> (i removed the include for now) i get this displayed Fatal error: DB_Sql_vb is already a function or class in admin/db_mysql.php on line 6 and this sent to me via email Database error in vBulletin: Invalid SQL: SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0 mysql error: Unknown column 'userid' in 'where clause' mysql error number: 1054 Date: Saturday 26th of August 2000 01:21:46 PM Script: /index4a.php3 Referer |
#6
|
|||
|
|||
anyone ?
|
#7
|
|||
|
|||
This is just off the top of my head but it could be that you're including global.php in twice. Since DB_Sql_vb is already defined (possibly through config.php) including it again will bring up that error.
If you delete that file see what happens... or if it's not that, try to look for a file that is referenced twice by require -- that's probably you're answer I do not know if the mysql error is related to the first one, but could be! --red |
#8
|
|||
|
|||
thanks.. this is what i have in the index4a.php3 before the html tags
Code:
<? require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php"); require("/home/usr1/www.animeboards.net/htdocs/phpads/config.inc.php3"); require("/home/usr1/www.animeboards.net/htdocs/phpads/view.inc.php3"); require("/home/usr1/www.animeboards.net/htdocs/phpads/acl.inc.php3"); chdir("/home/usr1/www.animeboards.net/htdocs/forums"); require("/home/usr1/www.animeboards.net/htdocs/forums/global.php"); ?> Code:
chdir("/home/usr1/www.animeboards.net/htdocs/forums"); require("/home/usr1/www.animeboards.net/htdocs/forums/global.php"); require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php"); |
#9
|
|||
|
|||
change index4a.php's requires to this:
Code:
<? require("/home/usr1/www.animeboards.net/htdocs/phpads/config.inc.php3"); require("/home/usr1/www.animeboards.net/htdocs/phpads/view.inc.php3"); require("/home/usr1/www.animeboards.net/htdocs/phpads/acl.inc.php3"); chdir("/home/usr1/www.animeboards.net/htdocs/forums"); require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php"); require("/home/usr1/www.animeboards.net/htdocs/forums/global.php"); ?> |
#10
|
|||
|
|||
thanks i did that i it came up with this error
Fatal error: DB_Sql_vb is already a function or class in admin/db_mysql.php on line 6 i did an exact copy of index4a.php3 named index4b.php3 except, removed all other php includes and the activeusers.root.php3 works at http://www.animeboards.net/index4b.php3 but when i add back all the php includes to index4b.php3 i get the say error Fatal error: DB_Sql_vb is already a function or class in admin/db_mysql.php on line 6 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|