Vorlage:Tweet/sandbox: Unterschied zwischen den Versionen
get date automatically
(archive params) |
(get date automatically) |
||
Zeile 1: | Zeile 1: | ||
<includeonly>{{Quote box|style={{#if: {{{block|}}}|margin:1rem 40px;|}}|align={{#if: {{{left|}}}|left|{{#if: {{{block|}}}|none|right}}}}|width={{#if: {{{block|}}}|{{{width|500px}}}|{{{width|220px}}}}}|quote={{#if: {{{name|}}}||{{Formatting error|Missing <u>name</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | <includeonly>{{Quote box|style={{#if: {{{block|}}}|margin:1rem 40px;|}}|align={{#if: {{{left|}}}|left|{{#if: {{{block|}}}|none|right}}}}|width={{#if: {{{block|}}}|{{{width|500px}}}|{{{width|220px}}}}}|quote={{#if: {{{name|}}}||{{Formatting error|Missing <u>name</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | ||
-->{{#if: {{{username|}}}||{{Formatting error|Missing <u>username</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | -->{{#if: {{{username|}}}||{{Formatting error|Missing <u>username</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | ||
-->{{#if: {{{date|}}}||{{Formatting error|Missing <u>date</u> | -->{{#if: {{{date|{{#if:{{{id|}}}|{{#invoke:TwitterSnowflake|snowflakeToDate|id_str={{{id}}}|format=%B %e, %Y}}}}}||{{Formatting error|Missing <u>date</u> and <u>id</u> parameters.<br>|nocategory={{{nocategory|}}}}}}}<!-- | ||
-->{{#if: {{{text|}}}||{{Formatting error|Missing <u>text</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | -->{{#if: {{{text|}}}||{{Formatting error|Missing <u>text</u> parameter.<br>|nocategory={{{nocategory|}}}}}}}<!-- | ||
-->{{#ifeq: {{extract|{{{date|}}}|show=format}} | dmy | -->{{#ifeq: {{extract|{{{date|{{#if:{{{id|}}}|{{#invoke:TwitterSnowflake|snowflakeToDate|id_str={{{id}}}|format=%B %e, %Y}}}}}|show=format}} | dmy | ||
||{{#ifeq: {{extract|{{{date|}}}|show=format}} | mdy | ||{{#ifeq: {{extract|{{{date|{{#if:{{{id|}}}|{{#invoke:TwitterSnowflake|snowflakeToDate|id_str={{{id}}}|format=%B %e, %Y}}}}}|show=format}} | mdy | ||
||{{Formatting error|<u>date</u> parameter should be [[MOS:DATE|reformatted]] to look like:<br>''1 Jan 1970'' or ''Jan 1, 1970''.<br>|nocategory={{{nocategory|}}}}} | ||{{Formatting error|<u>date</u> parameter should be [[MOS:DATE|reformatted]] to look like:<br>''1 Jan 1970'' or ''Jan 1, 1970''.<br>|nocategory={{{nocategory|}}}}} | ||
}} | }} | ||
Zeile 47: | Zeile 47: | ||
|}} | |}} | ||
<div style="color: #4C545C;"> | <div style="color: #4C545C;"> | ||
{{{date|}}}<!-- | {{{date|{{#if:{{{id|}}}|{{#invoke:TwitterSnowflake|snowflakeToDate|id_str={{{id}}}|format=%B %e, %Y}}}}}<!-- | ||
-->{{{reference|{{{ref | -->{{{reference|{{{ref | ||
|{{#tag:ref|{{cite tweet|user= {{{username}}} |author= {{{name|}}} |number= {{{ID|{{{id|}}}}}} |date= {{{date}}} |title= {{#invoke:String|replace|{{{text}}}|%s+| |plain=false}} |archive-url= {{{archive-url|}}} |archive-date= {{{archive-date|}}} |url-status= {{{url-status|}}} }} }} | |{{#tag:ref|{{cite tweet|user= {{{username}}} |author= {{{name|}}} |number= {{{ID|{{{id|}}}}}} |date= {{{date|{{#if:{{{id|}}}|{{#invoke:TwitterSnowflake|snowflakeToDate|id_str={{{id}}}|format=%B %e, %Y}}}}} |title= {{#invoke:String|replace|{{{text}}}|%s+| |plain=false}} |archive-url= {{{archive-url|}}} |archive-date= {{{archive-date|}}} |url-status= {{{url-status|}}} }} }} | ||
}}}}}} | }}}}}} | ||
</div> | </div> |