Tooltip - Syndication - Final Fantasy XIV Database - ffxiv.yg.com

Add YG Final Fantasy XIV tooltip syndication to your website for FFXIV items

Final Fantasy XIV Tooltips

Get YG tooltips displaying on your site now!

Step 1:

  <script src="http://static.yg.com/js/exsyndication.js"></script>
For blogs, forums, and guild sites this is best placed in the index, header, footer, or any additional page that gets included throughout your site.

Step 2:





Samples:


Item: Weathered Gladius
<a href="http://ffxiv.yg.com/de/item/weathered-gladius?id=4030010">Weathered Gladius</a>
Skill: Blizzard
<a href="http://ffxiv.yg.com/de/skill/blizzard?id=28937">Blizzard</a>
Guildleve: Meet the Flint Stones
<a href="http://ffxiv.yg.com/de/guildleve/meet-the-flint-stones?id=3200">Meet the Flint Stones</a>
Quest: The Mad Tanner
<a href="http://ffxiv.yg.com/de/quest/the-mad-hatter?id=120016">The Mad Tanner</a>
Recipe: Marmot Steak
<a href="http://ffxiv.yg.com/de/recipe/marmot-steak?id=209">Marmot Steak</a>

How to customize the Final Fantasy XIV YG tooltip.

Adding one or more custom "class" to an anchor tag is the key to customizing the tooltips.

TIP: An anchor tag is the HTML link code and a class is an attribute you can add to the tag. Here is an example of a simple anchor tag with two custom class attributes. The first one is shown in italics while the second is underlined.
 <a class="first-class second-class" href="http://ffxiv.yg.com/de">Final Fantasy XIV Database</a>

Custom class values that you can use:


"yg-nocolor" - Will not change the text color based on the item name color: Weathered Hora
<a class="yg-nocolor" href="http://ffxiv.yg.com/de/item/weathered-hora?id=4020001">Weathered Hora</a>
"yg-name" - Text will look-up the object name: Unknown item
  <a class="yg-name" href="http://ffxiv.yg.com/de/item/copper-circlet?id=8010401">Unknown item</a>
"yg-iconsmall" - Include the small icon: Hempen Hat
  <a class="yg-iconsmall" href="http://ffxiv.yg.com/de/item/hempen-hat?id=8010104">Hempen Hat</a>
"yg-iconmedium" - Include the medium icon: Hempen Hat
  <a class="yg-iconmedium" href="http://ffxiv.yg.com/de/item/hempen-hat?id=8010104">Hempen Hat</a>
"yg-iconlarge" - Include the large icon: Hempen Hat
  <a class="yg-iconlarge" href="http://ffxiv.yg.com/de/item/hempen-hat?id=8010104">Hempen Hat</a>
"yg-notext" - Does not include any text. Can only use with yg-iconsmall or yg-iconmedium. Examples shown below.

Examples of using more than one class value:


"yg-iconsmall yg-notext" - display the small icon with no text: Vintage Celata
  <a class="yg-iconsmall yg-notext" href="http://ffxiv.yg.com/de/item/vintage-celata?id=8010017">Vintage Celata</a>
"yg-iconmedium yg-notext" - display the medium icon with no text: Vintage Celata
  <a class="yg-iconmedium yg-notext" href="http://ffxiv.yg.com/de/item/vintage-celata?id=8010017">Vintage Celata</a>
"yg-iconlarge yg-notext" - display the large icon with no text: Vintage Celata
  <a class="yg-iconlarge yg-notext" href="http://ffxiv.yg.com/de/item/vintage-celata?id=8010017">Vintage Celata</a>

Advanced Tooltip Syndication:


The following syndication features have been added to help make the integration of tool-tips into existing platforms easy and customizable.

How to use the advanced tooltip syndication.
    Simply add the following JS parameters below the <script src="http://static.yg.com/js/exsyndication.js" type="text/javascript"></script> line in your HTML code. You can use any combination of the following parameters to tweak how our tooltips display and get integrated into your site.

<script type="text/javascript">
    YG.UserSettings.Syndication =
    {
        removeClasses: ['extern'],
        defaultClass: 'yg-iconsmall yg-notext',
        clearTitle: true
    }
</script>

removeClasses - Used to remove pre-existing CSS classes that may automatically get added to anchor tags by your CMS or platform. An example of this is external links found in MediaWiki default to having a 'extern' CSS class added to them which sets a style that conflicts with our icons. The parameter accepts an array of strings for classes which you may want disabled when using our tooltips.

defaultClass - This option lets you set the default YG class options for all links to our site. If you always want to have small icons next to our links you can simply set it here instead of having to add in the 'yg-iconsmall' class to every anchor tag. This is a very useful option for forum admins who do not want to create custom BBCode rules.

clearTitle - If this parameter is set to true it will remove the title attribute from anchor tags that some content systems, such as MediaWiki, automatically add. This allows you to remove the title overlay so it doesn't interfere with the hovering tooltip our script adds.

Note: These parameter rules only apply to the links to our site where we add tool-tips and will not interfere with any other links found on your page.

Add tooltips to dynamic links
    If you are generating links dynamically (from Ajax or JavaScript) and want to add tooltips to the links you generate, just call the function specified below after you have generated the links and appended them somewhere in your page. The function will automatically add tooltips to the newly added links.
YG.Syndication.Regen();