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

Members tab add Search

Morgain

Well-known member
#1
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
member_dropdown_search2.png


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?

member_dropdown-2bar.png

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

Code:
 <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}" />
</form>
 
 
                </div>
            </li>
        </xen:if>
Blue code is existing code already there.
 

Jake Bunce

XenForo moderator
Staff member
#2
Surround the search thing with this condition:

Code:
<xen:if is="!{$tabs.members.selected}">

</xen:if>
That will make it only show in the popup (when the tab is not selected).