Sinisterly
Add search by reputation in memberlist - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Design (https://sinister.li/Forum-Design)
+--- Forum: Web Design (https://sinister.li/Forum-Web-Design)
+--- Thread: Add search by reputation in memberlist (/Thread-Add-search-by-reputation-in-memberlist)



Add search by reputation in memberlist - Kyou - 02-08-2014

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.


RE: Add search by reputation in memberlist - Sunlight - 02-11-2014

Very nice tutorial, and it'll work great if your gonna implement something like this.


RE: Add search by reputation in memberlist - King - 02-11-2014

Very nice tutorial and quite informative. Thanks.


RE: Add search by reputation in memberlist - Illuminati - 02-17-2014

Nice tutorial, thanks for sharing!


RE: Add search by reputation in memberlist - Skitstep - 02-17-2014

I really need to learn PHP, thanks for this man!