Template:prs

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
m (format structure of the code (and switch to #if for alt))
(Reduce template include size. See Template:post-getType documentation for more details.)
 
(includes 3 intermediate revisions)
Line 1: Line 1:
[[<!--  
[[<!--  
-
-->{{#ifeq:{{{site|}}}|<!-- /* choose target page */
+
-->{{#switch:{{post-getType|{{{site|Twitter}}}}}<!-- /* choose target page */
-
   -->|@StrongBadActual Tweets {{{4|{{{year}}}}}}<!--
+
   -->|I=@strongbadactual (Instagram)<!--
-
  -->|@strongbadactual (Instagram)<!--  
+
  -->|B=@StrongBadNoFoolin.bsky.social<!--
 +
  -->|r=@ronginald<!--
 +
  -->|#default=@StrongBadActual Tweets {{{4|{{{year}}}}}}<!--  
-->}}<!--  
-->}}<!--  
-->#{{{1|{{{ID}}}}}}<!-- /* target anchor */
-->#{{{1|{{{ID}}}}}}<!-- /* target anchor */
-->|{{#if:{{{alt|}}}<!-- /* link text */
-->|{{#if:{{{alt|}}}<!-- /* link text */
   -->|{{{alt}}}<!--  
   -->|{{{alt}}}<!--  
-
   -->|{{{2|{{{day}}}}}} {{{3|{{{month}}}}}} {{{4|{{{year}}}}}}<!--  
+
   -->|{{#if:{{{full|}}}<!--
-
-->}}<!--  
+
    -->|{{#time:F|{{{3|{{{month}}}}}}}} {{{2|{{{day}}}}}}, {{{4|{{{year}}}}}}<!--
 +
    -->|{{{2|{{{day}}}}}} {{{3|{{{month}}}}}} {{{4|{{{year}}}}}}<!--  
 +
  -->}}<!-- /* end {{#if:{{{full|}}} */
 +
-->}}<!-- /* end {{#if:{{{alt|}}}*/
-->]]<noinclude>
-->]]<noinclude>
-
This template handles the short link portion of {{tl|postref}}.
+
This template handles the short link portion of {{tl|postref}}.
 +
* Uses {{tl|post-getType}} to determine post type. (See documentation for abbreviated code values.)
==Usage==
==Usage==
<code><nowiki>{{prs|1254408772249845763|26|Apr|2020}}</nowiki></code>
<code><nowiki>{{prs|1254408772249845763|26|Apr|2020}}</nowiki></code>
Line 27: Line 33:
<code><nowiki>{{prs|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br>
<code><nowiki>{{prs|site=Instagram|BzWAeVkAAme|30|Jun|2019}}</nowiki></code><br>
{{prs|site=Instagram|BzWAeVkAAme|30|Jun|2019}}
{{prs|site=Instagram|BzWAeVkAAme|30|Jun|2019}}
 +
 +
Or for Bluesky posts:
 +
 +
<code><nowiki>{{prs|site=Bluesky|3lcqald3s5k2i|08|Dec|2024}}</nowiki></code><br>
 +
{{prs|site=Bluesky|3lcqald3s5k2i|08|Dec|2024}}
 +
 +
If you want to display the full date format:
 +
 +
<code><nowiki>{{prs|1254408772249845763|26|Apr|2020|full=1}}</nowiki></code>
 +
 +
Produces the following result:
 +
 +
{{prs|1254408772249845763|26|Apr|2020|full=1}}
If you want to use an alternate message:
If you want to use an alternate message:

Current revision as of 15:22, 26 October 2025

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

This template handles the short link portion of {{postref}}.

  • Uses {{post-getType}} to determine post type. (See documentation for abbreviated code values.)

[edit] Usage

{{prs|1254408772249845763|26|Apr|2020}}

Or with labelled parameters:

{{prs|ID=1254408772249845763|day=26|month=Apr|year=2020}}

Produces the following result:

26 Apr 2020

Or for Instagram posts:

{{prs|site=Instagram|BzWAeVkAAme|30|Jun|2019}}
30 Jun 2019

Or for Bluesky posts:

{{prs|site=Bluesky|3lcqald3s5k2i|08|Dec|2024}}
08 Dec 2024

If you want to display the full date format:

{{prs|1254408772249845763|26|Apr|2020|full=1}}

Produces the following result:

April 26, 2020

If you want to use an alternate message:

{{prs|1254408772249845763|26|Apr|2020|alt=this is a tweet link}}

Produces the following result:

this is a tweet link

Personal tools