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 : Voodoo Tech and Scripter's Den of Scriptniquity > WoW Progression (automatic updating)
Mottie (MVP) 10/27/2012 7:45 AM EST : WoW Progression (automatic updating)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

WoW Progression (automatic updating)

This mod allows you to grab your latest guild progression using the WoW api feed. The way it works is that it uses the individual progression from your most active raiders (added by you).


  • Guild progression is determined from individual raider progression
  • A boss is determined to be killed when a set number of raiders have killed a boss (see the ratio option below).
  • Guild run achievements were not used because they didn't seem to return consistent results. Also only the last heroic boss is tracked.
  • The number of boss kills can also be added to the tooltip. But because every raider has a different value, it averages the number of kills. So if a raider that has no boss kills is included, it may drastically affect the average.

The Code


This is a Mod
Control Panel > Site Mods > Get Site Mods >
Look for "WoW Progression  (automatic updating)"
also get the "Modified Tooltips" mod


Customizing

Once the mod is installed, you can modify the "Customization Code" as follows:
<script>Sys.Application.add_load(function(){

// target wow-progression element
$('.wow-progression').wowProgression({

// ** Guild Info ***
// battlenet domain = "us", "eu", "kr", "tw" or "sea";
// use "cn" for china

region  : "us",
// locale = "en_US", "es_MX", "pt_BR", "en_GB", "es_ES", "fr_FR",
// "ru_RU", "de_DE", "pt_PT", "it_IT", "ko_KR", "zh_TW" or "zh_CN"

locale  : "en_US",
// game server name; include spaces and apostrophes
server  : "Lightning's Blade",
// guild name; include spaces and apostrophes
guild   : "Our Guild's Name",
// list raiders under "all" for all expansion;
// or under a specific expansion

raiders : {
    'all'   : [ 'raider1', 'raider2' ],
    'mists' : [ 'raider3', 'raider4' ],
    'cat'   : [ 'raider3alt' ]
},

// ** Appearance **
// expansion to show. The order can be changed
// use "mists" and/or "cat"

show    : [ 'mists', 'cat' ],
// show heroics?
heroics : true,
// 75% of raiders showing kill before boss counted as killed
ratio   : 0.75,
// instance boss count: {n} = number kill count,
// {t} = total, {p} = percentage

count   : '{n}/{t}', // '{p}',
// tooltip - boss killed: use {s} for none/killed status text,
// {n} for number of kills
// this is an avg from all raiders

status  : "{s}",
// use instance abbreviation - "Firelands" becomes "FL"
useAbbr : false,
// boss status text
text    : {
    zero    : ''// zero boss kills - when using {n} in status
    none    : ''// boss not killed text
    killed  : 'Killed' // boss killed text
}
});});</script>

