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
  #12  
Old 08-30-2000, 02:41 AM
Guest
 
Posts: n/a
Default

eva:

Well,

Global.php has an explicit REQUIRE for /admin/config.php, so turn this:

Code:
 require("/home/usr1/www.animeboards.net/htdocs/forums/admin/config.php");
 require("/home/usr1/www.animeboards.net/htdocs/forums/global.php");
into this:

Code:
 require("/home/usr1/www.animeboards.net/htdocs/forums/global.php");
I'm not sure why you have that first require( config.php ) deal in there, but global.php does it for you. That's why you're getting the redefinition error.
Reply With Quote
  #13  
Old 09-09-2000, 04:45 PM
Guest
 
Posts: n/a
Default

Eva this works for me - see at http://www.hedgehogwheels.com/online.php

My forums are in /forums but I don't have an anchor = active so when you click it just goes to the page.

Code:
<?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 <a href=\"forums/index.php#active\">$members</a> members and
        <a href=\"forums/index.php#active\">$guests</a> guests viewing this forum";
  
?>
Putting $DOCUMENT_ROOT in all requires is a smart thing to do and makes this all easier. If all the PHP files in vBulletin had $DOCUMENT_ROOT then we wouldn't need to chdir.

[Edited by rangersfan on 09-09-2000 at 01:48 PM]
Reply With Quote
  #14  
Old 09-09-2000, 04:50 PM
Guest
 
Posts: n/a
Default

thanks mrogish and rangersfan... i had almost given up on this thread ...

i shall be giving this a try in the morning

man, is the code here messing with the newreply page... the text box is in the middle of my brower and had to scroll horizontally
Reply With Quote
  #15  
Old 09-12-2000, 03:10 AM
Guest
 
Posts: n/a
Default

I tried Rangerfans code but got this error:
Quote:
Fatal error: Call to a member function on a non-object in /home/php/pbcity/vb/etc/online.php on line 5
Reply With Quote
  #16  
Old 09-12-2000, 03:27 AM
Guest
 
Posts: n/a
Default

What I posted works, you can verify it by clicking the link in the same post.
Reply With Quote
  #17  
Old 09-12-2000, 03:35 AM
Guest
 
Posts: n/a
Default

Right,

Not for me though.

I tried putting both the absolute path and the url to the paths you specified in the chdir and the require statements.

Any ideas?
Reply With Quote
  #18  
Old 09-12-2000, 03:14 PM
Guest
 
Posts: n/a
Default

Chris Schreiber tried this yesterday as well Rangersfan and it did not work for him.

Any ideas?
Reply With Quote
  #19  
Old 09-12-2000, 03:31 PM
Guest
 
Posts: n/a
Default

I'm sorry but as it is, it works on my server.

Code:
Fatal error: Call to a member function on a non-object in /home/php/pbcity/vb/etc/online.php on line 5
Line 5 is the first reference to "$DB_site->query_first"

My script is in /
My forums are in /forums

Is your directory structure the same? If the script is in the same directory as the forum then no chdirs are needed.
Reply With Quote
  #20  
Old 09-12-2000, 04:36 PM
Guest
 
Posts: n/a
Default

The script is running at:
http://forums.paintballcity.com/etc/online.php
the full path to that is:
/home/php/pbcity/vb/etc

The forums are at:
http://forums.paintballcity.com
The full path to that is:
/home/php/pbcity/vb

What would be the right config?
Reply With Quote
  #21  
Old 09-12-2000, 04:42 PM
Guest
 
Posts: n/a
Default

By the paths you list than the etc directory is a sub-directory in the directory that contains your forums?
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 03:42 AM.


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.04495 seconds
  • Memory Usage 2,270KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_code
  • (1)bbcode_quote
  • (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
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)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