Wikipedia:Lua/Modul/PageTitleSimilar/en

Vorlagenprogrammierung Diskussionen Lua Unterseiten
Modul Deutsch English Modul: Dokumentation

PageTitleSimilar – Module to check whether a similar page name already exists.

Functions for templates

f
Standard function
Parameters:
  • 1 – Page with JSON configuration (mandatory)
  • URL – complete terminating interpunction at URL
    • URL=1 – try round bracket, period or question mark
failsafe
Version management

The Failsafe interface is heading for version management of globally distributed Lua modules. It enables modules equipped with this interface to

The Failsafe interface is present both at template level and for direct Lua access.

The functions in detail are (not all supported yet completely by every library):

Parameter
Value Result current
nothing
false
local version ID »2025-02-11«
Minimal version version ID required at least
date in ISO format

It will be compared whether the current local implementation matches this version or later.

  • empty, if minimal version not achieved
  • 2001-01-01 → »2025-02-11«
  • 2099-01-01 → »«
wikidata version ID of global upstream
  • version ID at Wikidata
  • local, if not found there
»2025-02-11«
~ Corresponding version ID locally and registered at Wikidata
  • empty, if up to date
  • version ID at Wikidata, if not equal
»2025-02-11«
@ Is the current (module) page linked correctly with Wikidata item?
  • empty, if linked to the item which is supposed
  • Iitem ID, if not
The return value is in template programming empty or under Lua false, otherwis a non-empty string as described.

Configuration

Example: MediaWiki:PageTitleSimilar.json

replace
replacement of typographic characters (optional)
Array of arrays with two elements each:
  1. Search pattern
  2. replacement text
sourceTypogr
Name of a page to be transcluded on successful replacement of typographic characters
  • 1 – Name of existing page
sourceURL
Name of a page to be transcluded on successful completion at URL=1
  • 1 – Name of existing page

Verwendung

Supposed to be used in system messages only:

Dependencies

None.