Template:Firehose row: Difference between revisions

From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
Magent (talk | contribs)
Fix #expr: round is an infix operator, not a function (via update-page on MediaWiki MCP Server)
Magent (talk | contribs)
List people and other topics separately instead of "about" (via update-page on MediaWiki MCP Server)
Line 14: Line 14:
# Has audio url
# Has audio url


Every topic is linked, through [[Module:Firehose links]], which splits a
An episode's subjects are split into '''people''' and '''topics''' by
multi-topic value so each name gets its own link rather than one broken one.
[[Module:Firehose links]]: a page in [[:Category:People]] is a person, any other
That linking is the whole point: it is what makes the episode appear on the
existing page — a band, a festival, a tune — is a topic, and a name with no page
page of each person, band or place it is about.
yet is filed with the people, since that is nearly always what the title parser
has found. Writing the page corrects it.


The query runs with <code>link=none</code>, so every value arrives as plain
The query runs with <code>link=none</code>, so every value arrives as plain
Line 43: Line 44:
<div style="font-size:.72em; letter-spacing:.09em; text-transform:uppercase; color:#5a6858;">{{#if:{{{2|}}}|[[{{{2}}}]]|}}</div>
<div style="font-size:.72em; letter-spacing:.09em; text-transform:uppercase; color:#5a6858;">{{#if:{{{2|}}}|[[{{{2}}}]]|}}</div>
<div style="font-weight:600; line-height:1.35;">[[{{{1}}}|{{#titleparts:{{{1}}}|0|2}}]]</div>
<div style="font-weight:600; line-height:1.35;">[[{{{1}}}|{{#titleparts:{{{1}}}|0|2}}]]</div>
{{#if:{{{3|}}}|<div style="font-size:.85em; color:#3d4a3e;">about {{#invoke:Firehose links|topiclinks|{{{3}}}}}</div>}}
{{#if:{{{3|}}}|<div style="font-size:.85em; color:#3d4a3e;">{{#invoke:Firehose links|subjects|{{{3}}}}}</div>}}
</div>
</div>
<div style="flex:0 0 auto; text-align:right; font-family:monospace; font-size:.78em; color:#6b7566; white-space:nowrap;">
<div style="flex:0 0 auto; text-align:right; font-family:monospace; font-size:.78em; color:#6b7566; white-space:nowrap;">

Revision as of 17:44, 14 September 2026

Renders one episode row for Template:Firehose. Not intended to be called directly — it is passed to #ask as template=Firehose row.

Parameters arrive positionally, in the order the printouts are declared in Template:Firehose:

  1. page title of the episode
  2. Has podcast
  3. Has topic
  4. Has air date
  5. Has episode url
  6. Has duration, in seconds
  7. Has audio url

An episode's subjects are split into people and topics by Module:Firehose links: a page in Category:People is a person, any other existing page — a band, a festival, a tune — is a topic, and a name with no page yet is filed with the people, since that is nearly always what the title parser has found. Writing the page corrects it.

The query runs with link=none, so every value arrives as plain text. That is deliberate: Semantic MediaWiki otherwise hands over pre-rendered links, which defeats #titleparts and makes the episode link impossible to relabel.

Note that #expr takes round as an infix operator — x / 60 round 0, never round(x / 60, 0). The function form parses but fails at render time with "Unexpected round operator", which is the sort of error you only see if you look at the page.

Laid out with divs rather than table markup on purpose: this template's output is assembled inside a parser function call, and pipe characters in that position are a reliable source of grief.

The name has no slash in it deliberately. Pages with a slash in the title cannot currently be read or edited through the REST API, because Apache rejects the encoded slash before MediaWiki sees it — so a subpage here would be a template no bot could ever fix.