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

Search by Custom Field [Deleted]

Discussion in 'Add-on Releases' started by Akinak, Jan 27, 2013.

  1. Akinak

    Akinak Well-Known Member

  2. MOZ

    MOZ Well-Known Member

    Style it more, integrate it with the XenForo search and you have a winner.
     
    ALFrisbee likes this.
  3. DRE

    DRE Well-Known Member

  4. Akinak

    Akinak Well-Known Member

  5. Akinak

    Akinak Well-Known Member

  6. Akinak

    Akinak Well-Known Member

  7. DRE

    DRE Well-Known Member

  8. DRE

    DRE Well-Known Member

    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.
     
  9. Akinak

    Akinak Well-Known Member

    Another way to use this search /members/search
    The same way problem may be modified template member_list
    And TMS needs.
     
  10. DRE

    DRE Well-Known Member

    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.
     
  11. Akinak

    Akinak Well-Known Member

    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.
     
  12. DRE

    DRE Well-Known Member

  13. Deepmartini

    Deepmartini Well-Known Member

    Any updates? Some of these ideas look promising.
     
  14. ALFrisbee

    ALFrisbee Active Member

    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.
     
  15. Akinak

    Akinak Well-Known Member

    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>
     
  16. ALFrisbee

    ALFrisbee Active Member

    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?
     
  17. Akinak

    Akinak Well-Known Member

    Members Page is your_forum/community/members/ or somth else?
     
  18. ALFrisbee

    ALFrisbee Active Member

  19. MOZ

    MOZ Well-Known Member

    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.
     
  20. Akinak

    Akinak Well-Known Member

    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.
     

Share This Page