MyBB Codes
[TUT] How to Sort members usernames in memberlist by Name - Printable Version

+- MyBB Codes (http://www.mybbcodes.com)
+-- Forum: Mods Database (/forumdisplay.php?fid=4)
+--- Forum: Tutorials for 1.4.x (/forumdisplay.php?fid=29)
+--- Thread: [TUT] How to Sort members usernames in memberlist by Name (/showthread.php?tid=955)


[TUT] How to Sort members usernames in memberlist by Name - Kevin - 03-27-2010 05:29 AM

By using this Tutorial you can Add Alphabet letters on the top of the memberlist page and you can sort them by alphabet letters.

Go to ACP --> Themes & Templates --> templates --> Desired template --> member_templates --> memberlist

Find This variable:
{$header}

Add after :
<table class="tborder" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" align="center">
<tr align="center">    
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=A">A</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=B">B</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=C">C</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=D">D</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=E">E</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=F">F</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=G">G</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=H">H</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=I">I</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=J">J</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=K">K</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=L">L</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=M">M</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=N">N</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=O">O</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=P">P</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=Q">Q</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=R">R</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=S">S</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=T">T</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=U">U</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=V">V</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=W">W</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=X">X</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=Y">Y</a></td>
  <td class="trow1" width="3%"><a href="{$mybb->settings['bburl']}/memberlist.php?letter=Z">Z</a></td>
</tr>
</table>
<br/>