MediaWiki extensions manual
TwitterTag
Release status: stable
Implementation Tag
Author(s) Mikko Miettinen
Original version:
Latest version 1.2.1
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.27+
PHP 7.1.0+
License GNU General Public License 3.0 or later
Download
Example Jedipedia
Tags
<twitter />
Hooks used
  • ParserFirstCallInit
Quarterly downloads 23 (Ranked 147th)
Translate the TwitterTag extension if it is available at translatewiki.net

The TwitterTag extension adds <twitter /> tag to allow embedding Twitter content on pages. It is ported from Fandom's extension.

Installation

Unless otherwise specified, you should always download and install "master" version, which is compatible with all supported versions. Release branches are not supported and may be outdated.
  • Download and place the file(s) in a directory called TwitterTag in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'TwitterTag' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage

Currently the extension supports individual tweets, profile timeline and list timeline. Likes timelines are deprecated by Twitter and pages containing them are added to a tracking category since version 1.2.1.

To add a tweet, use following code: <twitter screen-name="screen_name" tweet-id="tweet_id" />

To add a profile timeline, use following code: <twitter screen-name="screen_name" />

To add a list timeline, use following code: <twitter screen-name="screen_name" list-slug="list_slug" />

To add a likes timeline, use following code: <twitter likes-screen-name="screen_name" />

Alternatively, full URL can be provided using parameter href=.

Most parameters provided by Twitter, such as height=, width=, and lang=, are supported.

This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.