Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Roster > Replacing World of Warcraft Roster Ranks
Mottie (SuperAdmin) 5/27/2011 6:04 PM EST : Replacing World of Warcraft Roster Ranks
ACK!
Mottie
Posts: 3883

0
Like

0
Dislike

Replacing World of Warcraft Roster Ranks

GuildPortal admin site link to the original post



The following script will replace "Guild Master", "Rank 1", etc with the rank title that you set.

Copy (Ctrl-C) this code and paste (Ctrl-V) it into a free form text/HTML box somewhere on your roster page (make sure you paste it while the editor is in HTML mode () or right click in the editor and select "Paste As Html"), or you can paste this into the footer.

Code
<style type="text/css">
 .aColRnk span.rank { display: none; }
 /* Sorting header */
 th.header {
  background: #222222 url(http://www.axiomfiles.com/Files/278466/sort-white.gif) left center no-repeat;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  text-align:center;
  padding-left: 10px;
  border-right: 1px solid #000000;
 }
 th.headerSortUp { background: #440000 url(http://www.axiomfiles.com/Files/278466/asc-white.gif) left center no-repeat; }
 th.headerSortDown { background: #804000 url(http://www.axiomfiles.com/Files/278466/desc-white.gif) left center no-repeat; }
</style>
<script src="http://www.guildportal.com/Cms/jquery.tablesorter.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
 var r, ranks = [];
 ranks.push (["Guild Master","Warchief"]);
 ranks.push (["Rank 1","Officer"]);
 ranks.push (["Rank 2","Officer Alt"]);
 ranks.push (["Rank 3","Veteran"]);
 ranks.push (["Rank 4","Member"]);
 ranks.push (["Rank 5","Alt"]);
 ranks.push (["Rank 6","Lazy Peon"]);
 ranks.push (["Rank 7","Recruit"]);
 ranks.push (["Rank 8","Inactive"]);
 ranks.push (["Rank 9","Inactive"]);

 $("#tblIntegratedWowRoster").find("td.aColRnk").each(function(){
  for (j=0; j < ranks.length; j++) {
   r = $(this).html();
   if (r.match(ranks[j][0])) {
    $(this).html('<span class="rank">' + j + '</span> ' + r.replace(new RegExp(ranks[j][0],'g'), ranks[j][1]));
   }
  }
 }).end()
 .tablesorter({
  headers : { 4: { sorter: false } }, // ignore icon column
  textExtraction: function(node){ return $(node).text(); },
  sortList: [[5,0],[0,0]] // rank with GM at top, then names column
 });
});
</script>
Customizing
  • Add the corresponding guild rank name (in blue) to the rank number (in green)
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

 
 
Key 
New posts No new posts
New posts ( popular ) No new posts ( popular )
New posts ( sticky ) No new posts ( sticky )
New posts ( locked ) No new posts ( locked )
 
 
Who's Online 
There are   members online.
 
 
So-and-so has logged on!
%title%
%message%