TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,022
  • Total Topics: 21,332
  • Online today: 704
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 1059
  • Total: 1059

A wish for User box: Logout link...

Started by misjka, January 06, 2006, 09:06:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

misjka

Hi!
Am I the only one that would appreciate a Logout link in that User box? That way, at least I won't need that login/logout form in the header at all... Now have to go there every time to logout out (or to the logout bottun in the header), but it would be much more convenient to have that in the User box since I have other User info there...

bloc

It could be handy...but it is in the main menu too, so it would mean repeating the info. But that can said of "unread replies" etc. as well.. ::) I don't want to put too much in the userbox area though, since it get quite long.

What do others think?....

gerrymo

I agree. Logging out aint something you do every 5 mins, so why have it in the user block?

Rasyr

I think that misjka is wanting to remove it from the header, and put it into the user box.

misjka - to do what you want

Go to TPortalBlocks.template.php and find the following code (around line 252):



               if($context['TPortal']['can_submit_article']==1 && !$context['user']['is_admin'])
                       echo '<br /><b>'.$bullet.'<a href="', $scripturl, '?action=tpmod&sub=submitarticle">' . $txt['tp-submitarticle']. '</a></b>';

               echo '</div>';
        }
        // Otherwise they're a guest - so politely ask them to register or login.



And change it to:



               if($context['TPortal']['can_submit_article']==1 && !$context['user']['is_admin'])
                       echo '<br /><b>'.$bullet.'<a href="', $scripturl, '?action=tpmod&sub=submitarticle">' . $txt['tp-submitarticle']. '</a></b>';
               
               echo '<br /><b>'.$bullet.'<a href="', $scripturl, '?action=logout;sesc=', $sc, '">', $txt[108], '</a>';

               echo '</div>';
        }
        // Otherwise they're a guest - so politely ask them to register or login.



This will add a Logout link to the user box, just beneath the date.

misjka

OK, I'll check that out - thanks! And yes, you interpreted my request right :D.
About filling the user box too much, logout would maybe be an option when setting the user box up in TPadmin - so it will be up to admin to decide how much to put there...?

I'm logging in and out quite frequently while I test different things, switching between admin, globla moderator and a regular dummy user. I do not want to hang around too much as admin in the forum, so that is a second reason why to change now and then...

ZAD-Fossil

For Tiny v0.9.8 go to TPortalBlocks.template and find this Code (around line 437)
if(isset($context['TPortal']['userbox']['time'])){
echo '<br />'.$bullet. $context['current_time'];
}
}
// Otherwise they're a guest - so politely ask them to register or login.


and change it to:

if(isset($context['TPortal']['userbox']['time'])){
echo '<br />'.$bullet. $context['current_time'];
echo '<br /><b>'.$bullet.'<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a>';
}
}
// Otherwise they're a guest - so politely ask them to register or login.


Have fun  ;)

This website is proudly hosted on Crocweb Cloud Website Hosting.