Jump to content

Template:File: Difference between revisions

From The Petit Planet Wiki
Created page with "<includeonly><!-- -->{{#vardefine:type|{{#switch:{{#explode:{{PAGENAME}}|.|-1}} |png |jpg |jpeg |PNG |svg |webp |ico=Images |gif=GIFs |ogg|mp3=Audio |ogv=OGV Videos |mp4=MP4 Videos |woff |woff2 |ttf=Fonts |#default=Videos }}}}<!-- --><table class="wikitable alternating-colors-table"><!-- -->{{#if:{{{categories|{{{1|}}}}}}|<tr><!-- --><th>{{#if:{{#pos:{{{categories|{{{1|}}}}}}|;}}|Categories|Category}}</th><!-- --><td><ul>{{Array|{{{categories|{{{1|}}}}}}|;..."
 
Added option to add YouTube links
 
(One intermediate revision by one other user not shown)
Line 74: Line 74:
       --><th>{{#if:{{{sourcelink2|{{{slink2|}}}}}}|Sources|Source}}</th><!--
       --><th>{{#if:{{{sourcelink2|{{{slink2|}}}}}}|Sources|Source}}</th><!--
       --><td>{{Source|link1={{{sourcelink1|{{{slink1|{{{sourcelink|{{{slink|}}}}}}}}}}}}|label1={{{sourcelabel1|{{{slabel|{{{slabel1|Source}}}}}}}}}|link2={{{sourcelink2|{{{slink2|}}}}}}|label2={{{sourcelabel2|{{{slabel2|Source 2}}}}}}|link3={{{sourcelink3|{{{slink3|}}}}}}|label3={{{sourcelabel3|{{{slabel3|Source 3}}}}}}|noheader=1}}</td><!--
       --><td>{{Source|link1={{{sourcelink1|{{{slink1|{{{sourcelink|{{{slink|}}}}}}}}}}}}|label1={{{sourcelabel1|{{{slabel|{{{slabel1|Source}}}}}}}}}|link2={{{sourcelink2|{{{slink2|}}}}}}|label2={{{sourcelabel2|{{{slabel2|Source 2}}}}}}|link3={{{sourcelink3|{{{slink3|}}}}}}|label3={{{sourcelabel3|{{{slabel3|Source 3}}}}}}|noheader=1}}</td><!--
  --></tr>}}<!--
  -->{{#if:{{{youtubetitle|{{{yttitle|}}}}}}|<tr><!--
      --><th>Title</th><!--
      --><td lang="{{{lang|en}}}">{{{youtubetitle|{{{yttitle|}}}}}}</td><!--
  --></tr>}}<!--
  -->{{#if:{{{youtubelink|{{{ytlink|}}}}}}|<tr><!--
      --><th>Source</th><!--
      --><td lang="{{{lang|en}}}">[{{{youtubelink|{{{ytlink|}}}}}} {{{youtubelabel|{{{ytlabel|}}}}}}]</td><!--
   --></tr>}}<!--
   --></tr>}}<!--
    
    
Line 150: Line 160:
   -->{{#if:{{{categories|{{{1|}}}}}}|{{Array|{{{categories|{{{1|}}}}}}|;|[[Category:{item}]]}}}}<!--
   -->{{#if:{{{categories|{{{1|}}}}}}|{{Array|{{{categories|{{{1|}}}}}}|;|[[Category:{item}]]}}}}<!--
   -->{{#if:{{{featuring|}}}|{{Array|{{{featuring}}}|;|[[Category:{{#var:type}} Featuring {item}]]}}}}<!--
   -->{{#if:{{{featuring|}}}|{{Array|{{{featuring}}}|;|[[Category:{{#var:type}} Featuring {item}]]}}}}<!--
   -->{{#if:{{{neighbors|}}}|{{Array|{{{neighbors}}}|;|[[Category:{item} {{#var:type}}]]}}}}<!--
   -->{{#if:{{{neighbors|}}}|{{Array|{{{neighbors}}}|;|[[Category:{item} {{#var:type}}]][[Category:{item} Media]]}}}}<!--
   -->{{#if:{{{soundtracks|}}}|{{Array|template=1|{{{soundtracks}}}|;|²{#ifeq:_unreleased¦{item}¦[[Category:Media Using Unreleased Soundtracks]]¦²{#ifeq:²{#sub:{item}¦0¦9}²¦_variant ¦[<!---->[Category:Media Using an Unreleased Arrangement of ²{#explode:{item}¦¦1¦2}² Soundtrack]]¦[[Category:Media Using {item} Soundtrack]]}²}²}}}}<!--
   -->{{#if:{{{soundtracks|}}}|{{Array|template=1|{{{soundtracks}}}|;|²{#ifeq:_unreleased¦{item}¦[[Category:Media Using Unreleased Soundtracks]]¦²{#ifeq:²{#sub:{item}¦0¦9}²¦_variant ¦[<!---->[Category:Media Using an Unreleased Arrangement of ²{#explode:{item}¦¦1¦2}² Soundtrack]]¦[[Category:Media Using {item} Soundtrack]]}²}²}}}}<!--
   -->{{#if:{{{gallery|}}}|{{Array|{{{gallery}}}|;|[[Category:{item} Gallery Files]]}}}}<!--
   -->{{#if:{{{gallery|}}}|{{Array|{{{gallery}}}|;|[[Category:{item} Gallery Files]]}}}}<!--
Line 158: Line 168:
   -->{{#if:{{{transcription|}}}|[[Category:Files with Transcription]]}}<!--
   -->{{#if:{{{transcription|}}}|[[Category:Files with Transcription]]}}<!--
   -->{{#if:{{{slink|}}}{{{sourcelink|}}}{{{slink1|}}}{{{sourcelink1|}}}{{{slink2|}}}{{{sourcelink2|}}}{{{slink3|}}}{{{sourcelink3|}}}|[[Category:Files with Source]]}}<!--
   -->{{#if:{{{slink|}}}{{{sourcelink|}}}{{{slink1|}}}{{{sourcelink1|}}}{{{slink2|}}}{{{sourcelink2|}}}{{{slink3|}}}{{{sourcelink3|}}}|[[Category:Files with Source]]}}<!--
  -->{{#if:{{{youtubelink|{{{ytlink|}}}}}}|[[Category:Videos]]}}<!--
   -->{{#if:{{#var:date}}<!--
   -->{{#if:{{#var:date}}<!--
       -->|[[Category:Files by Date|{{#time:Y-m-d H:i:s|{{#var:date}}}}]]<!--
       -->|[[Category:Files by Date|{{#time:Y-m-d H:i:s|{{#var:date}}}}]]<!--

Latest revision as of 08:01, 6 April 2026

Template documentation
Note: parts of or the entire template might not be visible without values provided.
This template is used on 1,084 pages, or on about 42.38% of all pages.
Edits to this template will be widely noticed. To avoid large-scale disruption and unnecessary server load, any changes to this template should be tested in its sandbox or testcases subpages, or in your own user space. The tested changes can then be added to this page in one single edit.
Please consider discussing any changes in the wiki's Discord.
This template uses CSS found at MediaWiki:Tables.css (edit | hist).

{{File|Category}}

{{File
|categories = Stickers
|neighbors = Yunguo
}}

yields:
Category
Neighbor