Pages

Sunday, June 21, 2009

Add Wowhead Tooltips to Your Site

A lot of readers have been asking me how they can enable those Wowhead tooltips that many sites and blogs are using. When I looked at their blogs, I noticed that they had linked correctly to a Wowhead item/spell/quest/whatever page but the tooltip wasn't showing when you hovered the mouse over the link.

Don't worry, it's easy to fix that. You need to add a line of code to your site. The tooltips use Javascript which is hosted on Wowhead's server so you need to link to that JS file in order for the tooltips to work.

You get the code from the Powered by Wowhead page.
<script src="http://static.wowhead.com/widgets/power.js"></script>
After copying the line, open your blog's admin section and get to the part where you can edit the blog's source code directly. In Blogger's case that's located under Layout > Edit HTML.

Paste the code right under the "head" tag. You are done. Wowhead's tooltips should work now.

12 comments:

Anonymous said...

If only this worked for Wordpress!

Darth Solo said...

Of course it works with Wordpress. It works with any site. Just put the code within the "head" tags and it will work.

Anonymous said...

It doesn't in that you can't put the code in - you can't edit the source code for the blog directly I don't think, unless you speak CSS. Now in fairness this might be because I'm using a default layout, but...

You can edit the HTML for individual pages, however I've actually tried this in the past (inserting the Wowhead code) and it's never seemed to do anything, plus the main page doesn't count as a 'page' on the list - only additional pages which you create are listed.

I did hear somewhere that if you actually use Wordpress hosted pages, as opposed to blogging directly from the site, it works, so maybe when you pay for Wordpress to host them you can get at the code then.

Darth Solo said...

So wait, where is your site hosted? I assume it's on Wordpress' servers, right? I have another blog that's on Wordpress but it's hosted on my own server so I have access to the files. Is there no way you can access those files?

In the Wordpress admin account, you can also go to Design > Theme Editor and pick the Header (header.php) file to edit. You can insert the Wowhead code before the "head" tag closes. Caveat: you need to have write access to that file in order to save it.

Anonymous said...

Unfortunately Wordpress doesnt allow scripting on their free blogs so no can do...

However see...
www.blogazeroth.com/viewtopic.php?f=14&t=1253

for n alternative method solution...

Anonymous said...

Sweeeeet! Thank you very much! :)

I had always wondered how to do it, but just never got around to researching it.

Anonymous said...

What Anon said above :(

Darth Solo said...

Dang it guys! Can't you transfer to Blogspot then? What if you try to contact the people at Wordpress, explaining the situation?

It seems to me that if your blog is hosted by Wordpress you are in the least flexible situation. The way I see it, a Wordpress blog on your own server is the most flexible, followed by Blogspot, followed by a blog hosted on Wordpress' servers where you can't do jack.

Anonymous said...

I could do, but that would involve a lot of work, and I can still link the abilities and what-not. Besides, I would think it costs to host my own blog, and I don't think I'm blogging seriously enough for that - when I have as many readers as you ^^

I might contact WordPress though, that's not a bad idea. They may be unaware of the issue.

Darth Solo said...

But if you switch to Blogger, like me and many others, you won't have to pay for hosting. I'm just saying... It sucks not to have access to the code behind your site.

Anonymous said...

No, they are aware of the issue, they just don't allow scripting access for obvious security reasons. :-)

Darth Solo said...

Well, I don't blame them. Nonetheless, Blogger allows scripts. I'm not sure how they would cover their asses in the eventuality that someone decides to insert some nasty scripts.