Sign Up! Login: Password: New User? Forgot? Support
Top Mods!
Wowhead Search
by sonofsamedi
Digital Clock
by Wolfar15
Admin Forums
Welcome to the GuildPortal Help Community! These forums are for admin-to-admin help.
Available Forums
Forums : Pimp My Site! > Replacing WoW Roster Ranks
Mottie (MVP) 12/31/2008 9:15 AM EST : Replacing WoW Roster Ranks
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Replacing World of Warcraft Roster Ranks



The following script replacing the "Rank 0" 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)
TopBottom

Extell (New Admin) 12/31/2008 7:07 PM EST : RE: Replacing WoW Roster Ranks
Extell
Posts: 347
Fingers of Fury!

That is really nice!
Question about it....will it still sort by the rank number? Or will it begin sorting alphabetically?
TopBottom

Mottie (MVP) 12/31/2008 8:11 PM EST : RE: Replacing WoW Roster Ranks
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Sorry, but it will sort by rank number since this script makes the changes after the page is loaded.
TopBottom

Avandius (New Admin) 1/2/2009 6:24 AM EST : RE: Replacing WoW Roster Ranks
Avandius
Posts: 337
Fingers of Fury!

Awesome, nice addition Mottie.
TopBottom

Extell (New Admin) 1/5/2009 5:40 AM EST : RE: Replacing WoW Roster Ranks
Extell
Posts: 347
Fingers of Fury!

Mottie said:
Sorry, but it will sort by rank number since this script makes the changes after the page is loaded.


No needed there....that means its perfect. (Was what I was hoping it would do)
TopBottom

Aggrehstix (New Admin) 4/2/2010 2:15 PM EST : RE: Replacing WoW Roster Ranks
Aggrehstix
Posts: 182
Posts With Wolves

It is not sorting by rank for me.  i tried placing in an html on the roster page and in the footer.  I changed the name in blue to match identically with what my guild roster rank titles are.  No luck on getting it to auto sort with gm at the top and it decreasing in rank as it goes down the page.
TopBottom

Mottie (MVP) 4/2/2010 3:43 PM EST : RE: Replacing WoW Roster Ranks
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Aggrehstix!

This script is outdated. I wrote it way back when the guildhelper addon provided rank numbers instead of names. You should be able to sort the rank column just by clicking on the "Rank" in the header.
TopBottom

Aggrehstix (New Admin) 4/2/2010 5:18 PM EST : RE: Replacing WoW Roster Ranks
Aggrehstix
Posts: 182
Posts With Wolves

I would like my default sort not to be alpha but instead I want it to be sorted by Rank starting with GM at the top.

Is this not possible with any code?

I'll pay for the code if I need to.

Also you have helped me tons on here is there any kind of tip jar or donation area?

I support your site by purchasing the top end product you provide but I'd like to contribute more.
TopBottom

Mottie (MVP) 4/3/2010 1:04 AM EST : RE: Replacing WoW Roster Ranks
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Aggrehstix!

It may be possible with a custom sort, but it would make it easier if you made your roster page public so I could see/test the script with your other guild rank names.

I don't work for GuildPortal, but I've never asked for any tips... donate something to your local charity and I'll be happy
TopBottom

Aggrehstix (New Admin) 4/3/2010 11:21 AM EST : RE: Replacing WoW Roster Ranks
Aggrehstix
Posts: 182
Posts With Wolves

Well I think you should work for GP lol.  Cuz you're awesome.  And I made my member section public access now.

www.latecrew.guildportal.com

Thank you again.
TopBottom

Admins Online
There are   members online.
So-and-so has logged on!
%title%
%message%