|
|
Joined: Jun 2003
Posts: 88
Power User
|
Power User
Joined: Jun 2003
Posts: 88 |
1st I want to say thanks for the quick replay with my other question(s)
I do however have one more question for you
I need to mimic the bar on the forums that show “welcome username” and than the control panel link if they have access to it…
I have found the code that does this but I am not very familiar with the source for the forum.
The code I need to emulate *I think* is in ubbsthreads/index_outside.php on lines 20-26
// Get the user info $userob = new user; $user = $userob -> authenticate("U_Groups, U_TimeOffset, U_FrontPage"); $Username = $user['U_Username']; $html = new html; if (!$user['U_Username']) { $html -> not_right ($ubbt_lang['notloggedin']. $ubbt_lang['WEL_PRIV_NO'],$Cat); }
if anyone has done this before could you please post/pm me your code?
(the purpose of all of this is to initigrate a welcome message for forum members into a custom website that isn’t based off of *.tmpl files)
|
|
|
|
Joined: Jun 2003
Posts: 88
Power User
|
Power User
Joined: Jun 2003
Posts: 88 |
N/m i figured it out just incase anyone else has this problem: <?php // Require the library require ("includes/main.inc.php"); // ------------- // ------------------------------ // Define any necessary variables $Cat = get_input("Cat","get"); // ----------------- // Get the user info $userob = new user; $user = $userob -> authenticate("U_Groups, U_TimeOffset, U_FrontPage"); $Username = $user['U_Username']; echo ($Username); ?> o ya... remember to move a copy of includes to the top and to change the pathing in main.inc.php
|
|
|
|
Joined: Apr 2003
Posts: 359
Enthusiast
|
Enthusiast
Joined: Apr 2003
Posts: 359 |
Did you add this to an html file?
|
|
|
|
Joined: Jun 2003
Posts: 88
Power User
|
Power User
Joined: Jun 2003
Posts: 88 |
no, im making a content management system, im just including the stuff in the script the tmp files are separate i think i did something wrong though because when you click logout and go back to the site it still shows you logged in while you are logged out on the forums any ideas?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|