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

Members tab add Search

Discussion in 'Styling and Customization Questions' started by Morgain, Jan 21, 2012.

  1. Morgain

    Morgain Well-Known Member

    Unlike many admins I find the memberlist very useful and I've added info to it.
    I've also tried adding a Member Search box (the one I find on the Memberlist sidebar)
    to the BOTTOM of the Members dropdown.

    It's fine if I'm on another Tab. It even works

    However if I'm in any of the Members area pages the secondary navbar has a hissy fit!
    I can appreciate that I need to put a conditional on the Search so it has no effect on the secondary bar.
    Or something?


    [EDIT} sorry here's the code added after the last </ul> of the members section in template/ navigation

     <form action="{xen:link members}" method="post" class="secondaryContent findMember">
                <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase find_member}</a></h3>
                <input type="search" name="username" placeholder="{xen:phrase name}..." results="0" class="textCtrl AutoComplete" data-autoSubmit="true" />
                <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
    Blue code is existing code already there.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Surround the search thing with this condition:

    <xen:if is="!{$tabs.members.selected}">
    That will make it only show in the popup (when the tab is not selected).
    Morgain likes this.
  3. Morgain

    Morgain Well-Known Member

    Bless you Jake. This is a nice little convenience.

Share This Page