Difference between revisions of "Template:Image"

From SC4D Encyclopaedia
Jump to navigation Jump to search
sc4e>Jdenm8
(Editing so that internal links are referred using [[]] instead of a full URL.)
sc4e>Jdenm8
m (Reverted edits by Jdenm8 (Talk) to last version by CasperVg)
Line 1: Line 1:
<noinclude>
+
<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.
{{pp-template}}
+
==Syntax==
</noinclude>
+
<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
  
<!-- For reference, {{{1}}} is the image's path.-->
+
==Example==
 +
</noinclude><span class="plainlinks" {{#if:{{{width|}}}|id="{{{width}}}"}}>{{#if:{{{page|}}}{{{url|}}}|<!-- page or url parameters set
  
<div class="plainlinks" {{#if:{{{width|}}}|class="{{{width}}}"}}>
+
-->{{#if:{{{page|}}}|<!--
 
+
      page parameter set -->[{{fullurl:{{{page}}}}} {{{1}}}]|<!--
{{#if:
+
      url parameter set  -->[{{{url}}} {{{1}}}]}}<!--
    {{{page|}}}{{{url|}}}|
+
      neither set       -->|{{{1}}}}}</span><noinclude>
<!-- page or url parameters set -->
+
*Where neither is set:
    {{#if:{{{page|}}}|
+
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg}}
        <!-- page parameter set -->
+
*Where page is set (to [[Main Page]]):
            [[[{{{page}}}]] {{{1}}}]|
+
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|page=Main_Page}}
        <!-- url parameter set  -->
+
*Where url is set (too google):
            [{{{url}}} {{{1}}}]}}
+
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|url=http://www.google.com/}}
<!-- neither set -->
+
*Where width is set (to tinyImg):
    |{{{1}}} }}
+
{{img|http://www.sc4devotion.com/img/SC4DVD_1.jpg|width=tinyImg}}
</div>
 
 
 
<noinclude>
 
{{documentation}}
 
</noinclude>
 

Revision as of 23:03, 17 November 2012

This template includes an external image, and can also link you to either the external image, an internal article or an external link.

Syntax

{{img | 1 | page | url | width }}

  • 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

{{{1}}}

  • Where neither is set:

http://www.sc4devotion.com/img/SC4DVD_1.jpg

http://www.sc4devotion.com/img/SC4DVD_1.jpg

  • Where url is set (too google):

http://www.sc4devotion.com/img/SC4DVD_1.jpg

  • Where width is set (to tinyImg):

http://www.sc4devotion.com/img/SC4DVD_1.jpg