Template:ScaleImage: Difference between revisions

From Future Worlds Center Wiki
Jump to navigationJump to search
No edit summary
No edit summary
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 }}|{{{caption|}}}]]</includeonly>
<noinclude>
<noinclude>
<br /><br /><br />
<br /><br /><br />

Revision as of 02:48, 22 July 2011





EXAMPLE ON HOW TO USE THE TEMPLATE

myImage


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.