User:Ring/Topicon
From Guild Wars Wiki
Jump to navigationJump to search
Usage[edit]
{{User:Ring/Topicon|1|2|3|4|5|<named parameters>...}}
Parameters[edit]
- 1 - image
- plain file name of the image (default:Tango-heart-icon.png - also fallback if defined, but empty)
- 2 - top
- offset from top of page container, including units (default: 27px;)
- 3 - offset
- pixel to move icon to the left; exact value for
right:
, if first icon (default: 10)
- 4 - width
- force specified width of image, in pixels (default: 15)
- 5 - icon_nr
- index of top icon (default:0)
- link
- destination if image is clicked (see notes)
- description
- tooltip text showing up on hover over icon (default: top icon)
- class
- use specified classes for container, e.g.
class=metadata topicon
- id
- name to be used for the container
- style
- additional CSS instructions for container
Notes[edit]
- use
icon_nr
if using multiple top icons on one page; especially useful if all have same width - use
offset
also to correct padding between multiple icons with different widths - specify
width
and leave it empty to use actual image size, e.g.{{User:Ring/Topicon||5px|10px|}}
link
parameter for images doesn't seem to be supported by this wiki. For now, a workaround has been implemented - handle with care!
At first, I looked at User:Why Are We Fighting/Templates/Topicon, but didn't understand why there should be a table around the icon (please tell me, if you know). Then, I found another template on Wikipedia, which also restricted the top icon to certain namespaces, which I thought would be a good idea... It's heavily customized though, due to the lag of the imagemap tag in this wiki's parser (I guess) and other stuff. By now, only the namespace switch and parts of the corresponding error message remained.
Currently, I have no idea of how to change the link destination of images other than redirects on the image pages. If you know, please tell me. The template uses a dirty workaround though.