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
 
Cargo media: route render through Media/embed (declare unchanged)
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]]{{#if:{{{status|}}}|[[Category:Media - {{{status}}}]]|}}{{#if:{{{state|}}}|[[Category:Media in {{{state}}}]]|}}{{#if:{{{platform|}}}|[[Category:{{{platform}}} 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.


Line 12: Line 12:
  | state    = Minnesota
  | state    = Minnesota
  | agency    = ICE
  | agency    = ICE
  | agents    = Agent Name, Another Agent   (comma-separated page names)
  | agents    = Agent Name, Another Agent
  | incidents = Incident page, Another incident
  | incidents = Incident page, Another incident
  | status    = Unverified   (Verified/Unverified/Pending)
  | status    = Unverified
  | source    = who filmed / where it came from
  | source    = who filmed / where it came from
}}</pre>
}}</pre>
Query the table on [[Special:CargoTables/Media]] or via [[ICE List:Media browser]]. [[Category:Templates]]</noinclude>
Browse all media at [[ICE List:Media browser]] or [[Special:Drilldown/Media]]. [[Category:Templates]]</noinclude>

Revision as of 16:14, 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        (Video / Photo / Document)
 | platform  = YouTube      (YouTube/Vimeo/Instagram/X/Threads/Upload/Other)
 | url       = https://...  (full source URL, or File:name.mp4 for uploads)
 | embed     = VIDEOID      (YouTube/Vimeo ID only; leave blank for socials)
 | caption   = What it shows
 | date      = 2026-01-14
 | state     = Minnesota
 | agency    = ICE
 | agents    = Agent Name, Another Agent
 | incidents = Incident page, Another incident
 | status    = Unverified
 | source    = who filmed / where it came from
}}

Browse all media at ICE List:Media browser or Special:Drilldown/Media.