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 | Download extension Git [?]: |
|
Hooks used
|
|
| Quarterly downloads | 0 |
| 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
- Download and place the file(s) in a directory called
Listingsin yourextensions/folder. - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Listings' );
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
Tags
The Listings extension implements the following tags:
<buy><do><drink><eat><listing><see><sleep>
Attributes
All tags can be used with the same attributes:
nameName of the destination.altAdditional information on the destination. This string can contain Wiki markups.addressAddress the destination. This string can contain Wiki markups.directionsWay to or region of the destination. This string can contain Wiki markups.phonePhone number(s) of the destination.tollfreeToll-free phone number(s) of the destination.emailEmail of the destination.faxFax number(s) of the destination.urlURL of the destination.hoursOpening hours of the destination.pricePrice for the entrance or for accomodation of the destination.checkinCheck-in time of the hotels.checkoutCheck-out-time of the hotels.latPosition latitude of the destination. This information will be show only iflat,longattributes and thelistingsPositionTemplatestring are specified.longPosition longitude of the destination. This information will be show only iflat,longattributes and thelistingsPositionTemplatestring are specified.tagsAdditional tags (specifications) of the destination. This information is not shown.
Text
The text included by the starting and closing tags is shown at the end. This string can contain Wiki markups.
Example
* <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="[email protected]" 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
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 tags still work on Wikivoyage, but are deprecated and (at least on en:) any pages still using the tag are being added to a maintenance category.
| This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
| This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |