Ref:Twitter: Difference between revisions

From Oddworld Library
m (Made author and replyAuthor be used for account lines if specified)
(Added documentation)
 
Line 1: Line 1:
<includeonly>
{{ref:refHeader
{{ref:refHeader
   | author = {{#if: {{{author}}} | {{{author}}} [@{{{username}}}] | @{{{username}}} }}
   | author = {{#if: {{{author}}} | {{{author}}} [@{{{username}}}] | @{{{username}}} }}
Line 16: Line 17:
   }}
   }}
   [https://twitter.com/{{{replyUsername}}}/status/{{{replyID}}} Tweet].
   [https://twitter.com/{{{replyUsername}}}/status/{{{replyID}}} Tweet].
  {{#if: {{{quote|}}} | {{#ifeq: {{{quoteMarks|single}}} | double |“|‘}}<q cite="https://twitter.com/{{{username}}}/status/{{{messageID}}}">{{{quote}}}</q>{{#ifeq: {{{quoteMarks|single}}} | double |”|’}} }}
   {{{replyAuthor|{{{replyChannel|@{{{replyUsername}}}}}}}}} account.
   {{{replyAuthor|{{{replyChannel|@{{{replyUsername}}}}}}}}} account.
}}
}}
   Twitter.
   Twitter.
   San Francisco, California: X Corp.
   San Francisco, California: X Corp.
</includeonly>
<noinclude>
This reference template is used to easily reference a tweet from the social media platform Twitter. To use it, place it inside <code><nowiki><ref></nowiki></code> elements in the reference list.
<pre>
<ref name="Name of the reference">
{{ref:Twitter
  | parameter1 = value1
  | parameter2 = value2
}}
</ref>
</pre>
== Parameters ==
This template takes the following parameters. Those marked with an asterisk (*) are required for the template to work properly.
; author
: Unlike most reference templates, not required. If specified, this appears in the header of the reference and the username is placed in square brackets after it (but before the date). Using the Twitter account's profile name is not necessary; use the name of the company or person appearing in the tweeted media, or responsible for the tweet, if known.
; *username
: Required. Must match the Twitter account's username. Do not include the <code>@</code> symbol, it will be added by the template.
; *date
: Required. The date in the format single-digit date, full month name, four-digit year (<code>D Mmmm YYYY</code>).
; *datetime
: Required. The ISO 8601 date, which can be found in the source code of a Twitter web page. Inspect the date or relative date of the tweet and this will be the value of the <code>datetime</code> attribute in the <code><nowiki><time></nowiki></code> element.
; *messageID
: Required. The numerical sequence that appears at the end of the web address of an individual tweet.
; link
: Does nothing, but can be used to quickly access a source when editing the article
; quote
: Used to include a quote at the end of the reference. Only do this if it is particularly important to the context of the reference, and only if it is a short quote with no carriage returns.
; quoteMarks
: Defines how many quotation marks are used to delimit the quote. Does nothing if there is no quote. Defaults to <code>single</code> if not specified. The only other valid value is <code>double</code>. Only set the value to <code>double</code> if the quote itself contains single quotation marks. If the quote contains both single <em>and</em> double quotation marks, then the quotation marks <em>around</em> the quote should match the quotation marks that are <em>innermost</em> of the quote itself.
=== Replies ===
If the tweet is a reply to another tweet, include the following parameters. Those marked with an asterisk (*) are required for the template to include the replied-to tweet properly.
; replyAuthor
: Not required. The same rules apply as the <code>author</code> parameter.
; *replyUsername
: Required. The same rules apply as the <code>username</code> parameter.
; *replyDate
: Required. The same rules apply as the <code>date</code> parameter.
; *replyDatetime
: Required. The same rules apply as the <code>datetime</code> parameter.
; *replyID
: Required. The same rules apply as the <code>messageID</code> parameter.
If the referenced tweet is a reply to another tweet which is itself a reply to another tweet, then no further information should be included in the reference. Twitter conversations can be arbitrarily long. Referenced tweets should only look one message back for the purpose of adding basic context.
</noinclude>

Latest revision as of 17:24, 5 September 2024


This reference template is used to easily reference a tweet from the social media platform Twitter. To use it, place it inside <ref> elements in the reference list.

<ref name="Name of the reference">
{{ref:Twitter
  | parameter1 = value1
  | parameter2 = value2
}}
</ref>

Parameters

This template takes the following parameters. Those marked with an asterisk (*) are required for the template to work properly.

author
Unlike most reference templates, not required. If specified, this appears in the header of the reference and the username is placed in square brackets after it (but before the date). Using the Twitter account's profile name is not necessary; use the name of the company or person appearing in the tweeted media, or responsible for the tweet, if known.
*username
Required. Must match the Twitter account's username. Do not include the @ symbol, it will be added by the template.
*date
Required. The date in the format single-digit date, full month name, four-digit year (D Mmmm YYYY).
*datetime
Required. The ISO 8601 date, which can be found in the source code of a Twitter web page. Inspect the date or relative date of the tweet and this will be the value of the datetime attribute in the <time> element.
*messageID
Required. The numerical sequence that appears at the end of the web address of an individual tweet.
link
Does nothing, but can be used to quickly access a source when editing the article
quote
Used to include a quote at the end of the reference. Only do this if it is particularly important to the context of the reference, and only if it is a short quote with no carriage returns.
quoteMarks
Defines how many quotation marks are used to delimit the quote. Does nothing if there is no quote. Defaults to single if not specified. The only other valid value is double. Only set the value to double if the quote itself contains single quotation marks. If the quote contains both single and double quotation marks, then the quotation marks around the quote should match the quotation marks that are innermost of the quote itself.

Replies

If the tweet is a reply to another tweet, include the following parameters. Those marked with an asterisk (*) are required for the template to include the replied-to tweet properly.

replyAuthor
Not required. The same rules apply as the author parameter.
*replyUsername
Required. The same rules apply as the username parameter.
*replyDate
Required. The same rules apply as the date parameter.
*replyDatetime
Required. The same rules apply as the datetime parameter.
*replyID
Required. The same rules apply as the messageID parameter.

If the referenced tweet is a reply to another tweet which is itself a reply to another tweet, then no further information should be included in the reference. Twitter conversations can be arbitrarily long. Referenced tweets should only look one message back for the purpose of adding basic context.