Template:Twitterlink

UsageEdit

This template is used as a convenience function to link to Twitter sources when referring to posts for real-world information. The minimum invocation requires the Twitter username and post ID, so that referring to a post from @HAL_Laboratory found at https://twitter.com/HAL_Laboratory/status/1407172238453919746 (where 1407172238453919746 would be the post ID) would require an invocation of {{twitterlink}} as follows:

{{twitterlink|HAL_Laboratory|1407172238453919746}}

This yields a link to the appropriate Twitter post, along with the Twitter logo for additional visual reinforcement: Twitter link Twitter favicon.png

An additional unnamed argument may be supplied after the post ID to supply explanatory text after 'Twitter link':

{{twitterlink|HAL_Laboratory|1407172238453919746|(HAL Laboratory official Twitter account)}}

This generates the following formatted link: Twitter link (HAL Laboratory official Twitter account) Twitter favicon.png

Wayback Machine snapshotsEdit

To encourage compliance with the wiki's citing policy, optional convenience arguments exist to link to a Wayback Machine snapshot of the Twitter post. The two arguments are as follows:

  • wbsnap controls whether to link to the Wayback Machine at all. If the argument is invoked at all, the template creates a Wayback Machine link (even if the human-read value is something like 0 or no that seems to ask not to link to a snapshot).
  • wbtime controls the specific Wayback Machine snapshot to link. This defaults to 1000 so as to link to the oldest available snapshot. If wbsnap is not invoked, then invoking wbtime has no effect and on its own will not cause the template to link to the Wayback Machine.

The table below shows a number of sample invocations of these arguments.

Invocation Result Notes
{{twitterlink|HAL_Laboratory|1407172238453919746|wbsnap=y}} Twitter link Twitter favicon.png (Wayback Machine snapshot) Links to the oldest snapshot available.
{{twitterlink|HAL_Laboratory|1407172238453919746|wbsnap}} Twitter link wbsnap Twitter favicon.png Incorrect invocation of optional argument, leading to wbsnap instead being parsed as explanatory text for the primary link.
{{twitterlink|HAL_Laboratory|1407172238453919746|@HAL_Laboratory|wbsnap=false}} Twitter link @HAL_Laboratory Twitter favicon.png (Wayback Machine snapshot) Even though the value of wbsnap is false, the wiki does not parse this argument as a boolean. The template considers the argument invoked all the same, and links to the oldest snapshot available.
{{twitterlink|HAL_Laboratory|1407172238453919746|@HAL_Laboratory|wbsnap=1|wbtime=20230523174008}} Twitter link @HAL_Laboratory Twitter favicon.png (Wayback Machine snapshot) Links to a specific snapshot.
{{twitterlink|HAL_Laboratory|1407172238453919746|@HAL_Laboratory|wbtime=20230523174008}} Twitter link @HAL_Laboratory Twitter favicon.png Does not link to the Wayback Machine as wbsnap is missing even though wbtime is present.