vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Assistance With non-vb pages (https://vborg.vbsupport.ru/showthread.php?t=47425)

Orlandu 01-06-2003 02:40 AM

Assistance With non-vb pages
 
On my index page, http://www.ffalexandria.com, I want it to say "Welcome back, $user" or "Welcome guest, to Alexandria" if they are a guest. I thought by including ("forums/global.php"); this would work:
PHP Code:

if ($bbuserinfo[userid]!=0) {
$username=$bbuserinfo[username];
 
$welcome="Welcome back, $username.";
} else {
 
$welcome="Welcome guest, to Alexandria.";


But it doesn't, keeps giving me this error:
Warning: Unable to access ./admin/config.php in /sites/ffalexandria.com/www/forums/global.php on line 129

All I want it to do is say their username if their logged in, what do I need to do?

EDIT: It doesn't work, but it will say "Welcome guest". But it says that for everyone, even though you are logged in.

Mark Hewitt 01-06-2003 09:42 AM

global.php is assuming it is being called from the directory below the forums directory

Code:

//load config
require('./admin/config.php');

If you change that to an absolute path it may work (I have not tested this)

Orlandu 01-06-2003 03:28 PM

I just put it as
Code:

//load config
require('http://www.ffalexandria.com/forums/admin/config.php');

and this gives me this error:
Warning: php_hostconnect: connect failed in /sites/ffalexandria.com/www/forums/global.php on line 129

flup 01-06-2003 03:31 PM

Welcome guest, to Alexandria.

This is what i see when i visit...

Orlandu 01-06-2003 03:33 PM

I know, but I am logged in and it still says that. So its not getting the $bbuserinfo[username] right.

EDIT: I changed the include on my index page to a full path to the forums, and it doesn't give me an error anymore. Although it still doesn't say "Welcome back, $username" if you are logged in.

Mark Hewitt 01-07-2003 01:01 PM

Um yeah. Just tried something similar and I get the same. Doesn't seem to work if you include global.php when the file is out side of the main forums directory :(


All times are GMT. The time now is 11:17 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.01132 seconds
  • Memory Usage 1,724KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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