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
- [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.
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.
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
- // Wowhead
-
- if($tag === 'wow')
- {
- $html = '<a href="wow/wowhead_wrapper.php?item={TEXT}" class="wowhead">{TEXT}</a>';
- return array(
- 'valid' => true,
- 'html' => $html,
- 'allow_nested' => false,
- );
- }
-
-
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}
(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.
- // Wowhead Tooltips
- if($tag === 'wow')
- {
- $html = '<a href="wow/wowhead_wrapper.php?item='. urlencode($content) .'" class="wowhead">' . $content . '</a>';
- return array(
- 'valid' => true,
- 'html' => $html,
- 'allow_nested' => false,
- );
- }
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.