Search by Custom Field [Deleted]

Here's my suggestion. Create a sidebar search field that includes two boxes. One for location and the other that lets you search in all custom user fields. Read more about it here: http://xenforo.com/community/threads/advanced-member-search-request.27820/

66azyq.jpg

15d8myp.jpg
 
Installed it, doesn't show up on the sidebar. Don't see another way to use this search. Is there a direct link?

Deleted for now.
 
Another way to use this search /members/search
The same way problem may be modified template member_list
And TMS needs.
 
Another way to use this search /members/search
The same way problem may be modified template member_list
And TMS needs.
Okay I was able to find it that way, two problems though:


1. I don't see the custom profile field search sidebar on the member's page. It's not changed at all.

I can only see the custom profile field search sidebar on the members/search page


2. I have over 50 custom user fields. How to limit which custom user fields show?

Can you make an option for that in AdminCP/Options please? Disabling for now.
 
Okay I was able to find it that way, two problems though:


1. I don't see the custom profile field search sidebar on the member's page. It's not changed at all.

I can only see the custom profile field search sidebar on the members/search page


2. I have over 50 custom user fields. How to limit which custom user fields show?

Can you make an option for that in AdminCP/Options please? Disabling for now.

List of fields for which there is a search you can easily change in the template.
If I bear this option, you get overhead, which can be said to be compatible with other hacks. Or the settings will be not beautiful and not easy to use. Templates just invented to change the look for yourself. If you need help in editing the template, I'm ready to help.
 
Hi Akinak, I'm installing this now .. however I don't have TMS (nor do I really want to install it ... yet).
Can you explain which Templates I need to manually update, to get this to work without TMS?

Thanks heaps,
Fris.
 
Hi.
In template member_list find
Code:
    <div class="section">
        <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>

and replace
Code:
    <form action="{xen:link members/list}" method="post" class="secondaryContent findMember">
                        <h3><a href="{xen:link /members/search}" title="{xen:phrase find_member}">{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="search" name="location" placeholder="{xen:phrase location}" results="0" class="textCtrl">
<input type="search" name="any_custom_field" placeholder="{xen:phrase any_custom_field}" results="0" class="textCtrl">
<br><input type="submit" value="{xen:phrase search}" accesskey="s" class="button primary" />
            <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
        </form>

Also, if you need autocomplete location field in account personal details, in template account_personal_details find
Code:
<dd><input type="text" name="location" value="{$visitor.location}" id="ctrl_location" class="textCtrl OptOut" /></dd>
and replace
Code:
            <dd><input type="text" name="location" value="{$visitor.location}" class="textCtrl AutoComplete AcSingle" id="ctrl_location" data-acurl="{xen:link account/searchCity}"/></dd>
 
Thx Akinak. Unfortunately it's still not working ... I've made the change to the 'member_list' template, however nothing has changed in my Members page??

As per one of the other posts in this thread, I can see the functionality if I go directly to /members/search .. but it doesn't integrate with the existing members list ...

By the way, I'm using the 'Member List Manager' add-on.

One last thing, can we use wildcards when searching? e.g. "*Perth*" ... to catch those members who put "Perth, WA" ... or "Perth, Australia" ... etc?
 
The reason it is not working is because if you aren't using TMS, then you have to make changes to member_list_sort instead of member_list. Similarly to member_list_item_sort instead of member_list_item.

You should have read the Technical part better in my addon description.
Also, I would suggest you use TMS, that is why I have it included as an option.
 
Find
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>
in template member_list_sort and replace
Code:
        <form action="{xen:link members/list}" method="post" class="secondaryContent findMember">
                        <h3><a href="{xen:link /members/search}" title="{xen:phrase find_member}">{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="search" name="location" placeholder="{xen:phrase location}" results="0" class="textCtrl">
<input type="search" name="any_custom_field" placeholder="{xen:phrase any_custom_field}" results="0" class="textCtrl">
<br><input type="submit" value="{xen:phrase search}" accesskey="s" class="button primary" />
            <input type="hidden" name="_xfToken" value="{$visitor.csrf_token_page}" />
        </form>

MOZ ahead of me, he's absolutely right.
 
Back
Top Bottom