Sign Up! Login: Password: New User? Forgot? Support
Code 
 
 
Forums 
Forums : Archive > WoW Roster XSL & Statistics
Kilorglin (Applicant) 6/15/2010 6:09 AM EST : RE: WoW Roster XSL & Statistics

Kilorglin
Posts: 91

0
Like

0
Dislike

Hi again Mottie

Thanks for your prompt reply. I have changed the code and modified the variable as suggested.
However, I still get a default link to the US armory.
Below is the code I used in the free html widget at the bottom of the page (btw, is there a way to stop the widget from showing on the page?)
Thanks so much 

       Kilorglin

<script type="text/javascript">
$(document).ready(function(){
/* Replace "Rank #" with rank names */
 var replaceRanks = true;
 var ranks = {
  0 : "Guild Leader",
  1 : "Council",
  2 : "Officer",
  3 : "Raider",
  4 : "Member",
  5 : "Alt",
  6 : "New Recruit",
  7 : "Probation"
 };
 /* change this if you are on a non-us server: use eu, cn, kr or tw */
 var serverRegion = "eu";
 
 // ***************************
 // 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); });
  });
 }
})
 
<link type="text/css" href="http://www.axiomfiles.com/Files/258012/wow-roster.css" rel="stylesheet" />
TopBottom

Mottie (SuperAdmin) 6/15/2010 8:04 AM EST : RE: WoW Roster XSL & Statistics
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Kilorglin!

I apologize, I left out the closing script tag in the code on my help site, but it was correct in the admin forums. So just add this "</script>" above the <link> tag at the very bottom and it should start working properly - I've fixed the code in the post as well.

To hide your code box, check out this post.
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Kilorglin (Applicant) 6/15/2010 9:13 AM EST : RE: WoW Roster XSL & Statistics

Kilorglin
Posts: 91

0
Like

0
Dislike

Thanks a lot. It now works perfectly !
Sorry for the hasle: it's such an obvious change... At least for someone as qualified as you (not my case at all
Best
TopBottom

Dethmaul (Member) 7/28/2010 3:01 PM EST : RE: WoW Roster XSL & Statistics
Dethmaul
Posts: 987

0
Like

0
Dislike

Mottie,
Thanks for all you do. Quick question. I don't like the way the roster is sorted, it is sorting by Achievement Points by deafault, is there any way to have it sort by level or class?
TopBottom

Mottie (SuperAdmin) 7/28/2010 4:25 PM EST : RE: WoW Roster XSL & Statistics
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Dethmaul said:
Mottie,
Thanks for all you do. Quick question. I don't like the way the roster is sorted, it is sorting by Achievement Points by deafault, is there any way to have it sort by level or class?


Hi Dethmaul!

I'll have to look into it... it's not yet set up to let you change it just yet
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Mottie (SuperAdmin) 7/29/2010 10:51 AM EST : RE: WoW Roster XSL & Statistics
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Dethmaul!

Ok, 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).
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Dethmaul (Member) 8/5/2010 2:48 PM EST : RE: WoW Roster XSL & Statistics
Dethmaul
Posts: 987

0
Like

0
Dislike

That worked like a charm, thank you.
TopBottom

Enniewan (Applicant) 11/18/2010 6:56 AM EST : RE: WoW Roster XSL & Statistics

Enniewan
Posts: 509

0
Like

0
Dislike

Dear Mottie,

Our guild is in it's 5th year of existence and we have always used Guildportal for as long as we have had a guild site. Thanks to your help site I've been able to spice the site up and I'm really grateful for all your effort. Recently I wanted to use your model for an altered roster with guild statistics but I just cant get it to show up the way I like it. I don't get the statistics and none of the extra roster features. Could you please advise me what is wrong in the code?

I tried posting the code but your site doesn't accept it. 
The page can be found here: http://www.guildportal.com/Guild.aspx?GuildID=151548&TabID=1946194

I would really appreciate your help with this.

Then I have another favor to ask if I may. With Cataclysm on our doorstep we want to make sure that we can raid again asap, so we put incentives on getting level 85 (and also for ppl that help get the guild perks). Since I use Guild Portal Synch it would be nice if we could have a gadget with the graphic representation of the position of the top-10 guildies in the race towards level 85. I would like beneath each other 10 bars with a player name and the space behind devided from 80 to 85 and then as far as that player is filled with a color, the fastest leveler at the top. I have looked for weeks, checked sites for data mining the armory like http://eis-blog.ucsc.edu/2010/04/mining-the-world-of-warcraft-armory/http://perl.about.com/od/packagesmodules/qt/perl_wow.htm and http://www.crunchywow.com/blog/2010/07/25/understanding-world-of-warcraft-armory-api/. But I'm not skilled in Perl or API's and such and as a 56 yo woman it's a steep learning curve that will not get me the result in time, if at all. Furthermore I think this is usefull for other guilds too and maybe you sympathise with the goal)

Sorry to trouble you with all this. I really hope you can help and if not, I understand.

Enniewan
TopBottom

Mottie (SuperAdmin) 11/18/2010 9:32 AM EST : RE: WoW Roster XSL & Statistics
ACK!
Mottie
Posts: 3884

0
Like

0
Dislike

Hi Enniewan!

It appears you are missing a few commas in the roster code (in red):
$(document).ready(function(){
$('#wowroster').wowrosterxsl({
 wowMaxLevel : 85,
 serverRegion : 'eu',
 addAutoRoster : true,
 includeDKP  : false,
 showStatistics : true,
 includeNotes : true,
 replaceRanks : true // set to false by default; ranks values below show the default settings
  ranks : {
   0 : "Guildleider",
   1 : "Bank",
   2 : "Officier",
   3 : "RL",
   4 : "nacht team",
   5 : "avond team",
   6 : "reserve raiders",
   7 : "vanilla",
   8 : "Strafbank",
   9 : "Aspirant"
  }
})
})
Would sorting the roster table so the highest level is on top work? Or did you want a separate widget with that information? I'm not sure how to determine the fastest leveler other than their actual level. I don't think the armory provides the actual XP or total XP of that level.

Also, it looks like you could use some help straightening out your site - you kicked my OCD into overdrive... so, if you make me an admin I'll take care of it for you
Characters: Mottie Motty Mortie Ooshiny Mot Fudgems
TopBottom

Enniewan (Applicant) 11/18/2010 9:53 AM EST : RE: WoW Roster XSL & Statistics

Enniewan
Posts: 509

0
Like

0
Dislike

Hi Mottie,

Thanks for your speedy reply I've added the comma's. Playing around with the code makes you blind for mistakes after a while I guess. But the statistics still don't show and I would like the Guildportal features like medals and mail to show too .... No medals rewarded yet but those will be part of the incentives in Cataclysm as rewards for the effort guildies make for the guild. 

I would very much like the race to 85 in the guild to be a separate gadget to be placed on the home page, if that's not too much work.

Great that you want to help me clean up and you're very welcome to become super admin. (But I still want to learn from my mistakes too.)

/cheer

Enniewan
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%