Extension talk:WoWItem
i changed a few lines in the file urlreader.php to be able to use german item names.
function itemstats_read_url($url) { global $wgLanguageCode; // Try cURL first. If that isn't available, check if we're allowed to // use fopen on URLs. If that doesn't work, just die. if (function_exists('curl_init')) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_TIMEOUT, 30); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $language = $wgLanguageCode; curl_setopt ($ch, CURLOPT_HTTPHEADER, array("Accept-Language: ".$language.",".$language."-".$language.";"));
probably it would be better to include an additional tag like lang inside of the <item> tag, i.e. <item lang="en">. perhaps it makes sense to include a array of the available armory languages and check if the wiki language is one of them, if not "en" should be used. i only hacked in fix to use the wiki language.
Wowhead Support / Tooltip
editUsing wowhead for the tooltips and html output would be great.
errors installing on mediawiki 1.12
editExtension returned immediate errors. Not sure if this is a problem with my PHP setup, or what. I'm running PHP 5.2.6 on a Linux server (Apache 1.3.41).
First problem was a script error saying $WoWItem_site was not defined. I fixed that by adding "$WoWItem_site = 'wowarmory';" on line 28 of the wowitems.inc file.
Then I got these errors with a simple page that just says "<item>Fang of Venoxis</item>":
Notice: Trying to get property of non-object in /.../wiki/extensions/WoWItem/wowitem.inc on line 43
Notice: Undefined index: html in /.../wiki/extensions/WoWItem/wowitem.inc on line 46
Notice: Undefined index: html in /.../wiki/extensions/WoWItem/wowitem.inc on line 46
Notice: Undefined index: img in /.../wiki/extensions/WoWItem/wowitem.inc on line 52
Notice: Undefined index: img in /.../wiki/extensions/WoWItem/wowitem.inc on line 52
Notice: Undefined index: img in /.../wiki/extensions/WoWItem/wowitem.inc on line 55
Notice: Undefined variable: begin in /.../wiki/extensions/WoWItem/includes/wowarmory.php on line 55
Notice: Undefined variable: begin in /.../wiki/extensions/WoWItem/includes/wowarmory.php on line 73
Those last two lines repeat many times. It's dying on this code segment:
if (!$wlwowitem->init) { $wlwowitem = new wowiteminfo; }
I think because it's trying to run the init method on an object that hasn't been created yet.
Suggestions?
joe
-- Those are not errors, they are notices and it doesn't have anything to do with which version of MediaWiki you are using, your installation of PHP has E_NOTICE messages displayed. See the PHP function error_reporting() for more information. At any rate, I will look into it.
Notice: Trying to get property of non-object in /.../wiki/extensions/WoWItem/wowitem.inc on line 43
Fixed.
Notice: Undefined variable: begin in /.../wiki/extensions/WoWItem/includes/wowarmory.php on line 55
Fixed.
Notice: Undefined variable: begin in /.../wiki/extensions/WoWItem/includes/wowarmory.php on line 73
Fixed.
I cannot fix the "Undefined index" notices with 100% certainty as the indexes in $args are not provided by me, they are provided by the MediaWiki software.
$WoWItem_site should be defined in LocalSettings.php, I will add this to the installation instructions on the article page.
Any other notices unrelated to WoWItem are not my responsibility.
P.S. The script is not dying, notices do not kill a script.
--Egingell 07:25, 10 June 2008 (UTC)
no icons
editI dont get any icons after implementing this extention.
<item img="true">Dreadmist Mask</item>
Is there a known issue with the icon images? Look http://wiki.theinevitable.nl/index.php?title=Main_Page voorbeeld 2 is where I put that. Are these not working out of the box?
Is there maybe a way I can implement | wow item pack locally? Since when I look at the code i see it does something with /14/4/image.jpg
the itempack is .png and the location is /allfiles.png instead of subfolders.
Thanks for your help and time,
--dRiN
Sorry, it took so long to reply. The script downloads the icon from the site it probes and saves it to your server. If your PHP user doesn't have access to write files and folders to the directory, the file will not be saved. --Egingell 06:28, 8 November 2008 (UTC)
Stable?
editDoesnt seem to be available or stable