Posted by Ben on 27th January 2010

WoW Guild Retrieve

This is the home of the WoW Guild Retrieve plugin for WordPress. It requires WordPress v2.8 or later.

You can get it here: http://wordpress.org/extend/plugins/wow-guild-retrieve/

You have the following options when entering the shortcode:

realmname – The name of your guild’s realm. This is required.

guildname – Your guild’s name. This is required.

region – Set to “eu” if your guild is European.

restrict – Set to “true” if you want to restrict the list to level 80 only.

sorttype – This is the column number you want to sort on by default.

sortorder – Set this to either “asc” for ascending or “desc” for descending order.

tablesize – This is the default number of rows that will be shown in the table per page.

Also, you can change the names of the ranks displayed. Right now you need to go into the wow-guild.php file, go to line 146 (near the bottom), and change the rank names to suit your guild. An easier method is planned for the next release. To add new rank names, copy two lines starting with } elseif … and ending with $rank = … and paste them before the line that starts } else {, then change as above, making sure to increase the number in the elseif statement.

At this time, custom names are universal, so if you have multiple guild rosters on one website they will all have the same rank names.


This example is restricted to level 80 only:

Remedy

140 members

NameRaceClassLevelRank
BliyssOrcShaman80Rank 8
DyressiBloodElfPaladin80Guild Leader
IthakaTaurenDruid80Lieutenant
CerebùsTaurenDeathKnight80Rank 8
FalleciaBloodElfPriest80Rank 4
TrakkeBloodElfHunter80Rank 5
UsirisBloodElfPaladin80Rank 8
KirranaBloodElfPaladin80Rank 4
BwndOrcDeathKnight80Rank 8
DominusOrcHunter80Captain
KirralaBloodElfDeathKnight80Rank 7
FlooritUndeadWarrior80Rank 4
SnickabOrcShaman80Rank 8
GobbletUndeadRogue80Rank 4
DrakedøgUndeadWarlock80Rank 8
SlifTaurenShaman80Rank 7
WurstumpTaurenDruid80Rank 7
XzulOrcDeathKnight80Captain
PalkOrcHunter80Lieutenant
SortmagiBloodElfPriest80Rank 7
MyzeryOrcWarrior80Rank 4
ZaharahBloodElfPaladin80Rank 7
SlifurTaurenDruid80Rank 7
NazunaBloodElfPaladin80Rank 5
NoizytribeBloodElfWarlock80Lieutenant
EisenstahlOrcWarrior80Rank 8
MalghanUndeadMage80Rank 8
TanthusBloodElfPaladin80Rank 4
SilenzeUndeadRogue80Rank 8
UnholyvarthUndeadPriest80Rank 7
RikåBloodElfWarlock80Rank 7
AntreriTaurenShaman80Rank 4
MunchenTaurenDruid80Rank 4
SundershockTaurenWarrior80Rank 7
RækwønTrollShaman80Rank 4
GreshurmTaurenDruid80Rank 7
KümatoraUndeadRogue80Rank 7
BojacsBloodElfPaladin80Rank 8
EddiemoneyTrollHunter80Rank 8
SliferothBloodElfDeathKnight80Rank 7
BorgrosTaurenDruid80Rank 8
AmericiumBloodElfMage80Rank 7
LarrathOrcHunter80Rank 8
VormovliteUndeadPriest80Rank 7
DiamonddustBloodElfMage80Rank 7
TyriáBloodElfPriest80Lieutenant
RhymezBloodElfRogue80Rank 8
VairëBloodElfRogue80Rank 7
ArtholasOrcDeathKnight80Rank 4
DyressïBloodElfMage80Lieutenant
RanvierBloodElfPaladin80Rank 7
SpedhuntaTrollRogue80Rank 8
LayleeBloodElfRogue80Rank 7
BendownOrcWarrior80Rank 7
MiasmaBloodElfDeathKnight80Rank 8
DrewflyboyUndeadRogue80Rank 7
QuogarTaurenWarrior80Rank 8
VormovUndeadRogue80Rank 7
VarthftwTaurenDruid80Rank 4
SyrrahBloodElfPriest80Rank 8
SimulacrumOrcWarlock80Rank 4
OgrimOrcShaman80Rank 7
MunkenOrcHunter80Rank 7
NhyxBloodElfMage80Rank 7
ScrowtesUndeadRogue80Lieutenant
IcyhawttTrollMage80Rank 4
AcallysBloodElfPriest80Captain
HolywrathftwBloodElfPaladin80Rank 7
GrangierUndeadDeathKnight80Rank 8
BubbleagentBloodElfPaladin80Rank 5
RîkåBloodElfPriest80Rank 7
RikachånOrcWarrior80Rank 7
IrreplacableBloodElfPriest80Rank 8
SugekníghtOrcDeathKnight80Rank 7
JasongomezTaurenDruid80Rank 8
NexousOrcWarlock80Member
OromëOrcWarrior80Rank 8
HtarralOrcWarrior80Rank 8
PiglipsTrollWarrior80Rank 8
SlimiTaurenDruid80Lieutenant
RikachanBloodElfRogue80Rank 4
MunchanBloodElfWarlock80Rank 7
ShocktwoTaurenShaman80Rank 7
DeedlightBloodElfRogue80Lieutenant
SliferUndeadWarlock80Rank 4
VazgorUndeadRogue80Rank 7
IntreriBloodElfPaladin80Rank 7
ÅshbringerBloodElfPaladin80Rank 8
FenrixBloodElfPaladin80Rank 7
KirrahBloodElfMage80Rank 7
ShockoneTaurenShaman80Rank 4
BrudrustOrcShaman80Rank 8
GlowBloodElfPriest80Lieutenant
ThirummTaurenDruid80Rank 7
SyllacaBloodElfDeathKnight80Lieutenant
BermusTaurenDruid80Rank 8
WìnterBloodElfDeathKnight80Lieutenant
NatelleTrollHunter80Rank 7
VardisTaurenWarrior80Lieutenant
MystikalTrollPriest80Rank 4
DimeonTrollDeathKnight80Rank 8
PieceofashTaurenDruid80Rank 7
BloodmenaceBloodElfHunter80Rank 8
MarsmanviBloodElfMage80Rank 8
DeathftwTaurenDeathKnight80Rank 7
ChoocheOrcHunter80Rank 4
ScrowtussTaurenWarrior80Captain
MaggzBloodElfPaladin80Rank 4
ShockthreeTaurenShaman80Rank 7
IelláTrollShaman80Lieutenant
VanthilBloodElfPaladin80Lieutenant
TetheallaTrollPriest80Captain
TheboogygirlTrollShaman80Lieutenant
BendrewTrollMage80Rank 4
AnvorxTrollHunter80Rank 7
EstëTaurenDruid80Lieutenant
BanezeroUndeadMage80Lieutenant
NatasìBloodElfPaladin80Lieutenant
PriesticideBloodElfPriest80Rank 8
RagebarTaurenWarrior80Rank 7
XanthoriaBloodElfPaladin80Rank 8
SyalBloodElfHunter80Lieutenant
BearyTaurenDruid80Lieutenant

…and this example is sorting by rank (column 4) and displaying 15 rows instead of 10 by default:

Death from Below

19 members

NameRaceClassLevelRank
UeshibaOrcWarrior45Rank 8
VelithiceBloodElfDeathKnight58Rank 7
VendelUndeadMage70Rank 6
VindsvalTaurenWarrior71Rank 6
BrominBloodElfHunter74Rank 6
BlazingrunesOrcDeathKnight71Rank 8
ZamoyraBloodElfDeathKnight56Rank 7
KemosabeTaurenDruid23Rank 8
BrucewillisTrollHunter80Rank 6
OradeBloodElfPaladin41Rank 7
HateraidzUndeadWarrior30Rank 7
BarceOrcHunter78Rank 8
RaeannaBloodElfDeathKnight80Rank 6
BecmacdeTaurenDruid51Rank 7
BigpiecekeisBloodElfWarlock80Rank 6
LomminarUndeadDeathKnight67Rank 8
GiruneTaurenDeathKnight60Rank 7
FlamingcosmoBloodElfPaladin21Rank 8
ZookerTrollShaman70Rank 6

    60 Responses

  1. Great plugin, 1.0 is a beautiful thing.

  2. Joachim says:

    Hi! Relly nice plug-in.
    BUT, is there any way of changing “Rank 0″, “Rank 1″ etc? I would like to put in “Guild Master” “Officer” and so on.
    Everything else is great. =)

  3. @JOAHCHIM: I was just thinking the same thing. If you feel comfortable editing the plugin, there is an “IF” statement about halfway through. Modifying this should allow you to specify if Rank = 1 then Rank = Guild Master etc… I haven’t yet done this, but will be trying later today after work.

  4. @JOAHCHIM: I just edited my own, it wasn’t much work. Find the line that references if ($character[RANKID] or something along those lines. Replace that with something along the lines of:

    $rankid = $character["RANK"];
    if ($rankid == ’0′) { $rank = “Battle Leader”;
    } elseif ($rankid == ’1′) { $rank = “Battle Officer”;
    } elseif ($rankid == ’2′) { $rank = “Battle NCO”;
    } elseif ($rankid == ’3′) { $rank = “New Comer”;
    } else { $rank = “Rank ” . $character["RANK"]; }

  5. Ben says:

    I’ll see if I can include a way to use custom rank titles in the next release. In the mean time, Tony’s suggestion works well.

  6. Joachim says:

    @ANTHONY: Hi again, thank you for your help, but I didnt get it to work at all (FATAL ERROR). I’m not really in to this with php, and scripting etc, so. Would you mind paste it again + the line above, and the line under, so I can adjust to where it actually should be. Hope you understand my question.

  7. This is what mine looks like:

    $classimg = ‘class-’ . $class . ‘.png’;

    $rankid = $character["RANK"];
    if ($rankid == ’0′) { $rank = “Battle Leader”;
    } elseif ($rankid == ’1′) { $rank = “Battle Officer”;
    } elseif ($rankid == ’2′) { $rank = “Battle NCO”;
    } elseif ($rankid == ’3′) { $rank = “Alt”;
    } elseif ($rankid == ’4′) { $rank = “Initiate”;
    } else { $rank = “Rank ” . $character["RANK"]; }

    if (($restrict == ‘true’ AND $character["LEVEL"] == ’80′) OR ($restrict == ‘false’)){

  8. Joachim says:

    I copied this and pasted exact like yours, but still:
    “Parse error: syntax error, unexpected T_STRING in …wow-guild.php on line 128″

  9. Andreas says:

    HI..thx for that winderful plugin.

    Is there a way to open links for armory in a new window, istead of leaving the page.

    When you click on a member in the roster display..it takes you to armory in the same window therefore leaving the guildwebsite. But I would like to open the armory in a new window, so that people are not leaving the website.

    Thx,

    Andy

  10. Sebastien says:

    Great plugin ! Almost perfect. ;)
    Thanks for sharing this little pearl.

  11. Lucey says:

    I love this plugin first of all, so easy to install and use. However, I did see the gripes some people have with it not showing pictures and not letting you change the rankings and such. The fixes for those:

    Look in the wow-guild-retrieve/wow-guild.php file for /wp-content/plugins/wow-guild-retrieve/images/. Add your website to the beginning of that. It would look roughly like, http://www.mysite.com/wp-content/plugins/wow-guild-retrieve/images/. That should fix that for you.

    Secondly, if you copied and pasted the
    $rankid = $character["RANK"];
    if ($rankid == ‘0′) { $rank = “Battle Leader”;
    } elseif ($rankid == ‘1′) { $rank = “Battle Officer”;
    } elseif ($rankid == ‘2′) { $rank = “Battle NCO”;
    } elseif ($rankid == ‘3′) { $rank = “New Comer”;
    } else { $rank = “Rank ” . $character["RANK"]; }
    and it didn’t work, its because they have the ‘ ‘ and the ” ” messed up now due to the font that this site uses, change those to the standard ones on your php file and it should work now. The unexpected T_STRING error is almost always because it doesn’t have a ; or a ‘ or a “. Check those.

    Thanks again for the awesome plugin.

  12. Hi, I found and like your plugin but do not manage to get the nice odd/even effect on the table lines working. It looks like the default css is loaded but something must do wrong. Feel free to look at http://www.cube-arygos.de/mitgliederinfo/

    Thanks for your help

    • Ben says:

      Hi Alexander! If you want to add an odd/even effect to your roster table, add lines like this to your own css file: tr.even{background:#555;} tr.odd{background:#333;}

  13. Why isn’t mine column sort type not working?

    [wgr guildname="extreme torment" realmname="chamber of aspects" region="eu" sorttype="4" sortorder="desc" restrict="true"]

    no matter what i change, 0, 1, 2, 3 or 4, asc or desc… it doesn’t do a thing.

    Strange thing is that I’ve tested this out once, and it worked than… so either it’s me cause it’s sunday =) or there is something wrong? Please let me know!

    thanks!

  14. Ben says:

    Paul,

    The dataTable javascript is not running on your website, which is why there is no sorting. It looks like there might be a conflict somewhere with your other javascript.

    Try disabling your other javascript files (superfish, validate, etc.) and see if the sorting works then. If you can find out which javascript is causing a conflict with dataTable, I’ll try and fix it in my plugin.

  15. Thanks Ben,

    Ill try an figure it out, and let you know.

    Thanks!

  16. Hi Ben,

    It’s in jQuery 1.2.6. I use this .js for the slider on the main page. But since I don’t need it on the roster page this will work just as fine as a blueberry muffin!

    I subscribed to your rss, hoping you will be making more cool wp-wow-plugings!

  17. Ben says:

    Good to know, thank you Paul.

    I do have a new plugin in the works, but I’m not going to release any details about it just yet. ;)

  18. Kazia says:

    First off, great plugin.

    I’ve managed to get it to display the custom rank names – however is there a way to keep the sort non-alphabetical? IE. When sorting by rank, keep Guild Leader 0, Officers, 1, and so on so it’s sorted by rank hierarchy not alphabetical?

    Thanks!

  19. Ben says:

    Kazia,

    Unfortunately, the way the plugin sorts the table makes it extraordinarily difficult to sort ranks hierarchically.

    I’ll keep the idea in my notebook, though, and see if I can come up with a way to circumvent the problem.

  20. Kazia says:

    Oh well! Thanks for the quick response! I’ll just go alpha by name for now.

    You said you wanted to know if any other scripts are interrupting the plugin or interrupting others. I have a superfish menu on my theme and the roster works fine – but the menu is disabled on the roster page. Not a big deal, just letting you know.

  21. Pal says:

    For some odd reason its not working anymore for EU realms? I’ve tried several times using various guild/server combinations. When i try US guilds, it still pops up like it should.

  22. Ben says:

    Pal, you’re right. I’ll look into what the problem might be. It might just be a temporary thing, some change that Blizzard made… but I’ll investigate.

  23. Pal says:

    Thanks for the quick response Ben! I just recently found your plugin, and i love it :)

  24. Vilmand says:

    Hello i have just downloaded the plugin and it works great but there is no images???

    • Ben says:

      Hi Vilmand,

      The plugin expects your WordPress installation to be in the root directory (e.g., http://vilmand.wep.dk instead of vilmand.wep.dk/wordpress). To fix this, go to line 77 of the plugin .php file and change

      $content .= ‘<img src="/wp-content/plugins/

      to

      $content .= '<img src="/wordpress/cp-content/plugins/

  25. Vilmand says:

    Hello Ben i try this but it only bring one of the images. the horde images on the top but not the race and class images how do i do that ?
    Sorry my bad english

    • Ben says:

      Line 136 also needs to be changed – there are a number of “/wp-content…” URLs there, all you need to do is add “/wordpress” before “/wp-content.”

  26. Vilmand says:

    Helle again Ben thanks for your answer i got it work now

  27. Paladium says:

    hi,

    great work, but actually I’m stuck…. would you please kindly give me some advice ?

    here is the message I got :

    Warning: Invalid argument supplied for foreach() in /home/privatelounge/privatelab/socnet/wow_afd/wp-content/plugins/wow-guild-retrieve/wow-guild.php on line 90
    members

    the page link is : http://www.azerothfordummies.com/beta/

    a bunch of thanks in advance !!

  28. Paladium says:

    very sorry Pal, it works !! I was wrong…. thanks for this great plugin !!

  29. Paladium says:

    ok sorry, serious question this time : what about if I want the default display to be upper than 10 members ?

    thanks !!

  30. Ben says:

    If you mean level higher than 10, that’s not in the plugin yet. If you need that feature, I can add it, however.

  31. mattoo says:

    thanks for your answer.

    no actually I meant that by default only 10 members are displayed per page, and I was telling me that 25 by default would be more comfortable…

  32. Jaxom says:

    I tried tony’s

    if ($rankid == ‘0′) { $rank = “Battle Leader”;
    } elseif ($rankid == ‘1′) { $rank = “Battle Officer”;
    } elseif ($rankid == ‘2′) { $rank = “Battle NCO”;
    } elseif ($rankid == ‘3′) { $rank = “New Comer”;
    } else { $rank = “Rank ” . $character["RANK"]; }

    3 times and i keep getting a fatal error at line 145, so i just changed my title

    but it would be great if u could either create the list in the code and then we just have to change the numbers to the names, would be an easy solution

  33. GCSkye says:

    Is it possible to get it to display achievement points as well?

  34. Leandro says:

    Hi,

    Trying to set up a page with your plugin (and btw I only found how to display stuff be reading the comments, there’s no indication on how to use it in this page).

    Anyways, I get this error when looking at the page:

    Warning: Invalid argument supplied for foreach() in D:\WWW\chaotica\blog\wp-content\plugins\wow-guild-retrieve\wow-guild.php on line 108

    And the code I used was this:

    [wgr guildname="Chaotica" realmname="Area 52" region="US" sorttype="4" sortorder="desc" restrict="true"]

    And what about people who don’t have CURL installed in their host? Can’t you sort the tables by using only jQuery?

    • Ben says:

      The instructions for setting up WGR are in the readme file included with the plugin and on the WGR plugin page on WordPress’s site.

      WGR will only work if cURL is enabled. If it’s not, unfortunately there’s no way to talk to the WoW Armory.

      • Leandro says:

        hi Ben, thanks for your quick answer. Ok I managed to set up the guild roster, its working but not 100%.

        The code I used for my page was this:

        [wgr guildname="Chaotica" realmname="Area 52" region="us" sorttype="0" sortorder="desc" restrict="true" tablesize="15"]

        But its not sorting by toon name (column 0) and its also not retrieving just 15 rows as expected.

        You can see a test here:

        http://chaoticaguild.poros.kinghost.net/blog/?page_id=32

        Any ideas?

  35. Lawrence says:

    Hiya Ben,

    How do I go about putting it into a table-like format? You know how you’ve seperated yours into columns and added a search function?

    Cheers

  36. durnegard says:

    Sorry for my bad english, I’m french.

    I’ve got an error when I refresh the page of my site, but not every times.

    Warning: Invalid argument supplied for foreach() in /homez.348/paroxysm/www/wp-content/plugins/wow-guild-retrieve/wow-guild.php on line 108

    What do you think about this?

    Thanks for your help.

    • Ben says:

      This error occurs when your site is making too many requests to the WoW Armory. Leave it alone for awhile and the error will go away.

  37. Will says:

    Is there any way to get it to default the sorting by Level 80 ?? We want these to show up first. Awesome plugin. Took only seconds to install it.

    • Ben says:

      Sure. To display level 80 characters first, use the options sorttype=”3″ and sortorder=”desc” .

  38. Mark says:

    Question I am on realm Eldre’Thalas

    but when i change the realname i get

    Parse error: syntax error, unexpected T_STRING, expecting ‘)’ in /home/mark/public_html/word/wp-content/plugins/wow-guild-retrieve/wow-guild.php on line 51

    Hope you can help.
    Thanks Ben!

  39. Bats says:

    I am testing your plug-in. I completed the installation. I created a page called “Armory” and copied get_guild_info and published the page as you instructed :

    Enter get_guild_info into any page or post you want to display the roster table.

    But instead of bringing up the Armory info, all it says on the page is get_guild_info…. What am I missing? How can you enter a command line into a page or post if it isn’t a template? Do I have to create a template .php file?

    http://www.wootdawgs.com/armory/

    ty.

  40. Matt says:

    Plugin = Greatness

    Great job on this. It integrates to the site very nicely. I have a request tho that maybe you can fit in sometime in the future.

    -Add a public notes column. And if you feel froggy maybe you can add the feature to it that displays only x amount of characters and if you hover over the cell it will display the whole note in an alt popup. This would be nice so you know the Alt-Toons for each person as we list this info in our public notes.

    Problem:
    I’m trying to zebra stripe the table using the css code listed above and it’s not working correctly. It’s not highlighting every other row. It starts off with the first four rows alternating color, then it skips like 6 rows and then starts to alternate color for one row, then skips like 8 rows then alternates… you get the picture.

    Also it’s not working for I.E. at all, and I know I.E. is special when it comes to CSS cause they don’t want to conform to standards. I tried adding the code into the special CSS files for IE6 & 7 and nothing happens.

    Otherwise, keep up the great work. Very nice indeed. It works perfectly for our needs right now, so no complaints.
    -Zebra Stri

  41. Alan says:

    Heya, thanks for the great plugin – is just what I was after. Quick question tho, and I’m probably missing something really obvious and will come across as an idiot, but oh well;

    How do I change the theme from light to dark?

    I can see the code: ‘div#guild-data-div table td{color:#fff;}’

    but how do I activate/insert this to the correct place?

    Many thanks again for taking the time to code this plugin.

  42. Bob says:

    Thank you very much for this addon. I just got it working and it seems to perform pretty well.

    I hope you can find a way to allow the plugin to sort ranks by rank ID rather than alphabetically as this would be very useful.

    Again, thanks for all your hard work.

Post your comments