Wikipedia:Lua/Modul/Shortcuts/en

Wikipedia:Lua Modul Shortcuts en

Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English

Modul: Dokumentation

Shortcuts – Module to manage abbreviated links to frequently accessed pages.

Functions for templates

template
Support for {{Shortcut}} – Display hint on target page
Parameters of template transclusion:
  • 1
    List of shortcuts for this page, separated by commas
    HTML-Tags like <s> are possible and will be ignored.
    Optional – Default: retrieve from central registry; that precedes template parameter
  • light
    Suppress hint styling
    Optional – Default: place hint at certain position: style
Checks:
  • Is every shortcut in list a redirect?
  • Does this redirect page points in effect on target page?
  • Is redirect page categorized appropriately?
  • (future) If a talk page exists, {{Shortcut}} should have been used.
total
Table body of all shortcuts, initially sorted by abbreviation title
Parameters of #invoke:
  • nsn
    number of a namespace
    Optional – Default: all
Is to be completed by two column table head: shortcut / target page.
trows
Support for {{Shortcuts}} – generate table row (two columns) within survey
Parameters of template transclusion:
  • 1
    Canonical name of registered target page (spaced format)
    Mandatory
  • 2 3 4 5 6 7 8 9
    More target page names (any number)
    Optional
  • space
    Canonical name of namespace which precedes all registered target pages; then only page titles may be provided.
    Optional
  • story
    Wikitext with amendment to name of target page
    Optional
  • suffix
    Wikitext with amendment to list of shortcuts
    Optional
twoletters
Matrix with all two letter abbreviations in namespace and highlighting of registered shortcuts.
Not yet implemented.
Parameters of #invoke:
  • nsn
    number of a namespace
    Mandatory

Configuration

The settings in effect for the current project are described by /config.

Functions for Lua modules

There is one particular function for testing:

p.test(args)
args are the parameters, which would have been used on template transclusion or on #invoke call. Additionally can be provided or may be required:
  • args.suite – path to module; here: Module:Shortcuts
  • args.service – kind of action; name of function
  • args.shortcuts – liste
  • args.self – use as current page name

Usage

Unique for the entire Wiki project.

Dependencies

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.