Template:Tweet/doc

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
This is a documentation subpage for Template:Tweet.
It contains usage information, categories and other content that is not part of the original template page.
To view the template page itself, see Template:Tweet.

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)
    The fake Tweet. Hashtags[note 1] and mentions[note 2] are supported anywhere within the Tweet. Linking doesn't interfere with this, but piped links require escaping spaces.[note 3]
  • |date= (optional)
    Abbreviated month-day-comma-year format e.g. Dec 22, 2024. Defaults to current date
  • |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

  1. Hashtags on Twitter look like #example; where # (or hash) is code to treat the text as a tag, and example 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.
  2. Mentions on Twitter look like @example and are explained on wikipedia:Mention (blogging).
  3. 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)

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

Symbol comment vote.svg 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.