မေႃႇၵျူး:FindYDCportal/doc
This is the documentation page for မေႃႇၵျူး:FindYDCportal
| This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
| Lua module ဢၼ်ၼႆႉ လႆႈၸႂ်ႉဝႆႉ တီႈၼႃႈလိၵ်ႈ မွၵ်ႈ 151,000 ၼႃႈလိၵ်ႈ. To avoid major disruption and server load, any changes should be tested in the မေႃႇၵျူး's /sandbox ဢမ်ႇၼၼ် ၼႃႈလိၵ်ႈၽႄ /testcases . The tested changes can be added to this page in a single edit. ဝူၼ်ႉသွၼ်ႇ ဢုပ်ႇဢူဝ်း လွင်ႈလႅၵ်ႈလၢႆႈ တီႈၼႂ်း ၼႃႈလိၵ်ႈ တႃႇဢုပ်ႇ ၽွင်းမိူဝ်ႈပႆႇ ၵေႃႇသၢင်ႈၶဝ်ၼၼ်ႉ။ ႁူဝ်ၼပ်ႉ လွင်ႈၶဝ်ႈပႃးၼႆႉ မၼ်းႁဵတ်းဢၢပ်ႉတဵတ်ႉဝႆႉႁင်းမၼ်း (တူၺ်းတီႈ ၽိုၼ်လိၵ်ႈ)။ |
A helper module to find the most specific chronology portal which actually exists for a given year or decade. Used to simplify linking to a chronology portal.
- October 2019 update
All by-year and by-century portals have been deleted. There are now only 8 decade portals, listed in Category:Decades portals.
So all checking for century and year portals has been disabled.
If any of the decade portals are deleted, then this module should be edited to remove that decade from the table existingDecadePortals
ပရႃႇမီႇတႃႇ
[မႄးထတ်းငဝ်ႈငႃႇ]Takes one parameter, which must be either a year (e.g. "1879", "1123") or a decade (e.g. "1940s", "730s").
If the parameter is missing, empty, or does not fit the required format, an empty string is returned.
ၽွၼ်းဢွၵ်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]If a portal is found, returns its name without the namespace prefix, e.g.
- for "Portal:1980s" return
1980s - for "Portal:19th century" return
19th century
If no portal is found, it returns an empty string.
လွင်ႈၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]- Year parameter
{{#invoke: FindYDCportal | findydcportal |YYYY}} ... where YYYY is a 3- or 4-digit year
- Decade parameter
{{#invoke: FindYDCportal | findydcportal |YYY0s}} ... where YYY0s is a 3- or 4-digit decade
တူဝ်ယၢင်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]- Years
{{#invoke: FindYDCportal | findydcportal |2018}}→ လွင်ႈၽိတ်းပိူင်ႈ Lua: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').{{#invoke: FindYDCportal | findydcportal |1935}}→{{#invoke: FindYDCportal | findydcportal |1857}}→{{#invoke: FindYDCportal | findydcportal |736}}→{{#invoke: FindYDCportal | findydcportal |1800}}→
- Decades
{{#invoke: FindYDCportal | findydcportal |2000s}}→ လွင်ႈၽိတ်းပိူင်ႈ Lua: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').{{#invoke: FindYDCportal | findydcportal |1940s}}→{{#invoke: FindYDCportal | findydcportal |560s}}→
- Missing parameter
{{#invoke: FindYDCportal | findydcportal}}→
- Empty parameter
{{#invoke: FindYDCportal | findydcportal | }}→
- Invalid parameter
{{#invoke: FindYDCportal | findydcportal | 1927-related}}→{{#invoke: FindYDCportal | findydcportal | Swedish chef}}→
လွၵ်ႉၵျိၵ်ႉ
[မႄးထတ်းငဝ်ႈငႃႇ]If the parameter is a year:
- If the year portal exists, return its name.
Otherwise try the decade. - If the decade portal exists, return its name.
Otherwise try the century - If the century portal exists, return its name.
Otherwise return an empty string
If the parameter is a decade:
- If the decade portal exists, return its name.
Otherwise try the century - If the century portal exists, return its name.
Otherwise return an empty string