15
Points

Using R2-Db.com Tooltips on your website!

Created by ♦♦Jesta

Last Updated Nov 16 2011 11:29 AM

PLEASE NOTE: Our tooltip script is in beta, just like our website. You may experience problems with it's usage. If you need assistance or something isn't working right, please contact us.

Do you run a website and would like tooltips like R2-Db.com? Well, as long as you can add some code to the site (specifically a javascript tag), then you're in luck!

R2-Db.com has tried to make it as simple as possible to implement tooltips on every website, follow these simple instructions and we will have you up and running in no time!

Installation

Simply include the following code in the <head></head> of your website!

<script type="text/javascript" src="http://s3.r2-db.com/powered.js"></script>

After including the script on your page, any link you post to anything on R2-Db.com will tooltip when you mouse over it!

How does it work?

By including the code above, you are loading a 4.3kb javascript file from our Amazon S3 CDN. Upon execution, the tooltip script loads a 3kb CSS file (for styling the tooltips) and then scans the page for any link pointing to http://r2-db.com. If the script determines that the link can be tooltiped, it will automatically apply the "on mouse-over" event to create the tooltip when the user hovers over it.

What kind of links does it scan for?

We've tried to include all types of records, profiles and posts in the tooltip script. For example:

<a href="http://r2-db.com/item/8/shamwow">Shamwow</a>

When added to your page, it will look something like this Shamwow (and will tooltip on mouse over).

Currently, the tooltip script supports the following things on R2-Db.com:

Advanced Class, Questions, Article RSS, Article, Answer, Comment, Message, User, Race, Item, Skill, Npc, Quest, Mission, Place, Class, Starship, Companion, Profession, Crew-skill, Achievement, Profile, Guild, Group, Website, Tag, Achievement, Faction

It also works with our RSS feeds!

Why yes, yes it does. If you were to use an RSS aggregation tool with one of our RSS feeds, say the Questions RSS or the DevTracker, the tooltip script recognizes the URLs in the RSS feed and automatically tooltips them as you display them. It works great for wordpress sites that want to aggregate the data on R2-Db.com!

Can I host the script on my server?

You can, and all you'd have to do is download the contents of the script and host it somewhere on your site. HOWEVER, we do not recommend or support this. We are constantly updating the script and improving it's functionality. If you were to copy the script to your server, you would have to manually update every time we issue an update, which could be a pain. Plus, why host it on your server when we have a fast CDN hosting it for you!

Need more?

Feel free to sound off in the comments or send us a message for more support!

If you'd like us to use your Gravatar for this post, please enter your email address.

 
Stash