Hello Community!
I like to customized the log in log out button of my whole board, something like:
when a user is not logged in it will say "welcome guest please log in " and when the user is logged in it will say "Welcome back user".
In vbulletin you edit the phrases to achieve this how about in phpbb where will I edit to achieve this. I know php I just wanted to know the file or database table to edit to get me on the track.
Tnx in advance
Customize log in log out button
- stickerboy
- Registered User
- Posts: 94
- Joined: Fri Jun 04, 2004 3:05 pm
- Location: Scotland
- Contact:
Re: Customize log in log out button
This code in includes/functions.php is where the message is set:
Specifically the $user->lang. If you look in langauge/en/common.php - you'll find those values and can change them there to what you wish
Code: Select all
// Generate logged in/logged out status
if ($user->data['user_id'] != ANONYMOUS)
{
$u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id);
$l_login_logout = sprintf($user->lang['LOGOUT_USER'], $user->data['username']);
}
else
{
$u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login');
$l_login_logout = $user->lang['LOGIN'];
}
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
Re: Customize log in log out button
Wow thanx you look good !!
Uhmm I want to take it a step higher I want to display the user avatar next to the log out button. I want to query the database for the user's avatar. Question: what string variable is holding the user name? is that $user->data['username'] ?
Will I query the database like so:
SELECT * FROM table WHERE table_column = $user->data['username']
I hanvn't figured it out yet where to query but I'll get to that...
OR
what file in phpbb is displaying the avatar maybe I can just use it than going out of my way reinventing the wheel.
Tnx again.
Uhmm I want to take it a step higher I want to display the user avatar next to the log out button. I want to query the database for the user's avatar. Question: what string variable is holding the user name? is that $user->data['username'] ?
Will I query the database like so:
SELECT * FROM table WHERE table_column = $user->data['username']
I hanvn't figured it out yet where to query but I'll get to that...
OR
what file in phpbb is displaying the avatar maybe I can just use it than going out of my way reinventing the wheel.
Tnx again.