Login Register






Add search by reputation in memberlist filter_list
Author
Message
Add search by reputation in memberlist #1
Here is a quick and easy tutorial to add the option to search by reputation on the member list page.

1. Open inc/languages/english/memberlist.lang.php

2. Add this code somewhere in the middle. Easier if you follow the others, just place at the bottom of the list or something. Doesn't really matter.
Code:
$l['sort_by_reputation'] = "Sort by: Reputation"; $l['reputation'] = "Reputation";

3. Go to your theme's templates. Find the template "Memberlist" and open it. Once you are in it, find the following code:
Code:
colspan="5"

Change to:
Code:
colspan="6"

Next in the same template find:
Code:
<option value="postnum"{$sort_selected['postnum']}>{$lang->sort_by_posts}</option>

Add the following code after it:
Code:
<option value="reputation"{$sort_selected['reputation']}>{$lang->sort_by_reputation}</option>

Find this code:
Code:
<td class="tcat" width="15%" align="center"><span class="smalltext"><strong>{$lang->lastvisit}</strong></span></td>

And add after it:
Code:
<td class="tcat" width="10%" align="center"><span class="smalltext"><strong>{$lang->reputation}</strong></span></td>

Now you need to go to the template "Memberlist_User" and find:
Code:
<td class="{$alt_bg}" align="center">{$user['lastvisit']}</td>

Then you need to add this after it:
Code:
<td class="{$alt_bg}" align="center">{$user['reputation']}</td>

That is it, it's a very easy thing to do it and is just helpful in the long run.
[Image: 7yW1UHU.jpg]

Reply

RE: Add search by reputation in memberlist #2
Very nice tutorial, and it'll work great if your gonna implement something like this.

Reply

RE: Add search by reputation in memberlist #3
Very nice tutorial and quite informative. Thanks.
[Image: gucNwmx.png]

Reply

RE: Add search by reputation in memberlist #4
Nice tutorial, thanks for sharing!

Reply

RE: Add search by reputation in memberlist #5
I really need to learn PHP, thanks for this man!
[Image: e41e887e66a5f51303a56eafd27ba344.png]

Reply