SMF Support > SMF 2.0.x Support
How to hide a certain menu from guests
(1/1)
SoSad:
How do I hide a certain menu from guests? So that the menu will only be shown when the user is logged in.
Krash.:
In /Sources/Subs.php -
--- Code: ---
'logout' => array(
'title' => $txt['logout'],
'href' => $scripturl . '?action=logout;%1$s=%2$s',
'show' => !$user_info['is_guest'],
'sub_buttons' => array(
),
'is_last' => !$context['right_to_left'],
),
--- End code ---
Use this 'show =>' attribute for whichever button you don't want guests to see.
Navigation
[0] Message Index
Go to full version