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
Mottie (MVP) 6/3/2010 3:10 PM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

I've updated the code and the post above...
  • Moved the code to an external file
  • Added options to include data from the WoW Auto Roster and/or the default GuildPortal roster.
  • Updated the CSS and XSL files as well (no need to do anything if you are using my copy).
TopBottom

Mottie (MVP) 6/11/2010 5:22 PM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Added a "serverRegion" variable to fix the character armory links... I tried to do this inside the XSL, but sadly the XML does not contain the armory URL, so you'll have to set this manually.
TopBottom

baskickmy (New Admin) 7/7/2010 1:39 PM EST : RE: WoW Roster XSL & Statistics
baskickmy
Posts: 6
Getting Started!

We have 10 diffrent ranks so i tried to edit it like this

<script type="text/javascript">
$(document).ready(function(){
/* Replace "Rank #" with rank names */
 var replaceRanks = true;
 var ranks = {
  0 : "Guild Leader",
  1 : "Dragon rider",
  2 : "veteran",
  3 : "dismemberd",
  4 : "blood lt",
  5 : "dragons blood ",
  6 : "general",
  7 : "dragonkin"
  8 : "hatchling"
  9 : "egg"
 };
 /* change this if you are on a non-us server: use eu, cn, kr or tw */
 var serverRegion = "us";
 
 // ***************************
 // Don't Change Anything Below
 // ***************************
 var n, t, roster = $('#wowroster');
 if (replaceRanks) {
  roster.find('.wowRank').each(function(){
   n = parseInt( $(this).find('span').text().replace(/Rank /,''), 10);
   $(this).find('span').hide().after( ranks[n] );
  })
 }
 if (serverRegion != 'us') {
  roster.find('.wowName').each(function(){
   $(this).find('a').attr('href', function(i,a){ return a.replace(/www/, serverRegion); });
  });
 }
})
</script>


but this wont work and shows me the rank number, please help
TopBottom

Mottie (MVP) 7/7/2010 5:30 PM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Hi Baskickmy!

It looks like you are missing commas after #7 and #8... don't add one to #9. Try that
TopBottom

baskickmy (New Admin) 7/20/2010 3:54 PM EST : RE: WoW Roster XSL & Statistics
baskickmy
Posts: 6
Getting Started!

thank you so much !

Keep up the good work,
TopBottom

Mottie (MVP) 7/29/2010 10:59 AM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Dethmaul asked me on my forums to allow changing the default sort order of the roster... I played around with this and it was causing me trouble when I tried to add it into the script. So I think the easiest solution would be to just add this bit of code (under the "CODE TO RESORT THE ROSTER") to the end of the existing code.

Code
<script type="text/javascript" src="http://www.axiomfiles.com/Files/258012/wow-roster-xsl.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
 $('#wowroster').wowrosterxsl({
  replaceRanks : true, // set to false by default; ranks values below show the default settings
  ranks : {
   0 : "
Guild Leader",
   1 : "
Council",
   2 : "
Officer",
   3 : "
Veteran",
   4 : "
Member",
   5 : "
Alt",
   6 : "
New Recruit",
   7 : "
Probation"
  }
 })
})

// CODE TO RESORT THE ROSTER
$(window).load(function(){
 $('#wowroster').tablesorter({ sortList: [
[3,1], [0,0] ] });
})
</script>


Sort Order
  • The bracketed numbers in red set the sort order of the roster.
  • The GPUser column is actually hidden if you don't use it, so it is column #1. That's why the [3,1] code above targets the Level column

     0
     1 
     2
     3 
     4 
     5 
     6 
     7
     8
     9 
     10 
     Name  GPUser
     AP 
     Level 
     Race
     Class 
     Rank 
    Weekly XP
    Lifetime XP
    Notes 
     DKP 

  • The blocks of numbers tell the tablesorter script which column and the sort direction:

    [ [columnIndex, sortDirection], ... ]

    columnIndex is the column number (see above).
    sortDirection is 0 for Ascending and 1 for Descending.
    , ... shows that you can optionally sort multiple columns by adding more blocks, separated by commas.

  • So, the block [3,1], [0,0] tells the tablesorter to sort:

    • [3,1] : The Level column in a descending order (highest number first)
    • [0,0] : The Name column in ascending order (A at the top, Z at the bottom).
TopBottom

Mottie (MVP) 1/25/2011 9:38 AM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Updated to use Axho's WoW Roster Feed.
TopBottom

Powerwordhug (New Admin) 4/13/2011 10:17 AM EST : RE: WoW Roster XSL & Statistics
Powerwordhug
Posts: 74
Posts With Wolves

Sorry to be a pain but I can't seem to get it to show my entire guild roster and the lowest level being lvl 71 <--- It wouldn't show chars lower then level 71 ^^

It also makes the statistical aspect of this roster incorrect pointless if it only shows high levels.
TopBottom

Mottie (MVP) 4/13/2011 11:39 AM EST : RE: WoW Roster XSL & Statistics
GuildPortal MVP
Mottie
Posts: 3883
Zomgawsh Poster

Are you using the XSL roster? Do you you want the statistics to start from level 71? I haven't been paying attention to the status of Axho's site since it seems to be up and down all the time.
TopBottom

Powerwordhug (New Admin) 4/13/2011 12:10 PM EST : RE: WoW Roster XSL & Statistics
Powerwordhug
Posts: 74
Posts With Wolves

hiya

No I would love the roster to show every member in guild.  including the low levels not just part of total members.


Have I fuxored up by missing some crucial part that limits the displaying of the roster?   does it show only a certain amount from highest level down so that if you have enough high level members it will never show the low level ones?

I honestly don't know how it works, but from looking at other peoples rosters I don't see low level chars either 
TopBottom

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