Difference between revisions of "Template:Image"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>CasperVg
m (Protected "Template:Image": high risk template [edit=sysop:move=sysop])
sc4e>Jdenm8
Line 1: Line 1:
<noinclude>{{pp-template}}</noinclude><noinclude>This template includes an external image, and can also link you to either the external image, an internal article or an external link.
+
<span class="plainlinks" {{#if:{{{width|}}}|id="{{{width}}}"}}>{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
==Syntax==
 
<nowiki>{{img
 
| 1
 
| page
 
| url
 
| width
 
}}</nowiki>
 
*'''1''': The external image URL
 
*'''''page''''': An article name
 
*'''''url''''': An external URL to link to
 
*'''''width''''': can take these values
 
**tinyImg: upto 300px
 
**smallImg: upto 500px
 
**all others are 800px
 
 
 
==Example==
 
</noinclude><span class="plainlinks" {{#if:{{{width|}}}|id="{{{width}}}"}}>{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
 
  
 
-->{{#if:{{{page|}}}|<!--
 
-->{{#if:{{{page|}}}|<!--
 
       page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
 
       page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
 
       url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
 
       url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
       neither set        -->|{{{1}}}}}</span><noinclude>
+
       neither set        -->|{{{1}}}}}</span>
*Where neither is set:
+
 
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg}}
+
<noinclude>
*Where page is set (to [[Main Page]]):
+
{{documentation}}
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|page=Main_Page}}
+
</noinclude>
*Where url is set (too google):
 
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|url=http://www.google.com/}}
 
*Where width is set (to tinyImg):
 
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|width=tinyImg}}
 

Revision as of 05:07, 17 November 2012

{{{1}}}


[create] Documentation icon Template documentation