https://www.icyphoenix.com/viewtopic.php?f=35&t=4460 ----------------------------------- glitchies Wed 30 Jul, 2008 04:47 Incorperating Wowhead Tooltips ----------------------------------- hi there, i run a guild website using IP, and i really like how versatile it is, but i have a problem. My guild has asked me to incorporate [url=http://www.wowhead.com/?forums&topic=3464]WoWhead's tooltips. I can get it sorta working, i can make url's give the tooltip thing, but i can not make the bbcode portion of it work. here is the instructions that i have been trying to follow. Obviosly i ran into problems right away, since it is calling for files that dont exist... [i][b]Quoted from wowhead's site[/b][/i] [quote]I got solution for using Horris script in phpBB2. With this script you can use following bbcode with tooltip, URL and item quality color: [wow]Megaepic[/wow] So, follow this steps: 1. Download phpBB Wowhead mod by Horris http://mattmayers.com/download/phpBB_wowhead_mod.zip 2. Then, unzip and copy the whole wow/ directory to the root directory of your phpBB install. 3. Next, for every template you want this to work with you have to edit the overall_header.html file and add the following lines right before the tag... [code] [/code] 4. Open /forum/templates/YourOwnTemplate/bbcode.tpl Add this in the bottom of the file: [code]{TEXT}[/code] 5. Open /forum/includes/bbcode.php * Find this line: [code]$bbcode_tpl['email'] = str_replace('{EMAIL}', '1', $bbcode_tpl['email']);[/code] and insert these line after it: [code]$bbcode_tpl['wow'] = str_replace('{TEXT}', '1', $bbcode_tpl['wow']);[/code] * Find this line: [code]$replacements[] = $bbcode_tpl['img'];[/code] and insert these lines after it: [code]// [wow]text[/wow] $patterns[] = "#[wow]([^?nrt].*?)[/wow]#is"; $replacements[] = $bbcode_tpl['wow'];[/code][/quote] this is my test site, as you can see, i got the first part working, now just to figure out the rest... any help with this would be nice. http://testing.dirtyhorde.net/viewtopic.php?f=1&t=3 ----------------------------------- Lopalong Wed 30 Jul, 2008 16:05 Re: Incorperating Wowhead Tooltips ----------------------------------- Icy Phoenix uses a different bbCode structure than what you have for phpBB3? http://www.icyphoenix.com/viewtopic.php?f=4&t=4403&p=29782#p29782 ----------------------------------- novice programmer Wed 30 Jul, 2008 17:08 Re: Incorperating Wowhead Tooltips ----------------------------------- What is the bad thing? You wanted to show the grafics shown by java as the link "text"? ----------------------------------- glitchies Wed 30 Jul, 2008 18:05 Re: Incorperating Wowhead Tooltips ----------------------------------- ok, from what i understand, the script that i am trying to incorporate does a query of the wowhead database for me, so if i want a tooltip and link to show me the item i am looking at, i dont have to go to wowhead, find the item and then use that link. the way it is setup now, i would have to do the following steps... go to wowhead.com to find the item copy the link put in my post this [code][url=http://www.wowhead.com/?item=1750]linked chain gloves[/code] so say if i have 40 some odd items to look up, this gets annoying every night. what i am lead to believe is that the script does the search for me. so all i would have to put in the post is [wow]chain linked gloves[/wow] right now i do have another type of tooltip working, but it is using ajax and it doesnt look as nice. plus it doesnt clamp to the screen, so if a link is at the bottom of the webpage, it gets cut off. this is what it looks like right now with the current script. as you can see, it puts the tooltip at the end and bottom of the link, so if it is near the edge or bottom of the page, it gets cut off. [img]http://www.icyphoenix.com/files/images/2804/current.jpg[/img] and this is what i want it to look like. this one is more dynamic, it will move around depending on where on the screen the link is. [img]http://www.icyphoenix.com/files/images/2804/mouseover.jpg[/img] EDIT: ok, little bit of an update on this. i got it to the point where it creates links and tooltips, but to only one thing.. a bit of code that i cant (read:dont know how to) figure out to change/add. this is the code that i have [code]// Wowhead if($tag === 'wow') { $html = '{TEXT}'; return array( 'valid' => true, 'html' => $html, 'allow_nested' => false, ); } [/code] now what i want to do is replace the {TEXT} portions with what i put in between the [wow][/wow] right now all i ever get when i do a [wow]linked chain gloves[/wow] is a link to encripted texts.. and the word {TEXT} [img]http://www.icyphoenix.com/files/images/2804/mouseovertext.jpg[/img] (i just highlighted the word {TEXT} so it can be seen.) EDIT#2: Good news everybody! I got it working (for the most part) I go the tooltip and the link working by doing this. [code]// Wowhead Tooltips if($tag === 'wow') { $html = '' . $content . ''; return array( 'valid' => true, 'html' => $html, 'allow_nested' => false, ); }[/code] the only thing I would like to change now is the end result of what has been tagged. right now, if i put; hey guys! i got a [wow]tanglewood[/wow] today! it shows up as hey guys! i got a [color=#007fff]tanglewood[/color] today! (obviously with all the links and tooltips working) blue because that is the quality, but the real name of it is Tanglewood Staff. this shows up in the tooltip, so it is pulling it from an xml file off wowhead. i was wondering how i can get it to change the appearance of what i have tagged by replacing the text that i typed with what the name of the opject? EDIT#3: /le_sigh... Well, i got it working at the cost of giving up lightbox... not happy. if i have my lightbox scripts in overall_header.tpl first, lightbox works,but the tooltips dont. And if i have it after these scripts lightbox doesnt work and the tooltips do. ----------------------------------- glitchies Thu 31 Jul, 2008 20:05 Re: Incorperating Wowhead Tooltips ----------------------------------- OK, lightbox problems aside... I want to know how to do something else. right now i am using [code]// Wowhead Tooltips if($tag === 'wow') { $html = '' . $content . ''; return array( 'valid' => true, 'html' => $html, 'allow_nested' => false, ); } [/code] to get my mouseover and links pointing to the right place, what i want to do is replace the second $content in the string, with the name of the item. This is what the xml info looks like that it is looking at to get the other info for getting its item number and colouring the the item according to its quality, so i know it has access to the name of the item as well. [code] Wood Frog Box 35 Common Miscellaneous Small Pets INV_Crate_02
Wood Frog Box
Binds when used
Use: Right Click to summon and dismiss your frog.
 http://www.wowhead.com/?item=11027 [/code] here is the link to the java files that it is using to do the background work of replacing the name with the item so it can do a proper search. http://mattmayers.com/download/phpBB_wowhead_mod.zip any ideas on how to get it to change the name?