User:Stux/post-devel

From Homestar Runner Wiki

(Difference between revisions)
Jump to: navigation, search
(this kinda worked! Now I need to unset the flag after inserting the header and...)
(bring header back into template; clarify and comment out debug code; update comments; add more film logic)
Line 2: Line 2:
-->{{#if:{{{1|}}}<!-- /* check to see if old-style month parameter is set. */
-->{{#if:{{{1|}}}<!-- /* check to see if old-style month parameter is set. */
-->|
-->|
-
{{#switch:{{{2|}}}|={{!}}}|top=}}<!-- /* This is a single line of code that adds a "|}" tag. */  
+
{{#switch:{{{2|}}}|={{!}}}|top=}}<!-- /* This is a single line of code that adds a "|}" tag for the old style. */  
-
-->{{#setvar:postTemplateNeedHeaderFlag|true}}(here0-{{#var:postTemplateNeedHeaderFlag}})<!-- /* Flag: mark header as needed for insertion. */
+
-->{{#setvar:postTemplateNeedHeaderFlag|true}}<!--(debug0-{{#var:postTemplateNeedHeaderFlag}})--><!-- /* Flag: mark header as needed for insertion. */
-->|}}<!-- /*end {{#if:{{{1|}}} */  
-->|}}<!-- /*end {{#if:{{{1|}}} */  
-->
-->
-
{{#if:{{{table-begin|}}}<!-- /* NOTE: there are now two ways to include the header; noinclude is so header is shown in template page itself. (<noinclude>true</noinclude>) */
+
{{#if:{{{table-begin|<noinclude>true</noinclude>}}}<!-- /*  
-
-->|(here1a-{{#var:postTemplateNeedHeaderFlag}}){{#setvar:postTemplateNeedHeaderFlag|false}}{{post-table-header}}<!--
+
    NOTE: there are now three ways to include the header;  
 +
          A. We explicitly mark the beginning of a table using the table-begin parameter
 +
          B. Manually call {{post-table-header}} outside of this template (preferred for ongoing updates)
 +
          C. The old way by using the {{{1}}} parameter w/ the month.
 +
    NOTE 2: noinclude is used above so header is shown in this template's page.  
 +
*/
 +
-->|<!--(debug1a-{{#var:postTemplateNeedHeaderFlag}})-->{{#setvar:postTemplateNeedHeaderFlag|false}}{{post-table-header}}<!--
-->|{{#ifeq:{{#var:postTemplateNeedHeaderFlag}}|true|<!-- /* check if autoinsert flag is set */ -->
-->|{{#ifeq:{{#var:postTemplateNeedHeaderFlag}}|true|<!-- /* check if autoinsert flag is set */ -->
-
{{clear}}(here1b-{{#var:postTemplateNeedHeaderFlag}})
+
{{clear}}<!--(debug1b-{{#var:postTemplateNeedHeaderFlag}})-->
{{#switch:{{PAGENAME}}<!-- /* code to auto-post h2 header based on page name */
{{#switch:{{PAGENAME}}<!-- /* code to auto-post h2 header based on page name */
   -->|@strongbadactual (Instagram)=<h2>{{{1|{{CURRENTYEAR}}}}}</h2><!--
   -->|@strongbadactual (Instagram)=<h2>{{{1|{{CURRENTYEAR}}}}}</h2><!--
Line 16: Line 22:
-->}}{{#setvar:postTemplateNeedHeaderFlag|false}}
-->}}{{#setvar:postTemplateNeedHeaderFlag|false}}
{{post-table-header}}<!--  
{{post-table-header}}<!--  
-
-->|(here1c-{{#var:postTemplateNeedHeaderFlag}})}}<!--/*end #ifeq:postTemplateNeedHeaderFlag */  
+
-->|<!--(debug1c-{{#var:postTemplateNeedHeaderFlag}})-->}}<!--/*end #ifeq:postTemplateNeedHeaderFlag */  
-->}}<!-- /*end #if:{{{table-begin|}}} */  
-->}}<!-- /*end #if:{{{table-begin|}}} */  
-
-->(here2-{{#var:postTemplateNeedHeaderFlag}})
+
--><!--(debug2-{{#var:postTemplateNeedHeaderFlag}})-->
|- id="{{{id|}}}" {{#if:{{{reply|}}}|style="background:#F9F9F9"|}}<!-- /* single line of code */ -->
|- id="{{{id|}}}" {{#if:{{{reply|}}}|style="background:#F9F9F9"|}}<!-- /* single line of code */ -->
|width="200px" <!--
|width="200px" <!--
Line 48: Line 54:
-->}}<!-- /*end {{#if:{{{retweet|}}} */
-->}}<!-- /*end {{#if:{{{retweet|}}} */
-
-->{{#if:{{{film1|}}}|
+
-->{{#if:{{{film1|{{{film|}}}}}}|<!-- if either film1 or film are defined -->
<br />
<br />
:<p>'''Cast:''' {{Film|{{{film1|}}}}}<!--
:<p>'''Cast:''' {{Film|{{{film1|}}}}}<!--
Line 54: Line 60:
-->{{post-film|{{{film3|}}}}}<!--
-->{{post-film|{{{film3|}}}}}<!--
-->{{post-film|{{{film4|}}}}}<!--
-->{{post-film|{{{film4|}}}}}<!--
-
-->{{post-film|{{{film5|}}}}}</p>
+
-->{{post-film|{{{film5|}}}}}<!--
-
|}}<span style="display:none">{{{film|}}}</span>
+
-->{{#if:{{{film1|}}}|, |}}{{{film|}}}</p>
 +
|}}
<!-- /*end {{#if:{{{film1|}}} */
<!-- /*end {{#if:{{{film1|}}} */
Line 90: Line 97:
|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  
     This is used for two reasons&mdash; links to the section on the page  
Line 135: Line 144:
|film4=Fourth 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!**)
|film5=Fifth Character who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
-
|film=General list of Characters who appeared in the post.
+
|film=General list of Characters who appeared in the post. (**DO NOT INCLUDE STRONG BAD!**)
|table-end=1
|table-end=1
     /* Indicates this is the last item on the table and a table footer needs to be built! */
     /* Indicates this is the last item on the table and a table footer needs to be built! */

Revision as of 11:40, 22 December 2022

Text / Transcript Date / Link

(no text)

Date

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! */
    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). 
    This is used for two reasons— links to the section on the page 
    ([[@StrongBadActual Tweets 2014#913122813711708161]]) and the URL in the 
    Link column.
|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.
|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.
|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! */
}}

See Also

The following helper templates are used:

Personal tools