1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 logout on moderator bar

Discussion in 'Styling and Customization Questions' started by Adam Howard, Aug 30, 2013.

  1. Adam Howard

    Adam Howard Well-Known Member

    So the goal is to add a log-out link (button) on the moderator bar. This sounded a lot easier than it I thought it would be.

    This is how far I've gotten it

    www.sociallyuncensored.eu 2013-8-29 19 5 10.png

    The idea is to have it located on the right side of "Admin". And finally, to get it to actually show up for normal members.

    The coded added to the template moderator_bar that I'm using is

    li><a href="{xen:link logout, '', '_xfToken={$visitor.csrf_token_page}'}"
    class="LogOut">{xen:phrase log_out}</a></li>
  2. Adam Howard

    Adam Howard Well-Known Member

    I'm fairly sure this should be visable to logged in members, but its not. :(


    <xen:if is="{$visitor.user_id}">
    a href="{xen:link logout, '', '_xfToken={$visitor.csrf_token_page}'}"
    class="LogOut">{xen:phrase log_out}</a>
    span class="helper"></span>
    www.sociallyuncensored.eu 2013-8-29 20 55 58.png

    It's on the left side.... I wanted it on the right side, but I can live with it.

    I just need it so others can see that "Log Out" link & not just staff.
  3. Adam Howard

    Adam Howard Well-Known Member


    Stand by.... Will be releasing this as template add-on ;)
  4. Adam Howard

    Adam Howard Well-Known Member

Share This Page