MyBB Community Forums

Full Version: Display users on search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Why don't users display on search? I want the ability for users to search for users and not only threads and posts.

Is there a plugin for this?
You can search for users at the bottom of memberlist.php
(2022-02-22, 12:47 AM)SvePu Wrote: [ -> ]You can search for users at the bottom of memberlist.php

I know, but I would want to be able to search for users on search.php. Especially when I have a search box in my navigation.
It's not something MyBB does (or that I've seen any forum software do to be honest), so would need a custom plugin. Not sure how feasible it will be as the search results are cached and it only has the capability to search threads and posts. The results would have to be displayed separately and completely differently so doesn't make a lot of sense to me, but it'll need a custom plugin either way.
Don't understand the trouble:
[Image: nZq72Pf.png]
That's searching for content by a user, I think the request is to search for users themselves. Even though this is possible on memberlist.php
I have a search box on my nav bar, therefore I'd like to let users search for thread AND users in that search box. For example, if you search for Brad, the users with "Brad" in their name will show up, as will threads and posts.
You can grab the whole <form> element from Memberlist Search Template and put it into Search Template.
This way you create an independent search form for members and style it individually.
Keep in mind:
- This new <form> must be outside the original <form>
- This form must be pointing to memberlist.php via POST method.
- Implement all neccessary JavaScript files for the username selector - or dismiss the auto-select at all. Then create an own <input name="username" ...>.

You can convert all additional search options into a pre-defined value, e.g.
<input type="hidden" name="sort" value="regdate">
<input type="hidden" name="order" value="ascending">

Good luck!

[ExiTuS]
(2022-02-22, 05:42 PM)[ExiTuS] Wrote: [ -> ]You can grab the whole <form> element from Memberlist Search Template and put it into Search Template.
This way you create an independent search form for members and style it individually.
Keep in mind:
- This new <form> must be outside the original <form>
- This form must be pointing to memberlist.php via POST method.
- Implement all neccessary JavaScript files for the username selector  - or dismiss the auto-select at all. Then create an own <input name="username" ...>.

You can convert all additional search options into a pre-defined value, e.g.
<input type="hidden" name="sort" value="regdate">
<input type="hidden" name="order" value="ascending">

Good luck!

[ExiTuS]

No. For example, I want to search for Bill. When I search for Bill and click enter. All users with Bill in their name will show up.
As above, you will need a plugin for it. search.php doesn't search for users, so to have threads/posts and users returned in a single search will require a plugin.
Pages: 1 2