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: 01-01-2001 Last Update: Never Installs: 0
 
No support by the author.

I would like to include the $loggedinusers on a non VB page.

I assume that writing this data to a TXT file (and inserting it via SSI) everytime this data is modified would be a PAIN for the server as it may change several times per second when traffic is high... SO... what do you suggest?

Any of you guys could help?

I think that several peopel are trying to integrate vBulletin to sites as much as possible... I think that designwise it is the BEST board (onlineDJ.com looks great with the board, perfect integration) but it would be great to have an easy step by step help to show data to non VB pages, and to easily use the login of the board to other parts of the site.

Show Your Support

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

Comments
  #2  
Old 01-01-2001, 10:29 PM
Guest
 
Posts: n/a
Default

this goes back to asking for a few include files to be made by the developers. would be nice.

ManoOne, the only ways to do it are 1) use an include or 2) have the page a .php page with a direct call to the mySQL database quering number of online users. Up to you which you do, as an include file is basically exactly the same i would not think there is much of a performance difference.
Reply With Quote
  #3  
Old 01-01-2001, 10:50 PM
Guest
 
Posts: n/a
Default

interesting

what would be the PHP code to add to the page (i can set th ephp extension to it) in order to grab those numbers from the database and display them?

thanks
Reply With Quote
  #4  
Old 01-01-2001, 11:09 PM
Guest
 
Posts: n/a
Default

not sure but it will be the same as the bit on index.php so it is probably in there somewhere.
Reply With Quote
  #5  
Old 01-02-2001, 01:16 AM
Guest
 
Posts: n/a
Default

THANK YOU SO MUCH!

http://www.onlinedj.com

Look, the frontpage of the site! Users are logged in once they enter the domain, etc. etc..

excellent, thanks again
Reply With Quote
  #6  
Old 01-02-2001, 05:42 AM
Guest
 
Posts: n/a
Default

I would also like to show who is on the board form my home page. It would be no biggie for me o make it a php page.

Can you please explain how to do it.

Thanks!
Reply With Quote
  #7  
Old 01-02-2001, 08:52 AM
Guest
 
Posts: n/a
Default

i am not sure, this may work:


Code:
   $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,session.location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 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")."\";");
but then you will have to add this at the top

require("global.php");

it will also mean people on that page will be counted in the online stats
Reply With Quote
  #8  
Old 01-02-2001, 10:09 AM
Guest
 
Posts: n/a
Default

ManoOne

can you post your coding?
Reply With Quote
  #9  
Old 01-02-2001, 04:21 PM
Guest
 
Posts: n/a
Default

ManoOne, glad you got it working and glad i could help.

Mental Stamina, is must be something like what i posted because that is what i suggested to ManoOne who got it to work, the section you want is in index.php just make sure you require global.php at the top. try it it may well work
Reply With Quote
  #10  
Old 01-02-2001, 08:37 PM
Guest
 
Posts: n/a
Default

Guys.. I almost have it working I guess..
Here is the thing.. It dosent display..I viewed sorce..and the code stops at the

<?php

require("global.php");

?>

Hmm what do you think is happening?

I am calling this page:

http://www.clubfreestyle.com/testwho.php

Any ideas?
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:51 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.05124 seconds
  • Memory Usage 2,267KB
  • 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
  • (1)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