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

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

    Adam Howard Well-Known Member

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

    moderator_bar

    PHP:
    <xen:if is="{$visitor.user_id}">
               <
    a href="{xen:link logout, '', '_xfToken={$visitor.csrf_token_page}'}"
                 
    class="LogOut">{xen:phrase log_out}</a>
    </
    xen:if>
           <
    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

    SOLVED

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

    Adam Howard Well-Known Member

Share This Page