Editing
EQ/howtohelp/Creating an item tooltip
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== General == So I have noticed all these cool lucy tooltips on the site. How do I use them? How do they work? Well my estranged friend, Let me explain. I wrote some templates and custom code which figures out which item to show you based on the item name. So all you really need to know is the item name. We use something similar to a template called a '''Parser Function'''. Basically a '''Parser Function''' is a special kind of template that occur before templates are dispalyed. (This is a lie, but just pretend that is the truth okay; this is the non-technical people guide). == Using the #Lucy Parser Function == So there is this '''Parser Function''' called '''#Lucy''', you know it is a parser function, because it begins with #. So basically a '''Parser Function''', is a template that begins its name with #. What does the '''Parser Function''', '''#Lucy''' do? All it does is translates An item name to an item ID and product the wiki code to generate an item tooltip for the named item. It does this by figuring out the Lucy Item ID. So pick '''ANY ITEM IN THE GAME'''. Say ''Singing Short Sword''. Or something like ''Greater Terrormote''. Lets see the code to make those work. <pre> * {{#Lucy: Singing Short Sword}} * {{#Lucy: Greater Terrormote}} </pre> Copy and paste produces: * {{#Lucy: Singing Short Sword}} * {{#Lucy: Greater Terrormote}} Seems to work pretty well. What happens if the Parser Function fails to look up the name? Well this can happen for a few reasons. But generally it is pretty smart about it. Contact [[User:Zoycite]] about it. However there is an alternative called the '''Item''' template. In a nutshell the Item template is used to link to arbitrary item id's and display any text you like. '''What you should have learned so far''': # How to recognize a Parser Function # How to use the #Lucy Parser Function # There is an advanced template named '''Item''' to link to arbitrary items == Linking to items using the Item template == There is a small caveat to the #Lucy parser function. That is it may not always be accurate. Items are named the same, or otherwise it just doesn't know about. Well this is why you would use the Item template, to cure the ambiguity. Let's use {{#Lucy: Singing Short Sword}}, as our example because it is here. It has the following information # '''Item ID''' - 20542 # '''Item Name''' - Singing Short Sword To generate the Item link how I want I would type: <pre> * {{Item|Singing Short Sword|20542}} * {{Item|Bard Epic 1.0|20542}} </pre> Does it work ? * {{Item|Singing Short Sword|20542}} * {{Item|Bard Epic 1.0|20542}} Little known fact #Lucy Parser Function actually uses the Item template. You should use the #Lucy parser function when able because it is easier to use, and does not require looking the item up on Lucy and figuring out its Item ID. '''What you should have learned so far''': # How to link to arbitrary items changing the display name of the link # That #Lucy uses the Item template # Using the #Lucy parser function is easier.
Summary:
Please note that all contributions to zoywiki.com are considered to be released under the Attribution-Noncommercial-Share Alike 3.0 Unported (see
zoywiki.com:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Item
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
zoywiki.com
Main Page
Recent Changes
Game
Age4
Archived Games
Community
Admin Discussion
Zoywiki Tutorials
Random Page
Tools
What links here
Related changes
Special pages
Page information