跳转到内容

模块:ExListing/doc

来自维基导游

这是Module:ExListing的文档页面

Information concerning this TEST Module ExListing

[编辑]
THIS IS FOR TESTING PURPOSES ONLY - AND AS A SAMPLE OF WHAT CAN BE DONE WITH A SCRIBUNTO (LUA) MODULE
BASIC CODE CAN BE TAKEN AND REVAMPED BY SOMEONE WITH MUCH MORE EXPERIENCE
  1. Parameters being input to module -- Template ExListing
    • -- listing will be the DEFAULT
    • -- flag for embassy or consulate (user puts in flag name as name is sometimes different from actual flag name)
    • -- name
    • -- alternate name
    • -- url - begin with http://....
    • -- email address
    • -- physical address
    • -- latitude - lat and long being used in old manner and testing for new format
    • -- longitude
    • -- zoom - added as option - default 17
    • -- layer - added as option - default M
    • -- directions to entity
    • -- phone #
    • -- tollfree #
    • -- tty # - added - needs class name - future maybe!
    • -- fax #
    • -- hours of operation
    • -- price
    • -- checkin time
    • -- checkout time
    • -- description
    • -- icon - approved icon name or names separated by a comma to put in front of name
    • -- alternative text {{{1}}}
    • -- LANUGUAGE - for use with future map - lat,long,zoom,layer,language and pagenamee
    • -- PAGENAMEE - for use with future map - lat,long,zoom,layer,language and pagenamee
  2. Error Checking
    • Require name or produce Module script error
    • Attempt to fix URL address for display
    • Check lat and long for same number of digits after decimal point
    • Replace space in phone, fax, tty, tollfree numbers with 'no break space'
    • Attempt to repair multi-line turnovers in content entry
    • Check IsLatin in alt entry in order to do italics
  3. Tables in Module
    • Icon table - list of legal icons to be used in listing ie. Museum, Hospital, Parking etc.
    • Colors - used for maps based on listing type ie. brown, steelblue etc.
  4. Display differences
    • Using bold abbreviations to separate entities such as: phone, e-mail, fax etc.
    • Added fax
    • Using an indented line (preceded by a black circle) for turnover lines in content entry.
    • Added flag entry
  5. Work to be done on this Module test
    • Get the new maps to link and display correctly - current moment numbers do not show in map
    • Get other individual links in content to work...
      • Currently have basis for above to work see Module ExListingPoi, Template ExListingPoi etc.
  6. Possible issue with using Scribunto (Lua)
    • Maybe a wiki issue using a Module - question of timing - as to when a page is being rendered
    • and if timing is not correct issue may occur that parsing of icons for map does not happen...
    • Note: "At this point in the page parse, templates have already been expanded, parser functions and extension tags have already been processed, and pre-save transforms have happened" - quote from mediawiki.org

EXAMPLE OF LISTING INPUT

[编辑]
{{ExListing
| type = eat
| name=Peter and Paul Fortress
| alt=Petropavlovskaya Krepost
| url=http://www.spbmuseum.ru/en/themuseum/museum_complex/peterpaul_fortress/
| email=fakeemail@example.com
| address=Zayachi Island
| lat=59.95013
| long=30.31632
| directions=m. Gorkovskaya
| fax=+7 812 230-64-33
| hours=10:00-18:00
| price=Free. To enter cathedral and exhibitions, 280 RUB, students 150 RUB
| content=The Fortress, occupying the entire island, is the original citadel of Saint Petersburg, built during the first half of the 18th century, now a museum.
It is dominated by the Peter and Paul Cathedral (1712-1732) with its 123 m (404 ft) high spire.
Regular guided tours to the belltower and the viewing platform are provided from May to September.
| '''Alternate text if no content??? - not used'''
}}