Extension:Listings

From mediawiki.org
MediaWiki extensions manual
Listings
Release status: beta
Implementation API
Description This extension was written for use in imported Wikitravel articles. In future, the tags used should be substituted by templates.
Author(s) Roland Unger
Latest version 1.03 (2012-08-30)
MediaWiki 1.25+
License GNU General Public License 2.0 or later
Download
Quarterly downloads 3 (Ranked 147th)
Translate the Listings extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

Listing is one of the Wikivoyage extensions.

Installation[edit]

  • Download and move the extracted Listings folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Listings
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'Listings' );
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Usage[edit]

Tags[edit]

The Listings extension implements the following tags:

  • ‎<buy>
  • ‎<do>
  • ‎<drink>
  • ‎<eat>
  • ‎<listing>
  • ‎<see>
  • ‎<sleep>

Attributes[edit]

All tags can be used with the same attributes:

  • name Name of the destination.
  • alt Additional information on the destination. This string can contain Wiki markups.
  • address Address the destination. This string can contain Wiki markups.
  • directions Way to or region of the destination. This string can contain Wiki markups.
  • phone Phone number(s) of the destination.
  • tollfree Toll-free phone number(s) of the destination.
  • email Email of the destination.
  • fax Fax number(s) of the destination.
  • url URL of the destination.
  • hours Opening hours of the destination.
  • price Price for the entrance or for accomodation of the destination.
  • checkin Check-in time of the hotels.
  • checkout Check-out-time of the hotels.
  • lat Position latitude of the destination. This information will be show only if lat, long attributes and the listingsPositionTemplate string are specified.
  • long Position longitude of the destination. This information will be show only if lat, long attributes and the listingsPositionTemplate string are specified.
  • tags Additional tags (specifications) of the destination. This information is not shown.

Text[edit]

The text included by the starting and closing tags is shown at the end. This string can contain Wiki markups.

Example[edit]

* <see name="National Underground Railroad Freedom Center" alt="Museum" address="50 East Freedom Way" directions="Downtown" phone="333-7500" tollfree="1-877-648-4838" email="info@freedomcenter.org" fax="333-7500" lat="30.1234" long="50.5678" url="http://www.freedomcenter.org" hours="M-Sa 10AM-5PM, Su noon-6PM" price="Admission for one museum or OMNIMAX show: Adults $7.25, Seniors $6.25">Link to the [[Main Page]].</see>

Deprecation[edit]

This extension performs a task which is already possible using standard templates. This appears to have been intended as a means to retain compatibility with an old Wikitravel listings editor which is not in use on Wikivoyage. The default behaviour effectively hard-codes a template-like design and field names into the extension's PHP code; this must be overridden if new fields are to be added without changing the code.

  • phab:T45220 implemented a patch which overrides the generated output for this extension by redirecting processing to a template.
  • Individual-language Wikivoyage projects have deployed robot scripts to edit every page, replacing the XML tags with voy:template:listing or its local equivalent.
  • As of May 2020, phab:T253216 proposes the removal of the extension from Wikivoyage, the only major wiki family using this code.
  • The extension was finally undeployed in January 2024