⧼social-icons-mobile-buttons⧽

Template:ColTilesRemote

From Tsadra Commons
Revision as of 12:13, 14 September 2026 by Jeremi (talk | contribs) (imagefile= through filepath + Widget:RemoteImage)

The cards for Tsadra's Tibetan collection wikis, written once and shown on all of them.

Each collection site renders this row with:

{{#ask:[[Template:ColTilesRemote]]
	|source=commons
	|format=template
	|template=ColTilesRemote
	|link=none
	|userparam={{SERVERNAME}}
}}

Passing commons.tsadra.org is what stops a site advertising itself: the value arrives as {{{#userparam}}} and each card compares it with its own host=.

To add a collection, add a {{SiteTile}} call above, wrapped in the same #ifeq. Upload its image here, not on the collection wiki — a remote #ask resolves everything on this wiki.

Pass the image as |imagefile=NAME.jpg — a bare file name, never image= and never a File:… link.

A File: link is resolved against whichever wiki the markup ends up on, and this wiki sets $wgThumbnailScriptPath, so its thumbnails are site-relative /thumb.php?f=… paths that return 403 anywhere else — every image in the row would break. imagefile= instead goes through {{filepath:}}, which runs here where the file is native and yields an absolute URL at the right width, and then through {{RemoteImage}} — a Widget, because its output escapes the sanitiser: in running text MediaWiki autolinks a bare URL, and a raw <img> written in wikitext is escaped.

Note {{{#userparam}}} is hash-prefixed. {{{userparam}}} and the numbered slots are never set; this was tested against a remote query before the template was written.