Extension:WoWItem
From MediaWiki.org
|
WoWItem Release status: stable |
|||
|---|---|---|---|
| Implementation | Tag | ||
| Description | Link to World of Warcraft items. | ||
| Author(s) | Egingell | ||
| Last version | 201010251548 (21:48, 25 October 2010 (UTC)) | ||
| License | Written by Eric Gingell | ||
| Download | Wiki WoW Item Tooltip CHANGELOG |
||
| Example | Examples | ||
|
|||
|
|||
|
Check usage (experimental) |
|||
Contents |
[edit] What can this extension do?
This extension will convert an item number or item name from the popular game, World of Warcraft (WoW), into a WoW style popup.
[edit] Usage
- To show a WoW style popup for an item.
<item>{item name or item id}</item>
- To show a WoW style popup for an item using the icon instead of text.
<item img="true">{item name or item id}</item>
## or ##
<item img="{image URL}">{item name or item id}</item>
- To show a block of HTML instead of a popup.
<item html="true">{item name or item id}</item>
- To show a block of HTML with an icon included.
<item img="true" html="true">{item name or item id}</item>
## or ##
<item img="{image URL}" html="true">{item name or item id}</item>
- Use an item string instead of a name/itemID (does not support gems or enchants, yet).
<item itemstring="item:1234:0:0:0:0:0:1853:0:0" />
[edit] Installation
Unzip the ZIP archive into the extensions folder and add the require_once line to LocalSettings.php
[edit] Changes
Put this line at the end of LocalSettings.php
// $WoWItem_site values
// 'allakhazam' or 'alla' : Use Allakhazam's database.
// 'wowhead' or 'head' : Use WoWHead's database.
// 'curse' : Use WoWHead's database.
// 'wowpedia' or 'wowwiki' : Use WoWPedia's database.
// 'wowarmory' or anything other than the above : Use Blizzard's database.
$WoWItem_site = false;
require_once("$IP/extensions/WoWItem/wowitem.inc");
[edit] Contents
Contains a modified version of PHP WoW Item Mouseover by rodeojones which I modified to make work with my installation of MediaWiki
[edit] Known Issues
- If your PHP user doesn't have access to write files and directories to $IP (installation directory of MediaWiki), then the item textures (icons) will not be saved to your server and will not display for any items.
- May generate lots of E_NOTICE messages. See the PHP function error_reporting() for more information. This can be fixed by turning off E_NOTICE messages (at run time or by editing php.ini) or by instructing your users to include all tag attributes even if they are empty strings (e.g. <item img="" html="">{item name}</item>)
- If any of the sites you are fetching items from are offline or overloaded, items will show "<item not found>{Item Name}</item not found>".
Some items are not listed on WoWArmory.com. I'm working on a way to check WoWArmory.com and Allakhazam.com (shouldn't be too hard).
- My bad, just needed to wrap the item name in urlencode().
- Due to the way MediaWiki stores data returned by a hook, you may have to resave pages that have <item not found> in them.
- Only a problem if:
- you used my botched Version 6.1 and saved a page with an item link in it.
- new items were added to WoW and not yet in Allakhazam's database and you tried to link to them
- you managed to make it work with a different website other than Allakhazam
Version 6.1 does not work.
- Reverted to Version 6
- The script probes Allakhazam.com or WoWArmory.com twice if it sees an item with " of " in the name only if it doesn't find it the first time. E.g. "Corpse Harvester of Power": will probe [the site] twice to find "Corpse Harvester". "Helm of Desolation": will only probe once, since that item is found on the first pass.
Due to the way World of Warcraft handles items, it is not possible to link to items with sub names such as, "Corpse Harvester of the Bear". Attempting to link to such items will result in "<item not found>Corpse Harvester of the Bear</item not found>". I'm working on a way to make the script ignore sub names.
- Fixed (ugly)
Seems to break custom style sheets. I'm working on a fix.
- Fixed
If you don't put the require_once line at the end of LocalSettings.php (or after the headers have been sent), you will receive the following error:
Warning: Cannot modify header information - headers already sent by (output started at {$IP}/extensions/WoWItem/includes/overlibmws/overlibmws.php:3) in {$IP}/includes/WebResponse.php on line # Warning: Cannot modify header information - headers already sent by (output started at {$IP}/extensions/WoWItem/includes/overlibmws/overlibmws.php:3) in {$IP}/includes/WebResponse.php on line #
- Fixed (hopefully)
- Only the Armory and Allakhazam work reliably.
[edit] Contact
- If you have any problems not listed here, please post a ticket on CurseForge (here).
