vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Whose Online forced incorrect directory error? (https://vborg.vbsupport.ru/showthread.php?t=66408)

JAB Creations 06-22-2004 07:34 PM

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;

Sylvus 06-23-2004 06:19 PM

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");

Once all pages outside of the forum connect to the forum itself, you could then output the vB information to all your non-vB pages.

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...

JAB Creations 06-23-2004 07:09 PM

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


All times are GMT. The time now is 06:14 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.01017 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
  • (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