Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post 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 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...


Quoted from wowhead's site
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 </head> tag...
Code: [Download] [Hide]
  1. <script src="http://www.wowhead.com/widgets/power.js"></script>  
  2. <script src="wow/jquery-1.2.1.js"></script>  
  3. <script src="wow/wowhead_linker.js"></script> 


4. Open /forum/templates/YourOwnTemplate/bbcode.tpl
Add this in the bottom of the file:
Code: [Download] [Hide]
  1. <!-- BEGIN wow --><a href="wow/wowhead_wrapper.php?item={TEXT}" class="wowhead">{TEXT}</a><!-- END wow --> 


5. Open /forum/includes/bbcode.php
* Find this line:
Code: [Download] [Hide]
  1. $bbcode_tpl['email'] = str_replace('{EMAIL}', '1', $bbcode_tpl['email']); 

and insert these line after it:
Code: [Download] [Hide]
  1. $bbcode_tpl['wow'] = str_replace('{TEXT}', '1', $bbcode_tpl['wow']); 

* Find this line:
Code: [Download] [Hide]
  1. $replacements[] = $bbcode_tpl['img']; 

and insert these lines after it:
Code: [Download] [Hide]
  1. // [wow]text[/wow]  
  2. $patterns[] = "#[wow]([^?nrt].*?)[/wow]#is";  
  3. $replacements[] = $bbcode_tpl['wow']; 


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
 



 
glitchiesSend private message  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: Incorperating Wowhead Tooltips 
 
Icy Phoenix uses a different bbCode structure than what you have for phpBB3?

h**p://***.icyphoenix.com/viewtopic...&p=29782#p29782
 
 
 
Back to topPage bottom
Reply with quote Download Post 
Post Re: Incorperating Wowhead Tooltips 
 
What is the bad thing? You wanted to show the grafics shown by java as the link "text"?
 



 
novice programmerSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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: [Download] [Hide]
  1. [url=http://www.wowhead.com/?item=1750]linked chain gloves[/url] 

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.
 current

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.
 mouseover

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: [Download] [Hide]
  1. // Wowhead  
  2.           
  3.         if($tag === 'wow')  
  4.         {  
  5.             $html = '<a href="wow/wowhead_wrapper.php?item={TEXT}" class="wowhead">{TEXT}</a>';  
  6.             return array(  
  7.                 'valid' => true,  
  8.                 'html' => $html,  
  9.                 'allow_nested' => false,  
  10.             );  
  11.         }  
  12.  
  13.          


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}
 mouseovertext (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: [Download] [Hide]
  1. // Wowhead Tooltips  
  2.         if($tag === 'wow')  
  3.         {  
  4.             $html = '<a href="wow/wowhead_wrapper.php?item='. urlencode($content) .'" class="wowhead">' . $content . '</a>';  
  5.             return array(  
  6.                 'valid' => true,  
  7.                 'html' => $html,  
  8.                 'allow_nested' => false,  
  9.             );  
  10.         } 


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 tanglewood 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.
 




____________
http://testing.dirtyhorde.net
IPv=1.2.0.27
default theme
 
glitchiesSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: Incorperating Wowhead Tooltips 
 
OK, lightbox problems aside...

I want to know how to do something else.  

right now i am using
Code: [Download] [Hide]
  1. // Wowhead Tooltips  
  2.         if($tag === 'wow')  
  3.         {  
  4.             $html = '<a href="wow/wowhead_wrapper.php?item='. $content .'" class="wowhead"><strong>' . $content . '</strong></a>';  
  5.             return array(  
  6.                 'valid' => true,  
  7.                 'html' => $html,  
  8.                 'allow_nested' => false,  
  9.             );  
  10.         }  
  11.          


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: [Download] [Hide]
  1. <wowhead>  
  2. −  
  3. <item id="11027">  
  4. <name>Wood Frog Box</name>  
  5. <level>35</level>  
  6. <quality id="1">Common</quality>  
  7. <class id="15">Miscellaneous</class>  
  8. <subclass id="2">Small Pets</subclass>  
  9. <icon displayId="17284">INV_Crate_02</icon>  
  10. <inventorySlot id="0"/>  
  11. −  
  12. <htmlTooltip>  
  13. <table><tr><td><b class="q1">Wood Frog Box</b><br />Binds when used</td></tr></table><table><tr><td><span class="q2">Use: Right Click to summon and dismiss your frog.</span></td></tr></table>  
  14. </htmlTooltip>  
  15. <link>http://www.wowhead.com/?item=11027</link>  
  16. </item>  
  17. </wowhead> 


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?
 



 
glitchiesSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events