Module:Bad title suggestion/doc
Jump to navigation
Jump to search
| This is a documentation subpage for Module:Bad title suggestion. It may contain usage information, categories and other content that is not part of the original module page. |
| This is a documentation subpage for Module:Bad title suggestion. It may contain usage information, categories and other content that is not part of the original module page. |
| Error creating thumbnail: File missing | This Lua module is used in system messages. Changes to it can cause immediate changes to the MyWiki user interface. To avoid major disruption, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Please discuss changes on the talk page before implementing them. |
| This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing. |
This module implements title suggestions for the "Bad title" interface message at MediaWiki:Title-invalid-characters. When the user asks for a page with invalid characters, this module checks for a page with the given title up to the first invalid character. If it exists, {{Did you mean box}} is displayed.
Usage
[edit source]{{#invoke:Bad title suggestion|main|invalid_char|bad_title_encoded}}
In the case of MediaWiki:Title-invalid-characters, this is:
{{#invoke:Bad title suggestion|main|$1|$2}}
Examples
[edit source]- Foobar>:
{{#invoke:Bad title suggestion|main|>|Foobar>}}
Did you mean: Foobar?
- Wikipedia:Village pump}}:
{{#invoke:Bad title suggestion|main|}|Wikipedia:Village pump}}}}
- Main Page|title text!:
{{#invoke:Bad title suggestion|main|||Main Page|title text!}}
Did you mean: Main Page?
- This page absolutely does not exist>:
{{#invoke:Bad title suggestion|main|>|This page absolutely does not exist>}}
(nothing displayed)
- Category:Contents>:
{{#invoke:Bad title suggestion|main|>|Category:Contents>}}
Did you mean: Category:Contents?
- <Foobar>:
{{#invoke:Bad title suggestion|main|<|<Foobar>}}
(nothing displayed)
- Solo [3]:
{{#invoke:Bad title suggestion|main|[|Solo [3]}}
- M>Train:
{{#invoke:Bad title suggestion|main|>|M>Train}}