This site makes extensive use of JavaScript.
Please enable JavaScript in your browser.
Classic Theme
Thottbot Theme
Add Wowhead tooltips to your forums or CMS.
Return to board index
Post by
bahadur
...Since I redesigned the script (version 2.x+) I have not tested it to work with phpBB2. My advice is to upgrade to phpBB3, which comes with a converter to turn your phpBB2 MySQL database into something phpBB3 can use. If not, then there's not really anything I can do to help...I no longer run a phpBB2 board. If you're somewhat knowledgeable with PHP then you can take a look at phpBB2's code and find somewhere that is called every time a post is viewed. For example, I believe bbcode.php is one such file that has a couple of functions that you could add $text = $whp_parse($text); to, in order to get the text parsed. I used to use that file to hook into my old forums with other scripts that I was working on at the time. If I can help in any way, please let me know....
hi CraCkpot, it would be enough if said phpbb2 guide on page 1 of this thread exists somewhere for me as a reference, even if it is outdated. Quote from page 1:
CraCkpot, you're Prince among princes :) I followed your phpBB2 instructions and everything worked perfectly (once I re-downloaded the latest version of your script). It even co-exists with the original simple wowhead setup based on ItemId number. I am now using both methods:
I have my reasons to not switch to phpbb3 :)
I can always try to play around with phpbb but I found it more clever to ask other people's experience before trying to reinvent the wheel.
Post by
186106
This post was from a user who has deleted their account.
Post by
Lockslap
any chance this will work well with russian? :) i installed wowhead-2.5.2 on phpbb3
if i try to use russian_item_name - it not working..
but if i set var $wowhead_lang = 'ru'; - it partially works
- still not working, but
item_id - works - shows russian item name and description
same thing with and -
works only with achievement/quest id in bbcode
- dosn't work at all..
The Russian language is not currently supported. I can't seem to get any information from Wowhead if I attempt to search for an object (quest, spell, achievement, or item) using its Russian name. This is most likely due to improper encoding, but as I have stated in the past I am very bad at dealing with encodings.
Post by
227803
This post was from a user who has deleted their account.
Post by
242545
This post was from a user who has deleted their account.
Post by
Lockslap
If you use IDs for all Russian objects, then yes the script will function. The script doesn't need to search Wowhead if you already have the ID.
the funtion works? because , my addon has been working perfectly until yesterday.. and now everything works well less..this fuction.
Anyone knows anything?
Thanks.
I'm afraid I am going to need more information than what you have provided. For example, if you changed anything, if Wowhead was down, etc.
Post by
242545
This post was from a user who has deleted their account.
Post by
252635
This post was from a user who has deleted their account.
Post by
Lockslap
Hi craCkpot... first, I love wowhead and I love your script ;)
Can you tell me if there's a way to remove the check for wowhead.com to be online before 2.5.3 is out? I had to remove the script cause our forum became too slow with it.
Thanks and keep up the good work!
You sure can. Simply add (in parse.php):
$wowhead_online = true; Somewhere
BEFORE
where it actually does the check to Wowhead (soon after the function whp_parse($text); line).
Post by
Lockslap
I am going to be releasing a
BETA
version of 2.5.3 tonight to have other people test out the changes I have made. They are listed below.
Removed the check to see if Wowhead is online. This was causing too many slow downs on people's forums, as well as my own.
I have revamped (improved, I think) the pattern system. The patterns for each type of object this script can display are saved in the folder and are loaded into the script every time it is declared (only once during script execution, so don't worry about any lag issues. I have left the old pattern system in place while this one gets tested. That way it is easy to reverse in case of any issues.
Perhaps the most important change is the way the script handles multiple languages (more so character encodings). I did some research into phpBB's code (and Google <3) and phpBB only supports ASCII and UTF-8, regardless of the language being used. This should provide an easier solution to make sure all of the characters of the various languages are properly display, seeing as phpBB supports all of the languages that Wowhead supports. But, I am not completely finished with that just yet, which is why I am holding off on releasing.
One minor change is I believe that I have found a more efficient place for the script to get parsed inside of phpBB's execution. This should improve load times (even if they aren't noticeable). The changes are posted @ the script's
website
.
I will post the beta version sometime in the next couple of hours or so, or after I get this encoding shizzle figured out. Now let me go smoke and clear my head, then its back to work.
EDIT
It appears I have finally figured out what's going, in terms of certain characters of non-English languages not being parsed properly. It seems the problem lies in the urlencode() and utf8_encode functions I was trying to use to encode the text before querying Wowhead, these functions convert to the character's ASCII equivalent, not the Unicode. So now I am in the process of writing functions that will properly encode the string and, hopefully, make the script truly support all current WoW-supported languages. In light of this, I am going to hold off of release.
Post by
Lockslap
Version 2.5.3 Released!
The changes are as mentioned above with a couple of additions and clarifications.
There is an extra config variable located in wowhead.php which is the path (not url) to the patterns folder. If you are uncertain about what the path is then you can point your browser to path.php inside of the pattern folder and then copy and paste the text it prints out.
MAKE SURE YOU INCLUDE THE TRAILING (ENDING) SLASH!
All languages, except Russian (sorry, still can't figure it out), should now be fully supported by the script. If not, then please let me know.
The method by which the script handles the patterns for the links has been changed to an external system, rather than they be config variables. They are located inside of the folder. If this does not seem to work for people then the previous method is still coded into the script, just a few changes need to be made (will post later, if necessary).
Due to the rather immense slow down caused, I have removed the script's check to see if Wowhead is online. If Wowhead goes down, then you will most likely have to deal with any problems it may cause. Wowhead is usually really good about uptime (aside from scheduled maintenance ), so it shouldn't be that much of an issue.
The MySQL(i) table scheme was changed to support the many different characters available in Unicode.
UPDATING FROM PREVIOUS VERSION:
If you are updating from a previous version then you must run create_table.php once again in order to apply the updates to the table. This will clear your cache, which really isn't an issue. Also, this step is not required, but I have found a quicker execution point for the script from within phpBB's code. Just follow step number 5 at
http://wowhead.crackpot.us/#installphpbb3
and then you'll be all set.
Okay that's it for tonight folks. I have been working on this encoding issue for 4+ hours right now and my computer screen is getting blurry. Before I sign off I would like to personally thank Jens Maier for pointing me in the right direction with getting this encoding issue fixed. Him and I have been in contact via email (admin@crackpot.us) about possible solutions and I think I have found one. So thanks, Jens!
Good night everyone!
Post by
abouthere
Well, thanks for taking the time to address the problems the check for WoW Head being up was causing.
Unfortunately, the new code doesn't work.
I have backed out the previous changes (i.e. taken out the previous edits in includes_content.php). I've edited my wowhead.php file to include the correct path to the patterns folder (using your script to get the path). I've overwritten my wowhead folder with your new one and I've edited my viewtopic.php file in the manner indicated.
I re-ran the create_table.php because I was using caching so that it'd do the updates you mentioned. I've then cleared my cache and browsed to a forum where we're using the item, quest, achievements and spell tags. Any post with the stuff in it's parsing for, now returns a pure white page, which if I'm not mistaken indicates an error in the code that's being run so nothing is displayed.
If I remove the edits from my viewtopic.php file my board works fine apart from (obviously) the aforementioned BBCodes don't work. I put the edits back in but tried it without local caching in case that was an issue, same thing. So, I've backed the edits out at the moment.
I'm running MySQL5, PHP5 and I'm on a VPS with PHPBB3. Our site is at
http://www.champions-of-draenor.com/
Can you think of a reason please?
Regards,
Post by
Verderf
Hello,
Ive been using your awesome itemlink script for quite some time now, unfortunatly my forum died after a failed phpbb 3.0.2->3.0.3 upgrade so I had to reinstall my whole forum.
Ive followed the instructions to the letter, but once I browse to a thread that contains an item link I get this error:
Fatal error: Call to undefined method wowhead::utf8_to_unicode() in /home/cruxmort/domains/cruxmortys.net/public_html/forum/wowhead/includes/wowhead.php on line 565
any idea what Ive done wrong?
Thanks in advance!
Post by
MalrikBH
Wowhead.php line 565, change:
$data = $this->_read_url($this->_getDomain() . '/?item=' . $this->utf8_to_unicode($name) . '&xml');
to
$data = $this->_read_url($this->_getDomain() . '/?item=' . $this->_utf8_to_unicode($name) . '&xml');
I'm still getting stupidly slow loading times on pages fetching data.
Also item names with " ' " in are turning up "Not found".
I'd suggest changing the items so that you fetch the data for them on mouseover, instead of on page load.
I also checked the cache contents via PHPMyAdmin. It doesn't seem to be using it at all. Why? Nothing is being written into the items_cache table at all - is this why it's taking so long?
Post by
Verderf
Thanks MalrikBH, that solved the problem.
Next problem is that it seems to parse the items, but instead of showing an item link it removes the whole line and shows nothing.
Post by
Lockslap
Bah, I hate when a stupid mistake messes up the entire script...I guess that's what I get for working on it for 4+ hours straight in the wee morning hours. I have fixed the issue, you can redownload
2.5.3
and only overwrite wowhead.php, it should fix any issues (make sure you re-edit the config variables).
Next problem is that it seems to parse the items, but instead of showing an item link it removes the whole line and shows nothing.
That is most likely due to the patterns not being parsed correctly. Ensure that you have correctly set $template_dir in wowhead.php.
Post by
abouthere
Thank you for looking at this so quickly.
I've downloaded the package and just replaced my wowhead.php file (after setting my patterns path).
I no longer see the white page of death that indicated an error in the script, but I've a new problem. Any tags in a post aren't showing. The rest of the posts does though.
If you look at
http://champions-of-draenor.com/viewtopic.php?f=4&t=2128
you can see where I've given examples of each BBCode type, but none of the examples are showing.
Any suggestions please? (great work and know what you mean about late night edits sometimes coming back to haunt you).
Cheers!
/EDIT - sounds like I have the same issue as the poster before your last post craCKpot. I used your script to get the proper path and do have the trailing slash present.
Post by
MalrikBH
Hm, I've now got another rather large issue...
I've got a bridge for Joomla and PHPBB3.
For some bizare reason, the bridge needed PHPBB3 in /distribution/, and Joomla in root. The bridge uses a /forum/ intermediate, that everything works through.
For example, you view the entire forums through /forum/ (it's a routing program).
If I use Ashbringer in /forum/, it works, but it checks for wowhead everytime. It's ignoring the cache - it won't even inject it into the database.
If I use /distribution/ however, the item gets injected into the DB, and works fine.
Anyway to solve this?
Post by
Verderf
Awesome, that was the problem :)
Only problem Im having is is for example this error
but im sure thats allready known
also, some of the meta gems turn up as item not found :(
Post by
MalrikBH
Hm, I've now got another rather large issue...
Fixed my Joomla Rokbridge to PHPBB3. I'll try and generalise it and post it here for you to use/intergrate or others to use if I can get it to work on my other site.
Post Reply
This topic is locked. You cannot post a reply.