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! > WoW Mini Armory
Mottie (MVP) 1/18/2009 5:26 PM EST : WoW Mini Armory
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

How to add a WoW Mini Armory

mini-armory (single view)

mini-armory (compare)

First of all, I don't mean to tromp on Jizmak-Rebirth's version of the mini-armory. But since MMOGuildsites hasn't updated their armory since the expansion I decided to write one that would work with multiple sites.

I also apologize since I set this up to work with sites that will show data from the U.S. (US), Europe (EU), Korea (KR), China (CN) and Tiawan (TW)... but not all sites in the list support all of these regions. And frankly, I'm not modivated enough to set it up this way... the sites that don't support other regions will just return an error... lets just say, this code is already set up to allow for those sites future expandibility - hehe.

Copy (Ctrl-C) the code below and paste (Ctrl-V) it into a free form text/HTML box on your site while in HTML mode () or by right clicking in the editor box and choosing "Paste As Html". See it in action on my test-site Warcraf tab.

The Code

<style type="text/css">
#miniArmory input, #miniArmory select { background: #222222; color: #ffffff; border: 0px; margin-bottom:4px; }
#armoryContainer iframe { border:0px; }
#miniArmory hr { width:500px; }
#setArmoryServer0, #setArmoryServer1, #setArmoryServer2 { width: 100px; }
#setArmoryName0, #setArmoryName1, #setArmoryName2 { width: 137px; }
.ahide { display:none; }
</style>

<div id="miniArmory" align="center"></div>
<br>
<div id="armoryContainer" align="center">
 <span id="armory1"></span>
 <span id="armory2"></span>
</div>


<script type="text/javascript">
 var armorySite = new Array();
 // Default Variables
 var armoryServerLoc1 = "US";    // Default server (US, EU, KR, CN, TW)
 var armoryServerName1 = "Durotan";    // Default Server name (case sensitive)

 var armoryServerLoc2 = "US";    // Default server (US, EU, KR, CN, TW)
 var armoryServerName2 = "Durotan";    // Default Server name (case sensitive)

 defaultArmory = 'quickarmory';
 armoryHeight = 940;

 armorySite.push(["ArmoryLite","http://armorylite.com/","560"]);
 armorySite.push(["Armory-Light","http://www.armory-light.com/","850"]);
 armorySite.push(["Be Imba!","http://be.imba.hu/?","860"]);
 armorySite.push(["MMOGuildSite","http://armory.mmoguildsites.com/characters/","470"]);
 armorySite.push(["Quick Armory","http://www.quickarmory.com/?","435"]);
 armorySite.push(["Warcrafter",".warcrafter.net/","1000"]);
 armorySite.push(["WoW Armory","wowarmory.com/character-sheet.xml?","800"]);
 armorySite.push(["WoW Heroes","http://www.wow-heroes.com/index.php?","800"]);
 armorySite.push(["WoW Juju","http://www.wowjuju.com/index.php?","800"]);
 armorySite.push(["WoW Rep Calc","http://wowreputationcalculator.com/","800"]);

