Previous Thread
Next Thread
Print Thread
Rate Thread
#285381 05/21/2005 11:24 PM
Joined: Jun 2003
Posts: 88
Power User
Power User
Offline
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)

Sponsored Links
Joined: Jun 2003
Posts: 88
Power User
Power User
Offline
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
Offline
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?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)