This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Live
PTR
10.2.7
PTR
10.2.6
Beta
Add Wowhead tooltips to your forums or CMS.
Return to board index
Post by
aesyl
Ahah! I've found the problem. In wowhead.php lines 638 and 677, you misspelled _read_url() as _real_url(). Now I have a problem where apostrophes in quest/item names are being prefixed with a backslash. Clearly an escaping mechanism gone awry! Back to perusing code.
Update: It appears to only do it the first time it fetches the info from WoWHead, when it's taking the data from the cache, the slashes are gone.
Update #2: Fixed that. In all of the getXByID functions, changed..
'name' => $match,to
'name' => stripslashes($match),
The names are already escaped when you pull them from WoWHead.
Post by
Lockslap
Ahah! I've found the problem. In wowhead.php lines 638 and 677, you misspelled _read_url() as _real_url(). Now I have a problem where apostrophes in quest/item names are being prefixed with a backslash. Clearly an escaping mechanism gone awry! Back to perusing code.
Update: It appears to only do it the first time it fetches the info from WoWHead, when it's taking the data from the cache, the slashes are gone.
Update #2: Fixed that. In all of the getXByID functions, changed..
'name' => $match,to
'name' => stripslashes($match),
The names are already escaped when you pull them from WoWHead.
I'm surpised that it didn't throw up an error when it tried to call that function, as far as I know errors aren't surpressed. At any rate, great find!
I have made the necessary fixes and will release 2.4.2 in a little bit.
Post by
Lockslap
Version 2.4.2 Release
There are no major additions to this release it just fixed the bugs that were pointed out by Aesyl.
You can just download this but only overwrite wowhead.php, it is the only file changed in this release.
Post by
Merfed
Version 2.4.2 Release
There are no major additions to this release it just fixed the bugs that were pointed out by Aesyl.
You can just download this but only overwrite wowhead.php, it is the only file changed in this release.
Getting this error: Fatal error: Call to undefined function: simplexml_load_string() in /path/to/forum/wowhead/includes/wowhead.php on line 485 Any Ideas why?
Path/to/forum was changed by me when i posted this for privacy reasons.
Post by
Lockslap
Version 2.4.2 Release
There are no major additions to this release it just fixed the bugs that were pointed out by Aesyl.
You can just download this but only overwrite wowhead.php, it is the only file changed in this release.
Getting this error: Fatal error: Call to undefined function: simplexml_load_string() in /path/to/forum/wowhead/includes/wowhead.php on line 485 Any Ideas why?
Path/to/forum was changed by me when i posted this for privacy reasons.
It means that most likely you're using PHP 4.x, which is no longer supported. If you are using PHP 5.x then it means that your host has disabled SimpleXML for some reason, in which case you need to talk to your host about enabling it.
When I get done with this raid I am going to write a quick script to determine if the script will work on a person's host.
Post by
Lockslap
Requirement Tester Released!
Its nothing special, but it will check to make sure you have PHP installed (duh?), what version (5.x+), MySQL or MySQLi, SimpleXML enabled, cURL enabled (not required, but it still checks).
It will tell you if you pass or fail.
Hope this helps some of you. Just extract the file anywhere on your webserver then point your browser to it.
Post by
Merfed
Turned on php5. thanks for the response :)
Post by
Acacia
After attempting to install the script on our phpBB 3.0.2 I'm getting the following error on the page of the post where I tested the item tags:
PHP Notice: in file /wowhead/includes/wowhead.php on line 485: simplexml_load_string() expects at most 2 parameters, 3 given
PHP Notice: in file /includes/functions.php on line 3548: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3550: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3551: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3552: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
MySQL:
MySQL 4.0.24-standard-log
PHP:
5.0.3
Requirements:
passed though no cURL
Create_table returned errors relating to the
character set utf8 collate utf8_unicode_ci
parts, which I removed, and then ran the code in phpAdmin. The table is there and no other errors is reported, except for the one above.
Any advice?
Just to clarify Im getting these results with the item tag together with the errors above:
Anarchy
Post by
aesyl
The third parameter being used in simplexml_load_string was added as of PHP 5.1. Crackpot, you may want to update the requirements to PHP 5.1+.
Post by
226828
This post was from a user who has deleted their account.
Post by
sarbian
The french item with an accent don't seems to work.
Exemple : Lame-tonnerre, épée bénie du Cherchevent
(
http://fr.wowhead.com/?item=19019
)
Post by
Lockslap
I am going to modify the checker to account for what was brought to my attention in a previous post. As it turns out you must be running at least PHP 5.1+ in order for the script to work. It has to do with a parameter that I am using to remove CDATA tags from XML items. I am writing a fix to remove it manually if you do not have the option with SimpleXML.
I will release the fix tomorrow after work.
Post by
Lockslap
Version 2.4.3 Released
Fixed the issue with SimpleXML and PHP 5.0.x, it will now strip the CData tags before creating the SimpleXML object (which was the only reason for the 3rd parameter when making the function call). I also removed the character set options from the MySQL table to avoid any issues similar to the one posted above.
Other than that, there's not really any major changes. Just general upkeep and bug fixes.
Enjoy!
Post by
227803
This post was from a user who has deleted their account.
Post by
228212
This post was from a user who has deleted their account.
Post by
Lockslap
Well it appears that the lines to search for when trying to link a spell that I suppose is a recipe, I'm going to do a bit more research to verify this, and my script isn't doing that. That is why when you're trying to link it via name it doesn't work, whereas when using the ID only it does work (they're coded to work differently). So in light of this, I am going to do a bit more testing to make sure of what is going on, then I'll write the code to handle both of them.
Also, this morning I received an e-mail from a user who wanted PHP 4.x support once again, and he brought to my attention the fact that someone has made a back-port of SimpleXML, and then took the liberty to write it into the script. So in version 2.5 (coming soon!) I will be restoring PHP 4.x support (again, lol), even though I am not running it and nor should you ;-)
Once again, please if you find any bugs or have any comments feel free to post them and I will address any issues you find!
Thanks for the continued support,
craCkpot
EDIT
Sorry if this post seems jumbled or incoherent...I just woke up!
Post by
Acacia
Cheers,
the 2.4.3 update solved both the table creation issue and the error messages I received. Regular items are now parsing prettily ^^
Still cant get the wotlk item code to work but I'm happy with the regular items anywho :)
Post by
226554
This post was from a user who has deleted their account.
Post by
Acacia
Oops, I think I spoke too soon. Some items loads OK, while on some I seem to get some issues. The data seems to be fetched correctly, though it wont display correctly at all.
I've created a test thread here:
http://www.mahina.se/musketeers/viewtopic.php?f=16&t=102&start=0&st=0&sk=t&sd=a
Basically the errors returned are:
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: Entity: line 1: parser error : Entity 'nbsp' not defined
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: table>Use: Teaches you how to summon this mount.
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: ^
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: Entity: line 1: parser error : Entity 'nbsp' not defined
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: to summon this mount. Can only be summoned in Outland or Northrend.
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: ^
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: Entity: line 1: parser error : Entity 'nbsp' not defined
PHP Notice: in file /wowhead/includes/wowhead.php on line 499: r>
and
PHP Notice: in file /includes/functions.php on line 3548: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3550: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3551: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
PHP Notice: in file /includes/functions.php on line 3552: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2975)
Post by
ulic
I'm getting when I use the code Hellfire Ramparts, is that the wrong syntax, I just referenced the website in your signature.
Also some spells aren't working, like 28583.
Post Reply
This topic is locked. You cannot post a reply.