GuildPortal admin site link to the original postUpdated to work with Axho's WoW Feeds. If you already had this set up on your site, all you need to do is change the feed url (XML File URL) I've added a demo of it in action in my Roster tab. Basically, I put this script together to grab the most current guild information directly from Axho's WoW Feeds. It also has an additional widget you could add to show the guild statistics.

Script: If you are only going to use the WoW Roster, but you want to replace the rank number with names, add this script to a Free Form Text/HTML widget anywhere on the same page. Or if you can add this script to the Footer Area (Control Panel > Custom HTML & Script > Footer Area) or into the Custom Javascript/JQuery area (Control Panel > Custom HTML & Script > Custom Javascript/JQuery > Additional Functions tab). Make sure you check "Enabled?" before clicking [ Save ].

The code to change the initial sort order of the roster is found below the "// CODE TO RESORT THE ROSTER" comment in the code.

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).

CSS:

Add the Following stylesheet tag to a Free Form Text/HTML widget on the same page as your Roster (this CSS file includes CSS for the statistics script)

Or if you want to customize the colors, add the following to your Custom CSS ("Full Custom CSS" tab if you are using that, or "CSS Additions to Standard" tab if you are using only the Control panel to style your site).

Hopefully I commented the CSS well enough that you should be able to modify the Roster style. But there are a few notes:

To hide the class and roster text:

Add "text-indent: -99999em;" to that line.

Remove "padding-left" definition.

Then it might look better to have all of these images centered. Notice how the "20px" in ".wowClass-1", ".wowClass-2", etc and ".wowRace1-0", ".wowRace1-1", etc are highlighted in red? Yeah there are a lot of em, but to center the icon, you'll need to change the "20px" to "center".

Table sort arrows - To change the icons color from white to black, just change the file name "white" to "black". For example, change "asc-white.gif" to "asc-black.gif".

Guild Roster & Statistics

The statistics script will only work with the Roster XML/XSL Transformation widget, since it gets its information from there. In addition, this roster will grab data from the WoW Auto Roster (Character info popups, Guild Notes & DKP info) and/or Default GuildPortal Roster (GP User info). I also decided to move all the script into an external file as the script was getting unwieldly.

Add Roster: Add the XML/XSL Transformation widget as described above, but don't set up the CSS just yet.

The code above will run without any customization and show your guild roster. But there are a bunch of options I've included so you can customize it to your liking. The way the function works is you. Options are added as follows:

** NOTE ** the last "key: value" pair should NOT be followed by a comma or IE will go ballistic and bite your leg.

$('#wowroster')

This points to the "<table id="wowroster"></table>" (in light orange) seen in the code above. Note that selectors that point to an ID will begin with a hash sign "#".

wowrosterxsl({})

wowrosterxsl is the name of the function that enhances the wowroster table made from the XSL script. When putting this together with the $('#wowroster') above, make sure there is a period separating them.

key : value

This is called a key:value pair. The key is the name of the variable and the value is well, the value. For example, if I added someone named John Smith to my address book, I would look in my book and find "Last Name" and enter "Smith". Last name is the key and Smith is the value. Below is the list of key : value pairs that are recognized by this script, anything more will just be ignored.

All of the options

Key

Value (default shown)

Description

wowMaxLevel

80

Change the max level to show on the level breakdown graph (to 85 after the next expansion is released)

showStatistics

true

Set to false to hide the entire guild statistics block

replaceRanks

false

Set to true to get the "ranks" value and replace the "Rank 0", "Rank 1", etc in the Rank column

This adds information from the WoW Auto Roster, which includes the character popup, mail/blog links and medals); but hides the DKP column - this requires that the WoW Auto Roster widget is on the same page and populated with data from the GP Helper addon.

This adds information from the WoW Auto Roster (character popup, mail/blog links and medals without the notes) & the default GP Roster widget (GP User) - this requires that the WoW Auto Roster widget and default GP Roster widget is on the same page and populated with data from the GP Helper addon)

As stated, this replaces the "Rank 0", "Rank 1", etc with the rank names you add.

Customize CSS

There is more CSS than what is just listed above in the "Guild Roster Only" section. To see it all, view the css file here.

It would be possible to load the CSS file as listed in the code above, then add CSS to override the properties in the file, if added below the <link> tag, instead of copying the entire CSS file and modifying it, like this:

If you want to hide the WoW Auto Roster and/or Default GP roster, add the last line of CSS above.

Edit (6/2/2010): Modified Class color CSS to prevent being over-ridden by default CSS ( I use custom CSS, so I didn't notice ) Edit (6/3/2010): Modified the script to gather information from other roster widgets, then moved the script to an external file (made it a plugin) and changed the instructions above to match. Edit (6/11/2010): Added server regions variable. Edit (1/25/2011): Updated XSL, javascript and css to work with Axho's WoW feeds and included the new races. Edit (2/1/2011): Merged resort roster code into this main post. Edit (3/14/2011): Changed script to resort the table.

This topic was moved from forum WoW to forum Archive on 4/17/2013 10:04 AM by Mottie.

This seems to be working for free sites because I'm able to post them on our site. However I can't seem to get the roster to post class colors instead it gets styled like the rest of my page. However it does work and I love the race and level stats very cool! Thank you.

Wow, I didn't know the XML/XSL Transformation widget was now available to free sites... cool!

Anyway, I discovered the problem. The control panel was over-riding the class colors, so I've updated the css file and the post above. Just add ".wowName" in front of each '.wowClassColor-#' with no space, like so:

I would like to add something like this to my guild website, However my guild has around 150 characters in it. Most of these characters are Alts or lower ranks. Would it be possible to filter the characters shown based on guild rank? For example, only show characters with a rank "raider" or greater.

Wow, I didn't know the XML/XSL Transformation widget was now available to free sites... cool!

Anyway, I discovered the problem. The control panel was over-riding the class colors, so I've updated the css file and the post above. Just add ".wowName" in front of each '.wowClassColor-#' with no space, like so:

If you are adding the roster with statistics, then the script must go into a free form text/HTML type widget on the same page as the roster. If you are adding only the roster, then the script can go into a free form text/HTML widget on the same page, into the footer area or Custom javascript/jquery area.

Hello Mottie thanks again for all the hard work. It is my first guild site and your tips have been great. I am on a EU server and the roster shows fine. The problem is guild members names URLs which link to Us server, thus returning a broken page. I just cannot find a solution to this problem (even on the forums). Thanks

I spent some time today trying to figure out how to get the server region automatically in the XSL. Blizzard in all their wisdom left out the region code in the XML. So finding no automatic alternative, I had to add a "serverRegion" parameter in the script which updates the character armory links.

If your tooltips are not working or only show gibberish (raw HTML) then you are most likely missing the updated tooltip script. Add the following to your Footer Area (Control Panel > Custom HTML & Scripts > Footer Area)