vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   vbulletin external page (https://vborg.vbsupport.ru/showthread.php?t=303558)

shellcode 10-18-2013 06:16 PM

vbulletin external page
 
Hi,

We have a portal and we want vbulletin 5 entegration to our portal (username, online users, last topics and sessions{username etc.}...)

What should you do?

We should use Api or anything?

Which use include code for my header page?

I used this code in my header.php;

Code:

$root = $_SERVER['DOCUMENT_ROOT'];
$curdir = getcwd ();
chdir("$root/forum/");
require("$root/forum/core/global.php");
chdir ($curdir);

and i try
Code:

$vbulletin->userinfo['username'];
but:
"Access denied."

can you help me?

Thanks..

futureaudio 10-19-2013 05:06 AM

You need to include global.php and declare $vbulletin as global to be able to access vbulletin and related information:

Code:

require_once('./global.php');
global $vbulletin;


shellcode 10-19-2013 07:48 AM

Quote:

Originally Posted by futureaudio (Post 2454558)
You need to include global.php and declare $vbulletin as global to be able to access vbulletin and related information:

Code:

require_once('./global.php');
global $vbulletin;


hi futureaudio,

thank you for your answer.


I think global.php for vb4.. My question for vb5

Because show "Access denied." error when put
Code:

require_once('c://wamp/forum/core/global.php');
in my header

----

I added this codes to my header file.

Code:

chdir($forumpath);
require_once('./config.php');
require_once($config['core_path'] . '/includes/config.php');
global $vbulletin;

but i cant get username etc.
Code:

$vbulletin->userinfo['username'];


All times are GMT. The time now is 01:01 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.00973 seconds
  • Memory Usage 1,718KB
  • 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
  • (7)bbcode_code_printable
  • (1)bbcode_quote_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