Is it possible to put the logout, admin, and help links in the User box?? ???
Where is Your Themes User Box Located?
Quote from: p v c blue on January 27, 2009, 05:50:31 AM
Is it possible to put the logout, admin, and help links in the User box?? ???
Yes.
Quote from: JPDeni on January 27, 2009, 03:00:41 PM
Quote from: p v c blue on January 27, 2009, 05:50:31 AM
Is it possible to put the logout, admin, and help links in the User box?? ???
Yes.
Quite useful to make the "navigation bar" clean.
Can be done by editing ./Themes/default/TPBlocks.template.php under "function TPortal_userbox()".
Quote from: Crip on January 27, 2009, 10:37:16 AM
Where is Your Themes User Box Located?
Hey Crip in the usual place - ./Themes/default/TPBlocks.template.php
I just don't know what to put in it to make it happen, LOL! You know me, all graphic and no code! :laugh:
So does anyone know what to add to make it do this? :-\
For logout:
if ($context['user']['is_logged'])
echo '<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>';
For admin:
if ($context['allow_admin'])
echo '<a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>';
For help:
echo '<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>';
Be sure to have $scripturl, $txt, and $context in your "global" line.
All of these are from the default index.template.php file.