Description of Options

  • region

    * This must be set to the battle.net domain.
    * China's battle.net does not have a domain, but you can set this value to `"cn"` and the plugin will use the correct API domain.
    * Values include: `"us"`, `"eu"`, `"kr"`, `"tw"` or `"sea"`; use `"cn"` for China.
    * Default value is `"us"`.

  • locale

    * This sets the language to use.
    * Values include : `"en_US"`, `"es_MX"`, `"pt_BR"`, `"en_GB"`, `"es_ES"`, `"fr_FR"`, `"ru_RU"`, `"de_DE"`, `"pt_PT"`, `"it_IT"`, `"ko_KR"`, `"zh_TW"` or `"zh_CN"`.
    * Default value is `"en_US"` (English U.S.).

  • server

    * Set the server name to use here.
    * Only one server is usable per widget.
    * Include any spaces and apostrophes in the server name and make sure it is within double quotes.
    * Default is `"Lightning's Blade"` to show that double quotes should be surrounding the name with an apostrophe.
     
  • guild

    * Set your guild's name here.
    * Include spaces and apostrophes in the name and make sure it is within double quotes.
    * Default is `"Our Guild's Name"` to show that double quotes should be surrounding the name with an apostrophe.

  • raiders

    * List your raiders here; Yes, you only need to add one.
    * Include raiders under `'all'` to have them included in all expansions.
    * Include raiders under `'mists'` or `'cat'` to have them counted only for specific expansions.
    * So in this example:

        // list raiders here under "all" or the expansion abbreviation
        raiders : {
          'all'   : [ 'raider1', 'raider2' ], // included in all expansions
          'mists' : [ 'raider3', 'raider4' ],
          'cat'   : [ 'raider3alt' ]
        },

        the mists expansion will count raider1, raider2, raider3 and raider4; and the 'cat' expansion will count raider1, raider2 and raider3alt

    * Default value is as seen above, so nothing will show because those raider names don't exist!

  • show

    * Set the expansions to show within the progression box.
    * Values must be within an array and include "mists" and/or "cat".
    * The order of the expansions can be changed. The first expansion listed will be on top.
    * Default value is `[ 'mists', 'cat' ]`.

  • heroics

    * Set this boolean value to `true` to include heroic progression, or set it to `false` to not include heroic progression.
    * Do not wrap this value in quotes.
    * Default value is `true`.

  • ratio

    * This is a threshold ratio that must be suppassed before a boss will be counted as killed.
    * To better explain this, say the plugin has the ratio set to `0.75` and sees this data (x = boss killed):

        raider  Boss1 Boss2 Boss3
        lisa      x     x     x
        fred      x     x     -
        mike      x     x     -
        joe       x     -     -

        ratio    4/4   3/4   1/4  (fraction)
                  1    0.75  0.25 (decimal)

     
        * So all raiders have killed boss1 making the kill ratio one (or 100%). This is above the `0.75` (75%) set ratio, so boss1 will show as being killed.
        * Boss2 has 3/4 (0.75 or 75%) of the raiders killing the boss, so because this is equal to the set kill ratio, it will also show the boss as being killed.
        * Boss3 only had 1/4 (0.25 or 25%) of the raiders killing the boss. This is not above the set kill ratio, so this boss will not show as being killed.

    * Default value is `0.75`.

  • count

    * Set the format of the instance boss kill count using this option.
    * This count shows up on the right side of the instance progression bar.
    * The value of this option has a string that can include:
      * `{n}` - the number of kills in that instance.
      * `{t}` - the total number of bosses in that instance.
      * `{p}` - the percentage of kills in that instance.
    * The default value is `"{n}/{t}"` which shows the fraction of boss kills in the instance (e.g. `3/4`).
    * Alternatively you can include the percentage of kills using `"{n}/{t} ({p})"` (e.g. `3/4 (75%)`).

  • status

    * Set the format of the instnace boss kill status using this option.
    * This status shows up within the tooltip that pops up when hovering over a progression bar.
    * The value of this option has a string that can include:
      * `{s}` - the none/killed status text - see the `text` option below.
      * `{n}` - the number of boss kills averaged from all raiders in that expansion. So this number may be really off if one raider doesn't have any boss kills.
    * Default value is `"{s}"`.

  • useAbbr

    * Set this boolean value to `true` to use the instance name abbreviation.
    * I know that in different locales the instance name changes and therefore the abbreviation will change. If this change is needed, I'll include instructions on how to set this up.
    * Default value is `false`.

  • text

    * Set the desired text to show for the boss status, within the tooltip.
    * The option is set up as follows:

        // boss status text
        text    : {
          zero    : '' // boss kill count (if zero) - when using {n} in status
          none    : ''// boss not killed text
          killed  : 'Killed' // boss killed text
        },

        * `zero` is the text shown when the `{n}` status is shown, but the boss count is zero.
        * `none` is the text shown when the `{t}` status is shown, but the boss hasn't been killed.
        * `killed` is the text shown when the boss has been killed.
        * Any of these status text can also include HTML. So if you want an image to show a boss kill, use this instead: `killed : '<img src="/Cargo/Mods/1339/killed.png">'`.
        * Sorry, there isn't any way for a status to show that a boss has been attempted.
    * Default values are shown above.

Customize the look using the provided CSS:

/********************
 tooltip styling
 ********************/

