User:Stux/post-devel

From Homestar Runner Wiki

< User:Stux(Difference between revisions)
Jump to: navigation, search
(not gonna lie, this has been nutty... but logic dictates first must be set to true for this to work the way I need it to on the case when film1 is empty.)
(resync)
 
(includes 39 intermediate revisions)
Line 1: Line 1:
-
{{#if:{{#var:postTemplateNeedHeaderFlag}}||{{#setvar:postTemplateNeedHeaderFlag|false}}}}<!-- /* Flag: do we need to autoinsert a header? Default: no. */
+
<!--
 +
-->{{#if:{{{setTypeOverride|}}}|{{post-setTypeOverride|{{{setTypeOverride}}}}}|}}<!-- /* Before anything else, handle type override. */
 +
--><!--
 +
  /***************************/
 +
  /*  Auto insert header    */
 +
  /***************************/
 +
-->{{#if:{{#var:postTemplateNeedHeaderFlag}}||{{#setvar:postTemplateNeedHeaderFlag|false}}}}<!-- /* Flag: do we need to autoinsert a header? Default: no. */
-->{{#if:{{{1|}}}<!-- /* check to see if old-style month parameter is set. */
-->{{#if:{{{1|}}}<!-- /* check to see if old-style month parameter is set. */
-->|
-->|
Line 17: Line 23:
-->|{{#ifeq:{{#var:postTemplateNeedHeaderFlag}}|true|<!-- /* check if autoinsert flag is set */ -->
-->|{{#ifeq:{{#var:postTemplateNeedHeaderFlag}}|true|<!-- /* check if autoinsert flag is set */ -->
{{clear}}<!--(debug1b-{{#var:postTemplateNeedHeaderFlag}})-->
{{clear}}<!--(debug1b-{{#var:postTemplateNeedHeaderFlag}})-->
-
{{#switch:{{PAGENAME}}<!-- /* code to auto-post h2 header based on page name */
+
{{#switch:{{post-getType|{{{site|}}} }}<!-- /* code to auto-post h2 header based on page name */
-
   -->|@strongbadactual (Instagram)=<h2>{{{1|{{CURRENTYEAR}}}}}</h2><!--
+
   -->|ronginald|Instagram=<h2>{{{1|{{CURRENTYEAR}}}}}</h2><!--
-
   -->|#default=<h2>{{{1|{{#time: F}}}}}</h2><!--
+
   -->|Bluesky|Twitter=<h2>{{{1|{{#time: F}}}}}</h2><!--
-
-->}}{{#setvar:postTemplateNeedHeaderFlag|false}}
+
-->}}
-
{{post-table-header}}<!--  
+
{{#setvar:postTemplateNeedHeaderFlag|false}}{{post-table-header}}<!--  
-->|<!--(debug1c-{{#var:postTemplateNeedHeaderFlag}})-->}}<!--/*end #ifeq:postTemplateNeedHeaderFlag */  
-->|<!--(debug1c-{{#var:postTemplateNeedHeaderFlag}})-->}}<!--/*end #ifeq:postTemplateNeedHeaderFlag */  
-->}}<!-- /*end #if:{{{table-begin|}}} */  
-->}}<!-- /*end #if:{{{table-begin|}}} */  
-
--><!--(debug2-{{#var:postTemplateNeedHeaderFlag}})-->
+
--><!--(debug2-{{#var:postTemplateNeedHeaderFlag}})--><!--
-
|- id="{{{id|}}}" {{#if:{{{reply|}}}|style="background:#F9F9F9"|}}<!-- /* single line of code */ -->
+
  /***************************/
 +
  /* Start Body of the table */
 +
  /***************************/
 +
-->
 +
|- id="{{{id|}}}" {{#if:{{{reply|}}}|style="background:#F9F9F9"|}}<!-- /* single line of code to style replies */ -->
|width="200px" <!--
|width="200px" <!--
 +
--><!--
 +
  /***** Image Section *****/
-->{{#if:{{{pic|}}}<!--
-->{{#if:{{{pic|}}}<!--
-->|align=center{{!}}<!--
-->|align=center{{!}}<!--
-
-->{{post-pic|{{{pic|}}}|size={{{size|}}}|date={{{date|}}}|{{{site|}}}|isvideo={{{video transcript|}}}|isFirst=1}}<!--
+
-->{{post-pic|{{{pic|}}}|size={{{size|}}}|date={{{date|}}}|{{{site|}}}|isvideo={{{video transcript|}}}|isFirst=1|nophoto={{{nopic|}}}}}<!--
-
-->{{post-pic|{{{pic2|}}}|size={{{size2|}}}|date={{{date|}}}|{{{site|}}}}}<!--
+
-->{{post-pic|{{{pic2|}}}|size={{{size2|}}}|date={{{date|}}}|{{{site|}}}|nophoto={{{nopic2|}}}}}<!--
-
-->{{post-pic|{{{pic3|}}}|size={{{size3|}}}|date={{{date|}}}|{{{site|}}}}}<!--
+
-->{{post-pic|{{{pic3|}}}|size={{{size3|}}}|date={{{date|}}}|{{{site|}}}|nophoto={{{nopic3|}}}}}<!--
-
-->{{post-pic|{{{pic4|}}}|size={{{size4|}}}|date={{{date|}}}|{{{site|}}}}}<!--
+
-->{{post-pic|{{{pic4|}}}|size={{{size4|}}}|date={{{date|}}}|{{{site|}}}|nophoto={{{nopic4|}}}}}<!--
-
-->{{post-pic|{{{pic5|}}}|size={{{size5|}}}|date={{{date|}}}|{{{site|}}}}}
+
-->{{post-pic|{{{pic5|}}}|size={{{size5|}}}|date={{{date|}}}|{{{site|}}}|nophoto={{{nopic5|}}}}}
{{!}}<!--  
{{!}}<!--  
Line 41: Line 53:
-->}}<!-- /*end {{#if:{{{pic|}}} */
-->}}<!-- /*end {{#if:{{{pic|}}} */
 +
-->{{#if:{{{id2|}}}|<span id="{{{id2}}}"></span>|}}<!-- /* insert second anchor if present */
 +
  /***** Pinned Tweet Section *****/
-->{{#if:{{{pinned|}}}|
-->{{#if:{{{pinned|}}}|
-
:<p style="color:#5B7083">[[File:PinnedTweet.png|x15px]] ''This Tweet was pinned.''</p>
+
:<p style="color:#5B7083">[[File:PinnedTweet.png|x15px]] ''This tweet was pinned.''</p>
<br />
<br />
|}}<!-- /*end {{#if:{{{pinned|}}} */
|}}<!-- /*end {{#if:{{{pinned|}}} */
 +
--><!--
 +
  /***** Retweet Section *****/
-->{{#if:{{{retweet|}}}<!--
-->{{#if:{{{retweet|}}}<!--
-
   -->|''This is a Retweet of {{{retweet|}}} ''<!--
+
   -->|''This is a retweet of {{{retweet|}}} ''<!--
   -->|{{#if:{{{text|}}}<!--
   -->|{{#if:{{{text|}}}<!--
     -->|<div style="font-size:120%">{{{text|}}}</div><!--
     -->|<div style="font-size:120%">{{{text|}}}</div><!--
Line 54: Line 70:
-->}}<!-- /*end {{#if:{{{retweet|}}} */
-->}}<!-- /*end {{#if:{{{retweet|}}} */
 +
--><!--
 +
  /***** Film Section *****/
-->{{#if:{{{film1|{{{film|}}}}}}|<!-- if either film1 or film are defined -->
-->{{#if:{{{film1|{{{film|}}}}}}|<!-- if either film1 or film are defined -->
<br />
<br />
Line 65: Line 83:
<!-- /*end {{#if:{{{film1|}}} */
<!-- /*end {{#if:{{{film1|}}} */
 +
--><!--
 +
  /***** "This X" Section *****/
-->{{post-this|{{{link|}}}|t={{spc}}links to {{{link|}}}|{{{site|}}}}}<!--
-->{{post-this|{{{link|}}}|t={{spc}}links to {{{link|}}}|{{{site|}}}}}<!--
-->{{post-this|{{{reply|}}}|t={{spc}}is a reply to {{{reply|}}}|{{{site|}}}}}<!--
-->{{post-this|{{{reply|}}}|t={{spc}}is a reply to {{{reply|}}}|{{{site|}}}}}<!--
Line 71: Line 91:
-->{{post-this|{{{altdesc|}}}|t='s '''Image Description''' reads:<br/>{{{altdesc|}}}|{{{site|}}}}}<!--
-->{{post-this|{{{altdesc|}}}|t='s '''Image Description''' reads:<br/>{{{altdesc|}}}|{{{site|}}}}}<!--
-->{{post-this|{{{deleted|}}}|t={{spc}}has been deleted.|{{{site|}}}}}<!--
-->{{post-this|{{{deleted|}}}|t={{spc}}has been deleted.|{{{site|}}}}}<!--
 +
--><!--
 +
 +
  /***** Special Subsections *****/
-->{{post-subsection|{{{image transcript|}}}|name=Image Transcript}}<!--  
-->{{post-subsection|{{{image transcript|}}}|name=Image Transcript}}<!--  
-->{{post-subsection|{{{video transcript|}}}|name=Video Transcript}}<!--
-->{{post-subsection|{{{video transcript|}}}|name=Video Transcript}}<!--
Line 78: Line 101:
<!--  
<!--  
-
-->|{{#if:{{{deleted|}}}<!--  
+
--><!--
 +
  /***** Date Section *****/
 +
-->| style="position: relative;" |<!-- /* support floating elements */
 +
-->{{#if:{{{deleted|}}}<!--  
   -->|{{{date|Date}}}<!--  
   -->|{{{date|Date}}}<!--  
-
   -->|{{#switch:{{{site|{{PAGENAME}}}}}<!--  
+
   -->|{{#switch:{{post-getType|{{{site|}}} }}<!--  
-
     -->|#default=[[twitter:StrongBadActual/status/{{{id|}}}|{{{date|Date}}}]]<!--  
+
     -->|Twitter=[[twitter:StrongBadActual/status/{{{id|}}}|{{{date|Date}}}]]<!--  
-
     -->|@strongbadactual (Instagram)=[[instagram:p/{{{id|}}}/|{{{date|Date}}}]]<!--
+
     -->|Bluesky={{pl|l=https://bsky.app/profile/strongbadnofoolin.bsky.social/post/{{{id|}}} {{{date|Date}}}}}<!--
-
   -->}}<!--  
+
    -->|Instagram=[[instagram:p/{{{id|}}}/|{{{date|Date}}}]]<!--
-
-->}}<!-- /*end {{#if:{{{deleted|}}} */
+
    -->|ronginald={{{date|Date}}}<!--
 +
   -->}}<!-- /* end {{#switch:{{post-getType| */
 +
-->}}<includeonly><!-- /* end {{#if:{{{deleted|}}} */
 +
    /* add floating link to this entry (partially disabled, in development) */
 +
  --><div class="hovul" style="position: absolute;bottom:0px; right:0px;text-align:right;font-size:90%;"><!--
 +
  -->[[{{FULLPAGENAME}}#{{{id}}}|🔗]]<!-- {{spc}}<span title="<nowiki>{{postref|</nowiki>{{{id}}}{{!}}{{#time: j | {{{date}}} }}{{!}}{{#time: F | {{{date}}} }}{{!}}{{#time: Y | {{{date}}} }}<nowiki>}}</nowiki>">⧉</span>--></div><!--
 +
  --></includeonly><!--
 +
--><!-- (debug100:var={{#var:postTemplateTypeOverride}}, site={{{site|}}}, type={{post-getType|{{{site|}}} }})
 +
--><!--
-
-->{{clear}}{{post-table-end|{{{table-end|}}}}}<!--  
+
-->__NOTOC__{{clear}}<!-- /* clear date section */
 +
  /***** Handle Table Closing *****/
 +
-->{{post-table-end|{{{table-end|}}}}}<!--  
--><noinclude>
--><noinclude>
|}
|}
 +
<!--
 +
  /***************************/
 +
  /*  End of Template Code  */
 +
  /***************************/
 +
-->
===How to use the template===
===How to use the template===
Line 97: Line 138:
|table-begin=1
|table-begin=1
     /* Indicates this is the first item on the table and a table header needs to be built! */
     /* Indicates this is the first item on the table and a table header needs to be built! */
-
    NOTE: Instead of using this flag, the {{post-table-header}} template can also be inserted
 
-
    above the first entry of this template for the month.
 
|id=The number at the end of the post's URL (for example, 913122813711708161).  
|id=The number at the end of the post's URL (for example, 913122813711708161).  
-
     This is used for two reasons&mdash; links to the section on the page  
+
    (REQUIRED, value must be UNIQUE to the page!)
-
    ([[@StrongBadActual Tweets 2014#913122813711708161]]) and the URL in the  
+
     This is used for two purposes:
-
    Link column.
+
      creating anchor links to the section on the page  
 +
      (e.g. [[@StrongBadActual Tweets 2014#913122813711708161]])  
 +
      and generating the Twitter URL in the Link column.
 +
|id2=secondary ID for this entry, if necessary (OPTIONAL)
|site=For differentiating Twitter or Instagram posts. DO NOT USE unless  
|site=For differentiating Twitter or Instagram posts. DO NOT USE unless  
     absolutely necessary, as this template is programmed to match the page it's on.
     absolutely necessary, as this template is programmed to match the page it's on.
 +
    (Note: this temporarily overrides the setTypeOverride value for a single post.)
 +
|setTypeOverride=Use this to PERMANENTLY override the post type
 +
    (for the lifetime of the current page, unless overridden again), expected values are:
 +
    Instagram|Twitter|ronginald
 +
    For a complete list, see: {{post-getType}}
 +
    (Note: this calls {{post-setTypeOverride}} which may be called separately.)
|pic=The post's image or a video thumbnail.
|pic=The post's image or a video thumbnail.
|pic2=A second image.
|pic2=A second image.
Line 110: Line 158:
|pic4=A fourth image.
|pic4=A fourth image.
|pic5=A fifth image.
|pic5=A fifth image.
 +
|nopic=1 /* If set, indicates that the post's first image needs to be uploaded.  The corresponding pic value will be used as the suggested filename. */
 +
|nopic2=1 /* The second image needs to be uploaded. */
 +
|nopic3=1 /* The third image needs to be uploaded. */
 +
|nopic4=1 /* The fourth image needs to be uploaded. */
 +
|nopic5=1 /* The fifth image needs to be uploaded. */
|size=For changing the size of the image. Again, DO NOT USE unless there is a  
|size=For changing the size of the image. Again, DO NOT USE unless there is a  
     good reason, as the images are automatically formatted to be 200 pixels wide  
     good reason, as the images are automatically formatted to be 200 pixels wide  
Line 149: Line 202:
}}
}}
</pre>
</pre>
 +
<!-- TODO, reinstate once I get this working:
 +
    NOTE: Instead of using this flag, the {{post-table-header}} template can also be inserted
 +
    above the first entry of this template for the month.
 +
-->
 +
===See Also===
===See Also===
The following helper templates are used:
The following helper templates are used:
*{{t|post-table-header}}
*{{t|post-table-header}}
 +
*{{t|post-setTypeOverride}}
 +
*{{t|post-getType}}
*{{t|post-getTypeName}}
*{{t|post-getTypeName}}
*{{t|post-pic}}
*{{t|post-pic}}
Line 159: Line 219:
*{{t|post-table-end}}
*{{t|post-table-end}}
-
[[Category:Toon Article Formatting Templates|{{PAGENAME}}]]</noinclude>
+
Related templates:
 +
*{{t|prs}}
 +
*{{t|postref}}
 +
*{{t|@}}
 +
 
 +
Development pages:
 +
* Please test any changes to this template in its development sandbox:
 +
** [[User:Stux/post-devel]] is the development copy of this template.
 +
** Any changes to that template are reflected in this page: [[User:Stux/post-sandbox]].
 +
** If the changes are successful, the entire page may be copied to {{t|post}} verbatim.
 +
*** Otherwise, please revert development changes back to the last known good copy of [[User:Stux/post-devel]] that matches {{t|post}} so that the two pages remain synchronized.
 +
*** Any partial, in-development code may be commented out using HTML comments until the feature can be finalized and/or fixed.
 +
** Also note that the helper templates listed above do not have sandboxed equivalents.  Changes made to those templates will be immediate.
 +
 
 +
<!-- /* only add category to the [[Template:post]] page. */ -->
 +
{{#ifeq:{{FULLPAGENAME}}|Template:post<!--
 +
  -->|[[Category:Toon Article Formatting Templates|{{PAGENAME}}]]<!--
 +
  -->|Main Template page: {{t|post}}<!-- /* Link back if this is a development page. */
 +
-->}}
 +
</noinclude>

Current revision as of 11:22, 29 August 2025

Text / Transcript Date / Link

(no text)

Date

[edit] How to use the template

{{post
|table-begin=1
    /* Indicates this is the first item on the table and a table header needs to be built! */
|id=The number at the end of the post's URL (for example, 913122813711708161). 
    (REQUIRED, value must be UNIQUE to the page!)
    This is used for two purposes:
      creating anchor links to the section on the page 
      (e.g. [[@StrongBadActual Tweets 2014#913122813711708161]]) 
      and generating the Twitter URL in the Link column.
|id2=secondary ID for this entry, if necessary (OPTIONAL)
|site=For differentiating Twitter or Instagram posts. DO NOT USE unless 
    absolutely necessary, as this template is programmed to match the page it's on.
    (Note: this temporarily overrides the setTypeOverride value for a single post.)
|setTypeOverride=Use this to PERMANENTLY override the post type 
    (for the lifetime of the current page, unless overridden again), expected values are:
    Instagram|Twitter|ronginald
    For a complete list, see: {{post-getType}}
    (Note: this calls {{post-setTypeOverride}} which may be called separately.)
|pic=The post's image or a video thumbnail.
|pic2=A second image.
|pic3=A third image.
|pic4=A fourth image.
|pic5=A fifth image.
|nopic=1 /* If set, indicates that the post's first image needs to be uploaded.  The corresponding pic value will be used as the suggested filename. */
|nopic2=1 /* The second image needs to be uploaded. */
|nopic3=1 /* The third image needs to be uploaded. */
|nopic4=1 /* The fourth image needs to be uploaded. */
|nopic5=1 /* The fifth image needs to be uploaded. */
|size=For changing the size of the image. Again, DO NOT USE unless there is a 
    good reason, as the images are automatically formatted to be 200 pixels wide 
    (188 for videos, due to the filmstrip border).
|size2=Size of the second image.
|size3=Size of the third image.
|size4=Size of the fourth image.
|size5=Size of the fifth image.
|pinned=Set to a non-blank value if the Tweet has been pinned.
|text=The text of the post.
|link=If the post is a link, put the link information here.
|quote=If the post is a Quote Tweet, put any additional information here, 
    including the person who posted what was linked to, and a paraphrase 
    of what they posted.
|reply=If the post is a reply, put any additional information here, including 
    the person who was replied to, and a paraphrase of what they posted.
|refer=If the post refers to someone else's, but does not link to it, put 
    any additional information here (such as a link to the post that was referenced).
|altdesc=If the post contains an alternate image description as defined 
    here: https://help.twitter.com/en/using-twitter/how-to-use-alt-gif
|deleted=If the post has been deleted, put something here 
    (for example, "yes" or "true").
|retweet=If a post is Retweeted with no additional text, put the username 
    and content type here (for example, "@trogdorgame's video").
|image transcript=Transcribing the image if there is any text in it.
|video transcript=Transcribing the video.
|live video transcript=Transcribing a live video.
|poll=If a poll is posted, put the options here.
|fun facts=Fun facts regarding the post.
|date=The date of the post.
|film1=First Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|film2=Second Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|film3=Third Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|film4=Fourth Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|film5=Fifth Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|film=General list of Characters who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|table-end=1
    /* Indicates this is the last item on the table and a table footer needs to be built! */
}}

[edit] See Also

The following helper templates are used:

Related templates:

Development pages:

  • Please test any changes to this template in its development sandbox:
    • User:Stux/post-devel is the development copy of this template.
    • Any changes to that template are reflected in this page: User:Stux/post-sandbox.
    • If the changes are successful, the entire page may be copied to {{post}} verbatim.
      • Otherwise, please revert development changes back to the last known good copy of User:Stux/post-devel that matches {{post}} so that the two pages remain synchronized.
      • Any partial, in-development code may be commented out using HTML comments until the feature can be finalized and/or fixed.
    • Also note that the helper templates listed above do not have sandboxed equivalents. Changes made to those templates will be immediate.

Main Template page: {{post}}

Personal tools