Description
Make <item>item name</item> into a tooltip link.
Notes
- This is not an addon, it's a PHP script that is executed by a PHP enabled web server.
- Requires MediaWiki
- Requires PHP
- Requires a web server (i.e. IIS, Apache, LiteHTTPd, etc.).
- Could be modified to work with any Wiki implementation.
- Don't bother asking me to do it without giving me full access to your files (for debugging).
Having Issues or have a Suggestion?
- Please don't use the comments to post trouble tickets or suggestions. Instead post a ticket on CurseForge. Thanks.
- Any comments containing bug reports or feature requests will be deleted on sight and any comments asking where or why (referring to said comments) will also be deleted on sight.
- Please don't submit tickets about items that are not found until you try Allakhazam, WoWHead, and WoWArmory.
Installation
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 Curse's database.
// 'wowarmory' or anything other than the above : Use Blizzard's database.
$WoWItem_site = false;
require_once("$IP/extensions/WoWItem/wowitem.inc");
Known Issues
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
- 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 and find Helm of Desolation, which 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.
- The new user changeable item site may not work as expected.
- The WoW Head hack is still new, please post suggestions and bugs.
Tags
<item>Item Name</item>
Results in a bracketed link colored with the appropriate rarity color that when moused over, pops up a tooltip with the same information that would pop up in-game.
<item img="true">Item Name</item>
The icon is the link instead of plain text.
<item html="true">Item Name</item>
Results in an embedded tooltip.
<item img="true" html="true">Item Name</item>
Same as above with the item's icon included.
<item site="siteid">Item Name</item>
Change the site to retrieve data from to siteid. Valid values for siteid are "wowarmory", "alla", "allakhazam", "head", "wowhead", and "curse". If left out or an invalid value is used, it defaults to "wowarmory".
Donate
See Also
- 2 comments
- 2 comments
Facts
- Date created
- 07 Nov 2008
- Category
- Last update
- 03 Nov 2009
- Development stage
- Release
- License
- Written or Edited by Eric Gingell
- Curse link
- Wiki WoW Item Tooltip
- Recent files
- R: v200911031439 for 3.3.0 on 03 Nov 2009
- R: v200901152011 for 3.0.8 on 16 Jan 2009
- R: v200811271644 for 3.0.3 on 27 Nov 2008
- R: v200811260110 for 3.0.3 on 26 Nov 2008
- R: v200811241647 for 3.0.3 on 24 Nov 2008
- #2
egingell Fri, 06 Nov 2009 02:41:33Not at this time. It was a big enough pain in the ass to make this one.
P.S. Sorry for the late reply, I don't often check the comments, just the tickets.
- #1
Alanik Sat, 23 May 2009 16:47:21Works great, just recently set this up on my guild's media wiki. Mostly still very much under construction but feel free to check it out at Involution-of-Thrall.com/invowiki/
However, my fellow wiki editors are interested in getting tooltips for achievements, spells, quests, etc. Do you have any idea of a working extension that would do this as well?
Thanks for the great extension =)