Skip to content
Mottie edited this page Sep 14, 2013 · 2 revisions

Wiki Pages: Home | Setup | Options | Theme | Change

Header

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>

<!-- wowhead tooltips -->
<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"></script>
<script>var wowhead_tooltips = { "colorlinks": true, "iconizelinks": true, "renamelinks": true }</script>

<!-- wow guild news plugin -->
<link href="css/wowguildnews.css" rel="stylesheet">
<script src="js/jquery.wowGuildNews.js"></script>
<script>
jQuery(function($){
  // minimal setup - assuming us domain & english language
  $('.guildnews').wowGuildNews({
    server : "Durotan",
    guild  : "The Disreputable Dogs"
  });
});
</script>

HTML

<div class="guildnews"></div>

Script (showing default options)

  • Add any of these options to the minimal setup code seen in the header.
  • Make sure that every line, but the last one, ends with a comma.
  • An extra comma at the end will cause javascript errors in older IE browsers.
  • For more details about each option, see the Options page.
$('.guildnews').wowGuildNews({
  // ** Appearance **
  // number of news items to show; 25 max
  show    : 25,
  // small icon size ( true = 18x18; false = 56x56 )
  small   : true,

  // ** Guild Info ***
  // battlenet domain - "us", "eu", "kr", "tw" or "sea"; use "cn" for china
  region  : 'us',
  // locale - "en", "es", "pt", "en", "fr", "ru", "de", "it", "ko" or "zh"
  locale  : 'en',
  // game server name; include spaces and apostrophes
  server  : "Lightning's Blade",
  // guild name; include spaces and apostrophes
  guild   : "Our Guild's Name",

  // *** text language ***
  text : {
    // guild info
    "guildinfo" : "(Level {level} {faction} Guild, {server})",
    "faction"   : [ "Alliance", "Horde" ],

    // news listing
    // [icon] Fred purchased [Foo]. 1 hour ago.
    // [icon] Barney crafted [Bar]. Yesterday.
    // [icon] Dino earned the achievement [Bark] for 10 points. 45 minutes ago.
    // [icon] The guild earned the acheivement [Super Cool] for 10 points. Just now.
    "item"      : "{icon} {player} {action} {item}. {time}",
    "achv"      : "{icon} {player} earned the achievement {ach} for {points} points. {time}",

    // item actions; replaces {action} above
    "obtained"  : "obtained",
    "crafted"   : "crafted",
    "purchased" : "purchased",

    // guild achievement
    // (replaces {player} for guild achievements) "The guild earned..."
    "guild"     : "The guild",

    // time
    "future" : "in",
    "past"   : "ago",
    "recent" : "Recently", // only shown if time is somehow negative - issues with Blizzard api not providing UTC time
    "now"    : "Just now",
    "min"    : "1 minute",
    "mins"   : "minutes",
    "hour"   : "1 hour",
    "hours"  : "hours",
    "yday"   : "Yesterday",
    "days"   : "days",
    "weeks"  : "weeks"
  },

  // Battle.net armory shows future times (e.g. "in 10 minutes")
  // to change all future times to show "Recently", set this option to false
  showFutureTime : true,

  // *** tooltip URLs ***
  itemTooltip : "http://{locale}.wowhead.com/item={id}",
  achTooltip  : "http://{locale}.wowhead.com/achievement={id}",

  // ** Callbacks **
  // initialized callback function
  // el = $('.guildnews') - element that the plugin is initialized on
  initialized: function(el){}

});
Clone this wiki locally