The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Whose Online forced incorrect directory error?
I'm trying to set the whose online to let me rename the titles of my own homepage files when people are looking at them....
Problem is this ONLY works correctly if the files are in the VB folder. Well that like saying America can't work unless it occupies Canada! I tried doing a setpath but honestly I am a kind of a PHP newbie. I just know how to set and call strings :laugh: So somehow I need this to go out one level (out of the vb directory) and then into my directories.... .com/community/ ~VS~ .com/home/ Here is my code from the functions_online.php file. Any help is GREALTY appreciated! case 'home': $userinfo['action'] = 'Home Section'; $userinfo['where'] = "<a href=\"../home/home-news.php\">Latest News</a>"; break; AND.... case '../home/home-news.php': $userinfo['activity'] = 'home'; break; |
#2
|
|||
|
|||
First of all (I assume it's the same for the new vB3), you have to connect your other non-vb pages to the forum. vB has no way of knowing who's outside of the forum structure.
Making it work for vB2 required something along these lines via a .php file: Code:
require('./global.php'); require("$path/config.php"); On a similar note, directory structures will not work in the who's online (unless this was changed for vB3). It uses the filename the person is viewing. So instead, it would look like this: case 'home': $userinfo['action'] = 'Home Section'; $userinfo['where'] = "<a href=\"http://www.yoursite.com/home/home-news.php\">Latest News</a>"; break; AND.... case 'home-news.php': $userinfo['activity'] = 'home'; break; Remember, vB has no idea where a user is outside of the forum, that's why you have to connect to the global vB files outside of your forum structure. That's how it worked for vB2 so there's a good chance that's how it works for vB3 as well. You can do this by connecting to the vB database at the top of each of your .php files, or use an include to pull it in. EDIT: Here, for your vB3 Who's Online on non-vb pages. GO HERE Syl... |
#3
|
||||
|
||||
I kinda played with it with the help of Zack but you suggested what would work so I still thank you a billion times! Also thanks a billion extra for the go here page, the whose online will encourage people to wander into the chat for a bit :-D
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|