Difference between revisions of "User:Stewart/sandbox"

From Team Fortress Wiki
Jump to: navigation, search
(Created page with "<span class="backpack-link">User:Stewart/Sticky_Jumper</span>")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span class="backpack-link">[[User:Stewart/Sticky_Jumper]]</span>
+
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:
 +
 
 +
<code>importScript("User:Stewart/vector.js");</code>
 +
 
 +
 
 +
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/ItemLink|User:Stewart/Sticky_Jumper}} Working Tooltip
 +
 
 +
{{User:Stewart/ItemLink|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).
 +
{{User:Stewart/Blueprint/core| ingredient-1 = Class Token - Demoman| ingredient-2 = Slot Token - Secondary | ingredient-3 = Scrap Metal | result = Scottish Resistance | result-2 = Chargin' Targe | result-3 = Sticky Jumper | result-4 = Splendid Screen }}

Latest revision as of 01:55, 12 November 2011

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