/*************************************
 Don't Change Anything Below
**************************************/
 var aregions = '<option value="us">US</option><option value="eu">EU</option><option value="kr">';
 aregions += 'KR</option><option value="cn">CN</option><option value="tw">TW</option></select> ';
 var ainput = ' type="text" onKeyPress="return disableEnterKey(event)"> ';
 var ahtml = '<select id="setArmorySite">';
 for (j=0;j<armorySite.length;j++){
  ahtml += '<option value="' + armorySite[j][1] + '" ';
  ahtml += (armorySite[j][1].match(defaultArmory)) ? ' selected="selected">' : '>';
  ahtml += armorySite[j][0] + '</option>';
 }
 ahtml += '</select><hr><div class="ashow" align="center"><input id="setArmoryName0" title="Character Name"';
 ahtml += ainput + '<input id="setArmoryServer0" title="Realm"' + ainput + '<select id="setArmoryLoc0">';
 ahtml += aregions + '<input onclick="openArmory(0);" value="Get Info" type="button"> <input onclick="boxReset(0,\''
 ahtml += armoryServerLoc1 + '\',\'' + armoryServerName1 + '\');" value="Reset" type="button"> <input onclick="compare();" ';
 ahtml += 'value="Compare" type="button"></div><div class="ahide"><table border="0" align="center"><tr><td><input ';
 ahtml += 'id="setArmoryServer1" title="Realm"' +  ainput + '<select id="setArmoryLoc1">' + aregions;
 ahtml += '<input onclick="boxReset(1,\'' + armoryServerLoc1 + '\',\'' + armoryServerName1 + '\');" value="Reset" type="button">';
 ahtml += '<br><input id="setArmoryName1" title="Character Name"' + ainput + '<input onclick="openArmory(1);" value="Get Info" ';
 ahtml += 'type="button"></td><td><div style="width:20px;"/></td><td><input id="setArmoryServer2" title="Realm"' + ainput;
 ahtml += '<select id="setArmoryLoc2">' + aregions + '<input onclick="boxReset(2,\'' + armoryServerLoc2 + '\',\''
 ahtml += armoryServerName2 + '\');" value="Reset" type="button"><br><input id="setArmoryName2" title="Character Name"';
 ahtml += ainput + '<input onclick="openArmory(2);" value="Get Info" type="button"></td></tr></table></div>';
 $('#miniArmory').html(ahtml);
 $('#setArmoryLoc0').attr('value',armoryServerLoc1);
 $('#setArmoryServer0').attr('value',armoryServerName1);
 $('#setArmoryLoc1').attr('value',armoryServerLoc1);
 $('#setArmoryServer1').attr('value',armoryServerName1);
 $('#setArmoryLoc2').attr('value',armoryServerLoc2);
 $('#setArmoryServer2').attr('value',armoryServerName2);
