What's new
Guest viewing is limited

Separate Login and Logout + user color ?

Status
Not open for further replies.

Peak Forum Bot

Part Of The Furniture
PF Member
Special
Messages
4,381
Highlights
0
Reaction score
28
Points
0
Peak Coin
0.000000¢
DB Transfer
0.000000¢
Hi.

I also notice that you somehow was able to separate Login and Logout:
Login is show at the top overall_heder and logout is show in bottom overall_heder

Can i ask how you do this ?

Also username in logou form color is really nice addon. Is there any mod/instruction ?
 
For the colored usernames, you do the following:

Open "root/includes/functions.php" and find:
Code:
$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']);
Replace it with this:
Code:
$u_user_name = get_username_string('no_profile', $user->data['user_id'], $user->data['username'], $user->data['user_colour']);
		$u_login_logout = append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=logout', true, $user->session_id);
		$l_login_logout = sprintf($user->lang['LOGOUT_USER'], $u_user_name);

Now open "root/styles/prosilver/template/overall_header.html" and find:
Code:
<img src="{T_THEME_PATH}/images/<!-- IF not S_USER_LOGGED_IN -->key<!-- ELSE -->disconnect<!-- ENDIF -->.png" width="16" height="16" alt="" /> <a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a>
And replace it with this:
Code:
<!-- IF not S_USER_LOGGED_IN -->
            <img src="{T_THEME_PATH}/images/key.png" width="16" height="16" alt="" /> <a href="{U_LOGIN_LOGOUT}" title="{L_LOGIN_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a>
			<!-- ELSE -->
			<img src="{T_THEME_PATH}/images/disconnect.png" width="16" height="16" alt="" /> <a href="{U_LOGIN_LOGOUT}" title="{L_LOGOUT}" accesskey="x">{L_LOGIN_LOGOUT}</a>
			<!-- ENDIF -->

As for the separate thing... I made that second lower userbar and only played with the condition "<!-- IF not S_USER_LOGGED_IN -->" and "<!-- IF S_USER_LOGGED_IN -->". The condition "<!-- IF not S_USER_LOGGED_IN -->" means that if a guest is viewing. The condition "<!-- IF S_USER_LOGGED_IN -->" means that a registered and logged in user viewing.
Simply put the content between those conditions depending on whether you want your logged in users to see it or you only want guests to see it.
 
Radek2212 said:
Thank you !! ;): > :woot: > :star: > :D Why i can't click "Thanks" :cry:
No problem. =)
And good question... I just noticed that even I can`t see the thanks button in some of my topics... Will look into it.


So are your questions answered? Can I close this?
 
Status
Not open for further replies.
Back
Top