MyBB Community Forums

Full Version: How to add logout button/link?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My current theme for whatever reason does not include a logout link or button.

I would like to add it to my "welcome" box, or I can add it in the header navigation.

But what code do I use for the logout?

*edit*
I found this code on my other mybb site, is it helpful?

<a rel="nofollow" class="cikis-yap" href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>
yes, you can use it .. however using class="cikis-yap" depends on your theme ...
(2011-12-25, 08:55 AM)ranjani Wrote: [ -> ]yes, you can use it .. however using class="cikis-yap" depends on your theme ...

Excellent! Thank you, I just removed the class info. Works perfect!!
do not use any class and see how it appears .. OR put a new class so that you can adjust it later
<a rel="nofollow" class="logout" href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>
(2011-12-25, 09:03 AM)ranjani Wrote: [ -> ]do not use any class and see how it appears .. OR put a new class so that you can adjust it later
<a rel="nofollow" class="logout" href="{$mybb->settings['bburl']}/member.php?action=logout&amp;logoutkey={$mybb->user['logoutkey']}">{$lang->welcome_logout}</a>

Thank you! I ended up just not using a class, it looked fine. Thanks again