function openArmory(x) {
 var aN = $('#setArmoryName'+x).attr('value');
 if (aN == '') return;
 var aSite = $('#setArmorySite').attr('value');
 var aL = $('#setArmoryLoc'+x).attr('value');
 var aS = $('#setArmoryServer'+x).attr('value');
 var aS2 = aS.replace(/(\s)/g,'+');
 for (j=0; j < armorySite.length; j++) {
  if (armorySite[j][1].match(aSite)) var aSN = j;
 }
// ArmoryLite & Armory-Light - http://armorylite.com/{Location}/{Server}/{Character}
 if (aSite.match('armorylite|armory-light')) {
  var armoryURL = armorySite[aSN][1] + aL +  '/' + aS +  '/' + aN;
 }
// Be Imba - http://be.imba.hu/?zone={Location}&realm={Server}&character={Character}
 if (aSite.match('imba')) {
  var armoryURL = armorySite[aSN][1] + 'zone=' + aL + '&realm=' + aS2 + '&character=' + aN;
 }
// MMOGuildsites - http://armory.mmoguildsites.com/characters/north+america/{Server}/{Character}
 if (aSite.match('mmoguildsites')) {
  var aL = ($('#setArmoryLoc'+x).attr('value')=='eu') ? 'europe' : 'north+america'
  var armoryURL = armorySite[aSN][1] + aL +  '/' + aS2 +  '/' + aN;
 }
// Quick Armory - http://www.quickarmory.com/?n={Character}&r={Server}
 if (aSite.match('quickarmory')) {
  if (aL == "us") { aL = "" } else { aL = aL + "-"; }
  var armoryURL = armorySite[aSN][1] + 'r=' + aL + aS2 + '&n=' + aN;
 }
// Warcrafter - http://{Server}-{Location}.warcrafter.net/{Character}
 if (aSite.match('warcrafter')) {
  var armoryURL = 'http://' + aS.replace(/(\s)/g,'').replace(/\'/g,'') + '-' + aL + armorySite[aSN][1] + aN;
 }
// WoW Armory - http://eu.wowarmory.com/character-sheet.xml?n={Character}&r={Server}
 if (aSite.match('wowarmory')) {
  if (aL == "us") aL = "www";
  var armoryURL = 'http://' + aL + '.' + armorySite[aSN][1] + 'r=' + aS2 + '&n=' + aN;
 }
// WoW Heroes - http://www.wow-heroes.com/index.php?zone={Location}&server={Server}&name={Character}
 if (aSite.match('wow-heroes')) {
  var armoryURL = armorySite[aSN][1] + 'zone=' + aL + '&server=' + aS + '&name=' + aN;
 }
// WoW Juju - http://www.wowjuju.com/index.php?page=6#{Location}_{Server}_{Character}
 if (aSite.match('wowjuju')) {
  var armoryURL = armorySite[aSN][1] + 'page=6#' + aL + "_" + aS + "_" + aN;
 }
// WoW Rep Calc - http://wowreputationcalculator.com/{Location}/{Server}/{Character}/
 if (aSite.match('wowreputationcalculator')) {
  var armoryURL = armorySite[aSN][1] + aL.toUpperCase() + "/" + aS2 + "/" + aN + '/';
 }
 var frameBox = '<iframe src="' + armoryURL + '" name="iframe' + x + '" scrolling="auto"';
 frameBox += ' width="'+ armorySite[aSN][2] +'" height="'+armoryHeight+'"></iframe>';
 if (x==0) x=1;
 $('#armory'+x).html(frameBox);
}
function compare(){
 var temp1 = $('#setArmoryLoc0').attr('value');
 var temp2 = $('#setArmoryServer0').attr('value');
 var temp3 = $('#setArmoryName0').attr('value')
 $('.ashow').css('display','none');
 $('.ahide').css('display','block');
 $('#setArmoryLoc1').attr('value',temp1);
 $('#setArmoryServer1').attr('value',temp2);
 $('#setArmoryName1').attr('value',temp3);
}
function boxReset(x1,x2,x3) {
 $('#setArmoryLoc'+x1).attr('value',x2);
 $('#setArmoryServer'+x1).attr('value',x3);
 if (x1==0) x1=1;
 $('#armory'+x1).html('');
}
function disableEnterKey(e){
 var key = (window.event) ? e.keyCode : key=e.which;
 if ( key == 13 ) { return false } else { return true }
}
</script>

Customizing

  • The input and select box styles are set in the CSS with the following code, change the color by modifying the text in blue.

  • Change the width of the horizontal bar (text is in red in the CSS and the default is 500px), or hide it by adding "display:none;"). Or you can adjust the width of the input boxes for both the server name (default is 100px) and the character name (default is 137px) - these are also in red.

  • The code in green is the HTML for the containers. There is no need to modify this.

  • You can set the default region, server & armory in the script by changing the code below (in purple). There are two variables for server location and name, the second one is the default for the compare boxes.

    • The server location (ServerLoc) can be set to the following regions: U.S. (US), Europe (EU), Korea (KR), China (CN) and Tiawan (TW). This variable is not case-sensitive.

       var armoryServerLoc1 = "US";    // Default server (US, EU, KR, CN, TW)
       var armoryServerLoc2 = "US";    // Default server (US, EU, KR, CN, TW)

    • The server name (ServerName) must match your server name with proper capitalization, punctuation and using spaces... here is an example of one of the U.S. servers: "Blade's Edge"

       var armoryServerName1 = "Durotan";    // Default Server name (case sensitive)
       var armoryServerName2 = "Blade's Edge";    // Default Server name (case sensitive)

    • The default armory site is set with the variable below. The text in purple must match the site's URL. So Quick Armory's URL is "http://www.quickarmory.com/", therefore the variable below must have "quickarmory". WoW Heroes' URL is "http://www.wow-heroes.com/" so the variable must be "wow-heroes".

      *DO NOT include any periods in this variable*

       defaultArmory = 'quickarmory';

  • Each site has a different width, you can adjust the size of the frame by editing the last number in the armorySite variable (in red). Below, the ArmoryLite site frame is set to be 560 pixels wide.

     armorySite.push(["ArmoryLite","http://armorylite.com/","560"]);

  • All the sites share the same frame height variable. Adjust how tall the frame is with this variable, default is set to 940 pixels:

     armoryHeight = 940;

  • If you'd like to add more sites to this list, please post a request in this thread.
