vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   See who is logged in outside of vBulletin (https://vborg.vbsupport.ru/showthread.php?t=41343)

nabeel 07-20-2002 10:00 PM

See who is logged in outside of vBulletin
 
PHP Code:

//PUT THIS AS THE VERY FIRST THING ON YOUR PAGE, BEFORE THE <html> TAG<?
                include_once("forums\\admin\\config.php");
    include_once("forums\\admin\\db_mysql.php");
    $DB_site=new DB_Sql_vb;
    $DB_site->appname='vBulletin';
    $DB_site->appshortname='vBulletin (forum)';
    $DB_site->database=$dbname
    $DB_site->server=$servername;
    $DB_site->user=$dbusername;
    $DB_site->password=$dbpassword;
    $DB_site->connect();

    include("forums\\admin\\functions.php");
    include("forums\\admin\\sessions.php");
?>

<?
//now you can check who is logged in, this can go anywhere
if($bbuserinfo['userid'] != 0){
        echo "welcome " . $bbuserinfo['username'] . "<br>your user id is: " . $bbuserinfo['userid'];
    }
?>


this could be used if you want to make sure someone is logged in before they come to your site, or a customized home page showing their info

ModshackUK 07-21-2002 03:25 PM

Ermmm does that not contain your password for your sql server ?

HM

nabeel 07-21-2002 03:26 PM

lol woops

i edited it

ModshackUK 07-21-2002 03:30 PM

LOL

Its ok I posted my IRCOP password the other day by accident but no one noticed :)

HM

Velocd 07-21-2002 03:32 PM

I'm amazed by your very detailed explanation in your first post by what this hack actually does :rolleyes: :p

If this is going at before the HTML tag, doesn't it still need the <?php and ?> tags?

I have this on my forum anyway, using one of Firefly's header online hacks, but installed on every page with some integration..

Good for those using HTML pages I suppose..

ModshackUK 07-21-2002 03:36 PM

I like the idea and will give it a shot later on tonight as I run another site thats mainly html based.

HM

nabeel 07-21-2002 03:37 PM

i couldnt get that one working, so i came up with this..took me a while. i added that stuff in.

blah...its too early :\

KuraFire 07-22-2002 10:21 AM

Erm, would this work if I want to see users, who are elsewhere on the site, on the Who's Online page of my vB?

nabeel 07-22-2002 03:57 PM

itll work if you wanna make a customized page on another part of your site.

im working on a "whos online" thing

webhost 07-25-2002 01:38 AM

This is what we use,
http://logitpro.com/


All times are GMT. The time now is 09:00 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.01239 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete