User:Stewart/sandbox

From Team Fortress Wiki
< User:Stewart
Revision as of 01:55, 12 November 2011 by Stewart (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This page is a proof-of-concept example of the Tooltip proposal here: Team_Fortress_Wiki:Discussion#Item_Tooltips_on_Item_Page_Links. In order for this example to work, you will need to copy the javascript from User:Stewart/vector.js into a page of the same name in your own userspace. It is suggested that you use the following code in your vector.js:

importScript("User:Stewart/vector.js");


Please note that the User:Stewart/Sticky_Jumper tooltip currently looks a little broken because it is a copy of the relevant templates and pages operating in my userspace and therefore cannot find the correct icon or name.

User:Stewart/Sticky_Jumper Working Tooltip

User:Stewart/NonSticky_Jumper Broken Tooltip

User:Stewart/Sticky_Jumper No Tooltip


(Note that the tooltips on the items in this blueprint example won't work as they are using the live Template:Backpack_item template, not User:Stewart/Backpack_item) Changes on the 11th mean that this blueprint now uses User:Stewart/TooltipLocations as a global blacklist of pages that should not have tooltips. The nolink parameters have been removed, and the 2 link templates changed slightly. User:Stewart/ItemLink now behaves exactly like a normal link, taking a page and an optional title, the tooltip wrapper is either applied or ignored based on whether the link target is in the blacklist or not. User:Stewart/ItemLinkWrapper takes 2 arguments - the content to wrap (as before) and the link target to check against the blacklist (this variation is intended for use with images).

Class Token - Demoman Slot Token - Secondary Scrap Metal Possible Results
Item icon Class Token - Demoman.png + Item icon Slot Token - Secondary.png + Item icon Scrap Metal.png =
Item icon Scottish Resistance.png Item icon Chargin' Targe.png Item icon Sticky Jumper.png
Item icon Splendid Screen.png