Template:postref
From Homestar Runner Wiki
(Difference between revisions)
m (format structure of the code) |
(add support for ronginald links; use post-getType template to facilitate site name detection, but ensure twitter remains the default) |
||
Line 1: | Line 1: | ||
- | {{# | + | {{#switch:{{post-getType|{{{site|Twitter}}}}}<!-- /* choose target page and heading */ |
- | -->|[[@ | + | -->|Instagram=[[@strongbadactual (Instagram)|@strongbadactual]] Instagram post<!-- |
- | -->|[[@ | + | -->|ronginald=[[@ronginald]] Tweet<!-- |
+ | -->|#default=[[@StrongBadActual]] Tweet<!-- | ||
-->}} (<!-- | -->}} (<!-- | ||
-->{{prs|{{{1|{{{ID}}}}}}|{{{2|{{{day}}}}}}|{{{3|{{{month}}}}}}|{{{4|{{{year}}}}}}|site={{{site|}}}<!-- | -->{{prs|{{{1|{{{ID}}}}}}|{{{2|{{{day}}}}}}|{{{3|{{{month}}}}}}|{{{4|{{{year}}}}}}|site={{{site|}}}<!-- | ||
Line 20: | Line 21: | ||
<code><nowiki>{{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br> | <code><nowiki>{{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br> | ||
{{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}} | {{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}} | ||
+ | |||
+ | Or for @ronginald historical posts: | ||
+ | |||
+ | <code><nowiki>{{postref|site=ronginald|114395585209053184|15|Sep|2011}}</nowiki></code><br> | ||
+ | {{postref|site=ronginald|114395585209053184|15|Sep|2011}} | ||
==See Also== | ==See Also== | ||
* Template {{tl|prs}} for shorter links | * Template {{tl|prs}} for shorter links | ||
+ | * Uses {{tl|post-getType}} to determine post type. | ||
[[Category:Internal link templates|{{PAGENAME}}]] | [[Category:Internal link templates|{{PAGENAME}}]] | ||
</noinclude> | </noinclude> |
Revision as of 21:50, 3 January 2023
@StrongBadActual Tweet ([[@StrongBadActual Tweets {{{year}}}#{{{ID}}}|{{{day}}} {{{month}}} {{{year}}}]])
Usage
{{postref|1254408772249845763|26|Apr|2020}}
Or with labelled parameters:
{{postref|ID=1254408772249845763|day=26|month=Apr|year=2020}}
Produces the following result:
@StrongBadActual tweet (26 Apr 2020)
Or for Instagram posts:
{{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}}
@strongbadactual Instagram post (30 Jun 2019)
Or for @ronginald historical posts:
{{postref|site=ronginald|114395585209053184|15|Sep|2011}}
@ronginald tweet (15 Sep 2011)
See Also
- Template {{prs}} for shorter links
- Uses {{post-getType}} to determine post type.