Difference between revisions of "Template:Image"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Jdenm8
m (Reverted edits by Jdenm8 (Talk) to last version by CasperVg)
sc4e>Jdenm8
(Undo revision 15366 by Jdenm8 (Talk) That didn't do what I expected.)
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.
+
<noinclude>
==Syntax==
+
{{pp-template}}
<nowiki>{{img
+
</noinclude>
| 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==
+
<!-- For reference, {{{1}}} is the image's path.-->
</noinclude><span class="plainlinks" {{#if:{{{width|}}}|id="{{{width}}}"}}>{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
 
  
-->{{#if:{{{page|}}}|<!--
+
<div class="plainlinks" {{#if:{{{width|}}}|class="{{{width}}}"}}>
      page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
+
 
      url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
+
{{#if:
      neither set       -->|{{{1}}}}}</span><noinclude>
+
    {{{page|}}}{{{url|}}}|
*Where neither is set:
+
<!-- page or url parameters set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg}}
+
    {{#if:{{{page|}}}|
*Where page is set (to [[Main Page]]):
+
        <!-- page parameter set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|page=Main_Page}}
+
            [[[{{{page}}}]] {{{1}}}]|
*Where url is set (too google):
+
        <!-- url parameter set  -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|url=http://www.google.com/}}
+
            [{{{url}}} {{{1}}}]}}
*Where width is set (to tinyImg):
+
<!-- neither set -->
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|width=tinyImg}}
+
    |{{{1}}} }}
 +
</div>
 +
 
 +
<noinclude>
 +
{{documentation}}
 +
</noinclude>

Revision as of 23:05, 17 November 2012




[create] Documentation icon Template documentation