View Full Version : Show username on non VB page - How?
Hello,
How do I go about showing my username on a non VB page?
And if the user is not logged in I want to show the logincode. Any ideas?
You include global.php and reference $bbusername to access the username:
If you want a login just do something like this:
require("global.php");
if ($bbusername == "")
{
eval("\$logincode = \"".gettemplate("logincode")."\";");
echo $logincode;
}
else
{
echo "hello $bbusername";
}
Ok another question:
How would I make it so that after I logged in, if bbusername was not found, it redirected back to the page where I logged in from.
So lets say I logged in from the homepage....instead of it redirecting me to the forum index page after login, it sent me back to the homepage.
I'm assuming using HTTP_REFERER some how.
Any ideas?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.