TopBottom

RoniB (New Admin) 1/25/2009 7:52 AM EST : RE: WoW Mini Armory
RoniB
Posts: 114
Posts With Wolves

I just have to say.. site design is a breeze with you around! I was actually looking for a way to do something else when I came across this. Thanks for all you do for us illerates that make us look spectacular 
TopBottom

Ayiana (New Admin) 2/25/2010 6:00 PM EST : RE: WoW Mini Armory
Ayiana
Posts: 1498
Zomgawsh Poster

I had an ancient version of this on my site that had long since broken - thank you for fixing it.  It was nice having the comparison side-by-side, but I think I can see why it wasn't practical given all the features you've added.  You've actually started to address something I've wondered about.

One of the questions, as a guild and raid leader, I am fielding constantly is, "Am I ready to raid yet?"  It's almost like, "Are we there yet?"  So I toddle out to be.imba to see if they are missing any enchants and what level of content they are geared for, maybe cross check with wow-heroes.  Gear score seems to be the new rage (someone please tell me why the in-game gear score and the wow-heroes gear score have nothing in common, but I digress).  What I was wondering if could be possible would be to have an aggregator for those things.  Break out a list of every 80 on your guild roster, then have buttons to click that retrieves their gear score from wow-heroes and their current content dungeon (this would probably have to be accomplished with an internal statement that reads a table that says gear score between x and y = dungeon z rather than reading it from the site, but just a guess).  Ideally it would also include missing enchants and a low hit warning, but those, I'm afraid, are probably not realistic.  Especially as it appears that be.imba is one of the naughty children that don't play nice with it.

No matter what, this gets those sites at least in front of them.  So thank you again.

Thoughts?
~Ayiana
TopBottom

Mottie (MVP) 2/26/2010 1:09 AM EST : RE: WoW Mini Armory
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Ayiana!

I'm afraid doing something like this would first require you to set up a php hosting site (not that big a deal), possibly a SQL database to store individual data and a lot of coding to aggregate information from various sites. Not to mention that the data from those sites might not be completely up to date until you "force" an update like in be.imba.

Honestly, I still need to learn how to set up a SQL database and interact with it. I barely know enough php code to get by and my time is somewhat limited. So, I don't think I can do a project like this for quite a while (if ever), sorry.

On a side note, ignore the gear score. It's mostly based on the set item levels of the item itself and the gems. The only place this matters is for the Flame Leviathan fight. What I would do is find a site (since I don't know this off the top of my head, just google "how much dps do I need for.. ") and determine the DPS or spellpower (for healers) range people need to be able to put out for a certain instance. Another good indicator is how difficult heroic instances are for the player - If a group can't finish a Heroic Halls of Stone, then they probably aren't ready to start 10 man raids.

For item upgrades and other information I use Rawr and sometimes the armory (but not very often).
TopBottom

Ayiana (New Admin) 2/26/2010 1:47 AM EST : RE: WoW Mini Armory
Ayiana
Posts: 1498
Zomgawsh Poster

Mottie,

I figured setting up something like that was pretty unreasonable, but I'm just unknowledgeable about these things to ask. 

