Jump to content

Template:Media: Difference between revisions

From ICE List Wiki
[unchecked revision][unchecked revision]
Cargo Media system: declare table + store + smart embed renderer
 
PF-free: drop conditional categories (parser functions unavailable); declare unchanged
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#cargo_store:_table=Media|caption={{{caption|}}}|mtype={{{type|Video}}}|platform={{{platform|}}}|url={{{url|}}}|embed={{{embed|}}}|mdate={{{date|}}}|state={{{state|}}}|agency={{{agency|}}}|agents={{{agents|}}}|incidents={{{incidents|}}}|status={{{status|Unverified}}}|source={{{source|}}}}}{{#switch:{{lc:{{{platform|}}}}}|youtube={{YouTube|{{{embed|{{{url|}}}}}}|{{{caption|}}}}}|vimeo={{Vimeo|{{{embed|{{{url|}}}}}}|{{{caption|}}}}}|instagram={{Instagram|{{{url|}}}|{{{caption|}}}}}|threads={{Threads|{{{url|}}}|{{{caption|}}}}}|x|twitter={{Tweet|{{{url|}}}|{{{caption|}}}}}|upload|file={{Video file|{{{url|}}}|{{{caption|}}}}}|#default=<div class="ic-video"><div class="ic-video-cap">[{{{url|}}} {{{caption|View media}}}]</div></div>}}[[Category:Media]]{{#if:{{{status|}}}|[[Category:Media - {{{status}}}]]|}}{{#if:{{{state|}}}|[[Category:Media in {{{state}}}]]|}}</includeonly><noinclude>{{#cargo_declare:_table=Media|caption=Text|mtype=String|platform=String|url=Text|embed=String|mdate=Date|state=String|agency=String|agents=List (,) of Page|incidents=List (,) of Page|status=String|source=Text}}
<includeonly>{{#cargo_store:_table=Media|caption={{{caption|}}}|mtype={{{type|Video}}}|platform={{{platform|}}}|url={{{url|}}}|embed={{{embed|}}}|mdate={{{date|}}}|state={{{state|}}}|agency={{{agency|}}}|agents={{{agents|}}}|incidents={{{incidents|}}}|status={{{status|Unverified}}}|source={{{source|}}}}}{{Media/embed|platform={{{platform|}}}|url={{{url|}}}|embed={{{embed|}}}|caption={{{caption|}}}}}[[Category:Media]]</includeonly><noinclude>{{#cargo_declare:_table=Media|caption=Text|mtype=String|platform=String|url=Text|embed=String|mdate=Date|state=String|agency=String|agents=List (;) of Page|incidents=List (;) of Page|status=String|source=Text}}
Stores one media item into the Cargo '''Media''' table and renders its embed.
Stores one media item into the Cargo '''Media''' table and renders its embed.


Usage:
Usage:
<pre>{{Media
<pre>{{Media
  | type      = Video       (Video / Photo / Document)
  | type      = Video
  | platform  = YouTube      (YouTube/Vimeo/Instagram/X/Threads/Upload/Other)
  | platform  = YouTube      (YouTube/Vimeo/Instagram/X/Threads/Facebook/TikTok/Reddit/Upload/Other)
  | url      = https://... (full source URL, or File:name.mp4 for uploads)
  | url      = https://...
  | embed    = VIDEOID      (YouTube/Vimeo ID only; leave blank for socials)
  | embed    = VIDEOID      (YouTube/Vimeo ID only)
  | caption  = What it shows
  | caption  = What it shows
  | date      = 2026-01-14
  | date      = 2026-01-14
  | state    = Minnesota
  | state    = Minnesota
  | agency    = ICE
  | agency    = ICE
  | agents    = Agent Name, Another Agent  (comma-separated page names)
  | agents    = Surname, First; Other Agent  (separate with ; )
  | incidents = Incident page, Another incident
  | incidents = Incident page; Another
  | status    = Unverified   (Verified/Unverified/Pending)
  | status    = Unverified
  | source    = who filmed / where it came from
  | source    = who filmed / where from
}}</pre>
}}</pre>
Query the table on [[Special:CargoTables/Media]] or via [[ICE List:Media browser]]. [[Category:Templates]]</noinclude>
Browse: [[ICE List:Media browser]] &middot; [[Special:Drilldown/Media]]. Tagging help: [[ICE List Wiki:Tagging media]]. [[Category:Templates]]</noinclude>

Latest revision as of 18:39, 10 July 2026

This template defines the table "Media". View table. Stores one media item into the Cargo Media table and renders its embed.

Usage:

{{Media
 | type      = Video
 | platform  = YouTube      (YouTube/Vimeo/Instagram/X/Threads/Facebook/TikTok/Reddit/Upload/Other)
 | url       = https://...
 | embed     = VIDEOID      (YouTube/Vimeo ID only)
 | caption   = What it shows
 | date      = 2026-01-14
 | state     = Minnesota
 | agency    = ICE
 | agents    = Surname, First; Other Agent   (separate with ; )
 | incidents = Incident page; Another
 | status    = Unverified
 | source    = who filmed / where from
}}

Browse: ICE List:Media browser · Special:Drilldown/Media. Tagging help: ICE List Wiki:Tagging media.