vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Pull user details into new PHP page (https://vborg.vbsupport.ru/showthread.php?t=281822)

conaero 04-20-2012 08:09 AM

Pull user details into new PHP page
 
We are creating a classifieds section in VB4 and created a PHP page and a template to go with it, and we require help with getting the user details onto this new php page as a variable.

We are fully versed in PHP, we just need to know where to look for these details.

Your help is very much appreciated as we are a bit stuck.

kh99 04-20-2012 08:41 AM

You just need to include global.php. But the current directory needs to be the vb directory before you include global.php, so if your page is in another directory, you'd need something like:

Code:

$savedir = getcwd();
chdir('/path/to/vb/dir');
require_once('./global.php');
chdir($savedir);


Once you do that, the user information will be in $vbulletin->userinfo[] (assuming the user is logged in).

conaero 04-20-2012 09:14 AM

Thanks mate, the coder seemed to nod when he read it so we will give it a whirl.


All times are GMT. The time now is 11:57 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.00895 seconds
  • Memory Usage 1,708KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete