Template:postref

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(Instagram functionality and optional labels for quick typing)
(add new "posted on" wording)
 
(includes 9 intermediate revisions)
Line 1: Line 1:
-
{{#ifeq:{{{site|}}}||[[@StrongBadActual]] Tweet|[[@strongbadactual (Instagram)|@strongbadactual]] Instagram post}} ([[{{#ifeq:{{{site|}}}||@StrongBadActual Tweets {{{4|{{{year}}}}}}|@strongbadactual (Instagram)}}#{{{1|{{{ID}}}}}}|{{{2|{{{day}}}}}} {{{3|{{{month}}}}}} {{{4|{{{year}}}}}}]])<noinclude>
+
{{#if:{{{posted|}}}<!--
 +
-->|{{#switch:{{post-getType|{{{site|Twitter}}}}}<!-- /* choose target page and heading */
 +
  -->|Instagram=[[@strongbadactual (Instagram)|posted]] to Instagram <!--
 +
  -->|ronginald=[[@ronginald|posted]] to Twitter<!--
 +
  -->|#default=[[@StrongBadActual|posted]] to Twitter<!--
 +
-->}} on {{b}}<!--
 +
-->|{{#switch:{{post-getType|{{{site|Twitter}}}}}<!-- /* choose target page and heading */
 +
  -->|Instagram=[[@strongbadactual (Instagram)|@strongbadactual]] Instagram post<!--
 +
  -->|ronginald=[[@ronginald]] Tweet<!--
 +
  -->|#default=[[@StrongBadActual]] Tweet<!--
 +
-->}} (<!-- /* end {{#switch:}} */
 +
-->}}<!-- /* end {{#if:{{{posted|}}} */
 +
-->{{prs|{{{1|{{{ID}}}}}}|{{{2|{{{day}}}}}}|{{{3|{{{month}}}}}}|{{{4|{{{year}}}}}}|site={{{site|}}}|full={{{posted|}}}<!--
 +
-->}}{{#if:{{{posted|}}}||)}}<!-- /* posted does not use parenthesis around {{prs}} */
 +
--><noinclude>
==Usage==
==Usage==
-
<code><nowiki>{{twitterreference|1254408772249845763|26|Apr|2020}}</nowiki></code>
+
<code><nowiki>{{postref|1254408772249845763|26|Apr|2020}}</nowiki></code>
Or with labelled parameters:
Or with labelled parameters:
-
<code><nowiki>{{twitterreference|ID=1254408772249845763|day=26|month=Apr|year=2020}}</nowiki></code>
+
<code><nowiki>{{postref|ID=1254408772249845763|day=26|month=Apr|year=2020}}</nowiki></code>
Produces the following result:
Produces the following result:
-
{{twitterreference|ID=1254408772249845763|day=26|month=Apr|year=2020}}
+
{{postref|ID=1254408772249845763|day=26|month=Apr|year=2020}}
 +
 
 +
Or with the "posted" parameter:
 +
 
 +
<code><nowiki>{{postref|1254408772249845763|26|Apr|2020|posted=1}}</nowiki></code><br>
 +
{{postref|1254408772249845763|26|Apr|2020|posted=1}}
Or for Instagram posts:
Or for Instagram posts:
-
<code><nowiki>{{twitterreference|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br>
+
<code><nowiki>{{postref|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br>
-
{{twitterreference|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==
 +
* 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>

Current revision as of 12:44, 10 January 2023

@StrongBadActual Tweet ([[@StrongBadActual Tweets {{{year}}}#{{{ID}}}|{{{day}}} {{{month}}} {{{year}}}]])

[edit] 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 with the "posted" parameter:

{{postref|1254408772249845763|26|Apr|2020|posted=1}}
posted to Twitter on April 26, 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)

[edit] See Also

  • Template {{prs}} for shorter links
  • Uses {{post-getType}} to determine post type.
Personal tools