Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by (Guest)
Developer Last Online: Jan 1970 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 08-25-2000 Last Update: Never Installs: 0
 
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-26-2000, 10:34 AM
Guest
 
Posts: n/a
Default

pretty please....
Reply With Quote
  #3  
Old 08-26-2000, 12:53 PM
Guest
 
Posts: n/a
Default

I'll help you - contact me via ICQ:73902680 or AIM: phpBulletin
Reply With Quote
  #4  
Old 08-26-2000, 01:15 PM
Guest
 
Posts: n/a
Default

thanks i sent you an email cause my ICQ doesn't connect properly anymore
Reply With Quote
  #5  
Old 08-26-2000, 05:38 PM
Guest
 
Posts: n/a
Default

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;
?>
i hazardly guessed and modified the echo part leaving intact the rest since i haven't a clue what it is
(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>";
?>
Problem is when i try to include it doesn't work and gives me 2 errors on http://animeboards.net/index4a.php3
(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
Reply With Quote
  #6  
Old 08-27-2000, 07:20 AM
Guest
 
Posts: n/a
Default

anyone ?
Reply With Quote
  #7  
Old 08-27-2000, 09:16 AM
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #8  
Old 08-27-2000, 09:54 AM
Guest
 
Posts: n/a
Default

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");  
?>
and this is what i have in the activeusers.root.php3 file
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");
Reply With Quote
  #9  
Old 08-27-2000, 01:30 PM
Guest
 
Posts: n/a
Default

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");  
?>
And drop all the requires from activeusers.root.php3
Reply With Quote
  #10  
Old 08-27-2000, 04:01 PM
Guest
 
Posts: n/a
Default

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
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04779 seconds
  • Memory Usage 2,278KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete