Template:Imagemap
From Userful Support
Revision as of 20:04, 16 November 2006 by Menwin (Retired) (talk | contribs) (Protected "Template:Imagemap" [edit=sysop:move=sysop])
Template: imagemap -- generates code to support hyperlinked images
- Pieces of an image can link to other resources like Web pages, PDFs, media/image files, etc.
- Supports up to 9 links.
Parameters:
- 1 -- full URL of image file. You can copy the link from the Image:My Picture.jpg page on the wiki. For example:
http://wiki.userful.ca/wiki/images/d/dd/My_Picture.jpg
- ref1-9 -- the URL to the resource(s) you want to link to. For example:
ref1=http://www.userful.com/
- xy1-9 -- the x-y coordinates for the rectangle that defines a hyperlink region in your image. For example:
xy1=10,10,30,20
- txt1-9 -- (optional) the "tooltip" or "fly-by" text you want to display when the mouse pointer sits on a hyperlink area. For example:
txt1=a picture of me
Note: Do not use quotes around any of the parameters. For example, use
userful.com
but not
"userful.com"
Usage:
{{imagemap|image_URL|txt1=tooltip text|ref1=URL|xy1=x1,y1,x2,y2|ref2=URL|xy2=x1,y1,x2,y2|...}}
- - or, for clearer formatting you can do it this way:
{{imagemap |http://www.pictures.com/picture.jpg |txt1=this is where it's at |ref1=http://www.someplace.com/ |xy1=10,10,50,35 |txt2=this is elsewhere |ref2=./otherpages/home.html |xy3=10,40,50,80 }}
- (Note that if you format it this way, there must be no leading whitespace before any of the lines.)
- This can support up to 9 ref/xy/txt parameter sets, numbered from 1 to 9.