I actually pay very little attention to gear score, but players hear about it all the time because PuGs now seem to live and die by it - which is incredibly stupid.  Many people carry around high level items they never use just to meet some arbitrary gear score threshold, then switch back to the item that is actually useful.  That being said, as a blunt tool to look at and see an incredibly low number means obvious work to be done, it is a starting point.  (Yes, I get the occasional, "I've been 80 for a week, can I got to ICC with the guild now?"  Unless you've been incredibly busy, probably not....)

In our environment, unfortunately, gear is definitely not always equivalent to performance.  We know all the benchmarks and have done the math on fights with hard enrage timers.  I'm working on something to get people better able to fend for themselves in evaluating their raid preparedness, but it is difficult in a very casual environment.  I do love RAWR.  Once I point out missing enchants it usually opens up a floodgate of statements, "Well, yeah, I haven't really figured out what to put on it so I haven't yet."  Since I have the guild enchanter and my husband the guild JC, we can generally set people straight, but it's nice to try and help them help themselves.  First stops are usually be.imba to show them their warnings and RAWR to help them evaluate gear along with suggestions of possibly TankSpot or ElitistJerks.  So long as they use them as a tools and not gospel... yeah right.

It can be especially difficult for people just now getting into the raiding arena as now even Ulduar has fallen off our calendar so they need to be running the ICC5 instances, obtaining emblem items, etc, to be ready to meet the encounters.

But it is late and I am rambling.  I really appreciate the response.  I very much suspected that it was something that wasn't practical, but never know unless you ask.  I guess you can chalk me up to one of those 'inquisitive idiots' in this particular case. 

I want to say again, though, how nice it is that you've updated the Mini Armory code.  It was handy to have it right there on the site and the expanded functionality you've added is gravy.

~Ayiana
TopBottom

Mottie (MVP) 2/26/2010 1:02 PM EST : RE: WoW Mini Armory
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Ayiana!

Naw, I don't chalk up/label anyone as an "inquisitive idiot" EVER! I don't believe in dumb questions, it's silly to pretend you know something that you don't and sometimes it can be dangerous.

Anyway, I'm responding because I think you might like this script I wrote way back when... it adds little tiny arrows at the top outside edge of the center column (check it out on my help site home page, they have been there forever LOL). Clicking on the arrow collapses or expands the side columns. This will give the mini-armory more room to display its information

TopBottom

Ayiana (New Admin) 2/26/2010 3:22 PM EST : RE: WoW Mini Armory
Ayiana
Posts: 1498
Zomgawsh Poster

Oh no, Mottie, I know you wouldn't.  You are a very patient teacher on these forums as well as very generous with your time and talent.  A co-worker is very fond of Despair.com's Demotivator posters and this one always made us chuckle.  But I agree, the only dumb question is the one that remains unasked (to paraphrase).

Oh wow, now those arrows are just cool.  I'm annoyed with myself that I've never noticed them before!  Thank you!

~Ayiana
TopBottom

Ayiana (New Admin) 2/26/2010 4:58 PM EST : RE: WoW Mini Armory
Ayiana
Posts: 1498
Zomgawsh Poster

Hmmmm, Mottie? I copied and pasted the script into my Footer Area and the arrows appeared, but clicking on them dunna make anything happen.  I tried removing it from there and putting it in the banner instead and not even the arrows appeard.  So I pasted it back in the footer and, at first still nothing - not even arrows, then after clicking through a few tabs the arrows suddenly appeared, I get a hand icon when I hover, but nothing else happens.  What'd I do?

Edit to add that I also notice that your arrows highlight on your site and I saw that in the script as well, but mine are being lazy.

~Ayiana
TopBottom

Mottie (MVP) 2/26/2010 6:32 PM EST : RE: WoW Mini Armory
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Hi Ayiana!

Well it looks like that page was one of the ones that had all the spaces stripped out.
<a id="LIcon"
became
<aid="LIcon"
etc... so, I replaced the code in that post. Now you just need to replace the code on your site... sorry about that, I have way too many posts to go back and check on them all =/
TopBottom

Ayiana (New Admin) 3/1/2010 4:59 PM EST : RE: WoW Mini Armory
Ayiana
Posts: 1498
Zomgawsh Poster

No apology, Mottie, as you said, you've contributed such a huge volume to this site, it'd take more time than we'd want you to spend checking up on little things.  I should've caught it; I don't see how you find these so quickly.  It is all better now.

A thousand thanks again,
~Ayiana
TopBottom

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