The Arcive of vBulletin Modifications Site. |
|
Username on Non-VB Page Details »»
|
|||||||||||||||||||||||||
I'm trying to print a message either welcoming members back, or if they are not logged in, asking them to either login or register.
I have tried This Code:
<?
require("forums/global.php");
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
echo "Welcome back, <b>$username</b>";
}
?>
Welcome Back, USERNAME OR Please Login or Register To Interact In Our Community. With the words Login, Register & Community being hyperlinks to their respective areas. This page/message will be outside the forums directory. Thanks in advance for any help!! ![]() Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
i might be missing something but try this
require("./forums/global.php"); |
|
#3
|
|||
|
|||
|
You're not defining the opposite case.
PHP Code:
|
|
#4
|
|||
|
|||
|
Hmmm... I tried both tid bits of code, and here is what I get:
PHP Code:
And thanks for the help! |
|
#5
|
|||
|
|||
|
I tried saving the code in a seperate file (welcome.php) and I didn't get the header information - however, it always shows up as guest - even though I'm logged in.
I even tried logging in then being redirected back to the welcome.php page - same thing, you are a guest. :banana: |
![]() |
|
|