PDA

View Full Version : "Who's Online" Including non vb pages?


Bacon Butty
04-03-2011, 10:43 AM
Hi all,

Just a quick one. This is my website (http://www.grandoldteam.com) and this is my forum. (http://www.grandoldteam.com/forum/forum.php). I'm trying to make the entire website as community driven as possible and I'd like the forums who is online to display users also browsing the custom built cms.

Any ideas how I'd go about this?

I know it's been done for earlier versions;

https://vborg.vbsupport.ru/showthread.php?t=32995
https://vborg.vbsupport.ru/showthread.php?t=157329
https://vborg.vbsupport.ru/showthread.php?t=60019
https://vborg.vbsupport.ru/showthread.php?t=39978

From searching I know I need to include global.php - but how do i include global.php outside vbulletin dir?


Any assistance would be greatly appreciated.

Lynne
04-03-2011, 04:18 PM
// ######################### REQUIRE BACK-END ############################
// if your page is outside of your normal vb forums directory, you should change directories by uncommenting the next line
// chdir ('/path/to/your/forums');
require_once('./global.php');


// added space so the lines show....

Bacon Butty
04-03-2011, 05:38 PM
Thanks Lynne! Very kind.

I don't suppose theres anyway of testing it works? The spike traffic our news articles receive don't seem evident on the forum 'who's online' statistics?

This is the code I'm using;

// Boot up vBulletin
$curdir = getcwd ();
chdir('forum');
require_once('forum/global.php');
chdir ($curdir);
$forumpath = $CONF['site'].'forum';

Lynne
04-03-2011, 06:16 PM
The page would show up in the session table for that user if the page is working correctly.

Bacon Butty
04-03-2011, 06:54 PM
So on my 'Who's Online (http://www.grandoldteam.com/forum/online.php)', I should be seeing some locations to the likes of this page? (http://www.grandoldteam.com/news/general-news/2011/apr/03/baines-sympathises)

Thanks again Lynne.

Lynne
04-03-2011, 06:58 PM
Yes. And in your database, as I mentioned.

Bacon Butty
04-03-2011, 07:03 PM
Hmm. Sadly doesn't appear to be the case. I'll have to do some tweaking to hopefully resolve.

Lynne
04-03-2011, 07:08 PM
This line must be a full path:
chdir('forum');