Template:ScaleImage: Difference between revisions
From Future Worlds Center Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly>[[File:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 }}px }}|{{{caption|}}}]]</includeonly> | <includeonly>[[File:{{{imagename}}}|{{ #if:{{#pos:{{{newwidth|100}}}|px}}|{{{newwidth|100}}}| {{#expr: ({{#imgw: {{{imagename}}} }} * {{{newwidth|100}}}) / 100 }}px }}|text-top|{{{caption|}}}]]</includeonly> | ||
<noinclude> | <noinclude> | ||
__TOC__ | __TOC__ | ||
==EXAMPLE ON HOW TO USE THE TEMPLATE== | ==EXAMPLE ON HOW TO USE THE TEMPLATE== | ||
Line 30: | Line 28: | ||
* <b>caption</b> : This variable expects from the editor to assign to it the caption of the image. Caption is a short explanation of the image that appears when the user has his or her mouse pointer over the image. | * <b>caption</b> : This variable expects from the editor to assign to it the caption of the image. Caption is a short explanation of the image that appears when the user has his or her mouse pointer over the image. | ||
* <b>newwidth</b> : This variable expects from the editor to assign to it the width of the image. New width=15,scales the image to 15%, new width=80px,scales the image to 80px. | * <b>newwidth</b> : This variable expects from the editor to assign to it the width of the image. New width=15,scales the image to 15%, new width=80px,scales the image to 80px. | ||
[[Category:T/Media]] | |||
</noinclude> | </noinclude> |
Latest revision as of 04:44, 2 November 2011
EXAMPLE ON HOW TO USE THE TEMPLATE
Copy and paste the code below to the page you wish to add an image:
{{ScaleImage |imagename=image.jpg |caption=myImage |newwidth=50px }}
Then replace the content of the variables with your own, for example :
Replace
imagename=image.jpg
With
imagename=my_image.jpg
List of Variables
- imagename : This variable expects from the editor to assign to it an image. You must first upload an image using the upload file option of the toolbox available on the left column of the page. This option is visible if and only if you are logged in.
- caption : This variable expects from the editor to assign to it the caption of the image. Caption is a short explanation of the image that appears when the user has his or her mouse pointer over the image.
- newwidth : This variable expects from the editor to assign to it the width of the image. New width=15,scales the image to 15%, new width=80px,scales the image to 80px.