Template:Tweet/doc
This template uses TemplateStyles: |
Synopsis
Basic
{{Tweet|by|text}}
Extended
{{Tweet|by|handle|text|date|verified}}
Parameters handle and date are optional; either may be omitted.
Description
This is for fake Tweets.
Parameters
|by=
(required)- The one supposedly tweeting
|handle=
(optional)- A custom fake user handle. Defaults to by with spaces removed and an @ prepended
|text=
(required)|date=
(optional)- Abbreviated month-day-comma-year format e.g.
Nov 21, 2024
. Defaults to current date
- Abbreviated month-day-comma-year format e.g.
|verified=yes
(optional)- Render fake verified account badge: — this is off by default, as most accounts don't have this. The verified account badge is a parody and does not represent whether the account has actually been verified, only whether it would be expected. Official accounts (for e.g. NASA and high-profile celebrities) generally have this.
Notes
- ↑ Hashtags on Twitter look like
#example
; where#
(or hash) is code to treat the text as a tag, andexample
is the topic (being tagged). Twitter uses hashtags as an optional way for users to find other posts with the same topic. Since no actual tagging takes place here, its only use is for humor. See Pope's Twitter page for examples of hashtag jokes. - ↑ Mentions on Twitter look like
@example
and are explained on wikipedia:Mention (blogging). - ↑ The Lua parser is kept simple. Hashtags and mentions are broken at the nearest space without checking for piped links. Hence, use underscores to separate the left-hand component of piped links.
Autolinking
The by parameter checks whether an Uncyclopedia page by that name exists, and will link automagically as a bonus feature. Additionally, clicking on the bird icon goes to Twitter.
Examples
Example 1
Actual example applied to the 2014 UnNews article UnNews:Taliban leader trolled by Twitter.
Without
From this revision
(Source)
@Afghan_Rebel @zabihmujahid, maybe Quetta is no longer safe or @zabihmujahid love to spend sometime in Karachi beach. — Sangar Rahimi (@SangarRahimi) October 3, 2014
(Render)
@Afghan_Rebel @zabihmujahid, maybe Quetta is no longer safe or @zabihmujahid love to spend sometime in Karachi beach. — Sangar Rahimi (@SangarRahimi) October 3, 2014
With
From this revision:
(Source)
{{Tweet | by = Sangar Rahimi | handle = SangarRahimi | text = @Afghan_Rebel @zabihmujahid, maybe Quetta is no longer safe or @zabihmujahid love to spend sometime in Karachi beach. | date = Oct 3, 2014 }}
(Render)
Sangar Rahimi @SangarRahimi · Oct 3, 2014 |
@Afghan_Rebel @zabihmujahid, maybe Quetta is no longer safe or @zabihmujahid love to spend sometime in Karachi beach. |
Example 2
A contrived example demonstrating bells and whistles:
- Source
{{Tweet | by = Jimmy Wales | handle = Jimbo | text = @Wikipedia @[[wiktionary:fr:donation|needs money]], #[[please]] #[[nobody_cares|help]] #us #[[wikipedia:Finding Nemo|find Nemo]] | date = May 30, 2003 | verified = yes }}
- Render
Jimmy Wales @Jimbo · May 30, 2003 |
@Wikipedia @needs money, #please #help #us #find Nemo |
Note: The underscore is significant, as mentioned above.
Technical details
Helper templates
Template:Tweet/parse hashtags and Template:Tweet/parse mentions are single-purpose templates powered by Lua. A limitation of Lua on MediaWiki is that there is no alternation operator; and nested invocations would be unclear, so these two templates are called one after another for that purpose.