.tips { width: 250px; }
/* tooltip title */
.tips .inst { border-bottom: #555 1px solid; margin: 2px; }
.tips .inst-title { font-size: 14px; font-weight: bold; }
.tips .inst-count { float: right; }

/* boss listing */
.tips .boss { font-size: 13px; position: relative; } /* wrapper */
.tips .boss-icon { width: 18px; height: 18px; margin: 0 5px 1px 0; vertical-align: middle; }
.tips .boss-name {}
.tips .boss-status { position: absolute; right: 5px; }
.tips .boss-killed { color: red; text-decoration: line-through; }

/* overall */
.wowprogression { width: 100%; margin: 0 auto; }
.wowprogression h3.expansion { margin: 10px 5px; text-align: center; }
.wowprogression .inst-name { font: 12px verdana, "trebuchet MS", helvetica, sans-serif; min-width: 50%; display: inline-block; }

/********************
 expansion blocks
 ********************/
/* expansion Title */

.wowprogression h3.expansion-mists {}
.wowprogression h3.expansion-cat {}

/* expansion instances wrapper */
.wowprogression div.instances-mists {}
.wowprogression div.instances-cat {}

/********************
 instance blocks
 ********************/
/* instance listing */

.wowprogression .instance { width: 100%; border-spacing: 0; }
.wowprogression .instance td.icon { /* wraps div.icon */
    width: 36px;
}
.wowprogression .instance div.icon {
    max-width: 35px;
    width: 35px;
    height: 35px;
    margin: 15px 2px 2px 5px;
    background-image: url(http://us.battle.net/wow/static/images/character/summary/raid-icons.jpg);
}

/* specific instances */
/* mists */

.wowprogression .inst-HoF .icon { background-position: -1780px -5px; }
.wowprogression .inst-MV .icon { background-position: -1719px -5px; }
.wowprogression .inst-TES .icon { background-position: -1841px -5px; }

/* cat */
.wowprogression .inst-DS .icon { background-position: -1658px -5px; }
.wowprogression .inst-FL .icon { background-position: -1597px -5px; }
.wowprogression .inst-ToFW .icon { background-position: -1536px -5px; }
.wowprogression .inst-BoT .icon { background-position: -1414px -5px; }
.wowprogression .inst-BD .icon { background-position: -1475px -5px; }
.wowprogression .inst-BH .icon { background-position: -1353px -5px; }

/********************
 progress bars
 ********************/

.wowprogression .bar-bkgd { height: 15px; }
.wowprogression .bar-color { height: 15px; text-align: right; }
.wowprogression .bar-text { height: 15px; font: 10px verdana, "trebuchet MS", helvetica, sans-serif; padding-right: 5px; }

.wowprogression .bar-normal, .bar-heroic {
    width: 98%;
    border: 1px solid #555;
    background: #222; /* bar background */
    background: -webkit-gradient(linear, left top, left bottom, from(#222), to(#444));
    background: -moz-linear-gradient(center top, #222, #444) repeat scroll 0 0 transparent;
}
.wowprogression .bar-normal .bar-text { color: #fff; }
.wowprogression .bar-normal .bar-color {
    background-color: #00f; /* normal: blue */
    background: -webkit-gradient(linear, left top, left bottom, from(#00f), to(#006));
    background: -moz-linear-gradient(center top, #00f, #006) repeat scroll 0 0 transparent;
}
.wowprogression .bar-heroic .bar-text { color: #fff; }
.wowprogression .bar-heroic .bar-color {
    background-color: #c00; /* heroic: red */
    background: -webkit-gradient(linear, left top, left bottom, from(#c00), to(#600));
    background: -moz-linear-gradient(center top, #c00, #600) repeat scroll 0 0 transparent;
}
</style>
  • If you want to hide an entire instance, just add "display:none;" to the css class name corresponding to that item. For example, to hide Throne of the Four Winds, add this:

        .wowprogression .inst-ToFW { display: none; }

  • To hide a specific normal or heroic instance, add the following:

        .wowprogression .inst-ToFW .bar-normal { display: none; } /* normal instance */
        .wowprogression .inst-ToFW .bar-heroic { display: none; }  /* heroic instance */
TopBottom

Mottie (MVP) 2/7/2013 10:59 AM EST : RE: WoW Progression (automatic updating)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Updates:
  • Just to update everyone. I made the script a little better so now it ignores names that don't exist or are misspelled; so you won't see a blank widget.
  • Also, I set up this demo to allow you to play with the settings. The code is in separate windows, but hopefully once you get it working the way you want, you can just copy and paste the parts of the code you need into the custom code window.

    Please don't copy and paste the code directly from the demo into the Customization Code window; There are extra bits of code that are essential. The best thing to do would be to copy all of the customization code into a text editor, and update it there.
I see these questions all the time.... so PLEASE NOTE:
  • If you are seeing raw HTML in the tooltip, you'll need to add the "Modified Tooltips" mod.
  • If you are having issues with the mod not updating right after a boss kill, it's because Blizzard's database doesn't update until you log out of the game. Also, note that the raiders listed in the mod are the ones that need to log out before the set ratio is met to update the boss kill.
  • This mod does not work when Blizzard's servers down, so you won't see anything on Tuesday mornings!
TopBottom

Mottie (MVP) 3/8/2013 11:07 AM EST : RE: WoW Progression (automatic updating)
GuildPortal MVP
Mottie
Posts: 3884
Zomgawsh Poster

Update!

Mod updated to include the Throne of Thunder instance... I did have to update the mod to include the new raid icon, so please make sure you save your setting before updating!

If you don't want to bother updating, all that was added was a new line of css and a fix for the Terrace of Endless Springs icon (it was missing the "o" in "ToES")

.wowprogression .inst-ToT .icon { background-position: -1902px -5px; }
.wowprogression .inst-ToES .icon { background-position: -1841px -5px; }

Add the above to your custom CSS (Control Panel > Custom HTML & Script > Custom CSS > CSS Additions to Standard) then you won't need to update the mod.
TopBottom

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