मैथिली विकिमिडियन्स
maiwikimedia
https://mai.wikimedia.org/wiki/%E0%A4%B8%E0%A4%AE%E0%A5%8D%E0%A4%AE%E0%A5%81%E0%A4%96_%E0%A4%AA%E0%A4%A8%E0%A5%8D%E0%A4%A8%E0%A4%BE
MediaWiki 1.42.0-wmf.20
first-letter
मेडिया
विशेष
वार्ता
प्रयोगकर्ता
प्रयोगकर्ता वार्ता
Wikimedia
Wikimedia वार्ता
फाइल
फाइल वार्ता
मेडियाविकि
मेडियाविकि वार्ता
आकृति
आकृति वार्ता
मद्दत
मद्दत वार्ता
श्रेणी
श्रेणी वार्ता
TimedText
TimedText talk
मोड्युल
मोड्युल वार्ता
Translations
Translations talk
सम्मुख पन्ना
0
1
1
2017-07-12T11:56:27Z
127.0.0.1
Created page with "==This subdomain is reserved for the creation of a [[wikimedia:Our projects|Wikimedia]] in '''[[w:en:मैथिली|मैथिली]]''' language== * Please '''do not..."
wikitext
text/x-wiki
==This subdomain is reserved for the creation of a [[wikimedia:Our projects|Wikimedia]] in '''[[w:en:मैथिली|मैथिली]]''' language==
* Please '''do not start editing''' this new site. This site has a test project on the [[incubator:|Wikimedia Incubator]] (or on the [[betawikiversity:|Beta Wikiversity]] or on the [[oldwikisource:|Old Wikisource]]) and it will be imported to here.
* If you would like to help translating the interface to this language, please do not translate here, but go to [[translatewiki:|translatewiki.net]], a special wiki for translating the interface. That way everyone can use it on every wiki using the [[mw:|same software]].
* For information about how to edit and for other general help, see [[m:Help:Contents|Help on Wikimedia's Meta-Wiki]] or [[mw:Help:Contents|Help on MediaWiki.org]].
== Sister projects ==
<span class="plainlinks">
[//www.wikipedia.org Wikipedia] |
[//www.wiktionary.org Wiktionary] |
[//www.wikibooks.org Wikibooks] |
[//www.wikinews.org Wikinews] |
[//www.wikiquote.org Wikiquote] |
[//www.wikisource.org Wikisource] |
[//www.wikiversity.org Wikiversity] |
[//www.wikivoyage.org Wikivoyage] |
[//www.wikidata.org Wikidata] |
[//commons.wikimedia.org Commons]
</span>
See Wikimedia's [[m:|Meta-Wiki]] for the coordination of these projects.
b347o2d9f11xs254xlyd21cdpuuxjav
22
1
2017-07-18T07:49:55Z
Biplab Anand
1
+Main Page
wikitext
text/x-wiki
{{Notitle}}
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
s33vqmpyr5m2rnevs6mm4fno4zp32dn
28
22
2017-07-19T11:03:55Z
Biplab Anand
1
+adding contents
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] हमरसभक समबन्धमे}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG}} }}}
|-
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] समाचार आ सूचना}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] सम्पर्क करी}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|30px]] विकिमिडिया परियोजना मैथिलीमे}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects}} }}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
a3hele9izr4frx5vdb7zokob7evy2ha
29
28
2017-07-19T11:04:19Z
Biplab Anand
1
"[[सम्मुख पन्ना]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जा...
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] हमरसभक समबन्धमे}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG}} }}}
|-
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] समाचार आ सूचना}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] सम्पर्क करी}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|30px]] विकिमिडिया परियोजना मैथिलीमे}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects}} }}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
a3hele9izr4frx5vdb7zokob7evy2ha
39
29
2017-07-20T11:53:08Z
Biplab Anand
1
+section
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] हमरसभक समबन्धमे}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG}} }}}
|-
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] समाचार आ सूचना}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Handshake logo.svg|25px]] अहाँ कोना मद्दति कऽ सकैत छी?}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG Help}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] सम्पर्क करी}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|28px]] विकिमिडिया परियोजना मैथिलीमे}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects}} }}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
0p3g6xvysd5iohbe0xv92dq8lc5lzbs
44
39
2017-07-20T12:13:00Z
Biplab Anand
1
+सुधार
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] हमरसभक सम्बन्धमे}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] समाचार आ सूचना}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Handshake logo.svg|25px]] अहाँ कोना मद्दति कऽ सकैत छी?}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG Help}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] सम्पर्क करी}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|28px]] विकिमिडिया परियोजना मैथिलीमे}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects}} }}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
2ct6ty9md8ydegr18596ip2t68ktgie
47
44
2017-07-20T12:32:56Z
Biplab Anand
1
+सुधार
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] हमरसभक सम्बन्धमे}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] समाचार आ सूचना}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Handshake logo.svg|25px]] अहाँ कोना मद्दति कऽ सकैत छी?}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG Help}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] सम्पर्क करी}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Featured picture icon BLACK-01.svg|25px]] चित्र दीर्घा}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Gallery}} }}}
|-
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|28px]] विकिमिडिया परियोजना मैथिलीमे}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects}} }}}
|}
[[श्रेणी:मुख्य पृष्ठ]]
advh665r57f5qm1i9snjjlqrz9lc42i
मेडियाविकि:Sitesupport-url
8
2
2
2017-07-12T11:56:27Z
127.0.0.1
Setting sidebar link
wikitext
text/x-wiki
https://donate.wikimedia.org/?utm_source=donate&utm_medium=sidebar&utm_campaign=mai.wikimedia.org&uselang=mai
j0a86r4qgdgf3zfbg2x1qfvtccg405x
आकृति:-
10
3
3
2017-07-18T02:28:07Z
Biplab Anand
1
copied from metawiki
wikitext
text/x-wiki
<div style="clear:{{{1|both}}}; height:1em"></div><noinclude>
This template "clears" both margins; it is often used before a header to make sure that header will be the full width of the page.
</noinclude>
ode11yuwb3aku31xbkmxxzok0x7an06
आकृति:Clear
10
4
4
2017-07-18T02:28:40Z
Biplab Anand
1
copied from metawiki
wikitext
text/x-wiki
<div style="clear:{{{1|both}}};"></div><noinclude>{{documentation}}</noinclude>
5aa2j06l3n3husy1g6jggf6oznzocau
आकृति:@
10
5
5
2017-07-18T02:29:07Z
Biplab Anand
1
copied from metawiki
wikitext
text/x-wiki
[[File:At_sign.svg|{{{1|17px}}}|@|link=]]<noinclude>{{documentation}}</noinclude>
jmafwcon2lihq7rmksickqwka4025of
प्रयोगकर्ता:Biplab Anand
2
6
6
2017-07-18T02:30:27Z
Biplab Anand
1
+user page
wikitext
text/x-wiki
__NOINDEX__
{{clear}}
</div><center>
{| style="width: 100%; background-color: #F8E0F1; border: 6px solid #0101DF; padding: 10px; margin-bottom: 8px; vertical-align: top;"
| colspan=3 style="vertical-align:top" |
|[[Image:Flag of Nepal.svg|95px|center|link=http://en.wikipedia.org/wiki/Nepal]]
<div style="margin-top: 1em;">
<div style="width:25%; float:left; height:4px; background:#990000;"></div>
<div style="width:25%; float:left; height:4px; background:#339966;"></div>
<div style="width:25%; float:left; height:4px; background:#A7D7F9;"></div>
<div style="width:25%; float:left; height:4px; background:#666666;"></div>
</div>
{{-}}
Hi,</br>
My name is '''Biplab Anand'''. I am from [[:en:Nepal|Nepal]]. I am being an editor on Wikimedia projects since 2013. I support the Wikimedia projects by serving as a [[m:GS|Global administrators]], [[m:GR|Global rollbackers]], [[m:Global renamers|Global renamers]] and [[m:SWMT|SWMT]] member. I am mostly active on [[w:mai:सम्मुख पन्ना|Maithili]] and [[w:ne:मुख्य पृष्ठ|Nepali Wikipedia]] and active on several other Wikimedia projects. Besides from online activities, I am also active in Wikimedia offline activities for [[:m:Maithili Wikimedians|Maithili Wikimedians]] User group. I use this username in all Wikimedia projects. If you want to <span class="plainlinks nourlexpansion">[{{fullurl:User_talk:Biplab Anand|action=edit§ion=new&editintro=}} <font style="color:blue;">leave me a message</font>]</span>, please use my [[User_talk:Biplab Anand|talk page]].
I have [[:en:Wikipedia:Administrators|administrator]] right on [[w:ne:मुख्य पृष्ठ|Nepali Wikipedia]] <small>(<span class="plainlinks">[{{fullurl:ne:Special:Listusers|limit=1&username={{PAGENAMEE}} verify}}]</span>)</small> and [[w:mai:सम्मुख पन्ना|Maithili Wikipedia]] <small>(<span class="plainlinks">[{{fullurl:mai:Special:Listusers|limit=1&username={{PAGENAMEE}} verify}}]</span>)</small>. My global contributions on Wikimedia project can be found via [[:meta::Special:CentralAuth/Biplab Anand|CentralAuth]].
<h1 style="margin:0; border-bottom:0; color:black;text-align:right;">
<sup><small><small>ne-N | mai-N | hi-4 | en-2 | bh-2 | awa-2 | dty-2 | sa-2</small></small></sup></h1>
[[Image:Biplab Anand - Mohali 2016-08-06 8145.JPG|200px|right]]
===Contact Info===
* [[Special:Emailuser/Biplab Anand|Email me]] (biplabanand{{@}}gmail.com)
* IRC Nick: <code>Biplab</code>
* Facebook: <span class="plainlinks nourlexpansion">[http://facebook.com/born4revolute <font style="color:blue;">Biplab Anand</font>]</span>
* Twitter: <span class="plainlinks nourlexpansion">[http://twitter.com/born4revolute <font style="color:blue;">@born4revolute</font>]</span>
'''Feel free to contact me using any of the above. Thanks!'''
|}
<center></div>
[[Category:User ne]]
[[Category:User mai]]
[[Category:WAM organisers]]
[[Category:Global sysops]]
[[Category:Global renamers]]
o4dyqvflxi6z2drck8y1m7u4m0gwk12
आकृति:अन्तर्जाल
10
7
7
2017-07-18T02:31:41Z
Biplab Anand
1
'मैथिली विकिमिडियन्स' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
मैथिली विकिमिडियन्स
1cfjvw6wk0ws2ixk5qx7jctcl8lv7s9
26
7
2017-07-18T07:55:41Z
Biplab Anand
1
wikitext
text/x-wiki
Maithili Wikimedians
l5dyqpkj5y91nyypdqletlaf0t252lv
आकृति:Notitle
10
8
8
2017-07-18T06:33:54Z
Biplab Anand
1
copied
wikitext
text/x-wiki
{{DISPLAYTITLE:<span style="display:none;">{{FULLPAGENAME}}</span>}}
o3y41c5nxeomt15o0gs0kunld6rkgol
आकृति:Image
10
9
9
2017-07-18T06:36:32Z
Biplab Anand
1
copied
wikitext
text/x-wiki
<div class="banner-image {{#ifeq: {{{align|}}}|left| banner-image-left|}}{{#ifeq: {{{align|}}}|none| banner-image-none|}}{{#ifeq: {{{align|}}}|center| banner-image-center|}}" style="max-width:{{{width|400px}}};{{#ifeq: {{{padding|}}}|no|| padding-left:1.5em;}}">
[[File:{{{file|Janki Mandir of Janakpur Dham(Nepal).jpg}}}|{{{width|400px}}}|{{#ifeq:{{{border|}}}|yes|border{{!}}}}alt={{{caption|}}}|{{#if:{{{link|}}}|link={{{link|}}}}}]]{{#if: {{{caption|}}}|
<p style="font-size: 90%;">
{{{caption}}}
</p>}}
</div><noinclude>
<div style="clear:both;">
----
'''Template documentation'''
This template is used to provide images with captions as an alternative to the ugly image captions that come with MediaWiki.
Syntax:
* '''<tt>file=</tt>''' Sets which file to use. Default value is [[commons:File:Janki Mandir of Janakpur Dham(Nepal).jpg|Janki Mandir of Janakpur Dham(Nepal).jpg]].
* '''<tt>width=</tt>''' The maximum width of the image. Note that the image gets smaller so that it is never more than a certain percentage of the browser window. Defaults to 400px.
* '''<tt>percentage=</tt>''' The percent width of the browser window the image takes up. The width proportionality is maintained until the image is at the maximum size; it does not get better. Defaults to 50%.
* '''<tt>align=</tt>''' Sets alignment of image and caption block. Options are right, left, center, and none. Default is right.
* '''<tt>caption=</tt>''' Places a caption beneath the image, and also serves as the alt text. Optional.
* '''<tt>padding=</tt>''' Gives the option to turn off padding, in case the image is part of a floating div already. Default is to include padding; turn off by setting parameter to "no".
* '''<tt> link=</tt>''' Allows the image to link to a different page. Default is to link to the image description page. Set <tt>link=</tt> to nothing and the image will not be clickable
</div></noinclude>
3e1vrkrq5f2pdxq4xcu8zgr7p1f6mby
आकृति:Header mega
10
10
10
2017-07-18T06:37:56Z
Biplab Anand
1
copied
wikitext
text/x-wiki
__NOTOC__{{notitle}}
<div class="plainlinks" id="megaheader{{#ifeq:{{{short}}}|yes|-short|}}">
<h1 style="position:absolute; top:0.5em; left:1em; padding:0.25em; text-align:left; color:#FFF !important; letter-spacing:2px; z-index:100; line-height:1; font-weight:600; border-bottom:0; background-color:rgba(50,50,50,0.85);">{{{title|{{PAGENAME}}}}}</h1>{{#if:{{{additional|}}}|
<div style="position:absolute; top:9em; left:2.5em; text-align:left; color:#FFF !important; z-index:100; line-height:1; font-weight:600; border-bottom:0;">
{{{additional}}}</div>}}{{#if:{{{credit|}}}|
<div style="position:absolute; bottom:20px; right:20px; text-align:right; z-index:100; line-height:1; font-size:70%; font-weight:450; border-bottom:0;">
[[:File:{{{file}}}|<span style="color:#FFF;">{{{credit|Image credit}}}</span>]]</div>}}
{{Image|file={{{file|Janki Mandir of Janakpur Dham(Nepal).jpg}}}|width=1920px|percentage=100%|padding=no|align=none}}
</div><noinclude>[[Category:Visual identity templates]]</noinclude>
9zt4wkwx7ovbxg33iomxa4dwrksj0fj
आकृति:Center
10
11
11
2017-07-18T07:02:34Z
Biplab Anand
1
copied from enwiki
wikitext
text/x-wiki
<includeonly><div class="center" style="width:auto; margin-left:auto; margin-right:auto;">{{{1}}}</div></includeonly>
gipo4jvs8i3r005axqfpa12a3up31e6
आकृति:Small
10
12
12
2017-07-18T07:04:41Z
Biplab Anand
1
copied from enwiki
wikitext
text/x-wiki
<small>{{{1}}}</small>{{#if:{{{1|}}}||<includeonly></includeonly>}}
sdko3fw57u2vrurg4qq1msv3ml2hz3b
आकृति:Clickable button 2
10
13
13
2017-07-18T07:06:13Z
Biplab Anand
1
copied from enwiki
wikitext
text/x-wiki
{{#invoke:Clickable button 2|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
opjw9s2c61c3mdy8g6kgotbq28z2cho
मोड्युल:Clickable button 2
828
14
14
2017-07-18T07:07:04Z
Biplab Anand
1
copied from enwiki
Scribunto
text/plain
-- This module implements {{clickable button 2}}.
local yesno = require('Module:Yesno')
local p = {}
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:Clickable button 2'
})
return p.luaMain(args)
end
function p.luaMain(args)
if not args[1] and not args.url then
return ''
end
local data = p.makeLinkData(args)
local link = p.renderLink(data)
local trackingCategories = p.renderTrackingCategories(args)
return link .. trackingCategories
end
function p.makeLinkData(args)
local data = {}
-- Get the link and display values, and find whether we are outputting a
-- wikilink or a URL.
if args.url then
data.isUrl = true
data.link = args.url
if args[1] then
data.display = args[1]
else
data.display = args.url
end
else
data.isUrl = false
data.link = args[1]
if args[2] then
data.display = args[2]
else
data.display = args[1]
end
end
-- Classes
local class = args.class and args.class:lower()
data.classes = {}
if class == 'ui-button-green'
or class == 'ui-button-blue'
or class == 'ui-button-red'
then
table.insert(
data.classes,
'submit ui-button ui-widget ui-state-default ui-corner-all'
.. ' ui-button-text-only ui-button-text'
)
else
table.insert(data.classes, 'mw-ui-button')
end
if class then
table.insert(data.classes, class)
end
-- Styles
do
--[[
-- Check whether we are on the same page as we have specified in
-- args[1], but not if we are using a URL link, as then args[1] is only
-- a display value. If we are currently on the page specified in
-- args[1] make the button colour darker so that it stands out from
-- other buttons on the page.
--]]
local success, linkTitle, currentTitle
if not data.isUrl then
currentTitle = mw.title.getCurrentTitle()
success, linkTitle = pcall(mw.title.new, args[1])
end
if success
and linkTitle
and mw.title.equals(currentTitle, linkTitle)
then
if class == 'ui-button-blue'
or class == 'mw-ui-progressive'
then
data.backgroundColor = '#2962CB'
elseif class == 'ui-button-green'
or class == 'mw-ui-constructive'
then
data.backgroundColor = '#008B6D'
elseif class == 'ui-button-red'
or class == 'mw-ui-destructive'
then
data.backgroundColor = '#A6170F'
else
data.backgroundColor = '#CCC'
data.color = '#666'
end
end
-- Add user-specified styles.
data.style = args.style
end
return data
end
function p.renderLink(data)
-- Render the display span tag.
local display
do
local displaySpan = mw.html.create('span')
for i, class in ipairs(data.classes or {}) do
displaySpan:addClass(class)
end
displaySpan
:attr('role', 'button')
:attr('aria-disabled', 'false')
:css{
['background-color'] = data.backgroundColor,
color = data.color
}
if data.style then
displaySpan:cssText(data.style)
end
displaySpan:wikitext(data.display)
display = tostring(displaySpan)
end
-- Render the link
local link
if data.isUrl then
link = string.format('[%s %s]', data.link, display)
else
link = string.format('[[%s|%s]]', data.link, display)
end
return string.format('<span class="plainlinks">%s</span>', link)
end
function p.renderTrackingCategories(args)
if yesno(args.category) == false then
return ''
end
local class = args.class and args.class:lower()
if class == 'ui-button-green'
or class == 'ui-button-blue'
or class == 'ui-button-red'
then
return '[[Category:Pages using old style ui-button-color]]'
else
return ''
end
end
return p
70kxwu53q2xsrtlfnigjx2qtm31abup
मोड्युल:Yesno
828
15
15
2017-07-18T07:07:52Z
Biplab Anand
1
copied from enwiki
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or tonumber(val) == 0
then
return false
else
return default
end
end
266x81qzpz9iq1b5gft4zsdy5qzbnwi
183
15
2018-02-28T12:14:32Z
wikipedia:en>MSGJ
0
+support for on/off
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
swdskn7svew8i9wuydn9uj5l3r2ghcs
184
183
2018-03-01T17:57:26Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Yesno]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
swdskn7svew8i9wuydn9uj5l3r2ghcs
मोड्युल:Arguments
828
16
16
2017-07-18T07:08:27Z
Biplab Anand
1
copied from enwiki
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
5qx9tzlul9ser30uxj9nbasjt92cevn
137
2015-12-23T16:07:27Z
wikipedia:en>Xaosflux
0
Changed protection level of Module:Arguments: used in the mediawiki interface ex: [[MediaWiki:Watchlist-details]] ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
5qx9tzlul9ser30uxj9nbasjt92cevn
138
16
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Arguments]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
5qx9tzlul9ser30uxj9nbasjt92cevn
आकृति:Mp-english
10
17
17
2017-07-18T07:35:31Z
Biplab Anand
1
+template
wikitext
text/x-wiki
<div align="right">
<!-- Englsih Version --><span title=''Click here to see the English version of this page">
{{clickable button 2|Click here to see the English version of this page|English|class=mw-ui-progressive}}
</span>
</div><noinclude>[[Category:Main page templates]]</noinclude>
ocm6krpa4qjj4dbso016rru80vwdsee
18
17
2017-07-18T07:40:29Z
Biplab Anand
1
minor
wikitext
text/x-wiki
<div align="right">
<!-- Englsih Version --><span title=''Click here to see the English version of this page">
{{clickable button 2|Template:Main Page/en|English|class=mw-ui-progressive}}
</span>
</div><noinclude>[[Category:Main page templates]]</noinclude>
j33i0v42ge4402fph6ipewqc3fepl6l
21
18
2017-07-18T07:47:56Z
Biplab Anand
1
minor
wikitext
text/x-wiki
<div align="right">
<!-- Englsih Version --><span title=''Click here to see the English version of this page">
{{clickable button 2|Template:Main Page/en|English|class=mw-ui-destructive}}
</span>
</div><noinclude>[[Category:Main page templates]]</noinclude>
gyxzu49jmmde6k3i93kgw0o0jx9sp67
आकृति:Main Page/Intro
10
18
19
2017-07-18T07:42:43Z
Biplab Anand
1
+template
wikitext
text/x-wiki
{{center|
{{small|
{{clickable button 2|सम्बन्धमे|सम्बन्धमे|class=mw-ui-progressive}}
{{clickable button 2|सदस्यसभ|सदस्यगण|class=mw-ui-progressive}}
{{clickable button 2|प्रतिवेदन|वार्षिक प्रतिवेदन|class=mw-ui-progressive}}
{{clickable button 2|भेटघाट|भेटघाट|class=mw-ui-progressive}}
{{clickable button 2|विधान|विधान|class=mw-ui-progressive}}
{{clickable button 2|कार्यक्रम|कार्यक्रम|class=mw-ui-progressive}}
}}
}}
7l0v9h15danesktffxz8jjb6r2y6fx3
40
19
2017-07-20T11:59:49Z
Biplab Anand
1
wikitext
text/x-wiki
{{center|
{{small|
{{clickable button 2|सम्बन्धमे|सम्बन्धमे|class=mw-ui-progressive}}
{{clickable button 2|सदस्यसभ|सदस्यगण|class=mw-ui-progressive}}
{{clickable button 2|प्रतिवेदन|वार्षिक प्रतिवेदन|class=mw-ui-progressive}}
{{clickable button 2|विकी भेटघाट|भेटघाट|class=mw-ui-progressive}}
{{clickable button 2|विधान|विधान|class=mw-ui-progressive}}
{{clickable button 2|कार्यक्रम|कार्यक्रम|class=mw-ui-progressive}}
}}
}}
rcjcgxorwhefkm5axp6x7n28a824v0b
41
40
2017-07-20T12:00:02Z
Biplab Anand
1
"[[आकृति:Main Page/Intro]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जाए...
wikitext
text/x-wiki
{{center|
{{small|
{{clickable button 2|सम्बन्धमे|सम्बन्धमे|class=mw-ui-progressive}}
{{clickable button 2|सदस्यसभ|सदस्यगण|class=mw-ui-progressive}}
{{clickable button 2|प्रतिवेदन|वार्षिक प्रतिवेदन|class=mw-ui-progressive}}
{{clickable button 2|विकी भेटघाट|भेटघाट|class=mw-ui-progressive}}
{{clickable button 2|विधान|विधान|class=mw-ui-progressive}}
{{clickable button 2|कार्यक्रम|कार्यक्रम|class=mw-ui-progressive}}
}}
}}
rcjcgxorwhefkm5axp6x7n28a824v0b
आकृति:Border-radius
10
19
20
2017-07-18T07:44:44Z
Biplab Anand
1
copied from enwiki
wikitext
text/x-wiki
<includeonly>border-radius: {{{1|3px}}}; -
4egcvrro835atiu5b2jfa4d53dutqcq
आकृति:Main Page/Intro/en
10
20
23
2017-07-18T07:52:06Z
Biplab Anand
1
+template
wikitext
text/x-wiki
{{center|
{{small|
{{clickable button 2|About us|About us|class=mw-ui-progressive}}
{{clickable button 2|Members|Members|class=mw-ui-progressive}}
{{clickable button 2|Reports|Annual Reports|class=mw-ui-progressive}}
{{clickable button 2|Outreach|Outreach|class=mw-ui-progressive}}
{{clickable button 2|Meetups|Meetups|class=mw-ui-progressive}}
{{clickable button 2|By-law|Constituiton|class=mw-ui-progressive}}
{{clickable button 2|Events|Events|class=mw-ui-progressive}}
}}
}}
3iwo5g52zg0h2gp6b4kehxpt0s90ej2
आकृति:Mp-maithili
10
21
24
2017-07-18T07:54:09Z
Biplab Anand
1
+template
wikitext
text/x-wiki
<div align="right">
<!-- Maithili Version --><span title=''मैथिलीमे पृष्ठ देखैक लेल">
{{clickable button 2|सम्मुख पन्ना|मैथिली|class=mw-ui-destructive}}
</span>
</div><noinclude>[[Category:Main page templates]]</noinclude>
96a02bwkt9vohyjjo9jvk3sn6dlvklj
आकृति:Main Page/en
10
22
25
2017-07-18T07:54:29Z
Biplab Anand
1
+template
wikitext
text/x-wiki
{{Notitle}}
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|Welcome to '''Maithili Wikimedians'''}}}</div> || {{Mp-maithili}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro/en}}
|}
[[श्रेणी:Main page]]
8c2o99ji4jufdkvfer52glo72w6ofae
187
25
2019-03-19T03:34:09Z
Biplab Anand
1
+plotting
wikitext
text/x-wiki
{{Notitle}}
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|Welcome to '''Maithili Wikimedians'''}}}</div> || {{Mp-maithili}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro/en}}
|}
{| class="plainlinks" style="width: 100%; background: none; border-spacing: 0px; margin-top: 5px;"
| style="width: 50%; border: 2px solid #D0F5E5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%; border-radius: 4px;"
! align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-who-title|[[File:Infobox info icon.svg|25px]] About Us}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-who-body-link|{{MWUG/en}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Speaker Icon.svg|20px]] News and Information}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG News/en}} }}}
|}
| style="border: 2px solid transparent;" |
| style="width: 50%; border: 2px solid #D0E5F5; background: #f4f7f4; vertical-align: top; {{Border-radius|4px}}" |
{| class="plainlinks" style="vertical-align: top; background: #f4f7f4; width: 100%"
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin: 0px; padding: 4px;">
{{{Mp-news-title|[[File:Handshake logo.svg|25px]] How you can help us?}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-news-body-link|{{MWUG Help/en}} }}}
|-
| align="center" style="padding: 2px;" |
<h3 style="background: #8deaa0; margin:0px; padding: 4px;">
{{{Mp-contact-title|[[File:(at).svg|20px]] Contact Us}}}
</h3>
|-
| style="padding: 5px;" |
{{{Mp-contact-body-link|{{MWUG Contacts/en}} }}}
|}
|}
{| class="plainlinks" style="width: 100%; background: #f4f7f4; border:2px solid #f4f7f4; margin-top: 5px; border-radius: 3px; -moz-border-radius: 4px; -webkit-border-radius: 4px;"
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Featured picture icon BLACK-01.svg|25px]] Gallery}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Gallery/en}} }}}
|-
| align="center" style="border: 2px solid #f4f7f4; background:#8deaa0; vertical-align: top;" |
<h3 style="padding: 4px;">
{{{Mp-wm-projects-title|[[File:Wikimedia logo family complete.svg|28px]] Wikimedia projects in Maithili}}}
</h3>
|-
| style="padding: 8px;" |
{{{Mp-wm-projects-body-link|{{Wikimedia projects/en}} }}}
|}
[[श्रेणी:Main page]]
tgrt6axb1ntud1lgs10p7qwybhg7q5a
आकृति:Wikimedia projects
10
23
27
2017-07-19T11:02:44Z
Biplab Anand
1
+template
wikitext
text/x-wiki
{| align="center" cellpadding="2" width="95%" style="background-color:transparent"
|- valign="top"
| valign="middle" width="16%" | <center>[[File:Wikipedia-logo.svg|110px|link=//mai.wikipedia.org|{{{w|विकिपिडिया}}}]]</center>
| valign="middle" width="16%" | <center>[[File:Commons-logo.svg|75px|link=//commons.wikimedia.org/wiki/सम्मुख_पन्ना|{{{c|विकिमिडिया कमन्स}}}]]</center>
| valign="middle" width="16%" | <center>[[File:Wikimedia Community Logo.svg|90px|link=//meta.wikimedia.org|{{{m|मेटा-विकी}}}]]</center>
|-
| valign="middle" bgcolor="#D6FFEB" style="border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 4px; border-left: 1px solid #000; -moz-border-radius: 0 0 0 5px; -webkit-border-radius: 0 0 0 5px;" | <center>[//mai.wikipedia.org {{{w|विकिपिडिया}}}]</center>
| valign="middle" bgcolor="#D6FFEB" style="padding: 4px; border-top: 1px solid #000; border-bottom: 1px solid #000;" | <center>[//commons.wikimedia.org/wiki/सम्मुख_पन्ना {{{c|कमन्स}}}]</center>
| valign="middle" bgcolor="#D6FFEB" style="border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 4px; border-right: 1px solid #000; -moz-border-radius: 0 0 5px 0; -webkit-border-radius: 0 0 5px 0;" | <center>[//meta.wikimedia.org {{{m|मेटा-विकी}}}]</center>
|}<noinclude>[[श्रेणी:मुख्य पृष्ठ]]</noinclude>
61j0ksy9fe0sb8dgstyxzvspfr6nr1h
मेडियाविकि:Sidebar
8
24
30
2017-07-19T11:11:08Z
Biplab Anand
1
+sidebar
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** सम्पर्क करी|सम्पर्क करी
** recentchanges-url|recentchanges
** helppage|help
** sitesupport-url|sitesupport
* नियमन
** जुड़ी|सदस्यता
** प्रतिवेदन|प्रतिवेदन
** अनुदान|अनुदान
* सम्पर्क
** मेल सूची|मेल सूची
** कार्यक्रम|कार्यक्रमसभ
** विकी भेटघाट|विकी भेटघाटसभ
ks6ag8xocsestntoc5gn4wf1u80vgkj
31
30
2017-07-19T11:11:32Z
Biplab Anand
1
wikitext
text/x-wiki
* navigation
** mainpage|mainpage-description
** सम्पर्क करी|सम्पर्क करी
** recentchanges-url|recentchanges
** sitesupport-url|sitesupport
* नियमन
** जुड़ी|सदस्यता
** प्रतिवेदन|प्रतिवेदन
** अनुदान|अनुदान
* सम्पर्क
** मेल सूची|मेल सूची
** कार्यक्रम|कार्यक्रमसभ
** विकी भेटघाट|विकी भेटघाटसभ
4f6hyixpz8nijrwf73k4jlvooq5gjow
आकृति:MWUG
10
25
32
2017-07-20T09:37:25Z
Biplab Anand
1
+MWUG
wikitext
text/x-wiki
<div style="float: right; margin-left: 0.9em;">
[[File:Maithili_Wikimedians_User_Group_Logo.svg|none|125px|link=http://mai.wikipedia.org/wiki/मैथिली भाषा]]
</div>
'''मैथिली विकिमिडियन्स''' (अङ्ग्रेजी भाषा: Maithili Wikimedians) [[:wmf:Home|विकिमिडिया फाउन्डेसन]]सँ मान्यताप्राप्त एक विकिमिडियन्ससभक प्रयोगकर्ता समूह छी । ई प्रयोगकर्ता समूहसँ आवद्ध रहल विकिमिडियन सदस्यसभ विकिमिडिया फाउन्डेसनक विविध परियोजनासभमे मैथिली भाषा उपर योगदान करैत छथि । ई प्रयोगकर्ता समूहक मुख्य उद्देश्य विकिमिडिया परियोजनासँ आवद्ध मैथिल योगदानकर्ताके प्रोत्साहित केनाए, विभिन्न मैथिल सङ्गठनसँ सम्बन्ध बनेनाए आ नेपाल तथा भारतमे रहल मैथिल भाषीसभकें निशुल्क आ स्वतन्त्र शैक्षिक सामग्रीसभ उपलब्ध करेनाए रहल अछि जहिमे विश्वकोशक विकाश, योगदान आ पहुँच बनेनाए रहल अछि । ई एकटा स्वयात्त प्रयोगकर्ता समूह छी जकर विकिपिडिया आ अन्य बहुपरियोजनापर कोनो किसिमसँ सामग्रीपर सम्पादकीय नियन्त्रण नै रहल अछि ।
[[:meta:Maithili Wikimedians User Group|मैथिली विकिमिडियन्स प्रयोगकर्ता समूह]] विकिमिडिया फाउन्डेसनक [[:meta:Affiliations Committee|सम्बद्ध समिति]]द्वारा सन् २०१५ [[:meta:Affiliations Committee/Resolutions/Recognition Maithili Wikimedians User Group|फरबरी ८]] कें स्वीकृत कएल गेल छल ।
ps8lcz17wji01d3od8x0kaahteqwjd7
33
32
2017-07-20T09:37:41Z
Biplab Anand
1
"[[आकृति:MWUG]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जाए] (अन...
wikitext
text/x-wiki
<div style="float: right; margin-left: 0.9em;">
[[File:Maithili_Wikimedians_User_Group_Logo.svg|none|125px|link=http://mai.wikipedia.org/wiki/मैथिली भाषा]]
</div>
'''मैथिली विकिमिडियन्स''' (अङ्ग्रेजी भाषा: Maithili Wikimedians) [[:wmf:Home|विकिमिडिया फाउन्डेसन]]सँ मान्यताप्राप्त एक विकिमिडियन्ससभक प्रयोगकर्ता समूह छी । ई प्रयोगकर्ता समूहसँ आवद्ध रहल विकिमिडियन सदस्यसभ विकिमिडिया फाउन्डेसनक विविध परियोजनासभमे मैथिली भाषा उपर योगदान करैत छथि । ई प्रयोगकर्ता समूहक मुख्य उद्देश्य विकिमिडिया परियोजनासँ आवद्ध मैथिल योगदानकर्ताके प्रोत्साहित केनाए, विभिन्न मैथिल सङ्गठनसँ सम्बन्ध बनेनाए आ नेपाल तथा भारतमे रहल मैथिल भाषीसभकें निशुल्क आ स्वतन्त्र शैक्षिक सामग्रीसभ उपलब्ध करेनाए रहल अछि जहिमे विश्वकोशक विकाश, योगदान आ पहुँच बनेनाए रहल अछि । ई एकटा स्वयात्त प्रयोगकर्ता समूह छी जकर विकिपिडिया आ अन्य बहुपरियोजनापर कोनो किसिमसँ सामग्रीपर सम्पादकीय नियन्त्रण नै रहल अछि ।
[[:meta:Maithili Wikimedians User Group|मैथिली विकिमिडियन्स प्रयोगकर्ता समूह]] विकिमिडिया फाउन्डेसनक [[:meta:Affiliations Committee|सम्बद्ध समिति]]द्वारा सन् २०१५ [[:meta:Affiliations Committee/Resolutions/Recognition Maithili Wikimedians User Group|फरबरी ८]] कें स्वीकृत कएल गेल छल ।
ps8lcz17wji01d3od8x0kaahteqwjd7
आकृति:MWUG Contacts
10
26
34
2017-07-20T09:54:29Z
Biplab Anand
1
+template
wikitext
text/x-wiki
==== <center>सामाजिक सञ्जाल</center> ====
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
==== <center>सम्पर्क</center> ====
<span class="plainlinks"><center>
* इमेल: maithiliwiki{{@}}gmail.com
* मेल सूची - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai सदस्यता ली])
</center></span>
ppkfnemyn70gnojxgbrm2tic8qifiox
35
34
2017-07-20T09:54:44Z
Biplab Anand
1
"[[आकृति:MWUG Contacts]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जाए]...
wikitext
text/x-wiki
==== <center>सामाजिक सञ्जाल</center> ====
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
==== <center>सम्पर्क</center> ====
<span class="plainlinks"><center>
* इमेल: maithiliwiki{{@}}gmail.com
* मेल सूची - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai सदस्यता ली])
</center></span>
ppkfnemyn70gnojxgbrm2tic8qifiox
36
35
2017-07-20T09:56:01Z
Biplab Anand
1
+सुधार
wikitext
text/x-wiki
__NOTOC__
==== <center>सामाजिक सञ्जाल</center> ====
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
==== <center>सम्पर्क</center> ====
<span class="plainlinks"><center>
* इमेल: maithiliwiki{{@}}gmail.com
* मेल सूची - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai सदस्यता ली])
</center></span>
rwdjtv8qyog11kcw3lwev18bv8z2vfp
37
36
2017-07-20T09:58:04Z
Biplab Anand
1
+सुधार
wikitext
text/x-wiki
__NOTOC__
<center>'''सामाजिक सञ्जाल'''</center>
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
<br>
<center>'''सम्पर्क'''</center>
<span class="plainlinks"><center>
* इमेल: maithiliwiki{{@}}gmail.com
* मेल सूची - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai सदस्यता ली])
</center></span>
spryfsu23tqccfv3vto2u32vqvz06cw
38
37
2017-07-20T09:59:30Z
Biplab Anand
1
wikitext
text/x-wiki
__NOTOC__
<center>'''सामाजिक सञ्जाल'''</center>
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
<br>
<center>'''सम्पर्क'''</center>
<span class="plainlinks"><center>
* इमेल: maithiliwikimedians{{@}}gmail.com
* मेल सूची - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai सदस्यता ली])
</center></span>
ko6zri0q45dh4zzzj566pe9h88k7acz
आकृति:MWUG Help
10
27
42
2017-07-20T12:11:47Z
Biplab Anand
1
+template
wikitext
text/x-wiki
हमरासभकें अहाँक मद्दति आ स्वयंसेवक समय चाही । एतय किछ उपाय बतायल गेल अछि जहि माध्यमसँ अहाँ मद्दति कऽ सकैत छी:
* अहाँ [https://mai.wikipedia.org/wiki/%E0%A4%B8%E0%A4%AE%E0%A5%8D%E0%A4%AE%E0%A5%81%E0%A4%96_%E0%A4%AA%E0%A4%A8%E0%A5%8D%E0%A4%A8%E0%A4%BE विकिपिडिया] आ विकिमिडिया परियोजनासभ सम्पादन आ योगदान करि '''[http://outreach.wikimedia.org/wiki/File:Welcome2WP_English_Flap_081810.pdf विकिमिडियन बनि!!!]''' सकैत छी ।
* अहाँ अपन '''[[:File:Nice People MEDIUM.ogv|योगदान]]''' कऽ सम्बन्धमे अपन कौलेज/विद्यालय/कार्यस्थानमे साझा करी ।
* अपन स्थानीय ठाममे '''[[विकी भेटघाट]]''' आयोजना करी ।
* '''[[विकी सम्मेलन]]''' आयोजनमे भाग लऽ योगदान करी ।
* '''[[विकी लभ्स अर्थ]]'''कऽ लेल स्वयंसेवक बनी ।
* '''[[मिडियाविकी कार्यशाला]]''' आ '''[[विकिपिडिया कार्यशाला]]''' आयोजनामे मद्दति करी ।
* '''[[ह्याकाथन]]'''मे सहभागी बनी ।
* अपनाद्वारा खिचल गेल चित्रसभ '''[[Commons:Main Page|विकिमिडिया कमन्स]]'''मे उपारोपण करी ।
* मैथिल सङ्गठनसभसँ सम्बन्ध बनेबामे मद्दति करी ।
p10uiazpu5qs0yxj2hcymzvek4jpk2k
43
42
2017-07-20T12:12:00Z
Biplab Anand
1
"[[आकृति:MWUG Help]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जाए] (अ...
wikitext
text/x-wiki
हमरासभकें अहाँक मद्दति आ स्वयंसेवक समय चाही । एतय किछ उपाय बतायल गेल अछि जहि माध्यमसँ अहाँ मद्दति कऽ सकैत छी:
* अहाँ [https://mai.wikipedia.org/wiki/%E0%A4%B8%E0%A4%AE%E0%A5%8D%E0%A4%AE%E0%A5%81%E0%A4%96_%E0%A4%AA%E0%A4%A8%E0%A5%8D%E0%A4%A8%E0%A4%BE विकिपिडिया] आ विकिमिडिया परियोजनासभ सम्पादन आ योगदान करि '''[http://outreach.wikimedia.org/wiki/File:Welcome2WP_English_Flap_081810.pdf विकिमिडियन बनि!!!]''' सकैत छी ।
* अहाँ अपन '''[[:File:Nice People MEDIUM.ogv|योगदान]]''' कऽ सम्बन्धमे अपन कौलेज/विद्यालय/कार्यस्थानमे साझा करी ।
* अपन स्थानीय ठाममे '''[[विकी भेटघाट]]''' आयोजना करी ।
* '''[[विकी सम्मेलन]]''' आयोजनमे भाग लऽ योगदान करी ।
* '''[[विकी लभ्स अर्थ]]'''कऽ लेल स्वयंसेवक बनी ।
* '''[[मिडियाविकी कार्यशाला]]''' आ '''[[विकिपिडिया कार्यशाला]]''' आयोजनामे मद्दति करी ।
* '''[[ह्याकाथन]]'''मे सहभागी बनी ।
* अपनाद्वारा खिचल गेल चित्रसभ '''[[Commons:Main Page|विकिमिडिया कमन्स]]'''मे उपारोपण करी ।
* मैथिल सङ्गठनसभसँ सम्बन्ध बनेबामे मद्दति करी ।
p10uiazpu5qs0yxj2hcymzvek4jpk2k
आकृति:MWUG News
10
28
45
2017-07-20T12:24:56Z
Biplab Anand
1
+template
wikitext
text/x-wiki
__NOTOC__
;<center>'''समाचार आ सूचना'''</center>
* [https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Earth_2017_in_Nepal/mai विकी लभ्स अर्थ २०१७ नेपाल]क समापन आ पुरस्कार वितरण कार्यक्रम काठमाडौंमे आयोजना कएल जाइत ।
oep7xdrzg6p5070nmreswpio6skkz5y
46
45
2017-07-20T12:25:13Z
Biplab Anand
1
"[[आकृति:MWUG News]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=मात्र स्वत: स्थापित प्रयोक्ताके...
wikitext
text/x-wiki
__NOTOC__
;<center>'''समाचार आ सूचना'''</center>
* [https://commons.wikimedia.org/wiki/Commons:Wiki_Loves_Earth_2017_in_Nepal/mai विकी लभ्स अर्थ २०१७ नेपाल]क समापन आ पुरस्कार वितरण कार्यक्रम काठमाडौंमे आयोजना कएल जाइत ।
oep7xdrzg6p5070nmreswpio6skkz5y
56
46
2017-08-10T10:16:25Z
Biplab Anand
1
+कार्यक्रम
wikitext
text/x-wiki
__NOTOC__
;<center>'''समाचार आ सूचना'''</center>
* २०१७ जुलाई २९ :- [[:meta:Maithili Wikimedians User Group/Events/Wiki Loves Earth 2017 in Nepal Felicitation Program|विकी लभ्स अर्थ २०१७ नेपाल]] पुरस्कार वितरण कार्यक्रम काठमाडौंमे सम्पन्न भेल ।
* २०१७ अगस्त ५ :- [[:meta:Strategy/Wikimedia movement/2017/Sources/Cycle 3/Maithili Wikimedians Strategy Meetup in Kathmandu, Nepal|विकिमिडिया रणनीति निर्धारण २०३०]] उपर काठमाडौंमे चर्चा कएल गेल ।
* २०१७ अगस्त ६ :- [[:meta:Strategy/Wikimedia movement/2017/Sources/Cycle 3/Wikimedians of Nepal Strategy Meetup in Rajbiraj, Nepal|विकिमिडिया रणनीति निर्धारण २०३०]] उपर राजविराजमे चर्चा कएल गेल ।
mbd3aungt92gge1tpxfb5ic5s4gt4pt
आकृति:Gallery
10
29
48
2017-07-20T12:46:58Z
Biplab Anand
1
+Gallery
wikitext
text/x-wiki
<div style="width:100%"><div class="plainlinks" style="text-align:center; padding:10px; border:1px dotted black;">'''मैथिली विकिमिडियन्सद्वारा आयोजित कार्यक्रमसभ</div></div>
<gallery mode="packed-hover" heights="170px">
File:Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day 01 (28).JPG|Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day.
File:Participants (Girls) Holding Banner During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:Participants In The Conference Hall During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:WLE 2016 in Nepal Felicitation Program (33).jpg|Wiki Loves Earth 2016 in Nepal Felicitation Program.
File:Wiki Training Session Second 01.JPG|Wiki training session at Rajbiraj.
File:Participant of presentation-Outreach program in Janakpur, Nepal-IMG 6867.jpg|Outreach event at Janakpur.
File:Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.JPG|Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.
File:Happyland Higher Sec. School-WEP- Group Pic 2.JPG|Group photo at Happyland Higher Secondary School.
File:Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam Nepal 07.jpg|Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam.
File:Wiki Loves earth outreach program group photo of Ilam.jpg|Wiki Loves earth outreach program group photo of Ilam.
File:Kshitiz Edu. Foundation Rajbiraj WEP Outreach.jpg|Group Photo at Kshitiz Educational Foundation.
File:Rajbiraj Model College, WEP 14.JPG|Group photo at Rajbiraj Model College.
</gallery>
ibq7yi19ihv4sprdjymcy74z03ftgkv
49
48
2017-07-20T12:47:11Z
Biplab Anand
1
"[[आकृति:Gallery]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: Main page ([संपादन=माइनजन मात्रके अनुमति दएल जाए] (अ...
wikitext
text/x-wiki
<div style="width:100%"><div class="plainlinks" style="text-align:center; padding:10px; border:1px dotted black;">'''मैथिली विकिमिडियन्सद्वारा आयोजित कार्यक्रमसभ</div></div>
<gallery mode="packed-hover" heights="170px">
File:Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day 01 (28).JPG|Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day.
File:Participants (Girls) Holding Banner During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:Participants In The Conference Hall During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:WLE 2016 in Nepal Felicitation Program (33).jpg|Wiki Loves Earth 2016 in Nepal Felicitation Program.
File:Wiki Training Session Second 01.JPG|Wiki training session at Rajbiraj.
File:Participant of presentation-Outreach program in Janakpur, Nepal-IMG 6867.jpg|Outreach event at Janakpur.
File:Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.JPG|Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.
File:Happyland Higher Sec. School-WEP- Group Pic 2.JPG|Group photo at Happyland Higher Secondary School.
File:Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam Nepal 07.jpg|Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam.
File:Wiki Loves earth outreach program group photo of Ilam.jpg|Wiki Loves earth outreach program group photo of Ilam.
File:Kshitiz Edu. Foundation Rajbiraj WEP Outreach.jpg|Group Photo at Kshitiz Educational Foundation.
File:Rajbiraj Model College, WEP 14.JPG|Group photo at Rajbiraj Model College.
</gallery>
ibq7yi19ihv4sprdjymcy74z03ftgkv
सदस्यसभ
0
30
50
2017-07-21T01:39:46Z
Biplab Anand
1
+team
wikitext
text/x-wiki
__NOTOC__
<div style="width:25%; float:left;height:4px; background:#339966;"></div>
<div style="width:25%; float:left;height:4px; background:#006699;"></div>
<div style="width:25%; float:left;height:4px; background:#990000;"></div>
<div style="width:25%; float:left;height:4px; background:#666666;"></div>
{| class="plainlinks" style="width: 100%; padding: 10px; background: transparent; border: 1px solid #CCC; {{Border-radius|3px}}"
| <div style="width:100%; margin-left: 16px; margin-top:0.2em; text-align: center; font-size: 300%;">{{{Mp-header-title|'''मैथिली विकिमिडियन्स''' प्रयोगकर्ता समूह}}}</div> || {{Mp-english}}
|- style="margin-bottom: 0.2em; text-align: center; font-size: 105%; font-weight: bold;"
| {{Main Page/Intro}}
|}
{{MWUG core team}}
tir14kf0paz966xo30uft4uufvx5eu6
आकृति:Profile
10
31
51
2017-07-21T02:27:44Z
Biplab Anand
1
+template
wikitext
text/x-wiki
{| style="width: 100%; margin: 5px 0 0 0;"
| style="padding: 0px; border-bottom: 2px solid #abd5f5;" | <span style="font-size: 140%; font-weight: bold;">[[User:{{{प्रयोगकर्ता नाम|Example}}}|{{{नाम|नाम}}}]]</span> || align="right" style="font-size: 110%; width: 70%; padding: 5px; background: skyblue; border-bottom: 2px solid #000; font-weight: bold;" | {{{पद|पद}}}
|}
{| style="width: 100%;"
|-
| style="background: transparent; padding: 0 10px 0 0; border:0px solid #abd5f5; vertical-align: top; text-align: justify;" | {{{विवरण}}}<br/><br/>इ-मेल: {{{इ-मेल}}} || align="center" style="width: 130px; padding: 5px; border: 2px solid #000;" | [[File:{{{चित्र|Silver - replace this image male.svg}}}|130px|link=]]
|}
9nc788inny4ncq4im6hitkkx7nzl511
52
51
2017-07-21T02:36:51Z
Biplab Anand
1
wikitext
text/x-wiki
{| style="width: 100%; margin: 5px 0 0 0;"
| style="padding: 0px; border-bottom: 2px solid #abd5f5;" | <span style="font-size: 140%; font-weight: bold;">[[User:{{{प्रयोगकर्ता नाम|Example}}}|{{{नाम|नाम}}}]]</span> || align="right" style="font-size: 110%; width: 70%; padding: 5px; background: skyblue; border-bottom: 2px solid #000; font-weight: bold;" | {{{पद|पद}}}
|}
{| style="width: 100%;"
|-
| style="background: transparent; padding: 0 10px 0 0; border:0px solid #abd5f5; vertical-align: top; text-align: justify;" | {{{विवरण}}}<br/><br/>इ-मेल: {{{इ-मेल}}} || align="center" style="width: 130px; padding: 5px; border: 2px solid #000;" | [[File:{{{चित्र|Silver - replace this image male.svg}}}|200px|link=]]
|}
bndp166vwsx2p3md63rbn9qmcobt1gz
53
52
2017-07-21T02:37:10Z
Biplab Anand
1
"[[आकृति:Profile]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: महत्वपूर्ण आकृति ([संपादन=माइनजन मात्रके अनु...
wikitext
text/x-wiki
{| style="width: 100%; margin: 5px 0 0 0;"
| style="padding: 0px; border-bottom: 2px solid #abd5f5;" | <span style="font-size: 140%; font-weight: bold;">[[User:{{{प्रयोगकर्ता नाम|Example}}}|{{{नाम|नाम}}}]]</span> || align="right" style="font-size: 110%; width: 70%; padding: 5px; background: skyblue; border-bottom: 2px solid #000; font-weight: bold;" | {{{पद|पद}}}
|}
{| style="width: 100%;"
|-
| style="background: transparent; padding: 0 10px 0 0; border:0px solid #abd5f5; vertical-align: top; text-align: justify;" | {{{विवरण}}}<br/><br/>इ-मेल: {{{इ-मेल}}} || align="center" style="width: 130px; padding: 5px; border: 2px solid #000;" | [[File:{{{चित्र|Silver - replace this image male.svg}}}|200px|link=]]
|}
bndp166vwsx2p3md63rbn9qmcobt1gz
192
53
2021-07-05T07:59:36Z
Tulsi Bhagat
5
wikitext
text/x-wiki
{| style="width: 100%; margin: 5px 0 0 0;"
| style="padding: 0px; border-bottom: 2px solid #abd5f5;" | <span style="font-size: 140%; font-weight: bold;">[[User:{{{प्रयोगकर्ता नाम|Example}}}|{{{नाम|नाम}}}]]</span> || align="right" style="font-size: 110%; width: 70%; padding: 5px; background: skyblue; border-bottom: 2px solid #000; font-weight: bold;" | {{{पद|पद}}}
|}
{| style="width: 100%;"
|-
| style="background: transparent; padding: 0 10px 0 0; border:0px solid #abd5f5; vertical-align: top; text-align: justify;" | {{{विवरण}}}<br/><br/>इ-मेल: {{{इ-मेल}}}<br/>वेबसाइट: {{{वेबसाइट}}} || align="center" style="width: 130px; padding: 5px; border: 2px solid #000;" | [[File:{{{चित्र|Silver - replace this image male.svg}}}|200px|link=]]
|}
jvq2p3xsbwd6xgjt712p9feixh4ekld
आकृति:MWUG core team
10
32
54
2017-07-21T05:35:38Z
Biplab Anand
1
+users
wikitext
text/x-wiki
{{Profile
| नाम = पंकज कुमार देव
| पद = स्वयंसेवक
| विवरण = '''पंकज कुमार देव''' एक सक्रिय मैथिली विकिमिडियन्स छथि । ओ वर्तमानमे कानून विषय राखि स्नातक कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । मैथिली विकिपिडियामे १०,००० लेख पहुँचेबाक लेल आयोजना कएल गेल [https://mai.wikipedia.org/s/c7d मिसन १०] कार्यक्रमक ओ सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = pankajdeo2010{{@}}gmail.com
| चित्र = Pankaj Deo-Outreach program in Janakpur, Nepal-IMG 6846.jpg
| प्रयोगकर्ता नाम = Pankaj Deo
}}
{{Profile
| नाम = जितेन्द्र साह
| पद = स्वयंसेवक
| विवरण = '''जितेन्द्र साह''' एक सक्रिय मैथिली विकिमिडियन्स छथि । ओ वर्तमानमे मानव प्रशासन व्यस्थापन विषय राखि स्नातकोतर कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । मैथिली विकिपिडियामे १०,००० लेख पहुँचेबाक लेल आयोजना कएल गेल [https://mai.wikipedia.org/s/c7d मिसन १०] कार्यक्रमक ओ सहसञ्चालक छल तँ विकिपिडिया एसियाली महिना कार्यक्रमक सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = zeeten.shah{{@}}gmail.com
| चित्र = JItendra Shah.jpg
| प्रयोगकर्ता नाम = Zeetendra
}}
{{Profile
| नाम = बिप्लब आनन्द
| पद = स्वयंसेवक
| विवरण = '''बिप्लब आनन्द''' एक सक्रिय मैथिली विकिमिडियन्स छथि । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल ओ सन् २०१४ जुन महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए अछि । ओ वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छथि । ओ सन् २०१३ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली, डोटेली, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = biplabanand{{@}}gmail.com
| चित्र = Biplab Anand Talks with Katherine Maher - Wiki Conference India - CGC - Mohali 2016-08-05 7226.JPG
| प्रयोगकर्ता नाम = Biplab Anand
}}
{{Profile
| नाम = विजय चौरसिया
| पद = स्वयंसेवक
| विवरण = '''विजय चौरसिया''' एक सक्रिय मैथिली विकिमिडियन्स छथि । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल ओ सन् २०१४ जुन महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए अछि । ओ वर्तमानमे सूचना प्रविधि आ विज्ञान विषय राखि स्नातक कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत विकिमिडिया कमन्स आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । विकी लभ्स अर्थ २०१६, नेपाल कार्यक्रमक ओ सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = bijaychaurasia25{{@}}gmail.com
| चित्र = Bijay Chaurasia during WMCON 2017.jpg
| प्रयोगकर्ता नाम = Bijay Chaurasia
}}
dy6lopi4ufmuqkem63mnelod2r6svoq
55
54
2017-07-21T05:36:29Z
Biplab Anand
1
"[[आकृति:MWUG core team]]" सुरक्षित किया गया।: बेसी पाठकबला पन्ना: महत्वपूर्ण आकृति ([संपादन=माइनजन मात्रके...
wikitext
text/x-wiki
{{Profile
| नाम = पंकज कुमार देव
| पद = स्वयंसेवक
| विवरण = '''पंकज कुमार देव''' एक सक्रिय मैथिली विकिमिडियन्स छथि । ओ वर्तमानमे कानून विषय राखि स्नातक कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । मैथिली विकिपिडियामे १०,००० लेख पहुँचेबाक लेल आयोजना कएल गेल [https://mai.wikipedia.org/s/c7d मिसन १०] कार्यक्रमक ओ सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = pankajdeo2010{{@}}gmail.com
| चित्र = Pankaj Deo-Outreach program in Janakpur, Nepal-IMG 6846.jpg
| प्रयोगकर्ता नाम = Pankaj Deo
}}
{{Profile
| नाम = जितेन्द्र साह
| पद = स्वयंसेवक
| विवरण = '''जितेन्द्र साह''' एक सक्रिय मैथिली विकिमिडियन्स छथि । ओ वर्तमानमे मानव प्रशासन व्यस्थापन विषय राखि स्नातकोतर कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । मैथिली विकिपिडियामे १०,००० लेख पहुँचेबाक लेल आयोजना कएल गेल [https://mai.wikipedia.org/s/c7d मिसन १०] कार्यक्रमक ओ सहसञ्चालक छल तँ विकिपिडिया एसियाली महिना कार्यक्रमक सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = zeeten.shah{{@}}gmail.com
| चित्र = JItendra Shah.jpg
| प्रयोगकर्ता नाम = Zeetendra
}}
{{Profile
| नाम = बिप्लब आनन्द
| पद = स्वयंसेवक
| विवरण = '''बिप्लब आनन्द''' एक सक्रिय मैथिली विकिमिडियन्स छथि । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल ओ सन् २०१४ जुन महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए अछि । ओ वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छथि । ओ सन् २०१३ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत नेपाली, डोटेली, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = biplabanand{{@}}gmail.com
| चित्र = Biplab Anand Talks with Katherine Maher - Wiki Conference India - CGC - Mohali 2016-08-05 7226.JPG
| प्रयोगकर्ता नाम = Biplab Anand
}}
{{Profile
| नाम = विजय चौरसिया
| पद = स्वयंसेवक
| विवरण = '''विजय चौरसिया''' एक सक्रिय मैथिली विकिमिडियन्स छथि । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल ओ सन् २०१४ जुन महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए अछि । ओ वर्तमानमे सूचना प्रविधि आ विज्ञान विषय राखि स्नातक कऽ रहल छथि । ओ सन् २०१५ सँ विकिमिडिया परियोजनासँ जुड़ल छल आ वर्तमानमे मैथिली लगायत विकिमिडिया कमन्स आ अन्य विकिमिडिया परियोजनामे योगदान करैत छथि । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद ओ मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए अछि । विकी लभ्स अर्थ २०१६, नेपाल कार्यक्रमक ओ सञ्चालक छल । ओ मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = bijaychaurasia25{{@}}gmail.com
| चित्र = Bijay Chaurasia during WMCON 2017.jpg
| प्रयोगकर्ता नाम = Bijay Chaurasia
}}
dy6lopi4ufmuqkem63mnelod2r6svoq
प्रयोगकर्ता:Tulsi Bhagat
2
33
57
2018-01-30T10:16:46Z
Tulsi Bhagat
5
+Profile
wikitext
text/x-wiki
{{Profile
| नाम = तुल्सी भगत
| पद = स्वयंसेवक, सम्पादक ऐवम् प्रयोगकर्ता
| विवरण = '''तुल्सी भगत''' एक सक्रिय मैथिली विकिमिडियन्स छी । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल हम सन् २०१४ अक्टुबर महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए छी । हम वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छी । हम सन् २०१४ सँ विकिमिडिया परियोजनासँ जुड़ल छी आ वर्तमानमे मैथिली लगायत नेपाली, भोजपुरी, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छी । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद हम मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए छी । हम मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = tulsibhagat50{{@}}gmail.com
| चित्र = Tulsi Bhagat - Mohali 2016-08-06 8147.JPG
| प्रयोगकर्ता नाम = Tulsi Bhagat
}}
fm2x3uvjy31kf4vcbdcuk0gh2o35e6y
84
57
2018-02-07T04:00:47Z
Tulsi Bhagat
5
+img updated
wikitext
text/x-wiki
{{Profile
| नाम = तुल्सी भगत
| पद = स्वयंसेवक, सम्पादक ऐवम् प्रयोगकर्ता
| विवरण = '''तुल्सी भगत''' एक सक्रिय मैथिली विकिमिडियन्स छी । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल हम सन् २०१४ अक्टुबर महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए छी । हम वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छी । हम सन् २०१४ सँ विकिमिडिया परियोजनासँ जुड़ल छी आ वर्तमानमे मैथिली लगायत नेपाली, भोजपुरी, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छी । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद हम मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए छी । हम मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = tulsibhagat50{{@}}gmail.com
| चित्र = Tulsi at Mysore Zoo (cropped).jpg
| प्रयोगकर्ता नाम = Tulsi Bhagat
}}
dahdepz9q2lwfj8417xrh00mbafbbr1
191
84
2020-03-22T08:19:31Z
Tulsi Bhagat
5
+
wikitext
text/x-wiki
__INDEX__
{{Profile
| नाम = तुल्सी भगत (Tulsi Bhagat)
| पद = स्वयंसेवक, सम्पादक ऐवम् प्रयोगकर्ता
| विवरण = '''तुल्सी भगत''' एक सक्रिय मैथिली विकिमिडियन्स छी । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल हम सन् २०१४ अक्टुबर महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए छी । हम वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छी । हम सन् २०१४ सँ विकिमिडिया परियोजनासँ जुड़ल छी आ वर्तमानमे मैथिली लगायत नेपाली, भोजपुरी, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छी । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद हम मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए छी । हम मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = tulsibhagat50{{@}}gmail.com
| चित्र = Tulsi at Mysore Zoo (cropped).jpg
| प्रयोगकर्ता नाम = Tulsi Bhagat
}}
dnyiubrkwoc6avi4t6v27mz966mmhmp
193
191
2021-07-05T08:00:23Z
Tulsi Bhagat
5
+वेबसाइट
wikitext
text/x-wiki
__INDEX__
{{Profile
| नाम = तुल्सी भगत (Tulsi Bhagat)
| पद = स्वयंसेवक, सम्पादक ऐवम् प्रयोगकर्ता
| विवरण = '''तुल्सी भगत''' एक सक्रिय मैथिली विकिमिडियन्स छी । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल हम सन् २०१४ अक्टुबर महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए छी । हम वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छी । हम सन् २०१४ सँ विकिमिडिया परियोजनासँ जुड़ल छी आ वर्तमानमे मैथिली लगायत नेपाली, भोजपुरी, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छी । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद हम मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए छी । हम मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = tulsibhagat50{{@}}gmail.com
| वेबसाइट = https://tulsibhagat.com.np
| चित्र = Tulsi at Mysore Zoo (cropped).jpg
| प्रयोगकर्ता नाम = Tulsi Bhagat
}}
3fstaclj1q5k84mqdz0nyxypuyzv2l9
197
193
2022-09-27T12:55:18Z
Tulsi Bhagat
5
// Clean up
wikitext
text/x-wiki
{{Profile
| नाम = तुलसी भगत (Tulsi Bhagat)
| पद = स्वयंसेवक, सम्पादक ऐवम् प्रयोगकर्ता
| विवरण = '''तुलसी भगत''' एक सक्रिय मैथिली विकिमिडियन्स छी । मैथिली विकिपिडियाके इनक्युबेटर परियोजनासँ बाहर निकालि पूर्ण बनेबाक लेल हम सन् २०१४ अक्टुबर महिनासँ सक्रिय भऽ अन्ततः सन् २०१४ नवम्बर ७ कऽ दिन मैथिली विकिपिडियाकें पूर्ण रूपसँ विकिमिडिया परियोजनासँ जोड़वाबमे महत्वपूर्ण योगदान देनए छी । हम वर्तमानमे व्यवस्थापन विषय राखि स्नातोकोतर कऽ रहल छी । हम सन् २०१४ सँ विकिमिडिया परियोजनासँ जुड़ल छी आ वर्तमानमे मैथिली लगायत नेपाली, भोजपुरी, हिन्दी भाषाक विकिपिडिया आ अन्य विकिमिडिया परियोजनामे योगदान करैत छी । मैथिली भाषाक विकिपिडिया पूर्णरूपसँ बाहर अएलाक बाद हम मैथिली भाषाक विकिपिडियाक प्रचार प्रसारक लेल विभिन्न शैक्षिक कार्यक्रमक आयोजनामे भागेदारी जनेनाए छी । हम मैथिली विकिमिडियन्स प्रयोगकर्ता समूहक संस्थापक सदस्य छी ।
| इ-मेल = tulsibhagat50{{@}}gmail.com
| वेबसाइट = https://tulsibhagat.com.np
| चित्र = Tulsi at Mysore Zoo (cropped).jpg
| प्रयोगकर्ता नाम = Tulsi Bhagat
}}
t8jlwakgec9dao3s1v3a610ftp19mdz
सम्पर्क करी
0
34
58
2018-02-03T16:45:47Z
Tulsi Bhagat
5
+सम्पर्क करी
wikitext
text/x-wiki
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ Facebook]
|[https://plus.google.com/118087016847902965545 Google Plus+]
|[http://twitter.com/maiwikimedians Twitter]
|[mailto:wikimedia-mai@lists.wikimedia.org E-mail us]
|}
</center></div>
ithgzlif5gh9emax76tqxw291vati8m
59
58
2018-02-04T16:06:27Z
Tulsi Bhagat
5
"[[सम्पर्क करी]]" सुरक्षित किया गया।: महत्वपूर्ण पन्ना ([संपादन=माइनजन मात्रके अनुमति दएल जाए] (अनिश...
wikitext
text/x-wiki
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ Facebook]
|[https://plus.google.com/118087016847902965545 Google Plus+]
|[http://twitter.com/maiwikimedians Twitter]
|[mailto:wikimedia-mai@lists.wikimedia.org E-mail us]
|}
</center></div>
ithgzlif5gh9emax76tqxw291vati8m
60
59
2018-02-07T03:23:31Z
Tulsi Bhagat
5
+Translate tag
wikitext
text/x-wiki
<languages/>
<translate>
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[<tvar|facebook-url>https://www.facebook.com/MaithiliWikimedians/</> Facebook]
|[<tvar|google+-url>https://plus.google.com/118087016847902965545</> Google Plus+]
|[<tvar|twitter-url>http://twitter.com/maiwikimedians</> Twitter]
|[<tvar|subscr-url>mailto:wikimedia-mai@lists.wikimedia.org</> E-mail us]
|}
</center></div></translate>
ay95rohrcrj58vu13efmeu5gqwdfonl
61
60
2018-02-07T03:24:16Z
Tulsi Bhagat
5
Marked this version for translation
wikitext
text/x-wiki
<languages/>
<translate>
<!--T:1-->
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[<tvar|facebook-url>https://www.facebook.com/MaithiliWikimedians/</> Facebook]
|[<tvar|google+-url>https://plus.google.com/118087016847902965545</> Google Plus+]
|[<tvar|twitter-url>http://twitter.com/maiwikimedians</> Twitter]
|[<tvar|subscr-url>mailto:wikimedia-mai@lists.wikimedia.org</> E-mail us]
|}
</center></div></translate>
e6nhro9sh6xkodcxc7iag1z7mdl33vj
67
61
2018-02-07T03:33:59Z
Tulsi Bhagat
5
सुधार
wikitext
text/x-wiki
<languages/>
<translate>
== सम्पर्क करी ==
<!--T:1-->
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[<tvar|facebook-url>https://www.facebook.com/MaithiliWikimedians/</> फेसबुक]
|[<tvar|google+-url>https://plus.google.com/118087016847902965545</> गुगल प्लस]
|[<tvar|twitter-url>http://twitter.com/maiwikimedians</> ट्विटर]
|[<tvar|subscr-url>mailto:wikimedia-mai@lists.wikimedia.org</> ई-मेल]
|}
</center></div></translate>
95hq3hbfrwxc6ws7cwmhg1ftc9nv7he
68
67
2018-02-07T03:34:39Z
Tulsi Bhagat
5
Marked this version for translation
wikitext
text/x-wiki
<languages/>
<translate>
== सम्पर्क करी == <!--T:1-->
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[<tvar|facebook-url>https://www.facebook.com/MaithiliWikimedians/</> फेसबुक]
|[<tvar|google+-url>https://plus.google.com/118087016847902965545</> गुगल प्लस]
|[<tvar|twitter-url>http://twitter.com/maiwikimedians</> ट्विटर]
|[<tvar|subscr-url>mailto:wikimedia-mai@lists.wikimedia.org</> ई-मेल]
|}
</center></div></translate>
eldx0m7e0ggb6c165x1duzn9yggyolo
79
68
2018-02-07T03:43:41Z
Tulsi Bhagat
5
wikitext
text/x-wiki
<languages/>
<translate>
== सम्पर्क करी == <!--T:1-->
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[<tvar|facebook-url>https://www.facebook.com/MaithiliWikimedians/</> फेसबुक]
|[<tvar|google+-url>https://plus.google.com/118087016847902965545</> गुगल प्लस]
|[<tvar|twitter-url>http://twitter.com/maiwikimedians</> ट्विटर]
|[<tvar|subscr-url>mailto:wikimedia-mai@lists.wikimedia.org</> ई-मेल करी]
|}
</center></div></translate>
ayl5qm716pp4ohx3amv6izr0z0cjvct
Translations:सम्पर्क करी/Page display title/mai
1198
35
62
2018-02-07T03:24:28Z
FuzzyBot
7
Importing a new version from external source
wikitext
text/x-wiki
सम्पर्क करी
fpa87yh2kapl0geyyyotcv3jelnytku
Translations:सम्पर्क करी/1/mai
1198
36
63
2018-02-07T03:24:28Z
FuzzyBot
7
Importing a new version from external source
wikitext
text/x-wiki
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[$facebook-url Facebook]
|[$google+-url Google Plus+]
|[$twitter-url Twitter]
|[$subscr-url E-mail us]
|}
</center></div>
29dgy2q36bn7ok3v3bwlxejiqa7uctd
69
63
2018-02-07T03:34:59Z
FuzzyBot
7
Importing a new version from external source
wikitext
text/x-wiki
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[$facebook-url फेसबुक]
|[$google+-url गुगल प्लस]
|[$twitter-url ट्विटर]
|[$subscr-url ई-मेल]
|}
</center></div>
1yvy57oajt6dnqsn7z0egkatt4cq0r5
80
69
2018-02-07T03:44:51Z
FuzzyBot
7
Importing a new version from external source
wikitext
text/x-wiki
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[$facebook-url फेसबुक]
|[$google+-url गुगल प्लस]
|[$twitter-url ट्विटर]
|[$subscr-url ई-मेल करी]
|}
</center></div>
8k3zdo374jyhm7k2zzox6b2saejmg1d
सम्पर्क करी/mai
0
37
64
2018-02-07T03:24:41Z
FuzzyBot
7
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ Facebook]
|[https://plus.google.com/118087016847902965545 Google Plus+]
|[http://twitter.com/maiwikimedians Twitter]
|[mailto:wikimedia-mai@lists.wikimedia.org E-mail us]
|}
</center></div>
f595jp1e0c3fp667wdjrw0y67053nol
71
64
2018-02-07T03:35:16Z
FuzzyBot
7
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल]
|}
</center></div>
9ckre458xyjstwr6z7c27rsizseerj4
81
71
2018-02-07T03:45:02Z
FuzzyBot
7
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल करी]
|}
</center></div>
8yifeqr9170ed3uik0gojxgk978valg
Translations:सम्पर्क करी/Page display title/hi
1198
38
65
2018-02-07T03:27:49Z
Tulsi Bhagat
5
'सम्पर्क करी' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
सम्पर्क करी
fpa87yh2kapl0geyyyotcv3jelnytku
76
65
2018-02-07T03:39:22Z
Tulsi Bhagat
5
wikitext
text/x-wiki
सम्पर्क करें
2idk57h2dxs6ugmnuntqywdrlhljou6
सम्पर्क करी/hi
0
39
66
2018-02-07T03:27:49Z
Tulsi Bhagat
5
'सम्पर्क करी' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<languages/>
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ Facebook]
|[https://plus.google.com/118087016847902965545 Google Plus+]
|[http://twitter.com/maiwikimedians Twitter]
|[mailto:wikimedia-mai@lists.wikimedia.org E-mail us]
|}
</center></div>
f595jp1e0c3fp667wdjrw0y67053nol
70
66
2018-02-07T03:35:16Z
FuzzyBot
7
Updating to match new version of source page
wikitext
text/x-wiki
<languages/>
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल]
|}
</center></div>
9ckre458xyjstwr6z7c27rsizseerj4
78
70
2018-02-07T03:43:02Z
Tulsi Bhagat
5
'== सम्पर्क करें == <div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<languages/>
== सम्पर्क करें ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल करें]
|}
</center></div>
5jdu52ys6jlimpcf3h22bq00a4avevx
Translations:सम्पर्क करी/Page display title/en
1198
40
72
2018-02-07T03:37:47Z
Tulsi Bhagat
5
'Contact us' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
Contact us
8flz77icq8s7y6fa6rfkdzeh21v2nyn
सम्पर्क करी/en
0
41
73
2018-02-07T03:37:47Z
Tulsi Bhagat
5
'Contact us' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<languages/>
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल]
|}
</center></div>
9ckre458xyjstwr6z7c27rsizseerj4
75
73
2018-02-07T03:38:45Z
Tulsi Bhagat
5
'== Contact us == <div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center> {| style="text-a...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<languages/>
== Contact us ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ Facebook]
|[https://plus.google.com/118087016847902965545 Google plus]
|[http://twitter.com/maiwikimedians Twitter]
|[mailto:wikimedia-mai@lists.wikimedia.org E-mail us]
|}
</center></div>
pxo7zd7wen8zg85h26hs3nr7azuxsia
Translations:सम्पर्क करी/1/en
1198
42
74
2018-02-07T03:38:45Z
Tulsi Bhagat
5
'== Contact us == <div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center> {| style="text-a...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
== Contact us ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[$facebook-url Facebook]
|[$google+-url Google plus]
|[$twitter-url Twitter]
|[$subscr-url E-mail us]
|}
</center></div>
gqio9ogjv3ssx4g6g3g13c5x7kz4nvr
Translations:सम्पर्क करी/1/hi
1198
43
77
2018-02-07T03:43:02Z
Tulsi Bhagat
5
'== सम्पर्क करें == <div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
== सम्पर्क करें ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[$facebook-url फेसबुक]
|[$google+-url गुगल प्लस]
|[$twitter-url ट्विटर]
|[$subscr-url ई-मेल करें]
|}
</center></div>
cr8r4h72kza3w89s2hdzhx0qmls9l2y
मेडियाविकि:Sitenotice
8
44
82
2018-02-07T03:56:45Z
Tulsi Bhagat
5
+Sitenotice created
wikitext
text/x-wiki
{|style="margin: auto; align:center; border-style: solid; border-width: 2px; border-color:#0000ff; background-color:#f5fffa;" cellpadding="10"
|<center>New user account creation has been disabled temporarily. If you need one, Please [[सम्पर्क करी|contact us]].</center>
|}
n2pbjujp8peg429ey262m6t2zrllc57
83
82
2018-02-07T03:58:37Z
Tulsi Bhagat
5
+updated
wikitext
text/x-wiki
{|style="margin: auto; align:center; border-style: solid; border-width: 2px; border-color:#0000ff; background-color:#f5fffa;" cellpadding="10"
|<center>New user account creation has been disabled temporarily. If you need one, Please [[सम्पर्क करी/en|contact us]].</center>
|}
j4qnvx5o2ae17q9vs550iqyezck2ft1
198
83
2023-06-27T08:16:21Z
Tulsi Bhagat
5
अनुवाद
wikitext
text/x-wiki
{|style="margin: auto; align:center; border-style: solid; border-width: 2px; border-color:#0000ff; background-color:#f5fffa;" cellpadding="10"
|<center>नव प्रयोगकर्ता खाता निर्माण अस्थायी रूपसँ अक्षम कएल गेल अछि। अगर अहाँ के एकटा खाता चाही त कृपया [[सम्पर्क करी]]।</center>
|}
g1jsa7wdmkyzpeqklloqzy6kwult1b8
मेडियाविकि:Sitenotice close
8
45
85
2018-02-07T04:37:51Z
Tulsi Bhagat
5
+updated
wikitext
text/x-wiki
हटावी
b3tfhnygsoaaskkd9uifafyyfjaz0cw
प्रयोगकर्ता:Jayprakash12345
2
47
96
2018-03-01T15:50:16Z
Jayprakash12345
8
'{{#babel:hi|en-2}} Hello, My name is Jay Prakash. I am from India. I am Mostly Active to Phabricator Wikimedia and Gerrit Wikimedia....' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
{{#babel:hi|en-2}}
Hello, My name is Jay Prakash. I am from India. I am Mostly Active to Phabricator Wikimedia and Gerrit Wikimedia. My IRC nick is same as my Username.
== My Activities ==
*[https://gerrit.wikimedia.org/r/#/q/owner:0freerunning%2540gmail.com Gerrit]
== My Ideas ==
[[meta:Mediawiki Awareness and Training in Indic Projects|Mediawiki Awareness and Training in Indic Projects]]
== Maa Saraswati ==
[[File:2 Hindu deity Sarasvati Saraswati on ceramic tile in Munnar Kerala India March 2014.jpg|right|350px]]
<div style="color:yellow;background-color:red;float:left;width:300px;border:double;">
हे हंसवाहिनी ज्ञानदायिनी<br>
अम्ब विमल मति दे। अम्ब विमल मति दे॥<br>
जग सिरमौर बनाएं भारत,<br>
वह बल विक्रम दे। वह बल विक्रम दे॥<br>
हे हंसवाहिनी ज्ञानदायिनी<br>
अम्ब विमल मति दे। अम्ब विमल मति दे॥<br>
साहस शील हृदय में भर दे,<br>
जीवन त्याग-तपोमर कर दे,<br>
संयम सत्य स्नेह का वर दे,<br>
स्वाभिमान भर दे। स्वाभिमान भर दे॥1॥<br>
हे हंसवाहिनी ज्ञानदायिनी<br>
अम्ब विमल मति दे। अम्ब विमल मति दे॥<br>
लव, कुश, ध्रुव, प्रहलाद बनें हम<br>
मानवता का त्रास हरें हम,<br>
सीता, सावित्री, दुर्गा मां,<br>
फिर घर-घर भर दे। फिर घर-घर भर दे॥2॥<br>
हे हंसवाहिनी ज्ञानदायिनी<br>
अम्ब विमल मति दे। अम्ब विमल मति दे॥<br>
</div>
<div style="color:yellow;background-color:#DEB887;float:left;width:300px;border:double;height:450px;">
या कुन्देन्दुतुषारहारधवला या शुभ्रवस्त्रावृता<br>
या वीणावरदण्डमण्डितकरा या श्वेतपद्मासना।<br>
या ब्रह्माच्युत शंकरप्रभृतिभिर्देवैः सदा वन्दिता<br>
सा मां पातु सरस्वती भगवती निःशेषजाड्यापहा ॥1॥<br>
शुक्लां ब्रह्मविचार सार परमामाद्यां जगद्व्यापिनीं<br>
वीणा-पुस्तक-धारिणीमभयदां जाड्यान्धकारापहाम्।<br>
हस्ते स्फटिकमालिकां विदधतीं पद्मासने संस्थिताम्<br>
वन्दे तां परमेश्वरीं भगवतीं बुद्धिप्रदां शारदाम्॥2॥<br>
</div>
hzy05kaq161rrudlpid63xb9l8xtcqf
आकृति:Reply to
10
48
97
2016-04-16T16:58:30Z
wikipedia:en>SiBr4
0
Allow substituting per talk page
wikitext
text/x-wiki
{{{{{|safesubst:}}}#invoke:Reply to|replyto|<noinclude>example=Example</noinclude>|max=50}}<noinclude>
{{documentation}}
</noinclude>
r4iis6ahgpah12nbgyv02cq29nsccah
98
97
2018-03-01T17:54:55Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Reply_to]] सँ १ अवतरण आयात कएल गेल: Importing template
wikitext
text/x-wiki
{{{{{|safesubst:}}}#invoke:Reply to|replyto|<noinclude>example=Example</noinclude>|max=50}}<noinclude>
{{documentation}}
</noinclude>
r4iis6ahgpah12nbgyv02cq29nsccah
आकृति:Reply to/doc
10
49
99
2018-01-30T04:14:07Z
wikipedia:en>DocWatson42
0
Cleaned up [[MOS:LAYOUTlayout]].
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{template shortcut|ping|re|replyto|reply|yo}}
{{Lua|Module:Reply to}}
{{High-risk|approximately 100,000}}
This template is used to link one or more users' names, in the form "<kbd>@Username:</kbd>", to trigger a [[Wikipedia:Notifications|notification]] for user(s) you are replying to in a discussion. The notification will only work successfully if you sign your post in the same edit in which you use this template. If you make a mistake in placing this template or in signing, see [[Help:Fixing failed pings]]. It is an alternative to the {{tl|talkback}} template. It works on any talk page or Wikipedia namespace page.
'''You cannot directly type the "@" symbol to notify a user of your reply, you must use the template documented here or manually create a [[WP:WIKILINK|wikilink]] to their [[WP:USERPAGE|user page]].<br /> The "@" symbol is used by this template for display purposes only.'''
This template is particularly helpful in discussions that are not threaded, to indicate which user's comment is referenced. If you feel that this template unnecessarily personalizes the discussion, you may still use the {{tl|talkback}} template on the user's talk page to indicate that you have replied to a comment. IP addresses are only notified if you post to their user talk page.
== Usage ==
<nowiki>{{reply to|Username}} Message text. ~~~~</nowiki>
The edit that adds this template '''must''' be signed with new signature tildes at a minimum, or the notification(s) will not work. See [[Wikipedia:Notifications]] and [[:mw:Help:Echo#Technical details]] for more information.
It is not necessary to use this template to ping the user if you are already linking to the username from your post, neither is it necessary when posting on their own talk page.
Note: Wikipedia does not support using the at sign in a reply to notify the user you are replying to, as many discussion boards do. While Wikipedia shows the results of using this template with an at sign, you must either use a template or directly link to the user's user page (e.g. <code><nowiki>[[User:Example|@Example]]</nowiki></code>) to ping them.
<code><s><nowiki>@Username Message text. ~~~~</nowiki></s></code> '''''DOES NOT WORK'''''
=== Single recipient ===
Use the following syntax:
<nowiki>{{reply to|Username}} Message text. ~~~~</nowiki>
For example, <code>{{tlf|Reply to|Jimbo Wales}}</code> generates "@{{noping|Jimbo Wales}}:" and notifies {{noping|Jimbo Wales}}
The comment must be signed and belong to a named section of a "Talk" or "Wikipedia" namespace page in order for the notification to work.
=== Multiple recipients ===
You can reply to up to 50 people at once. Use the following syntax:
<nowiki>{{reply to|User1|User2|User3|User4|User5|User6|User7|User8|User9|User10|...}} Message text. ~~~~</nowiki>
For example, <code><nowiki>{{reply to|Example|Jimbo Wales}}</nowiki></code> will produce:
{{reply to|Example|Jimbo Wales}}
'''''Warning:'' If the total number of detected to-be-pinged users in an edit exceeds 50, no notifications will be delivered.'''
=== Specify a nickname ===
You can display any text in place of a username by using {{para|labelX}}, where X is the index of a positional parameter, counting from 1. For example:
:"<code>{{tlf|reply to|2=Example|3=label1=Exemplar|4=Example2|5=label2=John}}</code>" produces "{{reply to|Example|label1=Exemplar|Example2|label2=John}}"
You can also use {{para|label}} in place of {{para|label1}}. For example:
:"<code>{{tlf|reply to|2=Example|3=label=John}}</code>" produces "{{reply to|Example|label=John}}"
=== Specify a prefix ===
To change the prefix, use {{para|prefix|''custom prefix''}}. For example:
:"<code>{{tlf|reply to|Example|3=prefix=Hello&nbsp; }}</code>" produces "{{reply to|Example|prefix=Hello }}"
Or you can remove the prefix entirely by using {{para|prefix}}. For example:
:"<code>{{tlf|reply to|Example|3=prefix=}}</code>" produces "{{reply to|Example|prefix=}}"
=== Customise punctuation ===
By default, the template will insert a colon after the final name. To change this, specify the required character using the {{para|p}} parameter. For example:
:"<code>{{tlf|reply to|Example|3=p=—}}</code>" produces "{{reply to|Example|p=—}}"
The parameter omits leading or trailing spaces. Use <code>&nbsp;</code> instead. For example:
:"<code>{{tlf|reply to|Example|3=p=&nbsp;–}} Text message</code>" produces "{{reply to|Example|p= –}} Text message"
To simply remove the colon, use the parameter with an empty value:
:"<code>{{tlf|reply to|Example|3=p=}}</code>" produces "{{reply to|Example|p=}}"
=== Customise conjunction ===
By default, the template will use the word "and" between multiple names. To change this, specify the required conjunction using the {{para|c}} parameter. For example:
:"<code>{{tlf|reply to|Example|Example2|4=c=or}}</code>" produces "{{reply to|Example|Example2|c=or}}"
:"<code>Neither {{tlf|reply to|Example|Example2|Example3|5=c=nor}}</code>" produces "Neither {{reply to|Example|Example2|Example3|c=nor}}"
To simply remove the conjunction, use the parameter with an empty value:
:"<code>{{tlf|reply to|Example|Example2|4=c=}}</code>" produces "{{reply to|Example|Example2|c=}}"
=== Or don't use! ===
If you are using the {{para|prefix}} and {{para|p}} together to just display one user name, then there is no need to use this template. Simply code <code>[[User:''username''|]]</code> or {{tlx|u|''username''}}. This will generate the same notifications as are generated by the template.
=== Error messages ===
Sometimes, when the recipient's username contains an equal sign, for example <code><nowiki>{{reply to|test=test}}</nowiki></code>, it will show:<br />
{{reply to|test=test}}
<br />
To fix this, simply add 1= at the beginning of the username, 2= at the second username, 3= at the third username and so on:<br />
<code><nowiki>{{reply to|1=test=test}}</nowiki></code>
== Redirects ==
* {{Tlx|Ping}}
* {{Tlx|Re}}
* {{Tlx|Replyto}}
* {{Tlx|Reply}}
* {{Tlx|Yo}}
* {{Plain link|url={{fullurl:Special:WhatLinksHere/Template:Reply to|hidelinks=1&hidetrans=1}}|name=''Complete list of (alias) redirects''}}<!-- checks WhatLinksHere to template, not doc -->
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Username #1",
"description": "The name of the first user that you want to notify",
"type": "wiki-user-name",
"required": true
},
"2": {
"label": "Username #2",
"description": "The name of the second user you want to notify (optional)",
"type": "wiki-user-name"
},
"3": {
"label": "Username #3",
"description": "The name of the third user you want to notify (optional)",
"type": "wiki-user-name"
},
"4": {
"label": "Username #4",
"description": "The name of the fourth user you want to notify (optional)",
"type": "wiki-user-name"
},
"5": {
"label": "Username #5",
"description": "The name of the fifth user you want to notify (optional)",
"type": "wiki-user-name"
},
"6": {
"label": "Username #6",
"description": "The name of the sixth user you want to notify (optional)",
"type": "wiki-user-name"
},
"7": {
"label": "Username #7",
"description": "The name of the seventh user you want to notify (optional)",
"type": "wiki-user-name"
},
"8": {
"label": "Username #8",
"description": "The name of the eighth user you want to notify (optional)",
"type": "wiki-user-name"
},
"9": {
"label": "Username #9",
"description": "The name of the ninth user you want to notify (optional)",
"type": "wiki-user-name"
},
"10": {
"label": "Username #10",
"description": "The name of the tenth user you want to notify (optional)",
"type": "wiki-user-name"
},
"label1": {
"aliases": [
"label"
],
"label": "Label #1",
"description": "An alternative nickname to be displayed instead of the first username (optional)",
"type": "string"
},
"c": {
"label": "Conjunction",
"description": "Custom conjunction to be displayed between the last two names (defaults to 'and')",
"type": "string",
"default": "and",
},
"label2": {
"label": "Label #2",
"description": "An alternative nickname to be displayed instead of the second username (optional)",
"type": "string"
},
"label3": {
"label": "Label #3",
"description": "An alternative nickname to be displayed instead of the third username (optional)",
"type": "string"
},
"label4": {
"label": "Label #4",
"description": "An alternative nickname to be displayed instead of the fourth username (optional)",
"type": "string"
},
"label5": {
"label": "Label #5",
"description": "An alternative nickname to be displayed instead of the fifth username (optional)",
"type": "string"
},
"label6": {
"label": "Label #6",
"description": "An alternative nickname to be displayed instead of the sixth username (optional)",
"type": "string"
},
"label7": {
"label": "Label #7",
"description": "An alternative nickname to be displayed instead of the seventh username (optional)",
"type": "string"
},
"label8": {
"label": "Label #8",
"description": "An alternative nickname to be displayed instead of the eighth username (optional)",
"type": "string"
},
"label9": {
"label": "Label #9",
"description": "An alternative nickname to be displayed instead of the ninth username (optional)",
"type": "string"
},
"label10": {
"label": "Label #10",
"description": "An alternative nickname to be displayed instead of the tenth username (optional)",
"type": "string"
},
"p": {
"label": "End punctuation",
"description": "Custom punctuation to be displayed after the final name (defaults to ':')",
"type": "string",
"default": ":",
},
"prefix": {
"label": "Prefix",
"description": "Custom prefix to be displayed before the first name (defaults to '@')",
"type": "string",
"default": "@",
}
},
"description": "Trigger a notification to one or several registered user(s) you are replying to in a discussion.",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"label1",
"label2",
"label3",
"label4",
"label5",
"label6",
"label7",
"label8",
"label9",
"label10",
"p",
"c",
"prefix"
]
}
</templatedata>
== See also ==
* [[Module:Reply to]] – the Lua module on which this template is based
* {{tl|user link}} – Links to a single user's page (without the @ sign and colon)
* {{tl|hidden ping}} – Notifies one or more users without displaying any text
* {{tl|noping}} – Links a user's name without triggering the Echo notification system
* {{tl|to}} – Uses "To " (with a space) at the beginning instead of the @ sign
* {{t|talkback}} – Allows a user to direct the attention of another user to a discussion via a notification
* [[:mw:Manual:Echo|Manual:Echo]] – the manual page for the underlying ''Echo'' feature that provides the notifications
* [[Help:Fixing failed pings]]
<includeonly>
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Username internal link templates]]
}}</includeonly>
tpenfzg41k67scq7mxuqt1t68wj1ajo
100
99
2018-03-01T17:55:14Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Reply_to/doc]] सँ १ अवतरण आयात कएल गेल: Importing template doc
wikitext
text/x-wiki
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{template shortcut|ping|re|replyto|reply|yo}}
{{Lua|Module:Reply to}}
{{High-risk|approximately 100,000}}
This template is used to link one or more users' names, in the form "<kbd>@Username:</kbd>", to trigger a [[Wikipedia:Notifications|notification]] for user(s) you are replying to in a discussion. The notification will only work successfully if you sign your post in the same edit in which you use this template. If you make a mistake in placing this template or in signing, see [[Help:Fixing failed pings]]. It is an alternative to the {{tl|talkback}} template. It works on any talk page or Wikipedia namespace page.
'''You cannot directly type the "@" symbol to notify a user of your reply, you must use the template documented here or manually create a [[WP:WIKILINK|wikilink]] to their [[WP:USERPAGE|user page]].<br /> The "@" symbol is used by this template for display purposes only.'''
This template is particularly helpful in discussions that are not threaded, to indicate which user's comment is referenced. If you feel that this template unnecessarily personalizes the discussion, you may still use the {{tl|talkback}} template on the user's talk page to indicate that you have replied to a comment. IP addresses are only notified if you post to their user talk page.
== Usage ==
<nowiki>{{reply to|Username}} Message text. ~~~~</nowiki>
The edit that adds this template '''must''' be signed with new signature tildes at a minimum, or the notification(s) will not work. See [[Wikipedia:Notifications]] and [[:mw:Help:Echo#Technical details]] for more information.
It is not necessary to use this template to ping the user if you are already linking to the username from your post, neither is it necessary when posting on their own talk page.
Note: Wikipedia does not support using the at sign in a reply to notify the user you are replying to, as many discussion boards do. While Wikipedia shows the results of using this template with an at sign, you must either use a template or directly link to the user's user page (e.g. <code><nowiki>[[User:Example|@Example]]</nowiki></code>) to ping them.
<code><s><nowiki>@Username Message text. ~~~~</nowiki></s></code> '''''DOES NOT WORK'''''
=== Single recipient ===
Use the following syntax:
<nowiki>{{reply to|Username}} Message text. ~~~~</nowiki>
For example, <code>{{tlf|Reply to|Jimbo Wales}}</code> generates "@{{noping|Jimbo Wales}}:" and notifies {{noping|Jimbo Wales}}
The comment must be signed and belong to a named section of a "Talk" or "Wikipedia" namespace page in order for the notification to work.
=== Multiple recipients ===
You can reply to up to 50 people at once. Use the following syntax:
<nowiki>{{reply to|User1|User2|User3|User4|User5|User6|User7|User8|User9|User10|...}} Message text. ~~~~</nowiki>
For example, <code><nowiki>{{reply to|Example|Jimbo Wales}}</nowiki></code> will produce:
{{reply to|Example|Jimbo Wales}}
'''''Warning:'' If the total number of detected to-be-pinged users in an edit exceeds 50, no notifications will be delivered.'''
=== Specify a nickname ===
You can display any text in place of a username by using {{para|labelX}}, where X is the index of a positional parameter, counting from 1. For example:
:"<code>{{tlf|reply to|2=Example|3=label1=Exemplar|4=Example2|5=label2=John}}</code>" produces "{{reply to|Example|label1=Exemplar|Example2|label2=John}}"
You can also use {{para|label}} in place of {{para|label1}}. For example:
:"<code>{{tlf|reply to|2=Example|3=label=John}}</code>" produces "{{reply to|Example|label=John}}"
=== Specify a prefix ===
To change the prefix, use {{para|prefix|''custom prefix''}}. For example:
:"<code>{{tlf|reply to|Example|3=prefix=Hello&nbsp; }}</code>" produces "{{reply to|Example|prefix=Hello }}"
Or you can remove the prefix entirely by using {{para|prefix}}. For example:
:"<code>{{tlf|reply to|Example|3=prefix=}}</code>" produces "{{reply to|Example|prefix=}}"
=== Customise punctuation ===
By default, the template will insert a colon after the final name. To change this, specify the required character using the {{para|p}} parameter. For example:
:"<code>{{tlf|reply to|Example|3=p=—}}</code>" produces "{{reply to|Example|p=—}}"
The parameter omits leading or trailing spaces. Use <code>&nbsp;</code> instead. For example:
:"<code>{{tlf|reply to|Example|3=p=&nbsp;–}} Text message</code>" produces "{{reply to|Example|p= –}} Text message"
To simply remove the colon, use the parameter with an empty value:
:"<code>{{tlf|reply to|Example|3=p=}}</code>" produces "{{reply to|Example|p=}}"
=== Customise conjunction ===
By default, the template will use the word "and" between multiple names. To change this, specify the required conjunction using the {{para|c}} parameter. For example:
:"<code>{{tlf|reply to|Example|Example2|4=c=or}}</code>" produces "{{reply to|Example|Example2|c=or}}"
:"<code>Neither {{tlf|reply to|Example|Example2|Example3|5=c=nor}}</code>" produces "Neither {{reply to|Example|Example2|Example3|c=nor}}"
To simply remove the conjunction, use the parameter with an empty value:
:"<code>{{tlf|reply to|Example|Example2|4=c=}}</code>" produces "{{reply to|Example|Example2|c=}}"
=== Or don't use! ===
If you are using the {{para|prefix}} and {{para|p}} together to just display one user name, then there is no need to use this template. Simply code <code>[[User:''username''|]]</code> or {{tlx|u|''username''}}. This will generate the same notifications as are generated by the template.
=== Error messages ===
Sometimes, when the recipient's username contains an equal sign, for example <code><nowiki>{{reply to|test=test}}</nowiki></code>, it will show:<br />
{{reply to|test=test}}
<br />
To fix this, simply add 1= at the beginning of the username, 2= at the second username, 3= at the third username and so on:<br />
<code><nowiki>{{reply to|1=test=test}}</nowiki></code>
== Redirects ==
* {{Tlx|Ping}}
* {{Tlx|Re}}
* {{Tlx|Replyto}}
* {{Tlx|Reply}}
* {{Tlx|Yo}}
* {{Plain link|url={{fullurl:Special:WhatLinksHere/Template:Reply to|hidelinks=1&hidetrans=1}}|name=''Complete list of (alias) redirects''}}<!-- checks WhatLinksHere to template, not doc -->
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"params": {
"1": {
"label": "Username #1",
"description": "The name of the first user that you want to notify",
"type": "wiki-user-name",
"required": true
},
"2": {
"label": "Username #2",
"description": "The name of the second user you want to notify (optional)",
"type": "wiki-user-name"
},
"3": {
"label": "Username #3",
"description": "The name of the third user you want to notify (optional)",
"type": "wiki-user-name"
},
"4": {
"label": "Username #4",
"description": "The name of the fourth user you want to notify (optional)",
"type": "wiki-user-name"
},
"5": {
"label": "Username #5",
"description": "The name of the fifth user you want to notify (optional)",
"type": "wiki-user-name"
},
"6": {
"label": "Username #6",
"description": "The name of the sixth user you want to notify (optional)",
"type": "wiki-user-name"
},
"7": {
"label": "Username #7",
"description": "The name of the seventh user you want to notify (optional)",
"type": "wiki-user-name"
},
"8": {
"label": "Username #8",
"description": "The name of the eighth user you want to notify (optional)",
"type": "wiki-user-name"
},
"9": {
"label": "Username #9",
"description": "The name of the ninth user you want to notify (optional)",
"type": "wiki-user-name"
},
"10": {
"label": "Username #10",
"description": "The name of the tenth user you want to notify (optional)",
"type": "wiki-user-name"
},
"label1": {
"aliases": [
"label"
],
"label": "Label #1",
"description": "An alternative nickname to be displayed instead of the first username (optional)",
"type": "string"
},
"c": {
"label": "Conjunction",
"description": "Custom conjunction to be displayed between the last two names (defaults to 'and')",
"type": "string",
"default": "and",
},
"label2": {
"label": "Label #2",
"description": "An alternative nickname to be displayed instead of the second username (optional)",
"type": "string"
},
"label3": {
"label": "Label #3",
"description": "An alternative nickname to be displayed instead of the third username (optional)",
"type": "string"
},
"label4": {
"label": "Label #4",
"description": "An alternative nickname to be displayed instead of the fourth username (optional)",
"type": "string"
},
"label5": {
"label": "Label #5",
"description": "An alternative nickname to be displayed instead of the fifth username (optional)",
"type": "string"
},
"label6": {
"label": "Label #6",
"description": "An alternative nickname to be displayed instead of the sixth username (optional)",
"type": "string"
},
"label7": {
"label": "Label #7",
"description": "An alternative nickname to be displayed instead of the seventh username (optional)",
"type": "string"
},
"label8": {
"label": "Label #8",
"description": "An alternative nickname to be displayed instead of the eighth username (optional)",
"type": "string"
},
"label9": {
"label": "Label #9",
"description": "An alternative nickname to be displayed instead of the ninth username (optional)",
"type": "string"
},
"label10": {
"label": "Label #10",
"description": "An alternative nickname to be displayed instead of the tenth username (optional)",
"type": "string"
},
"p": {
"label": "End punctuation",
"description": "Custom punctuation to be displayed after the final name (defaults to ':')",
"type": "string",
"default": ":",
},
"prefix": {
"label": "Prefix",
"description": "Custom prefix to be displayed before the first name (defaults to '@')",
"type": "string",
"default": "@",
}
},
"description": "Trigger a notification to one or several registered user(s) you are replying to in a discussion.",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"label1",
"label2",
"label3",
"label4",
"label5",
"label6",
"label7",
"label8",
"label9",
"label10",
"p",
"c",
"prefix"
]
}
</templatedata>
== See also ==
* [[Module:Reply to]] – the Lua module on which this template is based
* {{tl|user link}} – Links to a single user's page (without the @ sign and colon)
* {{tl|hidden ping}} – Notifies one or more users without displaying any text
* {{tl|noping}} – Links a user's name without triggering the Echo notification system
* {{tl|to}} – Uses "To " (with a space) at the beginning instead of the @ sign
* {{t|talkback}} – Allows a user to direct the attention of another user to a discussion via a notification
* [[:mw:Manual:Echo|Manual:Echo]] – the manual page for the underlying ''Echo'' feature that provides the notifications
* [[Help:Fixing failed pings]]
<includeonly>
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:Username internal link templates]]
}}</includeonly>
tpenfzg41k67scq7mxuqt1t68wj1ajo
आकृति:Bulleted list
10
50
101
2015-12-26T16:25:12Z
wikipedia:en>Frietjes
0
documentation does this
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:list|bulleted}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
6i48hhgfh5fc81eswo5wmwb9rx7sypn
102
101
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Bulleted_list]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:list|bulleted}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
6i48hhgfh5fc81eswo5wmwb9rx7sypn
आकृति:Documentation
10
51
103
2016-04-11T17:18:54Z
wikipedia:en>Rich Farmbrough
0
Undid revision 714753814 by [[Special:Contributions/Rich Farmbrough|Rich Farmbrough]] ([[User talk:Rich Farmbrough|talk]])
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
o4ddn701tao1ufdnkxe1wdgz5b5ga84
104
103
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Documentation]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude>
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
o4ddn701tao1ufdnkxe1wdgz5b5ga84
आकृति:Documentation subpage
10
52
105
2014-07-18T09:37:22Z
wikipedia:en>Sardanaphalus
0
Added 1.0em margin so template looks less a part of subsequent content and amended code layout -- hope neither of these too controversial
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
iwoex9r4jjje2jlwm8eygcyef0s6hzx
106
105
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Documentation_subpage]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<includeonly><!--
-->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:Edit-copy green.svg|40px|alt=|link=]]
| text =
'''This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]] for {{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}'''.<br />It contains usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}.
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
| [[Category:Documentation subpages without corresponding pages]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
iwoex9r4jjje2jlwm8eygcyef0s6hzx
आकृति:High-risk
10
53
107
2018-02-20T03:34:02Z
wikipedia:en>Wbm1058
0
add optional parameter to show additional information. using it on [[Template:Infobox]] documentation page.
wikitext
text/x-wiki
{{ombox
| type = content
| image = [[File:Ambox warning orange.svg|40px|alt=Warning|link=]]
| imageright =
| text =
'''This {{
#switch:{{NAMESPACE}}
|Module=Lua module
|#default=template
}} is used on <span class="plainlinks">[https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace={{NAMESPACENUMBER:{{FULLPAGENAME}}}}&name={{urlencode:{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{BASEPAGENAME}}
| #default = {{PAGENAME}}
}}}} {{#if:{{{1|}}}|{{formatnum:{{{1}}}}}|a very large number of}} pages]</span>.'''{{#if:{{{info|}}}|<br />{{{info}}}}}<br />To avoid large-scale disruption and unnecessary server load, any changes to this {{
#switch:{{NAMESPACE}}
|Module=module
|#default=template
}} should first be tested in its [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}/sandbox|/sandbox]] or [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}/testcases|/testcases]] subpages{{
#switch:{{NAMESPACE}}
|Module=.
|#default= or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].
}} The tested changes can then be added to this page in a single edit. Please consider discussing any changes {{#if:{{{2|}}}|at [[{{{2}}}]]|on the [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}
| #default = {{TALKPAGENAME}}
}}|talk page]]}} before implementing them.
}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
ri2f5z0xlo9bloylz6zogx67uowijqs
108
107
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:High-risk]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{ombox
| type = content
| image = [[File:Ambox warning orange.svg|40px|alt=Warning|link=]]
| imageright =
| text =
'''This {{
#switch:{{NAMESPACE}}
|Module=Lua module
|#default=template
}} is used on <span class="plainlinks">[https://tools.wmflabs.org/templatecount/index.php?lang=en&namespace={{NAMESPACENUMBER:{{FULLPAGENAME}}}}&name={{urlencode:{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{BASEPAGENAME}}
| #default = {{PAGENAME}}
}}}} {{#if:{{{1|}}}|{{formatnum:{{{1}}}}}|a very large number of}} pages]</span>.'''{{#if:{{{info|}}}|<br />{{{info}}}}}<br />To avoid large-scale disruption and unnecessary server load, any changes to this {{
#switch:{{NAMESPACE}}
|Module=module
|#default=template
}} should first be tested in its [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}/sandbox|/sandbox]] or [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}/testcases|/testcases]] subpages{{
#switch:{{NAMESPACE}}
|Module=.
|#default= or in your own [[Wikipedia:Subpages#How to create user subpages|user subpage]].
}} The tested changes can then be added to this page in a single edit. Please consider discussing any changes {{#if:{{{2|}}}|at [[{{{2}}}]]|on the [[{{
#switch: {{SUBPAGENAME}}
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}
| #default = {{TALKPAGENAME}}
}}|talk page]]}} before implementing them.
}}<noinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! -->
</noinclude>
ri2f5z0xlo9bloylz6zogx67uowijqs
आकृति:Lua
10
54
109
2018-02-23T17:02:35Z
wikipedia:en>Primefac
0
Changed protection level for "[[Template:Lua]]": [[WP:HIGHRISK|high-risk]] template with 2000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude>
{{Lua|Module:Lua banner}}
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
pnmjp3f3fl321yf2jpg5syebi412n7b
110
109
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Lua]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<includeonly>{{#invoke:Lua banner|main}}</includeonly><noinclude>
{{Lua|Module:Lua banner}}
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
pnmjp3f3fl321yf2jpg5syebi412n7b
आकृति:Noping
10
55
111
2014-02-12T13:48:55Z
wikipedia:en>Mr. Stradivarius
0
convert to Lua version at [[Module:No ping]]
wikitext
text/x-wiki
{{#invoke:No ping|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
923kfe9snhsebmdq1kud1oekizz5d1o
112
111
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Noping]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{#invoke:No ping|main}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
923kfe9snhsebmdq1kud1oekizz5d1o
आकृति:Ombox
10
56
113
2013-10-20T12:45:08Z
wikipedia:en>Mr. Stradivarius
0
switch to Lua version
wikitext
text/x-wiki
{{#invoke:Message box|ombox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
1o93yrjvq6v2ylug2k0uaaltljurje2
114
113
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Ombox]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{#invoke:Message box|ombox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
1o93yrjvq6v2ylug2k0uaaltljurje2
आकृति:Para
10
57
115
2015-09-07T00:44:14Z
wikipedia:en>HJ Mitchell
0
Changed protection level of Template:Para: lower to TE per request; also removed from [[WP:CASC]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
wikitext
text/x-wiki
<code class="nowrap" {{#if:{{{plain|}}}|style="border:none;background-color:inherit;color:inherit;"}}>|{{#if:{{{1|}}}|{{{1}}}=}}{{{2|}}}</code><noinclude>
{{Documentation}}
<!--Categories and interwikis go near the bottom of the /doc subpage.-->
</noinclude>
byvvhmp41qjgp4713oxicsdwzjqb1b0
116
115
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Para]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<code class="nowrap" {{#if:{{{plain|}}}|style="border:none;background-color:inherit;color:inherit;"}}>|{{#if:{{{1|}}}|{{{1}}}=}}{{{2|}}}</code><noinclude>
{{Documentation}}
<!--Categories and interwikis go near the bottom of the /doc subpage.-->
</noinclude>
byvvhmp41qjgp4713oxicsdwzjqb1b0
आकृति:Plain link
10
58
117
2017-08-29T18:25:20Z
wikipedia:en>JJMC89
0
typo in last edit
wikitext
text/x-wiki
<span class="plainlinks">{{SAFESUBST:<noinclude />#if:{{{2|{{{NAME|{{{name|}}}}}}}}}
|[{{{1|{{{URL|{{{url}}}}}}}}} {{{2|{{{NAME|{{{name|}}}}}}}}}]
|[{{{1|{{{URL|{{{url}}}}}}}}}]
}}</span><noinclude>
{{documentation}}
</noinclude>
4ksm928qcz1wzong5bwawgcsgfzt0v4
118
117
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Plain_link]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<span class="plainlinks">{{SAFESUBST:<noinclude />#if:{{{2|{{{NAME|{{{name|}}}}}}}}}
|[{{{1|{{{URL|{{{url}}}}}}}}} {{{2|{{{NAME|{{{name|}}}}}}}}}]
|[{{{1|{{{URL|{{{url}}}}}}}}}]
}}</span><noinclude>
{{documentation}}
</noinclude>
4ksm928qcz1wzong5bwawgcsgfzt0v4
आकृति:T
10
59
119
2010-09-11T03:24:59Z
wikipedia:en>NuclearWarfare
0
Protected Template:T: [[WP:HRT|Highly visible template]] ([edit=sysop] (indefinite) [move=sysop] (indefinite))
wikitext
text/x-wiki
#REDIRECT [[Template:tl]]
<!-- Used as Template:tl throughout English Wikipedia; demo template referenced only on meta ->
74rtluejlc1izdmxf0pe9y03u63c8ez
120
119
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:T]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
#REDIRECT [[Template:tl]]
<!-- Used as Template:tl throughout English Wikipedia; demo template referenced only on meta ->
74rtluejlc1izdmxf0pe9y03u63c8ez
आकृति:TemplateData header
10
60
121
2018-02-23T16:30:31Z
wikipedia:en>Primefac
0
Changed protection level for "[[Template:TemplateData header]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
<div class="templatedata-header">{{#if:{{{noheader|}}}|{{Template error report}}|This is the {{#if:{{{nolink|}}}|TemplateData|[[Wikipedia:TemplateData|TemplateData]]}} documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools; {{Template error report|lc=yes}}}}
'''TemplateData for {{{1|{{BASEPAGENAME}}}}}'''
</div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:TemplateData documentation]]
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1lgj007izalttlek052vptodul1clkt
122
121
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:TemplateData_header]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<div class="templatedata-header">{{#if:{{{noheader|}}}|{{Template error report}}|This is the {{#if:{{{nolink|}}}|TemplateData|[[Wikipedia:TemplateData|TemplateData]]}} documentation for this template used by [[Wikipedia:VisualEditor|VisualEditor]] and other tools; {{Template error report|lc=yes}}}}
'''TemplateData for {{{1|{{BASEPAGENAME}}}}}'''
</div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category:TemplateData documentation]]
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1lgj007izalttlek052vptodul1clkt
आकृति:Template error report
10
61
123
2018-02-23T16:30:31Z
wikipedia:en>Primefac
0
Changed protection level for "[[Template:Template error report]]": [[WP:HIGHRISK|high-risk]] template with 4000+ transclusions ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee the [https://tools.wmflabs.org/bambots/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{{1|{{ROOTPAGENAME}}}}}}} monthly error report] for this template.<noinclude>
{{documentation}}
[[Category:External link templates]]</noinclude>
58xkdtdvcn1dijd3bs4zlibe610r8r1
124
123
2018-03-01T17:57:23Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Template_error_report]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{#ifeq:{{yesno-no|{{{lc}}}}}|no|S|s}}ee the [https://tools.wmflabs.org/bambots/TemplateParam.php?wiki=enwiki&template={{Urlencode:{{{1|{{ROOTPAGENAME}}}}}}} monthly error report] for this template.<noinclude>
{{documentation}}
[[Category:External link templates]]</noinclude>
58xkdtdvcn1dijd3bs4zlibe610r8r1
आकृति:Template shortcut
10
62
125
2017-11-28T13:15:39Z
wikipedia:en>Evad37
0
update style to match {{shortcut}}, per talk
wikitext
text/x-wiki
<div role="note" class="shortcutbox shortcutbox-left plainlist plainlinks noprint" style="<!--
-->{{#switch:{{{clear|}}} |true=clear:{{{float|right}}}; |left|right|both=clear:{{{clear|}}}; |#default=}}<!--
-->float: {{#ifeq:{{{float|}}}|left|left|right}};<!--
-->margin: {{{top|0em}}} {{#ifeq:{{{float|}}}|left|1em 0em 0em|0em 0em 1em}};<!--
-->border: 1px solid #aaa; background: #fff; padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; font-weight: bold;"><!--
Adding the shortcut links:
--><div style="display: inline-block; border-bottom: 1px solid #aaa; line-height: 1.5em; font-weight: normal; margin-bottom: .2em;">{{#if:{{{redirect|}}} |Redirect |Shortcut}}{{#if:{{{2|}}}|s}}</div> {{bulleted list
| {{#if: {{{1|<noinclude>{{PAGENAME}}</noinclude>}}} | {{{{{pre|}}}{{#ifexist:Template:{{{1}}} |[{{fullurl:Template:{{{1}}}|redirect=no}} {{#if:true|{{{1}}}}}] |[[Template:{{{1|<noinclude>{{PAGENAME}}</noinclude>}}}|{{#if:true|{{{1|<noinclude>{{PAGENAME}}</noinclude>}}}}}]]}}}} }}<!--
--> | {{#if:{{{2|}}} | {{{{{pre2|}}}{{#ifexist:Template:{{{2}}} |[{{fullurl:Template:{{{2}}}|redirect=no}} {{#if:true|{{{2}}}}}] |[[Template:{{{2}}}|{{#if:true|{{{2}}}}}]]}}}} }}<!--
--> | {{#if:{{{3|}}} | {{{{{pre3|}}}{{#ifexist:Template:{{{3}}} |[{{fullurl:Template:{{{3}}}|redirect=no}} {{#if:true|{{{3}}}}}] |[[Template:{{{3}}}|{{#if:true|{{{3}}}}}]]}}}} }}<!--
--> | {{#if:{{{4|}}} | {{{{{pre4|}}}{{#ifexist:Template:{{{4}}} |[{{fullurl:Template:{{{4}}}|redirect=no}} {{#if:true|{{{4}}}}}] |[[Template:{{{4}}}|{{#if:true|{{{4}}}}}]]}}}} }}<!--
--> | {{#if:{{{5|}}} | {{{{{pre5|}}}{{#ifexist:Template:{{{5}}} |[{{fullurl:Template:{{{5}}}|redirect=no}} {{#if:true|{{{5}}}}}] |[[Template:{{{5}}}|{{#if:true|{{{5}}}}}]]}}}} }}<!--
--> | {{#if:{{{6|}}} | {{{{{pre6|}}}{{#ifexist:Template:{{{6}}} |[{{fullurl:Template:{{{6}}}|redirect=no}} {{#if:true|{{{6}}}}}] |[[Template:{{{6}}}|{{#if:true|{{{6}}}}}]]}}}} }}<!--
--> | {{#if:{{{7|}}} | {{{{{pre7|}}}{{#ifexist:Template:{{{7}}} |[{{fullurl:Template:{{{7}}}|redirect=no}} {{#if:true|{{{7}}}}}] |[[Template:{{{7}}}|{{#if:true|{{{7}}}}}]]}}}} }}<!--
--> | {{#if:{{{8|}}} | {{{{{pre8|}}}{{#ifexist:Template:{{{8}}} |[{{fullurl:Template:{{{8}}}|redirect=no}} {{#if:true|{{{8}}}}}] |[[Template:{{{8}}}|{{#if:true|{{{8}}}}}]]}}}} }}<!--
--> | {{#if:{{{9|}}} | {{{{{pre9|}}}{{#ifexist:Template:{{{9}}} |[{{fullurl:Template:{{{9}}}|redirect=no}} {{#if:true|{{{9}}}}}] |[[Template:{{{9}}}|{{#if:true|{{{9}}}}}]]}}}} }}<!--
--> | {{#if:{{{10|}}} | {{{{{pre10|}}}{{#ifexist:Template:{{{10}}} |[{{fullurl:Template:{{{10}}}|redirect=no}} {{#if:true|{{{10}}}}}] |[[Template:{{{10}}}|{{#if:true|{{{10}}}}}]]}}}} }}<!--
-->}}<!--
--></div><noinclude>{{Documentation}}</noinclude>
6jehv2ex3xjowwoqdbctmw8s94u28h7
126
125
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Template_shortcut]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<div role="note" class="shortcutbox shortcutbox-left plainlist plainlinks noprint" style="<!--
-->{{#switch:{{{clear|}}} |true=clear:{{{float|right}}}; |left|right|both=clear:{{{clear|}}}; |#default=}}<!--
-->float: {{#ifeq:{{{float|}}}|left|left|right}};<!--
-->margin: {{{top|0em}}} {{#ifeq:{{{float|}}}|left|1em 0em 0em|0em 0em 1em}};<!--
-->border: 1px solid #aaa; background: #fff; padding: 0.3em 0.6em 0.2em 0.6em; text-align: center; font-size: 85%; font-weight: bold;"><!--
Adding the shortcut links:
--><div style="display: inline-block; border-bottom: 1px solid #aaa; line-height: 1.5em; font-weight: normal; margin-bottom: .2em;">{{#if:{{{redirect|}}} |Redirect |Shortcut}}{{#if:{{{2|}}}|s}}</div> {{bulleted list
| {{#if: {{{1|<noinclude>{{PAGENAME}}</noinclude>}}} | {{{{{pre|}}}{{#ifexist:Template:{{{1}}} |[{{fullurl:Template:{{{1}}}|redirect=no}} {{#if:true|{{{1}}}}}] |[[Template:{{{1|<noinclude>{{PAGENAME}}</noinclude>}}}|{{#if:true|{{{1|<noinclude>{{PAGENAME}}</noinclude>}}}}}]]}}}} }}<!--
--> | {{#if:{{{2|}}} | {{{{{pre2|}}}{{#ifexist:Template:{{{2}}} |[{{fullurl:Template:{{{2}}}|redirect=no}} {{#if:true|{{{2}}}}}] |[[Template:{{{2}}}|{{#if:true|{{{2}}}}}]]}}}} }}<!--
--> | {{#if:{{{3|}}} | {{{{{pre3|}}}{{#ifexist:Template:{{{3}}} |[{{fullurl:Template:{{{3}}}|redirect=no}} {{#if:true|{{{3}}}}}] |[[Template:{{{3}}}|{{#if:true|{{{3}}}}}]]}}}} }}<!--
--> | {{#if:{{{4|}}} | {{{{{pre4|}}}{{#ifexist:Template:{{{4}}} |[{{fullurl:Template:{{{4}}}|redirect=no}} {{#if:true|{{{4}}}}}] |[[Template:{{{4}}}|{{#if:true|{{{4}}}}}]]}}}} }}<!--
--> | {{#if:{{{5|}}} | {{{{{pre5|}}}{{#ifexist:Template:{{{5}}} |[{{fullurl:Template:{{{5}}}|redirect=no}} {{#if:true|{{{5}}}}}] |[[Template:{{{5}}}|{{#if:true|{{{5}}}}}]]}}}} }}<!--
--> | {{#if:{{{6|}}} | {{{{{pre6|}}}{{#ifexist:Template:{{{6}}} |[{{fullurl:Template:{{{6}}}|redirect=no}} {{#if:true|{{{6}}}}}] |[[Template:{{{6}}}|{{#if:true|{{{6}}}}}]]}}}} }}<!--
--> | {{#if:{{{7|}}} | {{{{{pre7|}}}{{#ifexist:Template:{{{7}}} |[{{fullurl:Template:{{{7}}}|redirect=no}} {{#if:true|{{{7}}}}}] |[[Template:{{{7}}}|{{#if:true|{{{7}}}}}]]}}}} }}<!--
--> | {{#if:{{{8|}}} | {{{{{pre8|}}}{{#ifexist:Template:{{{8}}} |[{{fullurl:Template:{{{8}}}|redirect=no}} {{#if:true|{{{8}}}}}] |[[Template:{{{8}}}|{{#if:true|{{{8}}}}}]]}}}} }}<!--
--> | {{#if:{{{9|}}} | {{{{{pre9|}}}{{#ifexist:Template:{{{9}}} |[{{fullurl:Template:{{{9}}}|redirect=no}} {{#if:true|{{{9}}}}}] |[[Template:{{{9}}}|{{#if:true|{{{9}}}}}]]}}}} }}<!--
--> | {{#if:{{{10|}}} | {{{{{pre10|}}}{{#ifexist:Template:{{{10}}} |[{{fullurl:Template:{{{10}}}|redirect=no}} {{#if:true|{{{10}}}}}] |[[Template:{{{10}}}|{{#if:true|{{{10}}}}}]]}}}} }}<!--
-->}}<!--
--></div><noinclude>{{Documentation}}</noinclude>
6jehv2ex3xjowwoqdbctmw8s94u28h7
आकृति:Tl
10
63
127
2017-04-19T22:28:34Z
wikipedia:en>Lectonar
0
Changed protection level for "[[Template:Tl]]": request at rfp ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
h0vr3yvr9jdyd17x82vnav21ngwmxuk
128
127
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Tl]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{[[Template:{{{1}}}|{{{1}}}]]}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
h0vr3yvr9jdyd17x82vnav21ngwmxuk
आकृति:Tlf
10
64
129
2016-05-28T14:18:30Z
wikipedia:en>Ymblanter
0
Changed protection level of Template:Tlf: [[WP:High-risk templates|Highly visible template]] ([Edit=Require template editor access] (indefinite) [Move=Require administrator access] (indefinite))
wikitext
text/x-wiki
<span class="nowrap">{{{{#if:{{{1|}}}|{{{1}}}| tlf|...}}<!--
-->{{#ifeq:{{{2|x}}}|{{{2|}}}| |{{{2}}} | }}<!--
-->{{#ifeq:{{{3|x}}}|{{{3|}}}| |{{{3}}} | }}<!--
-->{{#ifeq:{{{4|x}}}|{{{4|}}}| |{{{4}}} | }}<!--
-->{{#ifeq:{{{5|x}}}|{{{5|}}}| |{{{5}}} | }}<!--
-->{{#ifeq:{{{6|x}}}|{{{6|}}}| |{{{6}}} | }}<!--
-->{{#ifeq:{{{7|x}}}|{{{7|}}}| |{{{7}}} | }}<!--
-->{{#ifeq:{{{8|x}}}|{{{8|}}}| |{{{8}}} | }}<!--
-->{{#ifeq:{{{9|x}}}|{{{9|}}}| |{{{9}}} | }}<!--
-->}}</span><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc sub-page, not here! -->
</noinclude>
mz6t9o5pdzfguxfj2q86tiqdtff1jpr
130
129
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Tlf]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<span class="nowrap">{{{{#if:{{{1|}}}|{{{1}}}| tlf|...}}<!--
-->{{#ifeq:{{{2|x}}}|{{{2|}}}| |{{{2}}} | }}<!--
-->{{#ifeq:{{{3|x}}}|{{{3|}}}| |{{{3}}} | }}<!--
-->{{#ifeq:{{{4|x}}}|{{{4|}}}| |{{{4}}} | }}<!--
-->{{#ifeq:{{{5|x}}}|{{{5|}}}| |{{{5}}} | }}<!--
-->{{#ifeq:{{{6|x}}}|{{{6|}}}| |{{{6}}} | }}<!--
-->{{#ifeq:{{{7|x}}}|{{{7|}}}| |{{{7}}} | }}<!--
-->{{#ifeq:{{{8|x}}}|{{{8|}}}| |{{{8}}} | }}<!--
-->{{#ifeq:{{{9|x}}}|{{{9|}}}| |{{{9}}} | }}<!--
-->}}</span><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc sub-page, not here! -->
</noinclude>
mz6t9o5pdzfguxfj2q86tiqdtff1jpr
आकृति:Tlx
10
65
131
2018-01-21T23:12:17Z
wikipedia:en>Redrose64
0
[[MOS:ELLIPSIS]]
wikitext
text/x-wiki
<includeonly><!--
--><code><!--
--><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!--
-->[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{2|}}} ||{{{2}}}}}<!--
-->{{#if:{{{3|}}} ||{{{3}}}}}<!--
-->{{#if:{{{4|}}} ||{{{4}}}}}<!--
-->{{#if:{{{5|}}} ||{{{5}}}}}<!--
-->{{#if:{{{6|}}} ||{{{6}}}}}<!--
-->{{#if:{{{7|}}} ||{{{7}}}}}<!--
-->{{#if:{{{8|}}} ||{{{8}}}}}<!--
-->{{#if:{{{9|}}} ||{{{9}}}}}<!--
-->{{#if:{{{10|}}} ||{{{10}}}}}<!--
-->{{#if:{{{11|}}} ||{{{11}}}}}<!--
-->{{#if:{{{12|}}} ||''...''}}<!--
--><nowiki>}}</nowiki><!--
--></code><!--
--></includeonly><noinclude>
{{Documentation}}</noinclude>
0dyhbuugzgzyax8gcf5l4wyycg4mps7
132
131
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Tlx]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
<includeonly><!--
--><code><!--
--><nowiki>{{</nowiki>{{#if:{{{subst|}}} |[[Help:Substitution|subst]]:}}<!--
-->[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:{{{1|}}}|{{{1|}}}]]<!--
-->{{#if:{{{2|}}} ||{{{2}}}}}<!--
-->{{#if:{{{3|}}} ||{{{3}}}}}<!--
-->{{#if:{{{4|}}} ||{{{4}}}}}<!--
-->{{#if:{{{5|}}} ||{{{5}}}}}<!--
-->{{#if:{{{6|}}} ||{{{6}}}}}<!--
-->{{#if:{{{7|}}} ||{{{7}}}}}<!--
-->{{#if:{{{8|}}} ||{{{8}}}}}<!--
-->{{#if:{{{9|}}} ||{{{9}}}}}<!--
-->{{#if:{{{10|}}} ||{{{10}}}}}<!--
-->{{#if:{{{11|}}} ||{{{11}}}}}<!--
-->{{#if:{{{12|}}} ||''...''}}<!--
--><nowiki>}}</nowiki><!--
--></code><!--
--></includeonly><noinclude>
{{Documentation}}</noinclude>
0dyhbuugzgzyax8gcf5l4wyycg4mps7
आकृति:Yesno
10
66
133
2018-01-23T08:37:08Z
wikipedia:en>MSGJ
0
add support for on/off, per discussion
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|false
|off
|0 = {{{no|<!-- null -->}}}
| = {{{blank|{{{no|<!-- null -->}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|true
|on
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
r1wh7ajnm478r67owpatavjany80n9e
134
133
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Yesno]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|false
|off
|0 = {{{no|<!-- null -->}}}
| = {{{blank|{{{no|<!-- null -->}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|true
|on
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
r1wh7ajnm478r67owpatavjany80n9e
आकृति:Yesno-no
10
67
135
2018-02-13T20:27:17Z
wikipedia:en>WOSlinker
0
separate pp-template not needed
wikitext
text/x-wiki
{{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude>
{{Documentation|Template:Yesno/doc}}
<!--Categories go in the doc page referenced above; interwikis go in Wikidata.-->
</noinclude>
34vmtxa9ubuh1vz2ulp78m5ela68riu
136
135
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Template:Yesno-no]] सँ १ अवतरण आयात कएल गेल
wikitext
text/x-wiki
{{safesubst:<noinclude />yesno|{{{1}}}|yes={{{yes|yes}}}|no={{{no|no}}}|blank={{{blank|no}}}|¬={{{¬|no}}}|def={{{def|no}}}}}<noinclude>
{{Documentation|Template:Yesno/doc}}
<!--Categories go in the doc page referenced above; interwikis go in Wikidata.-->
</noinclude>
34vmtxa9ubuh1vz2ulp78m5ela68riu
मोड्युल:Category handler
828
68
139
2014-07-22T05:08:26Z
wikipedia:en>Mr. Stradivarius
0
allow invocations specifying the page parameter to use the mw.loadData optimisations, and don't call mw.title.new every time
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- CATEGORY HANDLER --
-- --
-- This module implements the {{category handler}} template in Lua, --
-- with a few improvements: all namespaces and all namespace aliases --
-- are supported, and namespace names are detected automatically for --
-- the local wiki. This module requires [[Module:Namespace detect]] --
-- and [[Module:Yesno]] to be available on the local wiki. It can be --
-- configured for different wikis by altering the values in --
-- [[Module:Category handler/config]], and pages can be blacklisted --
-- from categorisation by using [[Module:Category handler/blacklist]]. --
-- --
--------------------------------------------------------------------------------
-- Load required modules
local yesno = require('Module:Yesno')
-- Lazily load things we don't always need
local mShared, mappings
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function trimWhitespace(s, removeBlanks)
if type(s) ~= 'string' then
return s
end
s = s:match('^%s*(.-)%s*$')
if removeBlanks then
if s ~= '' then
return s
else
return nil
end
else
return s
end
end
--------------------------------------------------------------------------------
-- CategoryHandler class
--------------------------------------------------------------------------------
local CategoryHandler = {}
CategoryHandler.__index = CategoryHandler
function CategoryHandler.new(data, args)
local obj = setmetatable({ _data = data, _args = args }, CategoryHandler)
-- Set the title object
do
local pagename = obj:parameter('demopage')
local success, titleObj
if pagename then
success, titleObj = pcall(mw.title.new, pagename)
end
if success and titleObj then
obj.title = titleObj
if titleObj == mw.title.getCurrentTitle() then
obj._usesCurrentTitle = true
end
else
obj.title = mw.title.getCurrentTitle()
obj._usesCurrentTitle = true
end
end
-- Set suppression parameter values
for _, key in ipairs{'nocat', 'categories'} do
local value = obj:parameter(key)
value = trimWhitespace(value, true)
obj['_' .. key] = yesno(value)
end
do
local subpage = obj:parameter('subpage')
local category2 = obj:parameter('category2')
if type(subpage) == 'string' then
subpage = mw.ustring.lower(subpage)
end
if type(category2) == 'string' then
subpage = mw.ustring.lower(category2)
end
obj._subpage = trimWhitespace(subpage, true)
obj._category2 = trimWhitespace(category2) -- don't remove blank values
end
return obj
end
function CategoryHandler:parameter(key)
local parameterNames = self._data.parameters[key]
local pntype = type(parameterNames)
if pntype == 'string' or pntype == 'number' then
return self._args[parameterNames]
elseif pntype == 'table' then
for _, name in ipairs(parameterNames) do
local value = self._args[name]
if value ~= nil then
return value
end
end
return nil
else
error(string.format(
'invalid config key "%s"',
tostring(key)
), 2)
end
end
function CategoryHandler:isSuppressedByArguments()
return
-- See if a category suppression argument has been set.
self._nocat == true
or self._categories == false
or (
self._category2
and self._category2 ~= self._data.category2Yes
and self._category2 ~= self._data.category2Negative
)
-- Check whether we are on a subpage, and see if categories are
-- suppressed based on our subpage status.
or self._subpage == self._data.subpageNo and self.title.isSubpage
or self._subpage == self._data.subpageOnly and not self.title.isSubpage
end
function CategoryHandler:shouldSkipBlacklistCheck()
-- Check whether the category suppression arguments indicate we
-- should skip the blacklist check.
return self._nocat == false
or self._categories == true
or self._category2 == self._data.category2Yes
end
function CategoryHandler:matchesBlacklist()
if self._usesCurrentTitle then
return self._data.currentTitleMatchesBlacklist
else
mShared = mShared or require('Module:Category handler/shared')
return mShared.matchesBlacklist(
self.title.prefixedText,
mw.loadData('Module:Category handler/blacklist')
)
end
end
function CategoryHandler:isSuppressed()
-- Find if categories are suppressed by either the arguments or by
-- matching the blacklist.
return self:isSuppressedByArguments()
or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist()
end
function CategoryHandler:getNamespaceParameters()
if self._usesCurrentTitle then
return self._data.currentTitleNamespaceParameters
else
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
return mShared.getNamespaceParameters(
self.title,
mappings
)
end
end
function CategoryHandler:namespaceParametersExist()
-- Find whether any namespace parameters have been specified.
-- We use the order "all" --> namespace params --> "other" as this is what
-- the old template did.
if self:parameter('all') then
return true
end
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
for ns, params in pairs(mappings) do
for i, param in ipairs(params) do
if self._args[param] then
return true
end
end
end
if self:parameter('other') then
return true
end
return false
end
function CategoryHandler:getCategories()
local params = self:getNamespaceParameters()
local nsCategory
for i, param in ipairs(params) do
local value = self._args[param]
if value ~= nil then
nsCategory = value
break
end
end
if nsCategory ~= nil or self:namespaceParametersExist() then
-- Namespace parameters exist - advanced usage.
if nsCategory == nil then
nsCategory = self:parameter('other')
end
local ret = {self:parameter('all')}
local numParam = tonumber(nsCategory)
if numParam and numParam >= 1 and math.floor(numParam) == numParam then
-- nsCategory is an integer
ret[#ret + 1] = self._args[numParam]
else
ret[#ret + 1] = nsCategory
end
if #ret < 1 then
return nil
else
return table.concat(ret)
end
elseif self._data.defaultNamespaces[self.title.namespace] then
-- Namespace parameters don't exist, simple usage.
return self._args[1]
end
return nil
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- Used for testing purposes.
return {
CategoryHandler = CategoryHandler
}
end
function p._main(args, data)
data = data or mw.loadData('Module:Category handler/data')
local handler = CategoryHandler.new(data, args)
if handler:isSuppressed() then
return nil
end
return handler:getCategories()
end
function p.main(frame, data)
data = data or mw.loadData('Module:Category handler/data')
local args = require('Module:Arguments').getArgs(frame, {
wrappers = data.wrappers,
valueFunc = function (k, v)
v = trimWhitespace(v)
if type(k) == 'number' then
if v ~= '' then
return v
else
return nil
end
else
return v
end
end
})
return p._main(args, data)
end
return p
letwavu3yvlayfzew66uuwixmwebq5b
140
139
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Category_handler]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- CATEGORY HANDLER --
-- --
-- This module implements the {{category handler}} template in Lua, --
-- with a few improvements: all namespaces and all namespace aliases --
-- are supported, and namespace names are detected automatically for --
-- the local wiki. This module requires [[Module:Namespace detect]] --
-- and [[Module:Yesno]] to be available on the local wiki. It can be --
-- configured for different wikis by altering the values in --
-- [[Module:Category handler/config]], and pages can be blacklisted --
-- from categorisation by using [[Module:Category handler/blacklist]]. --
-- --
--------------------------------------------------------------------------------
-- Load required modules
local yesno = require('Module:Yesno')
-- Lazily load things we don't always need
local mShared, mappings
local p = {}
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function trimWhitespace(s, removeBlanks)
if type(s) ~= 'string' then
return s
end
s = s:match('^%s*(.-)%s*$')
if removeBlanks then
if s ~= '' then
return s
else
return nil
end
else
return s
end
end
--------------------------------------------------------------------------------
-- CategoryHandler class
--------------------------------------------------------------------------------
local CategoryHandler = {}
CategoryHandler.__index = CategoryHandler
function CategoryHandler.new(data, args)
local obj = setmetatable({ _data = data, _args = args }, CategoryHandler)
-- Set the title object
do
local pagename = obj:parameter('demopage')
local success, titleObj
if pagename then
success, titleObj = pcall(mw.title.new, pagename)
end
if success and titleObj then
obj.title = titleObj
if titleObj == mw.title.getCurrentTitle() then
obj._usesCurrentTitle = true
end
else
obj.title = mw.title.getCurrentTitle()
obj._usesCurrentTitle = true
end
end
-- Set suppression parameter values
for _, key in ipairs{'nocat', 'categories'} do
local value = obj:parameter(key)
value = trimWhitespace(value, true)
obj['_' .. key] = yesno(value)
end
do
local subpage = obj:parameter('subpage')
local category2 = obj:parameter('category2')
if type(subpage) == 'string' then
subpage = mw.ustring.lower(subpage)
end
if type(category2) == 'string' then
subpage = mw.ustring.lower(category2)
end
obj._subpage = trimWhitespace(subpage, true)
obj._category2 = trimWhitespace(category2) -- don't remove blank values
end
return obj
end
function CategoryHandler:parameter(key)
local parameterNames = self._data.parameters[key]
local pntype = type(parameterNames)
if pntype == 'string' or pntype == 'number' then
return self._args[parameterNames]
elseif pntype == 'table' then
for _, name in ipairs(parameterNames) do
local value = self._args[name]
if value ~= nil then
return value
end
end
return nil
else
error(string.format(
'invalid config key "%s"',
tostring(key)
), 2)
end
end
function CategoryHandler:isSuppressedByArguments()
return
-- See if a category suppression argument has been set.
self._nocat == true
or self._categories == false
or (
self._category2
and self._category2 ~= self._data.category2Yes
and self._category2 ~= self._data.category2Negative
)
-- Check whether we are on a subpage, and see if categories are
-- suppressed based on our subpage status.
or self._subpage == self._data.subpageNo and self.title.isSubpage
or self._subpage == self._data.subpageOnly and not self.title.isSubpage
end
function CategoryHandler:shouldSkipBlacklistCheck()
-- Check whether the category suppression arguments indicate we
-- should skip the blacklist check.
return self._nocat == false
or self._categories == true
or self._category2 == self._data.category2Yes
end
function CategoryHandler:matchesBlacklist()
if self._usesCurrentTitle then
return self._data.currentTitleMatchesBlacklist
else
mShared = mShared or require('Module:Category handler/shared')
return mShared.matchesBlacklist(
self.title.prefixedText,
mw.loadData('Module:Category handler/blacklist')
)
end
end
function CategoryHandler:isSuppressed()
-- Find if categories are suppressed by either the arguments or by
-- matching the blacklist.
return self:isSuppressedByArguments()
or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist()
end
function CategoryHandler:getNamespaceParameters()
if self._usesCurrentTitle then
return self._data.currentTitleNamespaceParameters
else
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
return mShared.getNamespaceParameters(
self.title,
mappings
)
end
end
function CategoryHandler:namespaceParametersExist()
-- Find whether any namespace parameters have been specified.
-- We use the order "all" --> namespace params --> "other" as this is what
-- the old template did.
if self:parameter('all') then
return true
end
if not mappings then
mShared = mShared or require('Module:Category handler/shared')
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData
end
for ns, params in pairs(mappings) do
for i, param in ipairs(params) do
if self._args[param] then
return true
end
end
end
if self:parameter('other') then
return true
end
return false
end
function CategoryHandler:getCategories()
local params = self:getNamespaceParameters()
local nsCategory
for i, param in ipairs(params) do
local value = self._args[param]
if value ~= nil then
nsCategory = value
break
end
end
if nsCategory ~= nil or self:namespaceParametersExist() then
-- Namespace parameters exist - advanced usage.
if nsCategory == nil then
nsCategory = self:parameter('other')
end
local ret = {self:parameter('all')}
local numParam = tonumber(nsCategory)
if numParam and numParam >= 1 and math.floor(numParam) == numParam then
-- nsCategory is an integer
ret[#ret + 1] = self._args[numParam]
else
ret[#ret + 1] = nsCategory
end
if #ret < 1 then
return nil
else
return table.concat(ret)
end
elseif self._data.defaultNamespaces[self.title.namespace] then
-- Namespace parameters don't exist, simple usage.
return self._args[1]
end
return nil
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- Used for testing purposes.
return {
CategoryHandler = CategoryHandler
}
end
function p._main(args, data)
data = data or mw.loadData('Module:Category handler/data')
local handler = CategoryHandler.new(data, args)
if handler:isSuppressed() then
return nil
end
return handler:getCategories()
end
function p.main(frame, data)
data = data or mw.loadData('Module:Category handler/data')
local args = require('Module:Arguments').getArgs(frame, {
wrappers = data.wrappers,
valueFunc = function (k, v)
v = trimWhitespace(v)
if type(k) == 'number' then
if v ~= '' then
return v
else
return nil
end
else
return v
end
end
})
return p._main(args, data)
end
return p
letwavu3yvlayfzew66uuwixmwebq5b
मोड्युल:Category handler/blacklist
828
69
141
2016-12-30T14:53:53Z
wikipedia:en>Mr. Stradivarius
0
on second thoughts, blacklisting sandboxes for all templates is probably a bad idea
Scribunto
text/plain
-- This module contains the blacklist used by [[Module:Category handler]].
-- Pages that match Lua patterns in this list will not be categorised unless
-- categorisation is explicitly requested.
return {
'^Main Page$', -- don't categorise the main page.
-- Don't categorise the following pages or their subpages.
-- "%f[/\0]" matches if the next character is "/" or the end of the string.
'^Wikipedia:Cascade%-protected items%f[/\0]',
'^User:UBX%f[/\0]', -- The userbox "template" space.
'^User talk:UBX%f[/\0]',
-- Don't categorise subpages of these pages, but allow
-- categorisation of the base page.
'^Wikipedia:Template messages/.*$',
-- Don't categorise archives.
'/[aA]rchive',
"^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$",
}
hwue3i1eua4tsdxlsbcs4f5syudywbe
142
141
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Category_handler/blacklist]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module contains the blacklist used by [[Module:Category handler]].
-- Pages that match Lua patterns in this list will not be categorised unless
-- categorisation is explicitly requested.
return {
'^Main Page$', -- don't categorise the main page.
-- Don't categorise the following pages or their subpages.
-- "%f[/\0]" matches if the next character is "/" or the end of the string.
'^Wikipedia:Cascade%-protected items%f[/\0]',
'^User:UBX%f[/\0]', -- The userbox "template" space.
'^User talk:UBX%f[/\0]',
-- Don't categorise subpages of these pages, but allow
-- categorisation of the base page.
'^Wikipedia:Template messages/.*$',
-- Don't categorise archives.
'/[aA]rchive',
"^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$",
}
hwue3i1eua4tsdxlsbcs4f5syudywbe
मोड्युल:Category handler/config
828
70
143
2014-07-13T09:05:36Z
wikipedia:en>Mr. Stradivarius
0
Protected Module:Category handler/config: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
Scribunto
text/plain
--------------------------------------------------------------------------------
-- [[Module:Category handler]] configuration data --
-- Language-specific parameter names and values can be set here. --
-- For blacklist config, see [[Module:Category handler/blacklist]]. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- foo = 'parameter name', --
-- --
-- To add multiple names, you can use this format: --
-- --
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --
--------------------------------------------------------------------------------
cfg.parameters = {
-- The nocat and categories parameter suppress
-- categorisation. They are used with Module:Yesno, and work as follows:
--
-- cfg.nocat:
-- Result of yesno() Effect
-- true Categorisation is suppressed
-- false Categorisation is allowed, and
-- the blacklist check is skipped
-- nil Categorisation is allowed
--
-- cfg.categories:
-- Result of yesno() Effect
-- true Categorisation is allowed, and
-- the blacklist check is skipped
-- false Categorisation is suppressed
-- nil Categorisation is allowed
nocat = 'nocat',
categories = 'categories',
-- The parameter name for the legacy "category2" parameter. This skips the
-- blacklist if set to the cfg.category2Yes value, and suppresses
-- categorisation if present but equal to anything other than
-- cfg.category2Yes or cfg.category2Negative.
category2 = 'category2',
-- cfg.subpage is the parameter name to specify how to behave on subpages.
subpage = 'subpage',
-- The parameter for data to return in all namespaces.
all = 'all',
-- The parameter name for data to return if no data is specified for the
-- namespace that is detected.
other = 'other',
-- The parameter name used to specify a page other than the current page;
-- used for testing and demonstration.
demopage = 'page',
}
--------------------------------------------------------------------------------
-- Parameter values --
-- These are set values that can be used with certain parameters. Only one --
-- value can be specified, like this: --
-- --
-- cfg.foo = 'value name' -- --
--------------------------------------------------------------------------------
-- The following settings are used with the cfg.category2 parameter. Setting
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2
-- is present but equal to anything other than cfg.category2Yes or
-- cfg.category2Negative then it supresses cateogrisation.
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- The following settings are used with the cfg.subpage parameter.
-- cfg.subpageNo is the value to specify to not categorise on subpages;
-- cfg.subpageOnly is the value to specify to only categorise on subpages.
cfg.subpageNo = 'no'
cfg.subpageOnly = 'only'
--------------------------------------------------------------------------------
-- Default namespaces --
-- This is a table of namespaces to categorise by default. The keys are the --
-- namespace numbers. --
--------------------------------------------------------------------------------
cfg.defaultNamespaces = {
[ 0] = true, -- main
[ 6] = true, -- file
[ 12] = true, -- help
[ 14] = true, -- category
[100] = true, -- portal
[108] = true, -- book
}
--------------------------------------------------------------------------------
-- Wrappers --
-- This is a wrapper template or a list of wrapper templates to be passed to --
-- [[Module:Arguments]]. --
--------------------------------------------------------------------------------
cfg.wrappers = 'Template:Category handler'
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
6ga9hbq2pdwalsvx68i53dmbr421rq5
144
143
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Category_handler/config]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--------------------------------------------------------------------------------
-- [[Module:Category handler]] configuration data --
-- Language-specific parameter names and values can be set here. --
-- For blacklist config, see [[Module:Category handler/blacklist]]. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- foo = 'parameter name', --
-- --
-- To add multiple names, you can use this format: --
-- --
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --
--------------------------------------------------------------------------------
cfg.parameters = {
-- The nocat and categories parameter suppress
-- categorisation. They are used with Module:Yesno, and work as follows:
--
-- cfg.nocat:
-- Result of yesno() Effect
-- true Categorisation is suppressed
-- false Categorisation is allowed, and
-- the blacklist check is skipped
-- nil Categorisation is allowed
--
-- cfg.categories:
-- Result of yesno() Effect
-- true Categorisation is allowed, and
-- the blacklist check is skipped
-- false Categorisation is suppressed
-- nil Categorisation is allowed
nocat = 'nocat',
categories = 'categories',
-- The parameter name for the legacy "category2" parameter. This skips the
-- blacklist if set to the cfg.category2Yes value, and suppresses
-- categorisation if present but equal to anything other than
-- cfg.category2Yes or cfg.category2Negative.
category2 = 'category2',
-- cfg.subpage is the parameter name to specify how to behave on subpages.
subpage = 'subpage',
-- The parameter for data to return in all namespaces.
all = 'all',
-- The parameter name for data to return if no data is specified for the
-- namespace that is detected.
other = 'other',
-- The parameter name used to specify a page other than the current page;
-- used for testing and demonstration.
demopage = 'page',
}
--------------------------------------------------------------------------------
-- Parameter values --
-- These are set values that can be used with certain parameters. Only one --
-- value can be specified, like this: --
-- --
-- cfg.foo = 'value name' -- --
--------------------------------------------------------------------------------
-- The following settings are used with the cfg.category2 parameter. Setting
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2
-- is present but equal to anything other than cfg.category2Yes or
-- cfg.category2Negative then it supresses cateogrisation.
cfg.category2Yes = 'yes'
cfg.category2Negative = '¬'
-- The following settings are used with the cfg.subpage parameter.
-- cfg.subpageNo is the value to specify to not categorise on subpages;
-- cfg.subpageOnly is the value to specify to only categorise on subpages.
cfg.subpageNo = 'no'
cfg.subpageOnly = 'only'
--------------------------------------------------------------------------------
-- Default namespaces --
-- This is a table of namespaces to categorise by default. The keys are the --
-- namespace numbers. --
--------------------------------------------------------------------------------
cfg.defaultNamespaces = {
[ 0] = true, -- main
[ 6] = true, -- file
[ 12] = true, -- help
[ 14] = true, -- category
[100] = true, -- portal
[108] = true, -- book
}
--------------------------------------------------------------------------------
-- Wrappers --
-- This is a wrapper template or a list of wrapper templates to be passed to --
-- [[Module:Arguments]]. --
--------------------------------------------------------------------------------
cfg.wrappers = 'Template:Category handler'
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
6ga9hbq2pdwalsvx68i53dmbr421rq5
मोड्युल:Category handler/data
828
71
145
2014-07-13T09:05:55Z
wikipedia:en>Mr. Stradivarius
0
Protected Module:Category handler/data: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
Scribunto
text/plain
-- This module assembles data to be passed to [[Module:Category handler]] using
-- mw.loadData. This includes the configuration data and whether the current
-- page matches the title blacklist.
local data = require('Module:Category handler/config')
local mShared = require('Module:Category handler/shared')
local blacklist = require('Module:Category handler/blacklist')
local title = mw.title.getCurrentTitle()
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(
title.prefixedText,
blacklist
)
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(
title,
mShared.getParamMappings()
)
return data
k26mwixuaeijisfddb0sxkg82iux8v4
146
145
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Category_handler/data]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module assembles data to be passed to [[Module:Category handler]] using
-- mw.loadData. This includes the configuration data and whether the current
-- page matches the title blacklist.
local data = require('Module:Category handler/config')
local mShared = require('Module:Category handler/shared')
local blacklist = require('Module:Category handler/blacklist')
local title = mw.title.getCurrentTitle()
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(
title.prefixedText,
blacklist
)
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(
title,
mShared.getParamMappings()
)
return data
k26mwixuaeijisfddb0sxkg82iux8v4
मोड्युल:Category handler/shared
828
72
147
2014-07-13T09:06:15Z
wikipedia:en>Mr. Stradivarius
0
Protected Module:Category handler/shared: [[WP:High-risk templates|High-risk Lua module]] ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite))
Scribunto
text/plain
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local p = {}
function p.matchesBlacklist(page, blacklist)
for i, pattern in ipairs(blacklist) do
local match = mw.ustring.match(page, pattern)
if match then
return true
end
end
return false
end
function p.getParamMappings(useLoadData)
local dataPage = 'Module:Namespace detect/data'
if useLoadData then
return mw.loadData(dataPage).mappings
else
return require(dataPage).mappings
end
end
function p.getNamespaceParameters(titleObj, mappings)
-- We don't use title.nsText for the namespace name because it adds
-- underscores.
local mappingsKey
if titleObj.isTalkPage then
mappingsKey = 'talk'
else
mappingsKey = mw.site.namespaces[titleObj.namespace].name
end
mappingsKey = mw.ustring.lower(mappingsKey)
return mappings[mappingsKey] or {}
end
return p
omlsnhudxz6juptvtxz7ns97jutbzc5
148
147
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Category_handler/shared]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module contains shared functions used by [[Module:Category handler]]
-- and its submodules.
local p = {}
function p.matchesBlacklist(page, blacklist)
for i, pattern in ipairs(blacklist) do
local match = mw.ustring.match(page, pattern)
if match then
return true
end
end
return false
end
function p.getParamMappings(useLoadData)
local dataPage = 'Module:Namespace detect/data'
if useLoadData then
return mw.loadData(dataPage).mappings
else
return require(dataPage).mappings
end
end
function p.getNamespaceParameters(titleObj, mappings)
-- We don't use title.nsText for the namespace name because it adds
-- underscores.
local mappingsKey
if titleObj.isTalkPage then
mappingsKey = 'talk'
else
mappingsKey = mw.site.namespaces[titleObj.namespace].name
end
mappingsKey = mw.ustring.lower(mappingsKey)
return mappings[mappingsKey] or {}
end
return p
omlsnhudxz6juptvtxz7ns97jutbzc5
मोड्युल:Documentation
828
73
149
2016-07-11T04:31:31Z
wikipedia:en>Andy M. Wang
0
rm alt text on icon, since the adjacent text, "Template documentation" or "Module documentation", is sufficient alternative text (per [[Special:Diff/729145419|edit request]])
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
return '<small style="font-style: normal;">(' .. table.concat(ret, ' | ') .. ')</small>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Main function
----------------------------------------------------------------------------
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--
-- Messages:
-- 'main-div-id' --> 'template-documentation'
-- 'main-div-classes' --> 'template-documentation iezoomfix'
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- so that we don't have to worry about unclosed tags.
:tag('div')
:attr('id', message('main-div-id'))
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
:css('clear', 'both') -- So right or left floating items don't stick out of the doc box.
:newline()
:done()
:done()
:wikitext(p._endBox(args, env))
:wikitext(p.addTrackingCategories(env))
return tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title objects and other namespace- or
-- path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --> 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the same as the
-- subject namespace. However, pages in the Article, File, MediaWiki or Category
-- namespaces must have their /doc, /sandbox and /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.namespace == mw.site.namespaces.Module.id then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text
local ret = '<div style="clear: both;"></div>'
ret = ret .. messageBox.main('ombox', omargs)
return ret
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
local title = env.title
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
mProtectionBanner = require('Module:Protection banner')
local reason = message('protection-reason-edit')
return mProtectionBanner._main{reason, small = true}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
mProtectionBanner = require('Module:Protection banner')
return mProtectionBanner._main{action = 'move', small = true}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
-- 'start-box-link-id' --> 'doc_editlinks'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
elseif subjectSpace == 10 then
-- We are in the template or template talk namespaces.
data.headingFontWeight = 'bold'
data.headingFontSize = '125%'
else
data.headingFontSize = '150%'
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
data.linksClass = message('start-box-linkclasses')
data.linksId = message('start-box-link-id')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
:css('padding-bottom', '3px')
:css('border-bottom', '1px solid #aaa')
:css('margin-bottom', '1ex')
:newline()
:tag('span')
:cssText(data.headingStyleText)
:css('font-weight', data.headingFontWeight)
:css('font-size', data.headingFontSize)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'fmbox-id' --> 'documentation-meta-data'
-- 'fmbox-style' --> 'background-color: #ecfcf4'
-- 'fmbox-textstyle' --> 'font-style: italic'
--
-- The HTML is generated by the {{fmbox}} template, courtesy of [[Module:Message box]].
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the arguments for {{fmbox}}.
local fmargs = {}
fmargs.id = message('fmbox-id') -- Sets 'documentation-meta-data'
fmargs.image = 'none'
fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4'
fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;'
-- Assemble the fmbox text field.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '')
text = text .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
fmargs.text = text
return messageBox.main('fmbox', fmargs)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if subjectSpace == 828 and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
jf2f51u5rzim7qgb93sv92cvfe6ak0s
150
149
2018-03-01T17:57:24Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Documentation]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4)
end
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
return '<small style="font-style: normal;">(' .. table.concat(ret, ' | ') .. ')</small>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Main function
----------------------------------------------------------------------------
p.main = makeInvokeFunc('_main')
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--
-- Messages:
-- 'main-div-id' --> 'template-documentation'
-- 'main-div-classes' --> 'template-documentation iezoomfix'
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- so that we don't have to worry about unclosed tags.
:tag('div')
:attr('id', message('main-div-id'))
:addClass(message('main-div-classes'))
:newline()
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:tag('div')
:css('clear', 'both') -- So right or left floating items don't stick out of the doc box.
:newline()
:done()
:done()
:wikitext(p._endBox(args, env))
:wikitext(p.addTrackingCategories(env))
return tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title objects and other namespace- or
-- path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --> 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the same as the
-- subject namespace. However, pages in the Article, File, MediaWiki or Category
-- namespaces must have their /doc, /sandbox and /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if compareUrl then
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
else
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.namespace == mw.site.namespaces.Module.id then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text
local ret = '<div style="clear: both;"></div>'
ret = ret .. messageBox.main('ombox', omargs)
return ret
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local protectionLevels, mProtectionBanner
local title = env.title
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editProt = protectionLevels.edit and protectionLevels.edit[1]
local moveProt = protectionLevels.move and protectionLevels.move[1]
if editProt then
-- The page is edit-protected.
mProtectionBanner = require('Module:Protection banner')
local reason = message('protection-reason-edit')
return mProtectionBanner._main{reason, small = true}
elseif moveProt and moveProt ~= 'autoconfirmed' then
-- The page is move-protected but not edit-protected. Exclude move
-- protection with the level "autoconfirmed", as this is equivalent to
-- no move protection at all.
mProtectionBanner = require('Module:Protection banner')
return mProtectionBanner._main{action = 'move', small = true}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = message('view-link-display')
data.editLinkDisplay = message('edit-link-display')
data.historyLinkDisplay = message('history-link-display')
data.purgeLinkDisplay = message('purge-link-display')
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = message('create-link-display')
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
-- 'start-box-link-id' --> 'doc_editlinks'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading')
elseif subjectSpace == 828 then -- Module namespace
data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading')
elseif subjectSpace == 6 then -- File namespace
data.heading = message('file-namespace-heading')
else
data.heading = message('other-namespaces-heading')
end
-- Heading CSS
local headingStyle = args['heading-style']
if headingStyle then
data.headingStyleText = headingStyle
elseif subjectSpace == 10 then
-- We are in the template or template talk namespaces.
data.headingFontWeight = 'bold'
data.headingFontSize = '125%'
else
data.headingFontSize = '150%'
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
data.linksClass = message('start-box-linkclasses')
data.linksId = message('start-box-link-id')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
:css('padding-bottom', '3px')
:css('border-bottom', '1px solid #aaa')
:css('margin-bottom', '1ex')
:newline()
:tag('span')
:cssText(data.headingStyleText)
:css('font-weight', data.headingFontWeight)
:css('font-size', data.headingFontSize)
:wikitext(data.heading)
local links = data.links
if links then
sbox:tag('span')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
return '\n' .. (content or '') .. '\n'
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'fmbox-id' --> 'documentation-meta-data'
-- 'fmbox-style' --> 'background-color: #ecfcf4'
-- 'fmbox-textstyle' --> 'font-style: italic'
--
-- The HTML is generated by the {{fmbox}} template, courtesy of [[Module:Message box]].
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the arguments for {{fmbox}}.
local fmargs = {}
fmargs.id = message('fmbox-id') -- Sets 'documentation-meta-data'
fmargs.image = 'none'
fmargs.style = message('fmbox-style') -- Sets 'background-color: #ecfcf4'
fmargs.textstyle = message('fmbox-textstyle') -- 'font-style: italic;'
-- Assemble the fmbox text field.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '')
text = text .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
fmargs.text = text
return messageBox.main('fmbox', fmargs)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[Wikipedia:Template documentation|documentation]]
-- is [[Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = message('edit-link-display')
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = message('history-link-display')
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = message('create-link-display')
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
if subjectSpace == 828 then
mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary}
end
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
-- for Modules, add testcases run link if exists
if subjectSpace == 828 and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then
local testcasesRunLinkDisplay = message('testcases-run-link-display')
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink)
else
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
end
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
jf2f51u5rzim7qgb93sv92cvfe6ak0s
मोड्युल:Documentation/config
828
74
151
2016-07-11T04:32:48Z
wikipedia:en>Andy M. Wang
0
rm alt text on icon, since the adjacent text is sufficient alternative text (per [[Special:Diff/729145419|edit request]])
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Sandbox.svg|50px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
cfg['sandbox-notice-pagetype-other'] = 'sandbox page'
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'
cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'
cfg['sandbox-notice-compare-link-display'] = 'diff'
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.'
cfg['sandbox-notice-testcases-link-display'] = 'test cases'
cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).'
cfg['sandbox-notice-testcases-run-link-display'] = 'run'
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].
cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.'
.. ' If you make a change to this template, please update the print version as well.'
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['main-div-id']
-- The "id" attribute of the main HTML "div" tag.
cfg['main-div-id'] = 'template-documentation'
-- cfg['main-div-classes']
-- The CSS classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'template-documentation iezoomfix'
-- cfg['start-box-linkclasses']
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.
cfg['start-box-linkclasses'] = 'mw-editsection-like plainlinks'
-- cfg['start-box-link-id']
-- The HTML "id" attribute for the links in the start box.
cfg['start-box-link-id'] = 'doc_editlinks'
----------------------------------------------------------------------------------------------------
-- {{fmbox}} template configuration
----------------------------------------------------------------------------------------------------
-- cfg['fmbox-id']
-- The id sent to the "id" parameter of the {{fmbox}} template.
cfg['fmbox-id'] = 'documentation-meta-data'
-- cfg['fmbox-style']
-- The value sent to the style parameter of {{fmbox}}.
cfg['fmbox-style'] = 'background-color: #ecfcf4'
-- cfg['fmbox-textstyle']
-- The value sent to the "textstyle parameter of {{fmbox}}.
cfg['fmbox-textstyle'] = 'font-style: italic'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
6hym6c6py8yoseohy71qvk7kafcy1p5
152
151
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Documentation/config]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local cfg = {} -- Do not edit this line.
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Sandbox.svg|50px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
cfg['sandbox-notice-pagetype-other'] = 'sandbox page'
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.'
cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).'
cfg['sandbox-notice-compare-link-display'] = 'diff'
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.'
cfg['sandbox-notice-testcases-link-display'] = 'test cases'
cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).'
cfg['sandbox-notice-testcases-run-link-display'] = 'run'
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]'
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
cfg['template-namespace-heading'] = 'Template documentation'
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
cfg['module-namespace-heading'] = 'Module documentation'
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
cfg['file-namespace-heading'] = 'Summary'
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
cfg['other-namespaces-heading'] = 'Documentation'
-- cfg['view-link-display']
-- The text to display for "view" links.
cfg['view-link-display'] = 'view'
-- cfg['edit-link-display']
-- The text to display for "edit" links.
cfg['edit-link-display'] = 'edit'
-- cfg['history-link-display']
-- The text to display for "history" links.
cfg['history-link-display'] = 'history'
-- cfg['purge-link-display']
-- The text to display for "purge" links.
cfg['purge-link-display'] = 'purge'
-- cfg['create-link-display']
-- The text to display for "create" links.
cfg['create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Wikipedia:Transclusion|transcluded]] from $1.'
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].'
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages."
cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages."
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = 'sandbox'
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = 'edit'
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = 'create'
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = 'diff'
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = 'mirror'
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = 'testcases'
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = 'edit'
-- cfg['testcases-run-link-display']
-- The text to display for test cases "run" links.
cfg['testcases-run-link-display'] = 'run'
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = 'create'
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = 'Please add categories to the $1 subpage.'
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = '$1.'
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = 'Subpages of this $1'
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = 'template'
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = 'module'
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = 'page'
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].
cfg['print-blurb'] = 'A [[Help:Books/for experts#Improving the book layout|print version]] of this template exists at $1.'
.. ' If you make a change to this template, please update the print version as well.'
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['main-div-id']
-- The "id" attribute of the main HTML "div" tag.
cfg['main-div-id'] = 'template-documentation'
-- cfg['main-div-classes']
-- The CSS classes added to the main HTML "div" tag.
cfg['main-div-classes'] = 'template-documentation iezoomfix'
-- cfg['start-box-linkclasses']
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.
cfg['start-box-linkclasses'] = 'mw-editsection-like plainlinks'
-- cfg['start-box-link-id']
-- The HTML "id" attribute for the links in the start box.
cfg['start-box-link-id'] = 'doc_editlinks'
----------------------------------------------------------------------------------------------------
-- {{fmbox}} template configuration
----------------------------------------------------------------------------------------------------
-- cfg['fmbox-id']
-- The id sent to the "id" parameter of the {{fmbox}} template.
cfg['fmbox-id'] = 'documentation-meta-data'
-- cfg['fmbox-style']
-- The value sent to the style parameter of {{fmbox}}.
cfg['fmbox-style'] = 'background-color: #ecfcf4'
-- cfg['fmbox-textstyle']
-- The value sent to the "textstyle parameter of {{fmbox}}.
cfg['fmbox-textstyle'] = 'font-style: italic'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = true
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
6hym6c6py8yoseohy71qvk7kafcy1p5
मोड्युल:Effective protection expiry
828
75
153
2016-10-13T22:30:40Z
wikipedia:en>Jackmcbarn
0
don't error if the page isn't under PC
Scribunto
text/plain
local p = {}
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)
return stabilitySettings and stabilitySettings.expiry or 'unknown'
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)
if rawExpiry == 'infinity' then
return 'infinity'
elseif rawExpiry == '' then
return 'unknown'
else
local year, month, day, hour, minute, second = rawExpiry:match(
'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$'
)
if year then
return string.format(
'%s-%s-%sT%s:%s:%s',
year, month, day, hour, minute, second
)
else
error('internal error in Module:Effective protection expiry; malformed expiry timestamp')
end
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
i1wms02y1w048cq6uttka18a5pjzp63
154
153
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Effective_protection_expiry]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
local p = {}
-- Returns the expiry of a restriction of an action on a given title, or unknown if it cannot be known.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local stabilitySettings = mw.ext.FlaggedRevs.getStabilitySettings(title)
return stabilitySettings and stabilitySettings.expiry or 'unknown'
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
local rawExpiry = mw.getCurrentFrame():callParserFunction('PROTECTIONEXPIRY', action, pagename)
if rawExpiry == 'infinity' then
return 'infinity'
elseif rawExpiry == '' then
return 'unknown'
else
local year, month, day, hour, minute, second = rawExpiry:match(
'^(%d%d%d%d)(%d%d)(%d%d)(%d%d)(%d%d)(%d%d)$'
)
if year then
return string.format(
'%s-%s-%sT%s:%s:%s',
year, month, day, hour, minute, second
)
else
error('internal error in Module:Effective protection expiry; malformed expiry timestamp')
end
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
i1wms02y1w048cq6uttka18a5pjzp63
मोड्युल:Effective protection level
828
76
155
2016-04-06T17:04:11Z
wikipedia:en>Jackmcbarn
0
handle extendedconfirmed
Scribunto
text/plain
local p = {}
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local level = mw.ext.FlaggedRevs.getStabilitySettings(title)
level = level and level.autoreview
if level == 'review' then
return 'reviewer'
elseif level ~= '' then
return level
else
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
end
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
if title.namespace == 8 then -- MediaWiki namespace
return 'sysop'
elseif title.namespace == 2 and title.isSubpage and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) then -- user JS or CSS page
return 'sysop'
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
elseif level == 'templateeditor' then
return 'templateeditor'
elseif action == 'move' then
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif title.namespace == 6 then
return 'filemover'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
elseif level then
return level
elseif action == 'upload' then
return 'autoconfirmed'
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts
return 'user'
else
return '*'
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
6hocqvqqlqw255k1l856h6hwlqsf6e1
156
155
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Effective_protection_level]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
local p = {}
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action == 'autoreview' then
local level = mw.ext.FlaggedRevs.getStabilitySettings(title)
level = level and level.autoreview
if level == 'review' then
return 'reviewer'
elseif level ~= '' then
return level
else
return nil -- not '*'. a page not being PC-protected is distinct from it being PC-protected with anyone able to review. also not '', as that would mean PC-protected but nobody can review
end
elseif action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload, autoreview', 2 )
end
if title.namespace == 8 then -- MediaWiki namespace
return 'sysop'
elseif title.namespace == 2 and title.isSubpage and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) then -- user JS or CSS page
return 'sysop'
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
elseif level == 'templateeditor' then
return 'templateeditor'
elseif action == 'move' then
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif title.namespace == 6 then
return 'filemover'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
return 'templateeditor'
elseif level == 'extendedconfirmed' then
return 'extendedconfirmed'
else
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
elseif level then
return level
elseif action == 'upload' then
return 'autoconfirmed'
elseif action == 'create' and title.namespace % 2 == 0 and title.namespace ~= 118 then -- You need to be registered, but not autoconfirmed, to create non-talk pages other than drafts
return 'user'
else
return '*'
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
6hocqvqqlqw255k1l856h6hwlqsf6e1
मोड्युल:File link
828
77
157
2014-12-18T14:05:07Z
wikipedia:en>Mr. Stradivarius
0
when calling this from wikitext use a more readable error message for missing file parameters
Scribunto
text/plain
-- This module provides a library for formatting file wikilinks.
local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType
local p = {}
function p._main(args)
checkType('_main', 1, args, 'table')
-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our
-- own function to get the right error level.
local function checkArg(key, val, level)
if type(val) ~= 'string' then
error(string.format(
"type error in '%s' parameter of '_main' (expected string, got %s)",
key, type(val)
), level)
end
end
local ret = {}
-- Adds a positional parameter to the buffer.
local function addPositional(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = val
end
-- Adds a named parameter to the buffer. We assume that the parameter name
-- is the same as the argument key.
local function addNamed(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = key .. '=' .. val
end
-- Filename
checkArg('file', args.file, 3)
ret[#ret + 1] = 'File:' .. args.file
-- Format
if args.format then
checkArg('format', args.format)
if args.formatfile then
checkArg('formatfile', args.formatfile)
ret[#ret + 1] = args.format .. '=' .. args.formatfile
else
ret[#ret + 1] = args.format
end
end
-- Border
if yesno(args.border) then
ret[#ret + 1] = 'border'
end
addPositional('location')
addPositional('alignment')
addPositional('size')
addNamed('upright')
addNamed('link')
addNamed('alt')
addNamed('page')
addNamed('class')
addNamed('lang')
addNamed('start')
addNamed('end')
addNamed('thumbtime')
addPositional('caption')
return string.format('[[%s]]', table.concat(ret, '|'))
end
function p.main(frame)
local origArgs = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:File link'
})
if not origArgs.file then
error("'file' parameter missing from [[Template:File link]]", 0)
end
-- Copy the arguments that were passed to a new table to avoid looking up
-- every possible parameter in the frame object.
local args = {}
for k, v in pairs(origArgs) do
-- Make _BLANK a special argument to add a blank parameter. For use in
-- conditional templates etc. it is useful for blank arguments to be
-- ignored, but we still need a way to specify them so that we can do
-- things like [[File:Example.png|link=]].
if v == '_BLANK' then
v = ''
end
args[k] = v
end
return p._main(args)
end
return p
bzc22v133v9z5yc4aisazripn6l94p8
158
157
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:File_link]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module provides a library for formatting file wikilinks.
local yesno = require('Module:Yesno')
local checkType = require('libraryUtil').checkType
local p = {}
function p._main(args)
checkType('_main', 1, args, 'table')
-- This is basically libraryUtil.checkTypeForNamedArg, but we are rolling our
-- own function to get the right error level.
local function checkArg(key, val, level)
if type(val) ~= 'string' then
error(string.format(
"type error in '%s' parameter of '_main' (expected string, got %s)",
key, type(val)
), level)
end
end
local ret = {}
-- Adds a positional parameter to the buffer.
local function addPositional(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = val
end
-- Adds a named parameter to the buffer. We assume that the parameter name
-- is the same as the argument key.
local function addNamed(key)
local val = args[key]
if not val then
return nil
end
checkArg(key, val, 4)
ret[#ret + 1] = key .. '=' .. val
end
-- Filename
checkArg('file', args.file, 3)
ret[#ret + 1] = 'File:' .. args.file
-- Format
if args.format then
checkArg('format', args.format)
if args.formatfile then
checkArg('formatfile', args.formatfile)
ret[#ret + 1] = args.format .. '=' .. args.formatfile
else
ret[#ret + 1] = args.format
end
end
-- Border
if yesno(args.border) then
ret[#ret + 1] = 'border'
end
addPositional('location')
addPositional('alignment')
addPositional('size')
addNamed('upright')
addNamed('link')
addNamed('alt')
addNamed('page')
addNamed('class')
addNamed('lang')
addNamed('start')
addNamed('end')
addNamed('thumbtime')
addPositional('caption')
return string.format('[[%s]]', table.concat(ret, '|'))
end
function p.main(frame)
local origArgs = require('Module:Arguments').getArgs(frame, {
wrappers = 'Template:File link'
})
if not origArgs.file then
error("'file' parameter missing from [[Template:File link]]", 0)
end
-- Copy the arguments that were passed to a new table to avoid looking up
-- every possible parameter in the frame object.
local args = {}
for k, v in pairs(origArgs) do
-- Make _BLANK a special argument to add a blank parameter. For use in
-- conditional templates etc. it is useful for blank arguments to be
-- ignored, but we still need a way to specify them so that we can do
-- things like [[File:Example.png|link=]].
if v == '_BLANK' then
v = ''
end
args[k] = v
end
return p._main(args)
end
return p
bzc22v133v9z5yc4aisazripn6l94p8
मोड्युल:List
828
78
159
2017-08-08T13:55:25Z
wikipedia:en>Jdlrobson
0
Minerva skin needs whether an hlist is separated to be explicit (see https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Hlist_bullets_not_shown_in_mobile)
Scribunto
text/plain
-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist hlist-separated')
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent > 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items < 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create('div')
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return tostring(root)
end
function p.renderTrackingCategories(args)
local isDeprecated = false -- Tracks deprecated parameters.
for k, v in pairs(args) do
k = tostring(k)
if k:find('^item_style%d+$') or k:find('^item_value%d+$') then
isDeprecated = true
break
end
end
local ret = ''
if isDeprecated then
ret = ret .. '[[Category:List templates with deprecated parameters]]'
end
return ret
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
local list = p.renderList(data)
local trackingCategories = p.renderTrackingCategories(args)
return list .. trackingCategories
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame)
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p
lkqmcmpfob2c6xhq46f675tm6p136ns
160
159
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:List]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist hlist-separated')
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent > 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items < 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create('div')
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return tostring(root)
end
function p.renderTrackingCategories(args)
local isDeprecated = false -- Tracks deprecated parameters.
for k, v in pairs(args) do
k = tostring(k)
if k:find('^item_style%d+$') or k:find('^item_value%d+$') then
isDeprecated = true
break
end
end
local ret = ''
if isDeprecated then
ret = ret .. '[[Category:List templates with deprecated parameters]]'
end
return ret
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
local list = p.renderList(data)
local trackingCategories = p.renderTrackingCategories(args)
return list .. trackingCategories
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame)
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p
lkqmcmpfob2c6xhq46f675tm6p136ns
मोड्युल:Lua banner
828
79
161
2017-10-10T17:47:29Z
wikipedia:en>MusikAnimal
0
Protected "[[Module:Lua banner]]": [[WP:High-risk templates|High-risk Lua module]]; 1,000+ transclusions ([Edit=Require autoconfirmed or confirmed access] (indefinite))
Scribunto
text/plain
-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local p = {}
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules)
local trackingCategories = p.renderTrackingCategories(args, modules)
return box .. trackingCategories
end
function p.renderBox(modules)
local boxArgs = {}
if #modules < 1 then
boxArgs.text = '<strong class="error">Error: no modules specified</strong>'
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
end
local moduleList = mList.makeList('bulleted', moduleLinks)
boxArgs.text = 'Uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|link=Wikipedia:Lua]]'
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj)
if yesno(args.nocat) then
return ''
end
local cats = {}
-- Error category
if #modules < 1 then
cats[#cats + 1] = 'Lua templates with errors'
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
local subpageBlacklist = {
doc = true,
sandbox = true,
sandbox2 = true,
testcases = true
}
if titleObj.namespace == 10
and not subpageBlacklist[titleObj.subpageText]
then
local category = args.category
if not category then
local categories = {
['Module:String'] = 'Lua String-based templates',
['Module:Math'] = 'Templates based on the Math Lua module',
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
['Module:Citation'] = 'Lua-based citation templates'
}
categories['Module:Citation/CS1'] = categories['Module:Citation']
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
end
cats[#cats + 1] = category
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p
l8oeyvtrxsbtfip6xi5evqh3yk40lu5
162
161
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Lua_banner]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local p = {}
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules)
local trackingCategories = p.renderTrackingCategories(args, modules)
return box .. trackingCategories
end
function p.renderBox(modules)
local boxArgs = {}
if #modules < 1 then
boxArgs.text = '<strong class="error">Error: no modules specified</strong>'
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
end
local moduleList = mList.makeList('bulleted', moduleLinks)
boxArgs.text = 'Uses [[Wikipedia:Lua|Lua]]:\n' .. moduleList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = '[[File:Lua-logo-nolabel.svg|30px|alt=Lua logo|link=Wikipedia:Lua]]'
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj)
if yesno(args.nocat) then
return ''
end
local cats = {}
-- Error category
if #modules < 1 then
cats[#cats + 1] = 'Lua templates with errors'
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
local subpageBlacklist = {
doc = true,
sandbox = true,
sandbox2 = true,
testcases = true
}
if titleObj.namespace == 10
and not subpageBlacklist[titleObj.subpageText]
then
local category = args.category
if not category then
local categories = {
['Module:String'] = 'Lua String-based templates',
['Module:Math'] = 'Templates based on the Math Lua module',
['Module:BaseConvert'] = 'Templates based on the BaseConvert Lua module',
['Module:Citation'] = 'Lua-based citation templates'
}
categories['Module:Citation/CS1'] = categories['Module:Citation']
category = modules[1] and categories[modules[1]]
category = category or 'Lua-based templates'
end
cats[#cats + 1] = category
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p
l8oeyvtrxsbtfip6xi5evqh3yk40lu5
मोड्युल:Message box
828
80
163
2017-10-02T09:03:51Z
wikipedia:en>WOSlinker
0
change span to div to reduce lint errors
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('Module:No globals')
local getArgs
local categoryHandler = require('Module:Category handler')._main
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
table.insert(self.classes, class)
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
self.name = args.name
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small>''(%s)''</small>", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return categoryHandler{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Create the box table.
local boxTable = root:tag('table')
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
o82985w14pvc3irjmn280op991seq7t
164
163
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Message_box]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('Module:No globals')
local getArgs
local categoryHandler = require('Module:Category handler')._main
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if ns == 0 then
obj.cfg = cfg.ambox -- main namespace
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
table.insert(self.classes, class)
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
self.name = args.name
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small>''(%s)''</small>", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Imbox notice.png', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.invalidTypeError then
local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText
self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort)
end
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return categoryHandler{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Create the box table.
local boxTable = root:tag('table')
boxTable:attr('id', self.id or nil)
for i, class in ipairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
o82985w14pvc3irjmn280op991seq7t
मोड्युल:Message box/configuration
828
81
165
2016-10-03T11:04:13Z
wikipedia:en>Mr. Stradivarius
0
allow all templates to disable the plainlinks class
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = 'Article message templates with missing parameters',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'},
removalNotice = '[[Help:Maintenance template removal|Learn how and when to remove this template message]]'
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'imbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'imbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Padlock-silver-medium.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
16xsc67jviirmw0nf2yuxvotqd7rygq
166
165
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Message_box/configuration]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = 'Article message templates with missing parameters',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'},
removalNotice = '[[Help:Maintenance template removal|Learn how and when to remove this template message]]'
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'imbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'imbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Padlock-silver-medium.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox license.png' -- @todo We need an SVG version of this
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Padlock-silver-medium.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
16xsc67jviirmw0nf2yuxvotqd7rygq
मोड्युल:Namespace detect/config
828
82
167
2014-04-05T17:03:49Z
wikipedia:en>Mr. Stradivarius
0
use cfg.demopage rather than cfg.page now that the default parameter has been changed on the /data page
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect configuration data --
-- --
-- This module stores configuration data for Module:Namespace detect. Here --
-- you can localise the module to your wiki's language. --
-- --
-- To activate a configuration item, you need to uncomment it. This means --
-- that you need to remove the text "-- " at the start of the line. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. Values added --
-- here will work in addition to the default English parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- cfg.foo = 'parameter name' --
-- --
-- To add multiple names, you can use this format: --
-- --
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} --
--------------------------------------------------------------------------------
---- This parameter displays content for the main namespace:
-- cfg.main = 'main'
---- This parameter displays in talk namespaces:
-- cfg.talk = 'talk'
---- This parameter displays content for "other" namespaces (namespaces for which
---- parameters have not been specified):
-- cfg.other = 'other'
---- This parameter makes talk pages behave as though they are the corresponding
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].
---- Edit that module to change the default values of "yes", "no", etc.
-- cfg.subjectns = 'subjectns'
---- This parameter sets a demonstration namespace:
-- cfg.demospace = 'demospace'
---- This parameter sets a specific page to compare:
cfg.demopage = 'page'
--------------------------------------------------------------------------------
-- Table configuration --
-- These configuration items allow customisation of the "table" function, --
-- used to generate a table of possible parameters in the module --
-- documentation. --
--------------------------------------------------------------------------------
---- The header for the namespace column in the wikitable containing the list of
---- possible subject-space parameters.
-- cfg.wikitableNamespaceHeader = 'Namespace'
---- The header for the wikitable containing the list of possible subject-space
---- parameters.
-- cfg.wikitableAliasesHeader = 'Aliases'
--------------------------------------------------------------------------------
-- End of configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
1o6ozz56i8q0xgyl6xa41n2v7kelhli
168
167
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Namespace_detect/config]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect configuration data --
-- --
-- This module stores configuration data for Module:Namespace detect. Here --
-- you can localise the module to your wiki's language. --
-- --
-- To activate a configuration item, you need to uncomment it. This means --
-- that you need to remove the text "-- " at the start of the line. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Parameter names --
-- These configuration items specify custom parameter names. Values added --
-- here will work in addition to the default English parameter names. --
-- To add one extra name, you can use this format: --
-- --
-- cfg.foo = 'parameter name' --
-- --
-- To add multiple names, you can use this format: --
-- --
-- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} --
--------------------------------------------------------------------------------
---- This parameter displays content for the main namespace:
-- cfg.main = 'main'
---- This parameter displays in talk namespaces:
-- cfg.talk = 'talk'
---- This parameter displays content for "other" namespaces (namespaces for which
---- parameters have not been specified):
-- cfg.other = 'other'
---- This parameter makes talk pages behave as though they are the corresponding
---- subject namespace. Note that this parameter is used with [[Module:Yesno]].
---- Edit that module to change the default values of "yes", "no", etc.
-- cfg.subjectns = 'subjectns'
---- This parameter sets a demonstration namespace:
-- cfg.demospace = 'demospace'
---- This parameter sets a specific page to compare:
cfg.demopage = 'page'
--------------------------------------------------------------------------------
-- Table configuration --
-- These configuration items allow customisation of the "table" function, --
-- used to generate a table of possible parameters in the module --
-- documentation. --
--------------------------------------------------------------------------------
---- The header for the namespace column in the wikitable containing the list of
---- possible subject-space parameters.
-- cfg.wikitableNamespaceHeader = 'Namespace'
---- The header for the wikitable containing the list of possible subject-space
---- parameters.
-- cfg.wikitableAliasesHeader = 'Aliases'
--------------------------------------------------------------------------------
-- End of configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line.
1o6ozz56i8q0xgyl6xa41n2v7kelhli
मोड्युल:Namespace detect/data
828
83
169
2014-04-05T17:02:16Z
wikipedia:en>Mr. Stradivarius
0
bug fix - use the demospace parameter as both key and value in the argKeys table
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect data --
-- This module holds data for [[Module:Namespace detect]] to be loaded per --
-- page, rather than per #invoke, for performance reasons. --
--------------------------------------------------------------------------------
local cfg = require('Module:Namespace detect/config')
local function addKey(t, key, defaultKey)
if key ~= defaultKey then
t[#t + 1] = key
end
end
-- Get a table of parameters to query for each default parameter name.
-- This allows wikis to customise parameter names in the cfg table while
-- ensuring that default parameter names will always work. The cfg table
-- values can be added as a string, or as an array of strings.
local defaultKeys = {
'main',
'talk',
'other',
'subjectns',
'demospace',
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
local cfgValue = cfg[defaultKey]
local cfgValueType = type(cfgValue)
if cfgValueType == 'string' then
addKey(t, cfgValue, defaultKey)
elseif cfgValueType == 'table' then
for i, key in ipairs(cfgValue) do
addKey(t, key, defaultKey)
end
end
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.
end
local function getParamMappings()
--[[
-- Returns a table of how parameter names map to namespace names. The keys
-- are the actual namespace names, in lower case, and the values are the
-- possible parameter names for that namespace, also in lower case. The
-- table entries are structured like this:
-- {
-- [''] = {'main'},
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},
-- ...
-- }
--]]
local mappings = {}
local mainNsName = mw.site.subjectNamespaces[0].name
mainNsName = mw.ustring.lower(mainNsName)
mappings[mainNsName] = mw.clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
table.insert(mappings[nsname], canonicalName)
end
for _, alias in ipairs(ns.aliases) do
table.insert(mappings[nsname], mw.ustring.lower(alias))
end
end
end
return mappings
end
return {
argKeys = argKeys,
cfg = cfg,
mappings = getParamMappings()
}
ojp6d3pc8mql5nufaqdg576c9so3479
170
169
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Namespace_detect/data]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Namespace detect data --
-- This module holds data for [[Module:Namespace detect]] to be loaded per --
-- page, rather than per #invoke, for performance reasons. --
--------------------------------------------------------------------------------
local cfg = require('Module:Namespace detect/config')
local function addKey(t, key, defaultKey)
if key ~= defaultKey then
t[#t + 1] = key
end
end
-- Get a table of parameters to query for each default parameter name.
-- This allows wikis to customise parameter names in the cfg table while
-- ensuring that default parameter names will always work. The cfg table
-- values can be added as a string, or as an array of strings.
local defaultKeys = {
'main',
'talk',
'other',
'subjectns',
'demospace',
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
local cfgValue = cfg[defaultKey]
local cfgValueType = type(cfgValue)
if cfgValueType == 'string' then
addKey(t, cfgValue, defaultKey)
elseif cfgValueType == 'table' then
for i, key in ipairs(cfgValue) do
addKey(t, key, defaultKey)
end
end
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.
end
local function getParamMappings()
--[[
-- Returns a table of how parameter names map to namespace names. The keys
-- are the actual namespace names, in lower case, and the values are the
-- possible parameter names for that namespace, also in lower case. The
-- table entries are structured like this:
-- {
-- [''] = {'main'},
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},
-- ...
-- }
--]]
local mappings = {}
local mainNsName = mw.site.subjectNamespaces[0].name
mainNsName = mw.ustring.lower(mainNsName)
mappings[mainNsName] = mw.clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
table.insert(mappings[nsname], canonicalName)
end
for _, alias in ipairs(ns.aliases) do
table.insert(mappings[nsname], mw.ustring.lower(alias))
end
end
end
return mappings
end
return {
argKeys = argKeys,
cfg = cfg,
mappings = getParamMappings()
}
ojp6d3pc8mql5nufaqdg576c9so3479
मोड्युल:No globals
828
84
171
2014-05-02T15:35:56Z
wikipedia:en>Jackmcbarn
0
rm name exception
Scribunto
text/plain
local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)
gggsv54pq7f94l3up48hr91qtxnskdm
172
171
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:No_globals]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
local mt = getmetatable(_G) or {}
function mt.__index (t, k)
if k ~= 'arg' then
error('Tried to read nil global ' .. tostring(k), 2)
end
return nil
end
function mt.__newindex(t, k, v)
if k ~= 'arg' then
error('Tried to write global ' .. tostring(k), 2)
end
rawset(t, k, v)
end
setmetatable(_G, mt)
gggsv54pq7f94l3up48hr91qtxnskdm
मोड्युल:No ping
828
85
173
2017-04-25T01:30:16Z
wikipedia:en>JJMC89
0
Undid revision 775971588 by [[Special:Contributions/Jc86035|Jc86035]] ([[User talk:Jc86035|talk]]) Caused the template to ping users
Scribunto
text/plain
-- This module implements {{noping}}.
local p = {}
function p.main(frame)
local args = frame:getParent().args
return p._main(args)
end
function p._main(args)
local ret = {}
local fullUrl = mw.uri.fullUrl
local format = string.format
for i, username in ipairs(args) do
local url = fullUrl(mw.site.namespaces.User.name .. ':' .. username)
url = tostring(url)
local label = args['label' .. tostring(i)]
url = format('[%s %s]', url, label or username)
ret[#ret + 1] = url
end
ret = mw.text.listToText(ret)
ret = '<span class="plainlinks">' .. ret .. '</span>'
return ret
end
return p
890tvpvugcpkd1bbmliwjuo417yk2gw
174
173
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:No_ping]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module implements {{noping}}.
local p = {}
function p.main(frame)
local args = frame:getParent().args
return p._main(args)
end
function p._main(args)
local ret = {}
local fullUrl = mw.uri.fullUrl
local format = string.format
for i, username in ipairs(args) do
local url = fullUrl(mw.site.namespaces.User.name .. ':' .. username)
url = tostring(url)
local label = args['label' .. tostring(i)]
url = format('[%s %s]', url, label or username)
ret[#ret + 1] = url
end
ret = mw.text.listToText(ret)
ret = '<span class="plainlinks">' .. ret .. '</span>'
return ret
end
return p
890tvpvugcpkd1bbmliwjuo417yk2gw
मोड्युल:Protection banner
828
86
175
2016-09-29T18:32:41Z
wikipedia:en>Cenarium
0
remove expiry param (now also automatically retrieved for autoreview) and needsexpiry check
Scribunto
text/plain
-- This module implements {{pp-meta}} and its daughter templates such as
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.
-- Initialise necessary modules.
require('Module:No globals')
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main
local yesno = require('Module:Yesno')
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function makeCategoryLink(cat, sort)
if cat then
return string.format(
'[[%s:%s|%s]]',
mw.site.namespaces[14].name,
cat,
sort
)
end
end
-- Validation function for the expiry and the protection date
local function validateDate(dateString, dateType)
if not lang then
lang = mw.language.getContentLanguage()
end
local success, result = pcall(lang.formatDate, lang, 'U', dateString)
if success then
result = tonumber(result)
if result then
return result
end
end
error(string.format(
'invalid %s: %s',
dateType,
tostring(dateString)
), 4)
end
local function makeFullUrl(page, query, display)
return string.format(
'[%s %s]',
tostring(mw.uri.fullUrl(page, query)),
display
)
end
-- Given a directed graph formatted as node -> table of direct successors,
-- get a table of all nodes reachable from a given node (though always
-- including the given node).
local function getReachableNodes(graph, start)
local toWalk, retval = {[start] = true}, {}
while true do
-- Can't use pairs() since we're adding and removing things as we're iterating
local k = next(toWalk) -- This always gets the "first" key
if k == nil then
return retval
end
toWalk[k] = nil
retval[k] = true
for _,v in ipairs(graph[k]) do
if not retval[v] then
toWalk[v] = true
end
end
end
end
--------------------------------------------------------------------------------
-- Protection class
--------------------------------------------------------------------------------
local Protection = {}
Protection.__index = Protection
Protection.supportedActions = {
edit = true,
move = true,
autoreview = true,
upload = true
}
Protection.bannerConfigFields = {
'text',
'explanation',
'tooltip',
'alt',
'link',
'image'
}
function Protection.new(args, cfg, title)
local obj = {}
obj._cfg = cfg
obj.title = title or mw.title.getCurrentTitle()
-- Set action
if not args.action then
obj.action = 'edit'
elseif Protection.supportedActions[args.action] then
obj.action = args.action
else
error(string.format(
'invalid action: %s',
tostring(args.action)
), 3)
end
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.
obj.level = '*'
end
-- Set expiry
local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)
if effectiveExpiry == 'infinity' then
obj.expiry = 'indef'
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
end
-- Set reason
if args[1] then
obj.reason = mw.ustring.lower(args[1])
if obj.reason:find('|') then
error('reasons cannot contain the pipe character ("|")', 3)
end
end
-- Set protection date
if args.date then
obj.protectionDate = validateDate(args.date, 'protection date')
end
-- Set banner config
do
obj.bannerConfig = {}
local configTables = {}
if cfg.banners[obj.action] then
configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]
end
if cfg.defaultBanners[obj.action] then
configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]
configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default
end
configTables[#configTables + 1] = cfg.masterBanner
for i, field in ipairs(Protection.bannerConfigFields) do
for j, t in ipairs(configTables) do
if t[field] then
obj.bannerConfig[field] = t[field]
break
end
end
end
end
return setmetatable(obj, Protection)
end
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Protection:makeProtectionCategory()
local cfg = self._cfg
local title = self.title
-- Exit if the page is not protected.
if not self:isProtected() then
return ''
end
-- Get the expiry key fragment.
local expiryFragment
if self.expiry == 'indef' then
expiryFragment = self.expiry
elseif type(self.expiry) == 'number' then
expiryFragment = 'temp'
end
-- Get the namespace key fragment.
local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]
if not namespaceFragment and title.namespace % 2 == 1 then
namespaceFragment = 'talk'
end
-- Define the order that key fragments are tested in. This is done with an
-- array of tables containing the value to be tested, along with its
-- position in the cfg.protectionCategories table.
local order = {
{val = expiryFragment, keypos = 1},
{val = namespaceFragment, keypos = 2},
{val = self.reason, keypos = 3},
{val = self.level, keypos = 4},
{val = self.action, keypos = 5}
}
--[[
-- The old protection templates used an ad-hoc protection category system,
-- with some templates prioritising namespaces in their categories, and
-- others prioritising the protection reason. To emulate this in this module
-- we use the config table cfg.reasonsWithNamespacePriority to set the
-- reasons for which namespaces have priority over protection reason.
-- If we are dealing with one of those reasons, move the namespace table to
-- the end of the order table, i.e. give it highest priority. If not, the
-- reason should have highest priority, so move that to the end of the table
-- instead.
--]]
table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))
--[[
-- Define the attempt order. Inactive subtables (subtables with nil "value"
-- fields) are moved to the end, where they will later be given the key
-- "all". This is to cut down on the number of table lookups in
-- cfg.protectionCategories, which grows exponentially with the number of
-- non-nil keys. We keep track of the number of active subtables with the
-- noActive parameter.
--]]
local noActive, attemptOrder
do
local active, inactive = {}, {}
for i, t in ipairs(order) do
if t.val then
active[#active + 1] = t
else
inactive[#inactive + 1] = t
end
end
noActive = #active
attemptOrder = active
for i, t in ipairs(inactive) do
attemptOrder[#attemptOrder + 1] = t
end
end
--[[
-- Check increasingly generic key combinations until we find a match. If a
-- specific category exists for the combination of key fragments we are
-- given, that match will be found first. If not, we keep trying different
-- key fragment combinations until we match using the key
-- "all-all-all-all-all".
--
-- To generate the keys, we index the key subtables using a binary matrix
-- with indexes i and j. j is only calculated up to the number of active
-- subtables. For example, if there were three active subtables, the matrix
-- would look like this, with 0 corresponding to the key fragment "all", and
-- 1 corresponding to other key fragments.
--
-- j 1 2 3
-- i
-- 1 1 1 1
-- 2 0 1 1
-- 3 1 0 1
-- 4 0 0 1
-- 5 1 1 0
-- 6 0 1 0
-- 7 1 0 0
-- 8 0 0 0
--
-- Values of j higher than the number of active subtables are set
-- to the string "all".
--
-- A key for cfg.protectionCategories is constructed for each value of i.
-- The position of the value in the key is determined by the keypos field in
-- each subtable.
--]]
local cats = cfg.protectionCategories
for i = 1, 2^noActive do
local key = {}
for j, t in ipairs(attemptOrder) do
if j > noActive then
key[t.keypos] = 'all'
else
local quotient = i / 2 ^ (j - 1)
quotient = math.ceil(quotient)
if quotient % 2 == 1 then
key[t.keypos] = t.val
else
key[t.keypos] = 'all'
end
end
end
key = table.concat(key, '|')
local attempt = cats[key]
if attempt then
return makeCategoryLink(attempt, title.text)
end
end
return ''
end
function Protection:isIncorrect()
local expiry = self.expiry
return not self:isProtected()
or type(expiry) == 'number' and expiry < os.time()
end
function Protection:isTemplateProtectedNonTemplate()
local action, namespace = self.action, self.title.namespace
return self.level == 'templateeditor'
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = { self:makeProtectionCategory() }
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-incorrect'],
self.title.text
)
end
if self:isTemplateProtectedNonTemplate() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-template'],
self.title.text
)
end
return table.concat(ret)
end
--------------------------------------------------------------------------------
-- Blurb class
--------------------------------------------------------------------------------
local Blurb = {}
Blurb.__index = Blurb
Blurb.bannerTextFields = {
text = true,
explanation = true,
tooltip = true,
alt = true,
link = true
}
function Blurb.new(protectionObj, args, cfg)
return setmetatable({
_cfg = cfg,
_protectionObj = protectionObj,
_args = args
}, Blurb)
end
-- Private methods --
function Blurb:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
local success, date = pcall(
lang.formatDate,
lang,
self._cfg.msg['expiry-date-format'] or 'j F Y',
'@' .. tostring(num)
)
if success then
return date
end
end
function Blurb:_getExpandedMessage(msgKey)
return self:_substituteParameters(self._cfg.msg[msgKey])
end
function Blurb:_substituteParameters(msg)
if not self._params then
local parameterFuncs = {}
parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter
parameterFuncs.EDITREQUEST = self._makeEditRequestParameter
parameterFuncs.EXPIRY = self._makeExpiryParameter
parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter
parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter
parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
self._params = setmetatable({}, {
__index = function (t, k)
local param
if parameterFuncs[k] then
param = parameterFuncs[k](self)
end
param = param or ''
t[k] = param
return param
end
})
end
msg = msg:gsub('${(%u+)}', self._params)
return msg
end
function Blurb:_makeCurrentVersionParameter()
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return makeFullUrl(
'Special:Log',
{type = 'move', page = pagename},
self:_getExpandedMessage('current-version-move-display')
)
else
-- We need the history link.
return makeFullUrl(
pagename,
{action = 'history'},
self:_getExpandedMessage('current-version-edit-display')
)
end
end
function Blurb:_makeEditRequestParameter()
local mEditRequest = require('Module:Submit an edit request')
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Get the edit request type.
local requestType
if action == 'edit' then
if level == 'autoconfirmed' then
requestType = 'semi'
elseif level == 'extendedconfirmed' then
requestType = 'extended'
elseif level == 'templateeditor' then
requestType = 'template'
end
end
requestType = requestType or 'full'
-- Get the display value.
local display = self:_getExpandedMessage('edit-request-display')
return mEditRequest._link{type = requestType, display = display}
end
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return self:_formatDate(expiry)
else
return expiry
end
end
function Blurb:_makeExplanationBlurbParameter()
-- Cover special cases first.
if self._protectionObj.title.namespace == 8 then
-- MediaWiki namespace
return self:_getExpandedMessage('explanation-blurb-nounprotect')
end
-- Get explanation blurb table keys
local action = self._protectionObj.action
local level = self._protectionObj.level
local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'
-- Find the message in the explanation blurb table and substitute any
-- parameters.
local explanations = self._cfg.explanationBlurbs
local msg
if explanations[action][level] and explanations[action][level][talkKey] then
msg = explanations[action][level][talkKey]
elseif explanations[action][level] and explanations[action][level].default then
msg = explanations[action][level].default
elseif explanations[action].default and explanations[action].default[talkKey] then
msg = explanations[action].default[talkKey]
elseif explanations[action].default and explanations[action].default.default then
msg = explanations[action].default.default
else
error(string.format(
'could not find explanation blurb for action "%s", level "%s" and talk key "%s"',
action,
level,
talkKey
), 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeImageLinkParameter()
local imageLinks = self._cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if imageLinks[action][level] then
msg = imageLinks[action][level]
elseif imageLinks[action].default then
msg = imageLinks[action].default
else
msg = imageLinks.edit.default
end
return self:_substituteParameters(msg)
end
function Blurb:_makeIntroBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-blurb-expiry')
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
return pagetypes[self._protectionObj.title.namespace]
or pagetypes.default
or error('no default pagetype defined', 8)
end
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionBlurbs[action][level] then
msg = protectionBlurbs[action][level]
elseif protectionBlurbs[action].default then
msg = protectionBlurbs[action].default
elseif protectionBlurbs.edit.default then
msg = protectionBlurbs.edit.default
else
error('no protection blurb defined for protectionBlurbs.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionDateParameter()
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return self:_formatDate(protectionDate)
else
return protectionDate
end
end
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionLevels[action][level] then
msg = protectionLevels[action][level]
elseif protectionLevels[action].default then
msg = protectionLevels[action].default
elseif protectionLevels.edit.default then
msg = protectionLevels.edit.default
else
error('no protection level defined for protectionLevels.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return makeFullUrl(
'Special:Log',
{type = 'stable', page = pagename},
self:_getExpandedMessage('pc-log-display')
)
else
-- We need the protection log.
return makeFullUrl(
'Special:Log',
{type = 'protect', page = pagename},
self:_getExpandedMessage('protection-log-display')
)
end
end
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
end
function Blurb:_makeTooltipBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function Blurb:_makeVandalTemplateParameter()
return require('Module:Vandal-m')._main{
self._args.user or self._protectionObj.title.baseText
}
end
-- Public methods --
function Blurb:makeBannerText(key)
-- Validate input.
if not key or not Blurb.bannerTextFields[key] then
error(string.format(
'"%s" is not a valid banner config field',
tostring(key)
), 2)
end
-- Generate the text.
local msg = self._protectionObj.bannerConfig[key]
if type(msg) == 'string' then
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._args)
if type(msg) ~= 'string' then
error(string.format(
'bad output from banner config function with key "%s"'
.. ' (expected string, got %s)',
tostring(key),
type(msg)
), 4)
end
return self:_substituteParameters(msg)
end
end
--------------------------------------------------------------------------------
-- BannerTemplate class
--------------------------------------------------------------------------------
local BannerTemplate = {}
BannerTemplate.__index = BannerTemplate
function BannerTemplate.new(protectionObj, cfg)
local obj = {}
obj._cfg = cfg
-- Set the image filename.
local imageFilename = protectionObj.bannerConfig.image
if imageFilename then
obj._imageFilename = imageFilename
else
-- If an image filename isn't specified explicitly in the banner config,
-- generate it from the protection status and the namespace.
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
-- Deal with special cases first.
if (
namespace == 10
or namespace == 828
or reason and obj._cfg.indefImageReasons[reason]
)
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Fully protected modules and templates get the special red "indef"
-- padlock.
obj._imageFilename = obj._cfg.msg['image-filename-indef']
else
-- Deal with regular protection types.
local images = obj._cfg.images
if images[action] then
if images[action][level] then
obj._imageFilename = images[action][level]
elseif images[action].default then
obj._imageFilename = images[action].default
end
end
end
end
return setmetatable(obj, BannerTemplate)
end
function BannerTemplate:renderImage()
local filename = self._imageFilename
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
return makeFileLink{
file = filename,
size = (self.imageWidth or 20) .. 'px',
alt = self._imageAlt,
link = self._imageLink,
caption = self.imageCaption
}
end
--------------------------------------------------------------------------------
-- Banner class
--------------------------------------------------------------------------------
local Banner = setmetatable({}, BannerTemplate)
Banner.__index = Banner
function Banner.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 40
obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.
obj._reasonText = blurbObj:makeBannerText('text')
obj._explanationText = blurbObj:makeBannerText('explanation')
obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.
return setmetatable(obj, Banner)
end
function Banner:__tostring()
-- Renders the banner.
makeMessageBox = makeMessageBox or require('Module:Message box').main
local reasonText = self._reasonText or error('no reason text set', 2)
local explanationText = self._explanationText
local mbargs = {
page = self._page,
type = 'protection',
image = self:renderImage(),
text = string.format(
"'''%s'''%s",
reasonText,
explanationText and '<br />' .. explanationText or ''
)
}
return makeMessageBox('mbox', mbargs)
end
--------------------------------------------------------------------------------
-- Padlock class
--------------------------------------------------------------------------------
local Padlock = setmetatable({}, BannerTemplate)
Padlock.__index = Padlock
function Padlock.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 20
obj.imageCaption = blurbObj:makeBannerText('tooltip')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockIndicatorNames.default
or 'pp-default'
return setmetatable(obj, Padlock)
end
function Padlock:__tostring()
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{
name = 'indicator',
args = {name = self._indicatorName},
content = self:renderImage()
}
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- This is used for testing purposes.
return {
Protection = Protection,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
}
end
function p._main(args, cfg, title)
args = args or {}
cfg = cfg or require(CONFIG_MODULE)
local protectionObj = Protection.new(args, cfg, title)
local ret = {}
-- If a page's edit protection is equally or more restrictive than its
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)]
then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
-- Render the banner
if protectionObj:isProtected() then
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
.new(protectionObj, blurbObj, cfg)
)
end
end
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
return table.concat(ret)
end
function p.main(frame, cfg)
cfg = cfg or require(CONFIG_MODULE)
-- Find default args, if any.
local parent = frame.getParent and frame:getParent()
local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]
-- Find user args, and use the parent frame if we are being called from a
-- wrapper template.
getArgs = getArgs or require('Module:Arguments').getArgs
local userArgs = getArgs(frame, {
parentOnly = defaultArgs,
frameOnly = not defaultArgs
})
-- Build the args table. User-specified args overwrite default args.
local args = {}
for k, v in pairs(defaultArgs or {}) do
args[k] = v
end
for k, v in pairs(userArgs) do
args[k] = v
end
return p._main(args, cfg)
end
return p
ice162y8kua930ie41kredxjaxhzy3y
176
175
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Protection_banner]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module implements {{pp-meta}} and its daughter templates such as
-- {{pp-dispute}}, {{pp-vandalism}} and {{pp-sock}}.
-- Initialise necessary modules.
require('Module:No globals')
local makeFileLink = require('Module:File link')._main
local effectiveProtectionLevel = require('Module:Effective protection level')._main
local effectiveProtectionExpiry = require('Module:Effective protection expiry')._main
local yesno = require('Module:Yesno')
-- Lazily initialise modules and objects we don't always need.
local getArgs, makeMessageBox, lang
-- Set constants.
local CONFIG_MODULE = 'Module:Protection banner/config'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function makeCategoryLink(cat, sort)
if cat then
return string.format(
'[[%s:%s|%s]]',
mw.site.namespaces[14].name,
cat,
sort
)
end
end
-- Validation function for the expiry and the protection date
local function validateDate(dateString, dateType)
if not lang then
lang = mw.language.getContentLanguage()
end
local success, result = pcall(lang.formatDate, lang, 'U', dateString)
if success then
result = tonumber(result)
if result then
return result
end
end
error(string.format(
'invalid %s: %s',
dateType,
tostring(dateString)
), 4)
end
local function makeFullUrl(page, query, display)
return string.format(
'[%s %s]',
tostring(mw.uri.fullUrl(page, query)),
display
)
end
-- Given a directed graph formatted as node -> table of direct successors,
-- get a table of all nodes reachable from a given node (though always
-- including the given node).
local function getReachableNodes(graph, start)
local toWalk, retval = {[start] = true}, {}
while true do
-- Can't use pairs() since we're adding and removing things as we're iterating
local k = next(toWalk) -- This always gets the "first" key
if k == nil then
return retval
end
toWalk[k] = nil
retval[k] = true
for _,v in ipairs(graph[k]) do
if not retval[v] then
toWalk[v] = true
end
end
end
end
--------------------------------------------------------------------------------
-- Protection class
--------------------------------------------------------------------------------
local Protection = {}
Protection.__index = Protection
Protection.supportedActions = {
edit = true,
move = true,
autoreview = true,
upload = true
}
Protection.bannerConfigFields = {
'text',
'explanation',
'tooltip',
'alt',
'link',
'image'
}
function Protection.new(args, cfg, title)
local obj = {}
obj._cfg = cfg
obj.title = title or mw.title.getCurrentTitle()
-- Set action
if not args.action then
obj.action = 'edit'
elseif Protection.supportedActions[args.action] then
obj.action = args.action
else
error(string.format(
'invalid action: %s',
tostring(args.action)
), 3)
end
-- Set level
obj.level = args.demolevel or effectiveProtectionLevel(obj.action, obj.title)
if not obj.level or (obj.action == 'move' and obj.level == 'autoconfirmed') then
-- Users need to be autoconfirmed to move pages anyway, so treat
-- semi-move-protected pages as unprotected.
obj.level = '*'
end
-- Set expiry
local effectiveExpiry = effectiveProtectionExpiry(obj.action, obj.title)
if effectiveExpiry == 'infinity' then
obj.expiry = 'indef'
elseif effectiveExpiry ~= 'unknown' then
obj.expiry = validateDate(effectiveExpiry, 'expiry date')
end
-- Set reason
if args[1] then
obj.reason = mw.ustring.lower(args[1])
if obj.reason:find('|') then
error('reasons cannot contain the pipe character ("|")', 3)
end
end
-- Set protection date
if args.date then
obj.protectionDate = validateDate(args.date, 'protection date')
end
-- Set banner config
do
obj.bannerConfig = {}
local configTables = {}
if cfg.banners[obj.action] then
configTables[#configTables + 1] = cfg.banners[obj.action][obj.reason]
end
if cfg.defaultBanners[obj.action] then
configTables[#configTables + 1] = cfg.defaultBanners[obj.action][obj.level]
configTables[#configTables + 1] = cfg.defaultBanners[obj.action].default
end
configTables[#configTables + 1] = cfg.masterBanner
for i, field in ipairs(Protection.bannerConfigFields) do
for j, t in ipairs(configTables) do
if t[field] then
obj.bannerConfig[field] = t[field]
break
end
end
end
end
return setmetatable(obj, Protection)
end
function Protection:isProtected()
return self.level ~= '*'
end
function Protection:isTemporary()
return type(self.expiry) == 'number'
end
function Protection:makeProtectionCategory()
local cfg = self._cfg
local title = self.title
-- Exit if the page is not protected.
if not self:isProtected() then
return ''
end
-- Get the expiry key fragment.
local expiryFragment
if self.expiry == 'indef' then
expiryFragment = self.expiry
elseif type(self.expiry) == 'number' then
expiryFragment = 'temp'
end
-- Get the namespace key fragment.
local namespaceFragment = cfg.categoryNamespaceKeys[title.namespace]
if not namespaceFragment and title.namespace % 2 == 1 then
namespaceFragment = 'talk'
end
-- Define the order that key fragments are tested in. This is done with an
-- array of tables containing the value to be tested, along with its
-- position in the cfg.protectionCategories table.
local order = {
{val = expiryFragment, keypos = 1},
{val = namespaceFragment, keypos = 2},
{val = self.reason, keypos = 3},
{val = self.level, keypos = 4},
{val = self.action, keypos = 5}
}
--[[
-- The old protection templates used an ad-hoc protection category system,
-- with some templates prioritising namespaces in their categories, and
-- others prioritising the protection reason. To emulate this in this module
-- we use the config table cfg.reasonsWithNamespacePriority to set the
-- reasons for which namespaces have priority over protection reason.
-- If we are dealing with one of those reasons, move the namespace table to
-- the end of the order table, i.e. give it highest priority. If not, the
-- reason should have highest priority, so move that to the end of the table
-- instead.
--]]
table.insert(order, table.remove(order, self.reason and cfg.reasonsWithNamespacePriority[self.reason] and 2 or 3))
--[[
-- Define the attempt order. Inactive subtables (subtables with nil "value"
-- fields) are moved to the end, where they will later be given the key
-- "all". This is to cut down on the number of table lookups in
-- cfg.protectionCategories, which grows exponentially with the number of
-- non-nil keys. We keep track of the number of active subtables with the
-- noActive parameter.
--]]
local noActive, attemptOrder
do
local active, inactive = {}, {}
for i, t in ipairs(order) do
if t.val then
active[#active + 1] = t
else
inactive[#inactive + 1] = t
end
end
noActive = #active
attemptOrder = active
for i, t in ipairs(inactive) do
attemptOrder[#attemptOrder + 1] = t
end
end
--[[
-- Check increasingly generic key combinations until we find a match. If a
-- specific category exists for the combination of key fragments we are
-- given, that match will be found first. If not, we keep trying different
-- key fragment combinations until we match using the key
-- "all-all-all-all-all".
--
-- To generate the keys, we index the key subtables using a binary matrix
-- with indexes i and j. j is only calculated up to the number of active
-- subtables. For example, if there were three active subtables, the matrix
-- would look like this, with 0 corresponding to the key fragment "all", and
-- 1 corresponding to other key fragments.
--
-- j 1 2 3
-- i
-- 1 1 1 1
-- 2 0 1 1
-- 3 1 0 1
-- 4 0 0 1
-- 5 1 1 0
-- 6 0 1 0
-- 7 1 0 0
-- 8 0 0 0
--
-- Values of j higher than the number of active subtables are set
-- to the string "all".
--
-- A key for cfg.protectionCategories is constructed for each value of i.
-- The position of the value in the key is determined by the keypos field in
-- each subtable.
--]]
local cats = cfg.protectionCategories
for i = 1, 2^noActive do
local key = {}
for j, t in ipairs(attemptOrder) do
if j > noActive then
key[t.keypos] = 'all'
else
local quotient = i / 2 ^ (j - 1)
quotient = math.ceil(quotient)
if quotient % 2 == 1 then
key[t.keypos] = t.val
else
key[t.keypos] = 'all'
end
end
end
key = table.concat(key, '|')
local attempt = cats[key]
if attempt then
return makeCategoryLink(attempt, title.text)
end
end
return ''
end
function Protection:isIncorrect()
local expiry = self.expiry
return not self:isProtected()
or type(expiry) == 'number' and expiry < os.time()
end
function Protection:isTemplateProtectedNonTemplate()
local action, namespace = self.action, self.title.namespace
return self.level == 'templateeditor'
and (
(action ~= 'edit' and action ~= 'move')
or (namespace ~= 10 and namespace ~= 828)
)
end
function Protection:makeCategoryLinks()
local msg = self._cfg.msg
local ret = { self:makeProtectionCategory() }
if self:isIncorrect() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-incorrect'],
self.title.text
)
end
if self:isTemplateProtectedNonTemplate() then
ret[#ret + 1] = makeCategoryLink(
msg['tracking-category-template'],
self.title.text
)
end
return table.concat(ret)
end
--------------------------------------------------------------------------------
-- Blurb class
--------------------------------------------------------------------------------
local Blurb = {}
Blurb.__index = Blurb
Blurb.bannerTextFields = {
text = true,
explanation = true,
tooltip = true,
alt = true,
link = true
}
function Blurb.new(protectionObj, args, cfg)
return setmetatable({
_cfg = cfg,
_protectionObj = protectionObj,
_args = args
}, Blurb)
end
-- Private methods --
function Blurb:_formatDate(num)
-- Formats a Unix timestamp into dd Month, YYYY format.
lang = lang or mw.language.getContentLanguage()
local success, date = pcall(
lang.formatDate,
lang,
self._cfg.msg['expiry-date-format'] or 'j F Y',
'@' .. tostring(num)
)
if success then
return date
end
end
function Blurb:_getExpandedMessage(msgKey)
return self:_substituteParameters(self._cfg.msg[msgKey])
end
function Blurb:_substituteParameters(msg)
if not self._params then
local parameterFuncs = {}
parameterFuncs.CURRENTVERSION = self._makeCurrentVersionParameter
parameterFuncs.EDITREQUEST = self._makeEditRequestParameter
parameterFuncs.EXPIRY = self._makeExpiryParameter
parameterFuncs.EXPLANATIONBLURB = self._makeExplanationBlurbParameter
parameterFuncs.IMAGELINK = self._makeImageLinkParameter
parameterFuncs.INTROBLURB = self._makeIntroBlurbParameter
parameterFuncs.INTROFRAGMENT = self._makeIntroFragmentParameter
parameterFuncs.PAGETYPE = self._makePagetypeParameter
parameterFuncs.PROTECTIONBLURB = self._makeProtectionBlurbParameter
parameterFuncs.PROTECTIONDATE = self._makeProtectionDateParameter
parameterFuncs.PROTECTIONLEVEL = self._makeProtectionLevelParameter
parameterFuncs.PROTECTIONLOG = self._makeProtectionLogParameter
parameterFuncs.TALKPAGE = self._makeTalkPageParameter
parameterFuncs.TOOLTIPBLURB = self._makeTooltipBlurbParameter
parameterFuncs.TOOLTIPFRAGMENT = self._makeTooltipFragmentParameter
parameterFuncs.VANDAL = self._makeVandalTemplateParameter
self._params = setmetatable({}, {
__index = function (t, k)
local param
if parameterFuncs[k] then
param = parameterFuncs[k](self)
end
param = param or ''
t[k] = param
return param
end
})
end
msg = msg:gsub('${(%u+)}', self._params)
return msg
end
function Blurb:_makeCurrentVersionParameter()
-- A link to the page history or the move log, depending on the kind of
-- protection.
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'move' then
-- We need the move log link.
return makeFullUrl(
'Special:Log',
{type = 'move', page = pagename},
self:_getExpandedMessage('current-version-move-display')
)
else
-- We need the history link.
return makeFullUrl(
pagename,
{action = 'history'},
self:_getExpandedMessage('current-version-edit-display')
)
end
end
function Blurb:_makeEditRequestParameter()
local mEditRequest = require('Module:Submit an edit request')
local action = self._protectionObj.action
local level = self._protectionObj.level
-- Get the edit request type.
local requestType
if action == 'edit' then
if level == 'autoconfirmed' then
requestType = 'semi'
elseif level == 'extendedconfirmed' then
requestType = 'extended'
elseif level == 'templateeditor' then
requestType = 'template'
end
end
requestType = requestType or 'full'
-- Get the display value.
local display = self:_getExpandedMessage('edit-request-display')
return mEditRequest._link{type = requestType, display = display}
end
function Blurb:_makeExpiryParameter()
local expiry = self._protectionObj.expiry
if type(expiry) == 'number' then
return self:_formatDate(expiry)
else
return expiry
end
end
function Blurb:_makeExplanationBlurbParameter()
-- Cover special cases first.
if self._protectionObj.title.namespace == 8 then
-- MediaWiki namespace
return self:_getExpandedMessage('explanation-blurb-nounprotect')
end
-- Get explanation blurb table keys
local action = self._protectionObj.action
local level = self._protectionObj.level
local talkKey = self._protectionObj.title.isTalkPage and 'talk' or 'subject'
-- Find the message in the explanation blurb table and substitute any
-- parameters.
local explanations = self._cfg.explanationBlurbs
local msg
if explanations[action][level] and explanations[action][level][talkKey] then
msg = explanations[action][level][talkKey]
elseif explanations[action][level] and explanations[action][level].default then
msg = explanations[action][level].default
elseif explanations[action].default and explanations[action].default[talkKey] then
msg = explanations[action].default[talkKey]
elseif explanations[action].default and explanations[action].default.default then
msg = explanations[action].default.default
else
error(string.format(
'could not find explanation blurb for action "%s", level "%s" and talk key "%s"',
action,
level,
talkKey
), 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeImageLinkParameter()
local imageLinks = self._cfg.imageLinks
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if imageLinks[action][level] then
msg = imageLinks[action][level]
elseif imageLinks[action].default then
msg = imageLinks[action].default
else
msg = imageLinks.edit.default
end
return self:_substituteParameters(msg)
end
function Blurb:_makeIntroBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-blurb-expiry')
else
return self:_getExpandedMessage('intro-blurb-noexpiry')
end
end
function Blurb:_makeIntroFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('intro-fragment-expiry')
else
return self:_getExpandedMessage('intro-fragment-noexpiry')
end
end
function Blurb:_makePagetypeParameter()
local pagetypes = self._cfg.pagetypes
return pagetypes[self._protectionObj.title.namespace]
or pagetypes.default
or error('no default pagetype defined', 8)
end
function Blurb:_makeProtectionBlurbParameter()
local protectionBlurbs = self._cfg.protectionBlurbs
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionBlurbs[action][level] then
msg = protectionBlurbs[action][level]
elseif protectionBlurbs[action].default then
msg = protectionBlurbs[action].default
elseif protectionBlurbs.edit.default then
msg = protectionBlurbs.edit.default
else
error('no protection blurb defined for protectionBlurbs.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionDateParameter()
local protectionDate = self._protectionObj.protectionDate
if type(protectionDate) == 'number' then
return self:_formatDate(protectionDate)
else
return protectionDate
end
end
function Blurb:_makeProtectionLevelParameter()
local protectionLevels = self._cfg.protectionLevels
local action = self._protectionObj.action
local level = self._protectionObj.level
local msg
if protectionLevels[action][level] then
msg = protectionLevels[action][level]
elseif protectionLevels[action].default then
msg = protectionLevels[action].default
elseif protectionLevels.edit.default then
msg = protectionLevels.edit.default
else
error('no protection level defined for protectionLevels.edit.default', 8)
end
return self:_substituteParameters(msg)
end
function Blurb:_makeProtectionLogParameter()
local pagename = self._protectionObj.title.prefixedText
if self._protectionObj.action == 'autoreview' then
-- We need the pending changes log.
return makeFullUrl(
'Special:Log',
{type = 'stable', page = pagename},
self:_getExpandedMessage('pc-log-display')
)
else
-- We need the protection log.
return makeFullUrl(
'Special:Log',
{type = 'protect', page = pagename},
self:_getExpandedMessage('protection-log-display')
)
end
end
function Blurb:_makeTalkPageParameter()
return string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[self._protectionObj.title.namespace].talk.name,
self._protectionObj.title.text,
self._args.section or 'top',
self:_getExpandedMessage('talk-page-link-display')
)
end
function Blurb:_makeTooltipBlurbParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-blurb-expiry')
else
return self:_getExpandedMessage('tooltip-blurb-noexpiry')
end
end
function Blurb:_makeTooltipFragmentParameter()
if self._protectionObj:isTemporary() then
return self:_getExpandedMessage('tooltip-fragment-expiry')
else
return self:_getExpandedMessage('tooltip-fragment-noexpiry')
end
end
function Blurb:_makeVandalTemplateParameter()
return require('Module:Vandal-m')._main{
self._args.user or self._protectionObj.title.baseText
}
end
-- Public methods --
function Blurb:makeBannerText(key)
-- Validate input.
if not key or not Blurb.bannerTextFields[key] then
error(string.format(
'"%s" is not a valid banner config field',
tostring(key)
), 2)
end
-- Generate the text.
local msg = self._protectionObj.bannerConfig[key]
if type(msg) == 'string' then
return self:_substituteParameters(msg)
elseif type(msg) == 'function' then
msg = msg(self._protectionObj, self._args)
if type(msg) ~= 'string' then
error(string.format(
'bad output from banner config function with key "%s"'
.. ' (expected string, got %s)',
tostring(key),
type(msg)
), 4)
end
return self:_substituteParameters(msg)
end
end
--------------------------------------------------------------------------------
-- BannerTemplate class
--------------------------------------------------------------------------------
local BannerTemplate = {}
BannerTemplate.__index = BannerTemplate
function BannerTemplate.new(protectionObj, cfg)
local obj = {}
obj._cfg = cfg
-- Set the image filename.
local imageFilename = protectionObj.bannerConfig.image
if imageFilename then
obj._imageFilename = imageFilename
else
-- If an image filename isn't specified explicitly in the banner config,
-- generate it from the protection status and the namespace.
local action = protectionObj.action
local level = protectionObj.level
local namespace = protectionObj.title.namespace
local reason = protectionObj.reason
-- Deal with special cases first.
if (
namespace == 10
or namespace == 828
or reason and obj._cfg.indefImageReasons[reason]
)
and action == 'edit'
and level == 'sysop'
and not protectionObj:isTemporary()
then
-- Fully protected modules and templates get the special red "indef"
-- padlock.
obj._imageFilename = obj._cfg.msg['image-filename-indef']
else
-- Deal with regular protection types.
local images = obj._cfg.images
if images[action] then
if images[action][level] then
obj._imageFilename = images[action][level]
elseif images[action].default then
obj._imageFilename = images[action].default
end
end
end
end
return setmetatable(obj, BannerTemplate)
end
function BannerTemplate:renderImage()
local filename = self._imageFilename
or self._cfg.msg['image-filename-default']
or 'Transparent.gif'
return makeFileLink{
file = filename,
size = (self.imageWidth or 20) .. 'px',
alt = self._imageAlt,
link = self._imageLink,
caption = self.imageCaption
}
end
--------------------------------------------------------------------------------
-- Banner class
--------------------------------------------------------------------------------
local Banner = setmetatable({}, BannerTemplate)
Banner.__index = Banner
function Banner.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 40
obj.imageCaption = blurbObj:makeBannerText('alt') -- Large banners use the alt text for the tooltip.
obj._reasonText = blurbObj:makeBannerText('text')
obj._explanationText = blurbObj:makeBannerText('explanation')
obj._page = protectionObj.title.prefixedText -- Only makes a difference in testing.
return setmetatable(obj, Banner)
end
function Banner:__tostring()
-- Renders the banner.
makeMessageBox = makeMessageBox or require('Module:Message box').main
local reasonText = self._reasonText or error('no reason text set', 2)
local explanationText = self._explanationText
local mbargs = {
page = self._page,
type = 'protection',
image = self:renderImage(),
text = string.format(
"'''%s'''%s",
reasonText,
explanationText and '<br />' .. explanationText or ''
)
}
return makeMessageBox('mbox', mbargs)
end
--------------------------------------------------------------------------------
-- Padlock class
--------------------------------------------------------------------------------
local Padlock = setmetatable({}, BannerTemplate)
Padlock.__index = Padlock
function Padlock.new(protectionObj, blurbObj, cfg)
local obj = BannerTemplate.new(protectionObj, cfg) -- This doesn't need the blurb.
obj.imageWidth = 20
obj.imageCaption = blurbObj:makeBannerText('tooltip')
obj._imageAlt = blurbObj:makeBannerText('alt')
obj._imageLink = blurbObj:makeBannerText('link')
obj._indicatorName = cfg.padlockIndicatorNames[protectionObj.action]
or cfg.padlockIndicatorNames.default
or 'pp-default'
return setmetatable(obj, Padlock)
end
function Padlock:__tostring()
local frame = mw.getCurrentFrame()
-- The nowiki tag helps prevent whitespace at the top of articles.
return frame:extensionTag{name = 'nowiki'} .. frame:extensionTag{
name = 'indicator',
args = {name = self._indicatorName},
content = self:renderImage()
}
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p = {}
function p._exportClasses()
-- This is used for testing purposes.
return {
Protection = Protection,
Blurb = Blurb,
BannerTemplate = BannerTemplate,
Banner = Banner,
Padlock = Padlock,
}
end
function p._main(args, cfg, title)
args = args or {}
cfg = cfg or require(CONFIG_MODULE)
local protectionObj = Protection.new(args, cfg, title)
local ret = {}
-- If a page's edit protection is equally or more restrictive than its
-- protection from some other action, then don't bother displaying anything
-- for the other action (except categories).
if protectionObj.action == 'edit' or
args.demolevel or
not getReachableNodes(
cfg.hierarchy,
protectionObj.level
)[effectiveProtectionLevel('edit', protectionObj.title)]
then
-- Initialise the blurb object
local blurbObj = Blurb.new(protectionObj, args, cfg)
-- Render the banner
if protectionObj:isProtected() then
ret[#ret + 1] = tostring(
(yesno(args.small) and Padlock or Banner)
.new(protectionObj, blurbObj, cfg)
)
end
end
-- Render the categories
if yesno(args.category) ~= false then
ret[#ret + 1] = protectionObj:makeCategoryLinks()
end
return table.concat(ret)
end
function p.main(frame, cfg)
cfg = cfg or require(CONFIG_MODULE)
-- Find default args, if any.
local parent = frame.getParent and frame:getParent()
local defaultArgs = parent and cfg.wrappers[parent:getTitle():gsub('/sandbox$', '')]
-- Find user args, and use the parent frame if we are being called from a
-- wrapper template.
getArgs = getArgs or require('Module:Arguments').getArgs
local userArgs = getArgs(frame, {
parentOnly = defaultArgs,
frameOnly = not defaultArgs
})
-- Build the args table. User-specified args overwrite default args.
local args = {}
for k, v in pairs(defaultArgs or {}) do
args[k] = v
end
for k, v in pairs(userArgs) do
args[k] = v
end
return p._main(args, cfg)
end
return p
ice162y8kua930ie41kredxjaxhzy3y
मोड्युल:Protection banner/config
828
87
177
2018-01-27T02:46:16Z
wikipedia:en>BrownHairedGirl
0
protectionCategories = { ['all|all|all|all|all'] = 'Wikipedia fully protected pages', // per [[Wikipedia:Categories_for_discussion/Log/2018_January_5#Category:Wikipedia_protected_pages]]
Scribunto
text/plain
-- This module provides configuration data for [[Module:Protection banner]].
return {
--------------------------------------------------------------------------------
--
-- BANNER DATA
--
--------------------------------------------------------------------------------
--[[
-- Banner data consists of six fields:
-- * text - the main protection text that appears at the top of protection
-- banners.
-- * explanation - the text that appears below the main protection text, used
-- to explain the details of the protection.
-- * tooltip - the tooltip text you see when you move the mouse over a small
-- padlock icon.
-- * link - the page that the small padlock icon links to.
-- * alt - the alt text for the small padlock icon. This is also used as tooltip
-- text for the large protection banners.
-- * image - the padlock image used in both protection banners and small padlock
-- icons.
--
-- The module checks in three separate tables to find a value for each field.
-- First it checks the banners table, which has values specific to the reason
-- for the page being protected. Then the module checks the defaultBanners
-- table, which has values specific to each protection level. Finally, the
-- module checks the masterBanner table, which holds data for protection
-- templates to use if no data has been found in the previous two tables.
--
-- The values in the banner data can take parameters. These are specified
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
-- enclosed in curly braces).
--
-- Available parameters:
--
-- ${CURRENTVERSION} - a link to the page history or the move log, with the
-- display message "current-version-edit-display" or
-- "current-version-move-display".
--
-- ${EDITREQUEST} - a link to create an edit request for the current page.
--
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes
-- on the talk page; you may submit a request to ask an administrator to make
-- an edit if it is minor or supported by consensus."
--
-- ${IMAGELINK} - a link to set the image to, depending on the protection
-- action and protection level.
--
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY."
--
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation
-- so that it can be used in run-on sentences.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
-- Defined in the cfg.pagetypes table.
--
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.
-- "Editing of this page by new or unregistered users is currently disabled"
--
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the
-- template.
--
-- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or
-- "semi-protected".
--
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links
-- straight to that talk page section.
--
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to
-- create a blurb like "This template is semi-protected", or "This article is
-- move-protected until DD Month YYYY".
--
-- ${VANDAL} - links for the specified username (or the root page name)
-- using Module:Vandal-m.
--
-- Functions
--
-- For advanced users, it is possible to use Lua functions instead of strings
-- in the banner config tables. Using functions gives flexibility that is not
-- possible just by using parameters. Functions take two arguments, the
-- protection object and the template arguments, and they must output a string.
--
-- For example:
--
-- text = function (protectionObj, args)
-- if protectionObj.level == 'autoconfirmed' then
-- return 'foo'
-- else
-- return 'bar'
-- end
-- end
--
-- Some protection object properties and methods that may be useful:
-- protectionObj.action - the protection action
-- protectionObj.level - the protection level
-- protectionObj.reason - the protection reason
-- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set
-- to indefinite, and the protection time in unix time if temporary.
-- protectionObj.protectionDate - the protection date in unix time, or nil if
-- unspecified.
-- protectionObj.bannerConfig - the banner config found by the module. Beware
-- of editing the config field used by the function, as it could create an
-- infinite loop.
-- protectionObj:isProtected - returns a boolean showing whether the page is
-- protected.
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is
-- temporary.
-- protectionObj:isIncorrect - returns a boolean showing whether the protection
-- template is incorrect.
--]]
-- The master banner data, used if no values have been found in banners or
-- defaultBanners.
masterBanner = {
text = '${INTROBLURB}',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
},
-- The default banner data. This holds banner data for different protection
-- levels.
-- *required* - this table needs edit, move, autoreview and upload subtables.
defaultBanners = {
edit = {},
move = {},
autoreview = {
autoconfirmed = {
alt = 'Page protected with pending changes level 1',
tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',
image = 'Padlock-silver-light.svg'
},
default = {
alt = 'Page protected with pending changes level 2',
tooltip = 'All edits by users who are not reviewers or administrators are'
.. ' subject to review prior to becoming visible to unregistered users',
image = 'Padlock-orange.svg'
}
},
upload = {}
},
-- The banner data. This holds banner data for different protection reasons.
-- In fact, the reasons specified in this table control which reasons are
-- valid inputs to the first positional parameter.
--
-- There is also a non-standard "description" field that can be used for items
-- in this table. This is a description of the protection reason for use in the
-- module documentation.
--
-- *required* - this table needs edit, move, autoreview and upload subtables.
banners = {
edit = {
blp = {
description = 'For pages protected to promote compliance with the'
.. ' [[Wikipedia:Biographies of living persons'
.. '|biographies of living persons]] policy',
text = '${INTROFRAGMENT} to promote compliance with'
.. ' [[Wikipedia:Biographies of living persons'
.. "|Wikipedia's policy on the biographies"
.. ' of living people]].',
tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'
.. ' biographies of living people',
},
dmca = {
description = 'For pages protected by the Wikimedia Foundation'
.. ' due to [[Digital Millennium Copyright Act]] takedown requests',
explanation = function (protectionObj, args)
local ret = 'Pursuant to a rights owner notice under the Digital'
.. ' Millennium Copyright Act (DMCA) regarding some content'
.. ' in this article, the Wikimedia Foundation acted under'
.. ' applicable law and took down and restricted the content'
.. ' in question.'
if args.notice then
ret = ret .. ' A copy of the received notice can be found here: '
.. args.notice .. '.'
end
ret = ret .. ' For more information, including websites discussing'
.. ' how to file a counter-notice, please see'
.. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}."
.. "'''Do not remove this template from the article until the"
.. " restrictions are withdrawn'''."
return ret
end,
image = 'Padlock-black.svg',
},
dispute = {
description = 'For pages protected due to editing disputes',
text = function (protectionObj, args)
-- Find the value of "disputes".
local display = 'disputes'
local disputes
if args.section then
disputes = string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
args.section,
display
)
else
disputes = display
end
-- Make the blurb, depending on the expiry.
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROFRAGMENT} or until editing %s have been resolved.'
else
msg = '${INTROFRAGMENT} until editing %s have been resolved.'
end
return string.format(msg, disputes)
end,
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',
},
ecp = {
description = 'For articles in topic areas authorized by'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'
.. ' meets the criteria for community use',
tooltip = 'This ${PAGETYPE} is extended-confirmed protected',
alt = 'Extended-protected ${PAGETYPE}',
},
mainpage = {
description = 'For pages protected for being displayed on the [[Main Page]]',
text = 'This file is currently'
.. ' [[Wikipedia:This page is protected|protected]] from'
.. ' editing because it is currently or will soon be displayed'
.. ' on the [[Main Page]].',
explanation = 'Images on the Main Page are protected due to their high'
.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'
.. '<br /><span style="font-size:90%;">'
.. "'''Administrators:''' Once this image is definitely off the Main Page,"
.. ' please unprotect this file, or reduce to semi-protection,'
.. ' as appropriate.</span>',
},
office = {
description = 'For pages protected by the Wikimedia Foundation',
text = function (protectionObj, args)
local ret = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.'
if protectionObj.protectionDate then
ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'
end
return ret
end,
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"
.. " page unless you are authorized by the Wikimedia Foundation to do"
.. " so.'''",
image = 'Padlock-black.svg',
},
reset = {
description = 'For pages protected by the Wikimedia Foundation and'
.. ' "reset" to a bare-bones version',
text = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.protectionDate then
ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'
else
ret = ret .. 'This ${PAGETYPE} has been'
end
ret = ret .. ' reduced to a'
.. ' simplified, "bare bones" version so that it may be completely'
.. ' rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'
.. ' Standard Wikipedia policies will apply to its rewriting—which'
.. ' will eventually be open to all editors—and will be strictly'
.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'
.. ' it is being rebuilt.\n\n'
.. 'Any insertion of material directly from'
.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'
.. ' will any material added to the ${PAGETYPE} that is not properly'
.. ' sourced. The associated talk page(s) were also cleared on the'
.. " same date.\n\n"
.. "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not override"
.. " this action, and do not remove protection from this page,"
.. " unless you are authorized by the Wikimedia Foundation"
.. " to do so. No editor may remove this notice.'''"
return ret
end,
image = 'Padlock-black.svg',
},
sock = {
description = 'For pages protected due to'
.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'
.. ' [[Wikipedia:Blocking policy|blocked]] or'
.. ' [[Wikipedia:Banning policy|banned users]]'
.. ' from editing it.',
tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'
.. ' editing it',
},
template = {
description = 'For [[Wikipedia:High-risk templates|high-risk]]'
.. ' templates and Lua modules',
text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'
.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',
explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] or'
.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'
.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by'
.. ' [[Wikipedia:Consensus|consensus]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'
.. ' to prevent vandalism',
alt = 'Permanently protected ${PAGETYPE}',
},
usertalk = {
description = 'For pages protected against disruptive edits by a'
.. ' particular user',
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'
.. ' such as abusing the'
.. ' {{[[Template:unblock|unblock]]}} template.',
explanation = 'If you cannot edit this user talk page and you need to'
.. ' make a change or leave a message, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for edits to a protected page'
.. '|request an edit]],'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]],'
.. ' [[Special:Userlogin|log in]],'
.. ' or [[Special:UserLogin/signup|create an account]].',
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism|vandalism]]',
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.level == 'sysop' then
ret = ret .. "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. '
end
return ret .. '${EXPLANATIONBLURB}'
end,
tooltip = '${TOOLTIPFRAGMENT} due to vandalism',
}
},
move = {
dispute = {
description = 'For pages protected against page moves due to'
.. ' disputes over the page title',
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
image = 'Padlock-olive.svg'
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism#Page-move vandalism'
.. ' |page-move vandalism]]'
}
},
autoreview = {},
upload = {}
},
--------------------------------------------------------------------------------
--
-- GENERAL DATA TABLES
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Protection blurbs
--------------------------------------------------------------------------------
-- This table produces the protection blurbs available with the
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and
-- protection level, and is checked by the module in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionBlurbs = {
edit = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|'
.. 'protected]] from editing',
autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'
.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'
.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',
extendedconfirmed = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} as a result of'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] enforcement or meets the'
.. ' [[Wikipedia:Protection policy#extended|criteria for community use]]',
},
move = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]]'
},
autoreview = {
autoconfirmed = 'All edits made to this ${PAGETYPE} by'
.. ' [[Wikipedia:User access levels#New users|new]] or'
.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
.. ' users are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]',
default = 'All edits made to this ${PAGETYPE} by users who are not'
.. ' [[Wikipedia:Reviewing|reviewers]] or'
.. ' [[Wikipedia:Administrators|administrators]] are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]'
},
upload = {
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'
}
},
--------------------------------------------------------------------------------
-- Explanation blurbs
--------------------------------------------------------------------------------
-- This table produces the explanation blurbs available with the
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,
-- protection level, and whether the page is a talk page or not. If the page is
-- a talk page it will have a talk key of "talk"; otherwise it will have a talk
-- key of "subject". The table is checked in the following order:
-- 1. page's protection action, page's protection level, page's talk key
-- 2. page's protection action, page's protection level, default talk key
-- 3. page's protection action, default protection level, page's talk key
-- 4. page's protection action, default protection level, default talk key
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
explanationBlurbs = {
edit = {
autoconfirmed = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
},
extendedconfirmed = {
default = 'Extended confirmed protection prevents edits from all IP editors'
.. ' and registered users with fewer than 30 days tenure and 500 edits.'
.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'
.. ' specifies that extended confirmed protection can be applied to combat'
.. ' disruption, given that semi-protection has proven to be ineffective.'
.. ' Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask for unconversial changes supported by'
.. ' [[Wikipedia:Consensus|consensus]].'
},
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]]. You may also [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|request]] that this page be unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' You may [[Wikipedia:Requests for page'
.. ' protection#Current requests for edits to a protected page|request an'
.. ' edit]] to this page, or [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|ask]] for it to be unprotected.'
}
},
move = {
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves at'
.. ' [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.'
}
},
autoreview = {
default = {
reviewer = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} will not be visible to readers'
.. ' until they are accepted by a reviewer or an administrator.'
.. ' To avoid the need for your edits to be reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]]. Experienced editors may also'
.. ' request the [[Wikipedia:Reviewing|reviewer user right]].',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} by new and unregistered users'
.. ' will not be visible to readers until they are accepted by'
.. ' a reviewer. To avoid the need for your edits to be'
.. ' reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].'
},
},
upload = {
default = {
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but new versions of the file'
.. ' cannot be uploaded until it is unprotected. You can'
.. ' request that a new version be uploaded by using a'
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'
.. ' can [[Wikipedia:Requests for page protection|request]]'
.. ' that the file be unprotected.'
}
}
},
--------------------------------------------------------------------------------
-- Protection levels
--------------------------------------------------------------------------------
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- produces a short label for different protection levels. It is sorted by
-- protection action and protection level, and is checked in the following
-- order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionLevels = {
edit = {
default = 'protected',
templateeditor = 'template-protected',
extendedconfirmed = 'extended-protected',
autoconfirmed = 'semi-protected',
},
move = {
default = 'move-protected'
},
autoreview = {
},
upload = {
default = 'upload-protected'
}
},
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- This table lists different padlock images for each protection action and
-- protection level. It is used if an image is not specified in any of the
-- banner data tables, and if the page does not satisfy the conditions for using
-- the ['image-filename-indef'] image. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
images = {
edit = {
default = 'Padlock.svg',
templateeditor = 'Padlock-pink.svg',
extendedconfirmed = 'Padlock-blue.svg',
autoconfirmed = 'Padlock-silver.svg'
},
move = {
default = 'Padlock-olive.svg',
},
autoreview = {
autoconfirmed = 'Padlock-silver-light.svg',
default = 'Padlock-orange.svg'
},
upload = {
default = 'Padlock-purple.svg'
}
},
-- Pages with a reason specified in this table will show the special "indef"
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.
indefImageReasons = {
template = true
},
--------------------------------------------------------------------------------
-- Image links
--------------------------------------------------------------------------------
-- This table provides the data for the ${IMAGELINK} parameter, which gets
-- the image link for small padlock icons based on the page's protection action
-- and protection level. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
imageLinks = {
edit = {
default = 'Wikipedia:Protection policy#full',
templateeditor = 'Wikipedia:Protection policy#template',
extendedconfirmed = 'Wikipedia:Protection policy#extended',
autoconfirmed = 'Wikipedia:Protection policy#semi'
},
move = {
default = 'Wikipedia:Protection policy#move'
},
autoreview = {
autoconfirmed = 'Wikipedia:Protection policy#pc1',
reviewer = 'Wikipedia:Protection policy#pc2'
},
upload = {
default = 'Wikipedia:Protection policy#upload'
}
},
--------------------------------------------------------------------------------
-- Padlock indicator names
--------------------------------------------------------------------------------
-- This table provides the "name" attribute for the <indicator> extension tag
-- with which small padlock icons are generated. All indicator tags on a page
-- are displayed in alphabetical order based on this attribute, and with
-- indicator tags with duplicate names, the last tag on the page wins.
-- The attribute is chosen based on the protection action; table keys must be a
-- protection action name or the string "default".
padlockIndicatorNames = {
autoreview = 'pp-autoreview',
default = 'pp-default'
},
--------------------------------------------------------------------------------
-- Protection categories
--------------------------------------------------------------------------------
--[[
-- The protection categories are stored in the protectionCategories table.
-- Keys to this table are made up of the following strings:
--
-- 1. the expiry date
-- 2. the namespace
-- 3. the protection reason (e.g. "dispute" or "vandalism")
-- 4. the protection level (e.g. "sysop" or "autoconfirmed")
-- 5. the action (e.g. "edit" or "move")
--
-- When the module looks up a category in the table, first it will will check to
-- see a key exists that corresponds to all five parameters. For example, a
-- user page semi-protected from vandalism for two weeks would have the key
-- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module
-- changes the first part of the key to "all" and checks the table again. It
-- keeps checking increasingly generic key combinations until it finds the
-- field, or until it reaches the key "all-all-all-all-all".
--
-- The module uses a binary matrix to determine the order in which to search.
-- This is best demonstrated by a table. In this table, the "0" values
-- represent "all", and the "1" values represent the original data (e.g.
-- "indef" or "file" or "vandalism").
--
-- expiry namespace reason level action
-- order
-- 1 1 1 1 1 1
-- 2 0 1 1 1 1
-- 3 1 0 1 1 1
-- 4 0 0 1 1 1
-- 5 1 1 0 1 1
-- 6 0 1 0 1 1
-- 7 1 0 0 1 1
-- 8 0 0 0 1 1
-- 9 1 1 1 0 1
-- 10 0 1 1 0 1
-- 11 1 0 1 0 1
-- 12 0 0 1 0 1
-- 13 1 1 0 0 1
-- 14 0 1 0 0 1
-- 15 1 0 0 0 1
-- 16 0 0 0 0 1
-- 17 1 1 1 1 0
-- 18 0 1 1 1 0
-- 19 1 0 1 1 0
-- 20 0 0 1 1 0
-- 21 1 1 0 1 0
-- 22 0 1 0 1 0
-- 23 1 0 0 1 0
-- 24 0 0 0 1 0
-- 25 1 1 1 0 0
-- 26 0 1 1 0 0
-- 27 1 0 1 0 0
-- 28 0 0 1 0 0
-- 29 1 1 0 0 0
-- 30 0 1 0 0 0
-- 31 1 0 0 0 0
-- 32 0 0 0 0 0
--
-- In this scheme the action has the highest priority, as it is the last
-- to change, and the expiry has the least priority, as it changes the most.
-- The priorities of the expiry, the protection level and the action are
-- fixed, but the priorities of the reason and the namespace can be swapped
-- through the use of the cfg.bannerDataNamespaceHasPriority table.
--]]
-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
reasonsWithNamespacePriority = {
vandalism = true,
},
-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
categoryNamespaceKeys = {
[ 2] = 'user',
[ 3] = 'user',
[ 4] = 'project',
[ 6] = 'file',
[ 8] = 'mediawiki',
[ 10] = 'template',
[ 12] = 'project',
[ 14] = 'category',
[100] = 'portal',
[828] = 'module',
},
protectionCategories = {
['all|all|all|all|all'] = 'Wikipedia fully protected pages',
['all|all|office|all|all'] = 'Wikipedia Office-protected pages',
['all|all|reset|all|all'] = 'Wikipedia Office-protected pages',
['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages',
['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files',
['all|all|all|extendedconfirmed|all'] = 'Wikipedia pages under 30-500 editing restriction',
['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia pages under 30-500 editing restriction',
['all|template|all|all|edit'] = 'Wikipedia fully-protected templates',
['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages',
['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages',
['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people',
['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people',
['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute',
['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users',
['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',
['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories',
['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files',
['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals',
['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages',
['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages',
['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates',
['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages',
['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',
['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people',
['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people',
['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute',
['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users',
['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism',
['all|category|all|sysop|edit'] = 'Wikipedia protected categories',
['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files',
['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages',
['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages',
['all|template|all|sysop|edit'] = 'Wikipedia fully-protected templates',
['all|user|all|sysop|edit'] = 'Wikipedia protected user and user talk pages',
['all|module|all|all|edit'] = 'Wikipedia fully-protected modules',
['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules',
['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules',
['all|all|all|sysop|move'] = 'Wikipedia move-protected pages',
['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages',
['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute',
['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages',
['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages',
['all|template|all|sysop|move'] = 'Wikipedia move-protected templates',
['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages',
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',
['all|all|all|reviewer|autoreview'] = 'Wikipedia pending changes protected pages (level 2)',
['all|file|all|all|upload'] = 'Wikipedia upload-protected files',
},
--------------------------------------------------------------------------------
-- Expiry category config
--------------------------------------------------------------------------------
-- This table configures the expiry category behaviour for each protection
-- action.
-- * If set to true, setting that action will always categorise the page if
-- an expiry parameter is not set.
-- * If set to false, setting that action will never categorise the page.
-- * If set to nil, the module will categorise the page if:
-- 1) an expiry parameter is not set, and
-- 2) a reason is provided, and
-- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck
-- table.
expiryCheckActions = {
edit = nil,
move = false,
autoreview = true,
upload = false
},
reasonsWithoutExpiryCheck = {
blp = true,
template = true,
},
--------------------------------------------------------------------------------
-- Pagetypes
--------------------------------------------------------------------------------
-- This table produces the page types available with the ${PAGETYPE} parameter.
-- Keys are namespace numbers, or the string "default" for the default value.
pagetypes = {
[0] = 'article',
[6] = 'file',
[10] = 'template',
[14] = 'category',
[828] = 'module',
default = 'page'
},
--------------------------------------------------------------------------------
-- Strings marking indefinite protection
--------------------------------------------------------------------------------
-- This table contains values passed to the expiry parameter that mean the page
-- is protected indefinitely.
indefStrings = {
['indef'] = true,
['indefinite'] = true,
['indefinitely'] = true,
['infinite'] = true,
},
--------------------------------------------------------------------------------
-- Group hierarchy
--------------------------------------------------------------------------------
-- This table maps each group to all groups that have a superset of the original
-- group's page editing permissions.
hierarchy = {
sysop = {},
reviewer = {'sysop'},
filemover = {'sysop'},
templateeditor = {'sysop'},
extendedconfirmed = {'sysop'},
autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},
user = {'autoconfirmed'},
['*'] = {'user'}
},
--------------------------------------------------------------------------------
-- Wrapper templates and their default arguments
--------------------------------------------------------------------------------
-- This table contains wrapper templates used with the module, and their
-- default arguments. Templates specified in this table should contain the
-- following invocation, and no other template content:
--
-- {{#invoke:Protection banner|main}}
--
-- If other content is desired, it can be added between
-- <noinclude>...</noinclude> tags.
--
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. However, users can override any of the
-- arguments.
wrappers = {
['Template:Pp'] = {},
['Template:Pp-30-500'] = {'ecp'},
['Template:Pp-blp'] = {'blp'},
-- we don't need Template:Pp-create
['Template:Pp-dispute'] = {'dispute'},
['Template:Pp-main-page'] = {'mainpage'},
['Template:Pp-move'] = {action = 'move'},
['Template:Pp-move-dispute'] = {'dispute', action = 'move'},
-- we don't need Template:Pp-move-indef
['Template:Pp-move-vandalism'] = {'vandalism', action = 'move'},
['Template:Pp-office'] = {'office'},
['Template:Pp-office-dmca'] = {'dmca'},
['Template:Pp-pc1'] = {action = 'autoreview', small = true},
['Template:Pp-pc2'] = {action = 'autoreview', small = true},
['Template:Pp-reset'] = {'reset'},
['Template:Pp-semi-indef'] = {small = true},
['Template:Pp-sock'] = {'sock'},
['Template:Pp-template'] = {'template', small = true},
['Template:Pp-upload'] = {action = 'upload'},
['Template:Pp-usertalk'] = {'usertalk'},
['Template:Pp-vandalism'] = {'vandalism'},
},
--------------------------------------------------------------------------------
--
-- MESSAGES
--
--------------------------------------------------------------------------------
msg = {
--------------------------------------------------------------------------------
-- Intro blurb and intro fragment
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${INTROBLURB} and
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use
-- intro-blurb-noexpiry or intro-fragment-noexpiry.
-- It is possible to use banner parameters in these messages.
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',
--------------------------------------------------------------------------------
-- Tooltip blurb
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.
-- If the protection is temporary the tooltip-blurb-expiry message is used, and
-- if not the tooltip-blurb-noexpiry message is used.
-- It is possible to use banner parameters in these messages.
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',
--------------------------------------------------------------------------------
-- Special explanation blurb
--------------------------------------------------------------------------------
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages
-- in the MediaWiki namespace.
-- It is possible to use banner parameters in this message.
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]].',
--------------------------------------------------------------------------------
-- Protection log display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the protection log link
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.
-- It is possible to use banner parameters in these messages.
['protection-log-display'] = 'protection log',
['pc-log-display'] = 'pending changes log',
--------------------------------------------------------------------------------
-- Current version display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the page history link
-- or the move log link produced by the ${CURRENTVERSION} parameter.
-- It is possible to use banner parameters in these messages.
['current-version-move-display'] = 'current title',
['current-version-edit-display'] = 'current version',
--------------------------------------------------------------------------------
-- Talk page
--------------------------------------------------------------------------------
-- This message determines the display value of the talk page link produced
-- with the ${TALKPAGE} parameter.
-- It is possible to use banner parameters in this message.
['talk-page-link-display'] = 'talk page',
--------------------------------------------------------------------------------
-- Edit requests
--------------------------------------------------------------------------------
-- This message determines the display value of the edit request link produced
-- with the ${EDITREQUEST} parameter.
-- It is possible to use banner parameters in this message.
['edit-request-display'] = 'submit an edit request',
--------------------------------------------------------------------------------
-- Expiry date format
--------------------------------------------------------------------------------
-- This is the format for the blurb expiry date. It should be valid input for
-- the first parameter of the #time parser function.
['expiry-date-format'] = 'F j, Y',
--------------------------------------------------------------------------------
-- Tracking categories
--------------------------------------------------------------------------------
-- These messages determine which tracking categories the module outputs.
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- These are images that are not defined by their protection action and protection level.
['image-filename-indef'] = 'Padlock.svg',
['image-filename-default'] = 'Transparent.gif',
--------------------------------------------------------------------------------
-- End messages
--------------------------------------------------------------------------------
}
--------------------------------------------------------------------------------
-- End configuration
--------------------------------------------------------------------------------
}
hhzqd28fj5olzin4eeygno4totrmfh7
178
177
2018-03-01T17:57:25Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Protection_banner/config]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
-- This module provides configuration data for [[Module:Protection banner]].
return {
--------------------------------------------------------------------------------
--
-- BANNER DATA
--
--------------------------------------------------------------------------------
--[[
-- Banner data consists of six fields:
-- * text - the main protection text that appears at the top of protection
-- banners.
-- * explanation - the text that appears below the main protection text, used
-- to explain the details of the protection.
-- * tooltip - the tooltip text you see when you move the mouse over a small
-- padlock icon.
-- * link - the page that the small padlock icon links to.
-- * alt - the alt text for the small padlock icon. This is also used as tooltip
-- text for the large protection banners.
-- * image - the padlock image used in both protection banners and small padlock
-- icons.
--
-- The module checks in three separate tables to find a value for each field.
-- First it checks the banners table, which has values specific to the reason
-- for the page being protected. Then the module checks the defaultBanners
-- table, which has values specific to each protection level. Finally, the
-- module checks the masterBanner table, which holds data for protection
-- templates to use if no data has been found in the previous two tables.
--
-- The values in the banner data can take parameters. These are specified
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name
-- enclosed in curly braces).
--
-- Available parameters:
--
-- ${CURRENTVERSION} - a link to the page history or the move log, with the
-- display message "current-version-edit-display" or
-- "current-version-move-display".
--
-- ${EDITREQUEST} - a link to create an edit request for the current page.
--
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes
-- on the talk page; you may submit a request to ask an administrator to make
-- an edit if it is minor or supported by consensus."
--
-- ${IMAGELINK} - a link to set the image to, depending on the protection
-- action and protection level.
--
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry
-- is set. E.g. "Editing of this page by new or unregistered users is currently
-- disabled until dd Month YYYY."
--
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation
-- so that it can be used in run-on sentences.
--
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".
-- Defined in the cfg.pagetypes table.
--
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.
-- "Editing of this page by new or unregistered users is currently disabled"
--
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the
-- template.
--
-- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or
-- "semi-protected".
--
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,
-- depending on the protection action.
--
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links
-- straight to that talk page section.
--
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to
-- create a blurb like "This template is semi-protected", or "This article is
-- move-protected until DD Month YYYY".
--
-- ${VANDAL} - links for the specified username (or the root page name)
-- using Module:Vandal-m.
--
-- Functions
--
-- For advanced users, it is possible to use Lua functions instead of strings
-- in the banner config tables. Using functions gives flexibility that is not
-- possible just by using parameters. Functions take two arguments, the
-- protection object and the template arguments, and they must output a string.
--
-- For example:
--
-- text = function (protectionObj, args)
-- if protectionObj.level == 'autoconfirmed' then
-- return 'foo'
-- else
-- return 'bar'
-- end
-- end
--
-- Some protection object properties and methods that may be useful:
-- protectionObj.action - the protection action
-- protectionObj.level - the protection level
-- protectionObj.reason - the protection reason
-- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set
-- to indefinite, and the protection time in unix time if temporary.
-- protectionObj.protectionDate - the protection date in unix time, or nil if
-- unspecified.
-- protectionObj.bannerConfig - the banner config found by the module. Beware
-- of editing the config field used by the function, as it could create an
-- infinite loop.
-- protectionObj:isProtected - returns a boolean showing whether the page is
-- protected.
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is
-- temporary.
-- protectionObj:isIncorrect - returns a boolean showing whether the protection
-- template is incorrect.
--]]
-- The master banner data, used if no values have been found in banners or
-- defaultBanners.
masterBanner = {
text = '${INTROBLURB}',
explanation = '${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPBLURB}',
link = '${IMAGELINK}',
alt = 'Page ${PROTECTIONLEVEL}'
},
-- The default banner data. This holds banner data for different protection
-- levels.
-- *required* - this table needs edit, move, autoreview and upload subtables.
defaultBanners = {
edit = {},
move = {},
autoreview = {
autoconfirmed = {
alt = 'Page protected with pending changes level 1',
tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',
image = 'Padlock-silver-light.svg'
},
default = {
alt = 'Page protected with pending changes level 2',
tooltip = 'All edits by users who are not reviewers or administrators are'
.. ' subject to review prior to becoming visible to unregistered users',
image = 'Padlock-orange.svg'
}
},
upload = {}
},
-- The banner data. This holds banner data for different protection reasons.
-- In fact, the reasons specified in this table control which reasons are
-- valid inputs to the first positional parameter.
--
-- There is also a non-standard "description" field that can be used for items
-- in this table. This is a description of the protection reason for use in the
-- module documentation.
--
-- *required* - this table needs edit, move, autoreview and upload subtables.
banners = {
edit = {
blp = {
description = 'For pages protected to promote compliance with the'
.. ' [[Wikipedia:Biographies of living persons'
.. '|biographies of living persons]] policy',
text = '${INTROFRAGMENT} to promote compliance with'
.. ' [[Wikipedia:Biographies of living persons'
.. "|Wikipedia's policy on the biographies"
.. ' of living people]].',
tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'
.. ' biographies of living people',
},
dmca = {
description = 'For pages protected by the Wikimedia Foundation'
.. ' due to [[Digital Millennium Copyright Act]] takedown requests',
explanation = function (protectionObj, args)
local ret = 'Pursuant to a rights owner notice under the Digital'
.. ' Millennium Copyright Act (DMCA) regarding some content'
.. ' in this article, the Wikimedia Foundation acted under'
.. ' applicable law and took down and restricted the content'
.. ' in question.'
if args.notice then
ret = ret .. ' A copy of the received notice can be found here: '
.. args.notice .. '.'
end
ret = ret .. ' For more information, including websites discussing'
.. ' how to file a counter-notice, please see'
.. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}."
.. "'''Do not remove this template from the article until the"
.. " restrictions are withdrawn'''."
return ret
end,
image = 'Padlock-black.svg',
},
dispute = {
description = 'For pages protected due to editing disputes',
text = function (protectionObj, args)
-- Find the value of "disputes".
local display = 'disputes'
local disputes
if args.section then
disputes = string.format(
'[[%s:%s#%s|%s]]',
mw.site.namespaces[protectionObj.title.namespace].talk.name,
protectionObj.title.text,
args.section,
display
)
else
disputes = display
end
-- Make the blurb, depending on the expiry.
local msg
if type(protectionObj.expiry) == 'number' then
msg = '${INTROFRAGMENT} or until editing %s have been resolved.'
else
msg = '${INTROFRAGMENT} until editing %s have been resolved.'
end
return string.format(msg, disputes)
end,
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',
},
ecp = {
description = 'For articles in topic areas authorized by'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'
.. ' meets the criteria for community use',
tooltip = 'This ${PAGETYPE} is extended-confirmed protected',
alt = 'Extended-protected ${PAGETYPE}',
},
mainpage = {
description = 'For pages protected for being displayed on the [[Main Page]]',
text = 'This file is currently'
.. ' [[Wikipedia:This page is protected|protected]] from'
.. ' editing because it is currently or will soon be displayed'
.. ' on the [[Main Page]].',
explanation = 'Images on the Main Page are protected due to their high'
.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'
.. '<br /><span style="font-size:90%;">'
.. "'''Administrators:''' Once this image is definitely off the Main Page,"
.. ' please unprotect this file, or reduce to semi-protection,'
.. ' as appropriate.</span>',
},
office = {
description = 'For pages protected by the Wikimedia Foundation',
text = function (protectionObj, args)
local ret = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.'
if protectionObj.protectionDate then
ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'
end
return ret
end,
explanation = "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"
.. " page unless you are authorized by the Wikimedia Foundation to do"
.. " so.'''",
image = 'Padlock-black.svg',
},
reset = {
description = 'For pages protected by the Wikimedia Foundation and'
.. ' "reset" to a bare-bones version',
text = 'This ${PAGETYPE} is currently under the'
.. ' scrutiny of the'
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'
.. ' and is protected.',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.protectionDate then
ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'
else
ret = ret .. 'This ${PAGETYPE} has been'
end
ret = ret .. ' reduced to a'
.. ' simplified, "bare bones" version so that it may be completely'
.. ' rewritten to ensure it meets the policies of'
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'
.. ' Standard Wikipedia policies will apply to its rewriting—which'
.. ' will eventually be open to all editors—and will be strictly'
.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'
.. ' it is being rebuilt.\n\n'
.. 'Any insertion of material directly from'
.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'
.. ' will any material added to the ${PAGETYPE} that is not properly'
.. ' sourced. The associated talk page(s) were also cleared on the'
.. " same date.\n\n"
.. "If you can edit this page, please discuss all changes and"
.. " additions on the ${TALKPAGE} first. '''Do not override"
.. " this action, and do not remove protection from this page,"
.. " unless you are authorized by the Wikimedia Foundation"
.. " to do so. No editor may remove this notice.'''"
return ret
end,
image = 'Padlock-black.svg',
},
sock = {
description = 'For pages protected due to'
.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'
.. ' [[Wikipedia:Blocking policy|blocked]] or'
.. ' [[Wikipedia:Banning policy|banned users]]'
.. ' from editing it.',
tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'
.. ' editing it',
},
template = {
description = 'For [[Wikipedia:High-risk templates|high-risk]]'
.. ' templates and Lua modules',
text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'
.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',
explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] or'
.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'
.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by'
.. ' [[Wikipedia:Consensus|consensus]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'
.. ' to prevent vandalism',
alt = 'Permanently protected ${PAGETYPE}',
},
usertalk = {
description = 'For pages protected against disruptive edits by a'
.. ' particular user',
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'
.. ' such as abusing the'
.. ' {{[[Template:unblock|unblock]]}} template.',
explanation = 'If you cannot edit this user talk page and you need to'
.. ' make a change or leave a message, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for edits to a protected page'
.. '|request an edit]],'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]],'
.. ' [[Special:Userlogin|log in]],'
.. ' or [[Special:UserLogin/signup|create an account]].',
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism|vandalism]]',
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',
explanation = function (protectionObj, args)
local ret = ''
if protectionObj.level == 'sysop' then
ret = ret .. "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. '
end
return ret .. '${EXPLANATIONBLURB}'
end,
tooltip = '${TOOLTIPFRAGMENT} due to vandalism',
}
},
move = {
dispute = {
description = 'For pages protected against page moves due to'
.. ' disputes over the page title',
explanation = "This protection is '''not''' an endorsement of the"
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',
image = 'Padlock-olive.svg'
},
vandalism = {
description = 'For pages protected against'
.. ' [[Wikipedia:Vandalism#Page-move vandalism'
.. ' |page-move vandalism]]'
}
},
autoreview = {},
upload = {}
},
--------------------------------------------------------------------------------
--
-- GENERAL DATA TABLES
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Protection blurbs
--------------------------------------------------------------------------------
-- This table produces the protection blurbs available with the
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and
-- protection level, and is checked by the module in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionBlurbs = {
edit = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|'
.. 'protected]] from editing',
autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'
.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'
.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',
extendedconfirmed = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} as a result of'
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] enforcement or meets the'
.. ' [[Wikipedia:Protection policy#extended|criteria for community use]]',
},
move = {
default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'
.. ' from [[Help:Moving a page|page moves]]'
},
autoreview = {
autoconfirmed = 'All edits made to this ${PAGETYPE} by'
.. ' [[Wikipedia:User access levels#New users|new]] or'
.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'
.. ' users are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]',
default = 'All edits made to this ${PAGETYPE} by users who are not'
.. ' [[Wikipedia:Reviewing|reviewers]] or'
.. ' [[Wikipedia:Administrators|administrators]] are currently'
.. ' [[Wikipedia:Pending changes|subject to review]]'
},
upload = {
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'
}
},
--------------------------------------------------------------------------------
-- Explanation blurbs
--------------------------------------------------------------------------------
-- This table produces the explanation blurbs available with the
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,
-- protection level, and whether the page is a talk page or not. If the page is
-- a talk page it will have a talk key of "talk"; otherwise it will have a talk
-- key of "subject". The table is checked in the following order:
-- 1. page's protection action, page's protection level, page's talk key
-- 2. page's protection action, page's protection level, default talk key
-- 3. page's protection action, default protection level, page's talk key
-- 4. page's protection action, default protection level, default talk key
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
explanationBlurbs = {
edit = {
autoconfirmed = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].',
},
extendedconfirmed = {
default = 'Extended confirmed protection prevents edits from all IP editors'
.. ' and registered users with fewer than 30 days tenure and 500 edits.'
.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'
.. ' specifies that extended confirmed protection can be applied to combat'
.. ' disruption, given that semi-protection has proven to be ineffective.'
.. ' Please discuss any changes on the ${TALKPAGE}; you may'
.. ' ${EDITREQUEST} to ask for unconversial changes supported by'
.. ' [[Wikipedia:Consensus|consensus]].'
},
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]]. You may also [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|request]] that this page be unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' You may [[Wikipedia:Requests for page'
.. ' protection#Current requests for edits to a protected page|request an'
.. ' edit]] to this page, or [[Wikipedia:Requests for'
.. ' page protection#Current requests for reduction in protection level'
.. '|ask]] for it to be unprotected.'
}
},
move = {
default = {
subject = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves on the'
.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but cannot be moved'
.. ' until unprotected. Please discuss any suggested moves at'
.. ' [[Wikipedia:Requested moves]]. You can also'
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'
.. ' unprotected.'
}
},
autoreview = {
default = {
reviewer = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} will not be visible to readers'
.. ' until they are accepted by a reviewer or an administrator.'
.. ' To avoid the need for your edits to be reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]]. Experienced editors may also'
.. ' request the [[Wikipedia:Reviewing|reviewer user right]].',
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Edits to this ${PAGETYPE} by new and unregistered users'
.. ' will not be visible to readers until they are accepted by'
.. ' a reviewer. To avoid the need for your edits to be'
.. ' reviewed, you may'
.. ' [[Wikipedia:Requests for page protection'
.. '#Current requests for reduction in protection level'
.. '|request unprotection]], [[Special:Userlogin|log in]], or'
.. ' [[Special:UserLogin/signup|create an account]].'
},
},
upload = {
default = {
default = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' The page may still be edited but new versions of the file'
.. ' cannot be uploaded until it is unprotected. You can'
.. ' request that a new version be uploaded by using a'
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'
.. ' can [[Wikipedia:Requests for page protection|request]]'
.. ' that the file be unprotected.'
}
}
},
--------------------------------------------------------------------------------
-- Protection levels
--------------------------------------------------------------------------------
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which
-- produces a short label for different protection levels. It is sorted by
-- protection action and protection level, and is checked in the following
-- order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
protectionLevels = {
edit = {
default = 'protected',
templateeditor = 'template-protected',
extendedconfirmed = 'extended-protected',
autoconfirmed = 'semi-protected',
},
move = {
default = 'move-protected'
},
autoreview = {
},
upload = {
default = 'upload-protected'
}
},
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- This table lists different padlock images for each protection action and
-- protection level. It is used if an image is not specified in any of the
-- banner data tables, and if the page does not satisfy the conditions for using
-- the ['image-filename-indef'] image. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
images = {
edit = {
default = 'Padlock.svg',
templateeditor = 'Padlock-pink.svg',
extendedconfirmed = 'Padlock-blue.svg',
autoconfirmed = 'Padlock-silver.svg'
},
move = {
default = 'Padlock-olive.svg',
},
autoreview = {
autoconfirmed = 'Padlock-silver-light.svg',
default = 'Padlock-orange.svg'
},
upload = {
default = 'Padlock-purple.svg'
}
},
-- Pages with a reason specified in this table will show the special "indef"
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.
indefImageReasons = {
template = true
},
--------------------------------------------------------------------------------
-- Image links
--------------------------------------------------------------------------------
-- This table provides the data for the ${IMAGELINK} parameter, which gets
-- the image link for small padlock icons based on the page's protection action
-- and protection level. It is checked in the following order:
-- 1. page's protection action, page's protection level
-- 2. page's protection action, default protection level
-- 3. "edit" protection action, default protection level
--
-- It is possible to use banner parameters inside this table.
-- *required* - this table needs edit, move, autoreview and upload subtables.
imageLinks = {
edit = {
default = 'Wikipedia:Protection policy#full',
templateeditor = 'Wikipedia:Protection policy#template',
extendedconfirmed = 'Wikipedia:Protection policy#extended',
autoconfirmed = 'Wikipedia:Protection policy#semi'
},
move = {
default = 'Wikipedia:Protection policy#move'
},
autoreview = {
autoconfirmed = 'Wikipedia:Protection policy#pc1',
reviewer = 'Wikipedia:Protection policy#pc2'
},
upload = {
default = 'Wikipedia:Protection policy#upload'
}
},
--------------------------------------------------------------------------------
-- Padlock indicator names
--------------------------------------------------------------------------------
-- This table provides the "name" attribute for the <indicator> extension tag
-- with which small padlock icons are generated. All indicator tags on a page
-- are displayed in alphabetical order based on this attribute, and with
-- indicator tags with duplicate names, the last tag on the page wins.
-- The attribute is chosen based on the protection action; table keys must be a
-- protection action name or the string "default".
padlockIndicatorNames = {
autoreview = 'pp-autoreview',
default = 'pp-default'
},
--------------------------------------------------------------------------------
-- Protection categories
--------------------------------------------------------------------------------
--[[
-- The protection categories are stored in the protectionCategories table.
-- Keys to this table are made up of the following strings:
--
-- 1. the expiry date
-- 2. the namespace
-- 3. the protection reason (e.g. "dispute" or "vandalism")
-- 4. the protection level (e.g. "sysop" or "autoconfirmed")
-- 5. the action (e.g. "edit" or "move")
--
-- When the module looks up a category in the table, first it will will check to
-- see a key exists that corresponds to all five parameters. For example, a
-- user page semi-protected from vandalism for two weeks would have the key
-- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module
-- changes the first part of the key to "all" and checks the table again. It
-- keeps checking increasingly generic key combinations until it finds the
-- field, or until it reaches the key "all-all-all-all-all".
--
-- The module uses a binary matrix to determine the order in which to search.
-- This is best demonstrated by a table. In this table, the "0" values
-- represent "all", and the "1" values represent the original data (e.g.
-- "indef" or "file" or "vandalism").
--
-- expiry namespace reason level action
-- order
-- 1 1 1 1 1 1
-- 2 0 1 1 1 1
-- 3 1 0 1 1 1
-- 4 0 0 1 1 1
-- 5 1 1 0 1 1
-- 6 0 1 0 1 1
-- 7 1 0 0 1 1
-- 8 0 0 0 1 1
-- 9 1 1 1 0 1
-- 10 0 1 1 0 1
-- 11 1 0 1 0 1
-- 12 0 0 1 0 1
-- 13 1 1 0 0 1
-- 14 0 1 0 0 1
-- 15 1 0 0 0 1
-- 16 0 0 0 0 1
-- 17 1 1 1 1 0
-- 18 0 1 1 1 0
-- 19 1 0 1 1 0
-- 20 0 0 1 1 0
-- 21 1 1 0 1 0
-- 22 0 1 0 1 0
-- 23 1 0 0 1 0
-- 24 0 0 0 1 0
-- 25 1 1 1 0 0
-- 26 0 1 1 0 0
-- 27 1 0 1 0 0
-- 28 0 0 1 0 0
-- 29 1 1 0 0 0
-- 30 0 1 0 0 0
-- 31 1 0 0 0 0
-- 32 0 0 0 0 0
--
-- In this scheme the action has the highest priority, as it is the last
-- to change, and the expiry has the least priority, as it changes the most.
-- The priorities of the expiry, the protection level and the action are
-- fixed, but the priorities of the reason and the namespace can be swapped
-- through the use of the cfg.bannerDataNamespaceHasPriority table.
--]]
-- If the reason specified to the template is listed in this table,
-- namespace data will take priority over reason data in the protectionCategories
-- table.
reasonsWithNamespacePriority = {
vandalism = true,
},
-- The string to use as a namespace key for the protectionCategories table for each
-- namespace number.
categoryNamespaceKeys = {
[ 2] = 'user',
[ 3] = 'user',
[ 4] = 'project',
[ 6] = 'file',
[ 8] = 'mediawiki',
[ 10] = 'template',
[ 12] = 'project',
[ 14] = 'category',
[100] = 'portal',
[828] = 'module',
},
protectionCategories = {
['all|all|all|all|all'] = 'Wikipedia fully protected pages',
['all|all|office|all|all'] = 'Wikipedia Office-protected pages',
['all|all|reset|all|all'] = 'Wikipedia Office-protected pages',
['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages',
['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files',
['all|all|all|extendedconfirmed|all'] = 'Wikipedia pages under 30-500 editing restriction',
['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia pages under 30-500 editing restriction',
['all|template|all|all|edit'] = 'Wikipedia fully-protected templates',
['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages',
['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages',
['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people',
['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people',
['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute',
['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users',
['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',
['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories',
['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files',
['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals',
['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages',
['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages',
['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates',
['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages',
['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',
['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people',
['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people',
['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute',
['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users',
['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism',
['all|category|all|sysop|edit'] = 'Wikipedia protected categories',
['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files',
['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages',
['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages',
['all|template|all|sysop|edit'] = 'Wikipedia fully-protected templates',
['all|user|all|sysop|edit'] = 'Wikipedia protected user and user talk pages',
['all|module|all|all|edit'] = 'Wikipedia fully-protected modules',
['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules',
['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules',
['all|all|all|sysop|move'] = 'Wikipedia move-protected pages',
['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages',
['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute',
['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',
['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages',
['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages',
['all|template|all|sysop|move'] = 'Wikipedia move-protected templates',
['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages',
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',
['all|all|all|reviewer|autoreview'] = 'Wikipedia pending changes protected pages (level 2)',
['all|file|all|all|upload'] = 'Wikipedia upload-protected files',
},
--------------------------------------------------------------------------------
-- Expiry category config
--------------------------------------------------------------------------------
-- This table configures the expiry category behaviour for each protection
-- action.
-- * If set to true, setting that action will always categorise the page if
-- an expiry parameter is not set.
-- * If set to false, setting that action will never categorise the page.
-- * If set to nil, the module will categorise the page if:
-- 1) an expiry parameter is not set, and
-- 2) a reason is provided, and
-- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck
-- table.
expiryCheckActions = {
edit = nil,
move = false,
autoreview = true,
upload = false
},
reasonsWithoutExpiryCheck = {
blp = true,
template = true,
},
--------------------------------------------------------------------------------
-- Pagetypes
--------------------------------------------------------------------------------
-- This table produces the page types available with the ${PAGETYPE} parameter.
-- Keys are namespace numbers, or the string "default" for the default value.
pagetypes = {
[0] = 'article',
[6] = 'file',
[10] = 'template',
[14] = 'category',
[828] = 'module',
default = 'page'
},
--------------------------------------------------------------------------------
-- Strings marking indefinite protection
--------------------------------------------------------------------------------
-- This table contains values passed to the expiry parameter that mean the page
-- is protected indefinitely.
indefStrings = {
['indef'] = true,
['indefinite'] = true,
['indefinitely'] = true,
['infinite'] = true,
},
--------------------------------------------------------------------------------
-- Group hierarchy
--------------------------------------------------------------------------------
-- This table maps each group to all groups that have a superset of the original
-- group's page editing permissions.
hierarchy = {
sysop = {},
reviewer = {'sysop'},
filemover = {'sysop'},
templateeditor = {'sysop'},
extendedconfirmed = {'sysop'},
autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},
user = {'autoconfirmed'},
['*'] = {'user'}
},
--------------------------------------------------------------------------------
-- Wrapper templates and their default arguments
--------------------------------------------------------------------------------
-- This table contains wrapper templates used with the module, and their
-- default arguments. Templates specified in this table should contain the
-- following invocation, and no other template content:
--
-- {{#invoke:Protection banner|main}}
--
-- If other content is desired, it can be added between
-- <noinclude>...</noinclude> tags.
--
-- When a user calls one of these wrapper templates, they will use the
-- default arguments automatically. However, users can override any of the
-- arguments.
wrappers = {
['Template:Pp'] = {},
['Template:Pp-30-500'] = {'ecp'},
['Template:Pp-blp'] = {'blp'},
-- we don't need Template:Pp-create
['Template:Pp-dispute'] = {'dispute'},
['Template:Pp-main-page'] = {'mainpage'},
['Template:Pp-move'] = {action = 'move'},
['Template:Pp-move-dispute'] = {'dispute', action = 'move'},
-- we don't need Template:Pp-move-indef
['Template:Pp-move-vandalism'] = {'vandalism', action = 'move'},
['Template:Pp-office'] = {'office'},
['Template:Pp-office-dmca'] = {'dmca'},
['Template:Pp-pc1'] = {action = 'autoreview', small = true},
['Template:Pp-pc2'] = {action = 'autoreview', small = true},
['Template:Pp-reset'] = {'reset'},
['Template:Pp-semi-indef'] = {small = true},
['Template:Pp-sock'] = {'sock'},
['Template:Pp-template'] = {'template', small = true},
['Template:Pp-upload'] = {action = 'upload'},
['Template:Pp-usertalk'] = {'usertalk'},
['Template:Pp-vandalism'] = {'vandalism'},
},
--------------------------------------------------------------------------------
--
-- MESSAGES
--
--------------------------------------------------------------------------------
msg = {
--------------------------------------------------------------------------------
-- Intro blurb and intro fragment
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${INTROBLURB} and
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use
-- intro-blurb-noexpiry or intro-fragment-noexpiry.
-- It is possible to use banner parameters in these messages.
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',
--------------------------------------------------------------------------------
-- Tooltip blurb
--------------------------------------------------------------------------------
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.
-- If the protection is temporary the tooltip-blurb-expiry message is used, and
-- if not the tooltip-blurb-noexpiry message is used.
-- It is possible to use banner parameters in these messages.
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',
--------------------------------------------------------------------------------
-- Special explanation blurb
--------------------------------------------------------------------------------
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages
-- in the MediaWiki namespace.
-- It is possible to use banner parameters in this message.
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'
.. ' Please discuss any changes on the ${TALKPAGE}; you'
.. ' may ${EDITREQUEST} to ask an'
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'
.. '|consensus]].',
--------------------------------------------------------------------------------
-- Protection log display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the protection log link
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.
-- It is possible to use banner parameters in these messages.
['protection-log-display'] = 'protection log',
['pc-log-display'] = 'pending changes log',
--------------------------------------------------------------------------------
-- Current version display values
--------------------------------------------------------------------------------
-- These messages determine the display values for the page history link
-- or the move log link produced by the ${CURRENTVERSION} parameter.
-- It is possible to use banner parameters in these messages.
['current-version-move-display'] = 'current title',
['current-version-edit-display'] = 'current version',
--------------------------------------------------------------------------------
-- Talk page
--------------------------------------------------------------------------------
-- This message determines the display value of the talk page link produced
-- with the ${TALKPAGE} parameter.
-- It is possible to use banner parameters in this message.
['talk-page-link-display'] = 'talk page',
--------------------------------------------------------------------------------
-- Edit requests
--------------------------------------------------------------------------------
-- This message determines the display value of the edit request link produced
-- with the ${EDITREQUEST} parameter.
-- It is possible to use banner parameters in this message.
['edit-request-display'] = 'submit an edit request',
--------------------------------------------------------------------------------
-- Expiry date format
--------------------------------------------------------------------------------
-- This is the format for the blurb expiry date. It should be valid input for
-- the first parameter of the #time parser function.
['expiry-date-format'] = 'F j, Y',
--------------------------------------------------------------------------------
-- Tracking categories
--------------------------------------------------------------------------------
-- These messages determine which tracking categories the module outputs.
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',
--------------------------------------------------------------------------------
-- Images
--------------------------------------------------------------------------------
-- These are images that are not defined by their protection action and protection level.
['image-filename-indef'] = 'Padlock.svg',
['image-filename-default'] = 'Transparent.gif',
--------------------------------------------------------------------------------
-- End messages
--------------------------------------------------------------------------------
}
--------------------------------------------------------------------------------
-- End configuration
--------------------------------------------------------------------------------
}
hhzqd28fj5olzin4eeygno4totrmfh7
मोड्युल:Reply to
828
88
179
2017-07-21T16:31:05Z
wikipedia:en>Ahecht
0
user string.format for better readability, use consistent single vs double quotes, simplify error messages
Scribunto
text/plain
local p = {}
function p.replyto(frame)
local origArgs = frame:getParent().args
local args = {}
local maxArg = 1
local usernames = 0
for k, v in pairs(origArgs) do
if type(k) == 'number' then
if mw.ustring.match(v,'%S') then
if k > maxArg then maxArg = k end
usernames = usernames + 1
local title = mw.title.new(v)
if not title then return '<strong class="error">Error in [[Template:Reply to]]: Input contains forbidden characters.</strong>' end
args[k] = title.rootText
end
elseif v == '' and k:sub(0,5) == 'label' then
args[k] = '​'
else
args[k] = v
end
end
if usernames > (tonumber(frame.args.max) or 50) then
return string.format(
'<strong class="error">Error in [[Template:Reply to]]: More than %s names specified.</strong>',
tostring(frame.args.max or 50)
)
else
if usernames < 1 then
if frame.args.example then args[1] = frame.args.example else return '<strong class="error">Error in [[Template:Reply to]]: Username not given.</strong>' end
end
local isfirst = true
local outStr = ''
for i = 1, maxArg do
if args[i] then
if isfirst then
outStr = string.format(
'<span class="template-ping">%s[[User:%s|%s]]',
args['prefix'] or '@',
args[i],
(args['label1'] or args['label']) or args[i]
)
isfirst = false
else
if ( (usernames > 2) or ((usernames == 2) and (args['c'] == '')) ) then outStr = outStr..',' end
if i == maxArg then outStr = outStr..' '..(args['c'] or 'and') end
outStr = string.format(
'%s [[User:%s|%s]]',
outStr,
args[i],
args['label'..tostring(i)] or args[i]
)
end
end
end
outStr = outStr..(args['p'] or ':')..'</span>'
return outStr
end
end
return p
lts4m4r1odmipvredblq86fbnp9fs6n
180
179
2018-03-01T17:57:26Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:Reply_to]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
local p = {}
function p.replyto(frame)
local origArgs = frame:getParent().args
local args = {}
local maxArg = 1
local usernames = 0
for k, v in pairs(origArgs) do
if type(k) == 'number' then
if mw.ustring.match(v,'%S') then
if k > maxArg then maxArg = k end
usernames = usernames + 1
local title = mw.title.new(v)
if not title then return '<strong class="error">Error in [[Template:Reply to]]: Input contains forbidden characters.</strong>' end
args[k] = title.rootText
end
elseif v == '' and k:sub(0,5) == 'label' then
args[k] = '​'
else
args[k] = v
end
end
if usernames > (tonumber(frame.args.max) or 50) then
return string.format(
'<strong class="error">Error in [[Template:Reply to]]: More than %s names specified.</strong>',
tostring(frame.args.max or 50)
)
else
if usernames < 1 then
if frame.args.example then args[1] = frame.args.example else return '<strong class="error">Error in [[Template:Reply to]]: Username not given.</strong>' end
end
local isfirst = true
local outStr = ''
for i = 1, maxArg do
if args[i] then
if isfirst then
outStr = string.format(
'<span class="template-ping">%s[[User:%s|%s]]',
args['prefix'] or '@',
args[i],
(args['label1'] or args['label']) or args[i]
)
isfirst = false
else
if ( (usernames > 2) or ((usernames == 2) and (args['c'] == '')) ) then outStr = outStr..',' end
if i == maxArg then outStr = outStr..' '..(args['c'] or 'and') end
outStr = string.format(
'%s [[User:%s|%s]]',
outStr,
args[i],
args['label'..tostring(i)] or args[i]
)
end
end
end
outStr = outStr..(args['p'] or ':')..'</span>'
return outStr
end
end
return p
lts4m4r1odmipvredblq86fbnp9fs6n
मोड्युल:TableTools
828
89
181
2014-05-25T14:11:02Z
wikipedia:en>Mr. Stradivarius
0
fix cleanPattern function - some of the character classes were still being magic even when they were inside the set, so escape them all
Scribunto
text/plain
--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
if type(v) == 'number' and tostring(v) == '-nan' then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return s
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i <= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
return p
k1omc17qij757n8hd68yihcqxo4biqi
182
181
2018-03-01T17:57:26Z
Tulsi Bhagat
5
[[:wikipedia:en:Module:TableTools]] सँ १ अवतरण आयात कएल गेल
Scribunto
text/plain
--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
if type(v) == 'number' and tostring(v) == '-nan' then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return s
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i <= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
return p
k1omc17qij757n8hd68yihcqxo4biqi
Translations:सम्पर्क करी/Page display title/ne
1198
90
185
2018-10-01T11:14:57Z
Tulsi Bhagat
5
'सम्पर्क गर्नुहोस्' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
सम्पर्क गर्नुहोस्
dkrlq0rz9lp95nk1w64nrhm5egzn4fx
सम्पर्क करी/ne
0
91
186
2018-10-01T11:14:58Z
Tulsi Bhagat
5
'सम्पर्क गर्नुहोस्' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<languages/>
== सम्पर्क करी ==
<div style="margin-bottom: 1em; padding: .5em 1em; background: #EDFDEA;" class="plainlinks"><center>
{| style="text-align:center;"
|-
|width=25%|[[File:F icon.svg|50px|center]]
|width=25%|[[File:Google plus.svg|50px|center]]
|width=25%|[[File:Twitter logo initial.svg|50px|center]]
|width=25%|[[File:New_Logo_Gmail.svg|50px]]
|-
|[https://www.facebook.com/MaithiliWikimedians/ फेसबुक]
|[https://plus.google.com/118087016847902965545 गुगल प्लस]
|[http://twitter.com/maiwikimedians ट्विटर]
|[mailto:wikimedia-mai@lists.wikimedia.org ई-मेल करी]
|}
</center></div>
8yifeqr9170ed3uik0gojxgk978valg
आकृति:Gallery/en
10
92
188
2019-03-19T03:35:25Z
Biplab Anand
1
'<div style="width:100%"><div class="plainlinks" style="text-align:center; padding:10px; border:1px dotted black;">'''Event organized b...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
<div style="width:100%"><div class="plainlinks" style="text-align:center; padding:10px; border:1px dotted black;">'''Event organized by Maithili Wikimedians</div></div>
<gallery mode="packed-hover" heights="170px">
File:Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day 01 (28).JPG|Maithili Wikipedia- Womens Edit-a-thon 2016 - 08 March International Women's Day.
File:Participants (Girls) Holding Banner During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:Participants In The Conference Hall During 1st Anniversary Of MWUG & Felicitation Program.jpg|Participants during 1st Anniversary Of MWUG & Felicitation Program.
File:WLE 2016 in Nepal Felicitation Program (33).jpg|Wiki Loves Earth 2016 in Nepal Felicitation Program.
File:Wiki Training Session Second 01.JPG|Wiki training session at Rajbiraj.
File:Participant of presentation-Outreach program in Janakpur, Nepal-IMG 6867.jpg|Outreach event at Janakpur.
File:Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.JPG|Maithili Wikimedia Meetup Meetup and Wikipedia 15 Celebration Gathering.
File:Happyland Higher Sec. School-WEP- Group Pic 2.JPG|Group photo at Happyland Higher Secondary School.
File:Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam Nepal 07.jpg|Wiki Loves Earth 2017 in Nepal Outreach Program in Ilam.
File:Wiki Loves earth outreach program group photo of Ilam.jpg|Wiki Loves earth outreach program group photo of Ilam.
File:Kshitiz Edu. Foundation Rajbiraj WEP Outreach.jpg|Group Photo at Kshitiz Educational Foundation.
File:Rajbiraj Model College, WEP 14.JPG|Group photo at Rajbiraj Model College.
</gallery>
0yskr4x6egig0hssq6v1bvzs4ctnctl
आकृति:Wikimedia projects/en
10
93
189
2019-03-19T03:37:15Z
Biplab Anand
1
'{| align="center" cellpadding="2" width="95%" style="background-color:transparent" |- valign="top" | valign="middle" width="16%" | <ce...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
{| align="center" cellpadding="2" width="95%" style="background-color:transparent"
|- valign="top"
| valign="middle" width="16%" | <center>[[File:Wikipedia-logo.svg|110px|link=//mai.wikipedia.org|{{{w|Wikipedia}}}]]</center>
| valign="middle" width="16%" | <center>[[File:Commons-logo.svg|75px|link=//commons.wikimedia.org/wiki/सम्मुख_पन्ना|{{{c|Wikimedia Commons}}}]]</center>
| valign="middle" width="16%" | <center>[[File:Wikimedia Community Logo.svg|90px|link=//meta.wikimedia.org|{{{m|Meta-wiki}}}]]</center>
|-
| valign="middle" bgcolor="#D6FFEB" style="border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 4px; border-left: 1px solid #000; -moz-border-radius: 0 0 0 5px; -webkit-border-radius: 0 0 0 5px;" | <center>[//mai.wikipedia.org {{{w|Wikipedia}}}]</center>
| valign="middle" bgcolor="#D6FFEB" style="padding: 4px; border-top: 1px solid #000; border-bottom: 1px solid #000;" | <center>[//commons.wikimedia.org/wiki/सम्मुख_पन्ना {{{c|Commons}}}]</center>
| valign="middle" bgcolor="#D6FFEB" style="border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 4px; border-right: 1px solid #000; -moz-border-radius: 0 0 5px 0; -webkit-border-radius: 0 0 5px 0;" | <center>[//meta.wikimedia.org {{{m|Meta-wiki}}}]</center>
|}<noinclude>[[श्रेणी:Main page]]</noinclude>
r7a3mt0z0vn9awd2kdxse8a1t1ykjpa
आकृति:MWUG Contacts/en
10
94
190
2019-03-19T03:39:00Z
Biplab Anand
1
'__NOTOC__ <center>'''Social Media'''</center> <span class="plainlinks"><center> File:Wikimedia-logo.svg|50px|link=https://lists.wiki...' संग नव पृष्ठ बनाओल गेल
wikitext
text/x-wiki
__NOTOC__
<center>'''Social Media'''</center>
<span class="plainlinks"><center>
[[File:Wikimedia-logo.svg|50px|link=https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai]] [[File:F icon.svg|50px|link=https://www.facebook.com/MaithiliWikimedians/]] [[File:AIMMP@Twitter.png|50px|link=http://twitter.com/maiwikimedians]] [[File:Google plus.svg|50px|link=https://plus.google.com/100893647989625445430]] [[File:Youtube icon.svg|50px|link=]]
</center></span>
<br>
<center>'''Contact'''</center>
<span class="plainlinks"><center>
* E-mail: maithiliwikimedians{{@}}gmail.com
* Mailing list - Wikimedia-mai{{@}}lists.wikimedia.org ([https://lists.wikimedia.org/mailman/listinfo/wikimedia-mai Become a member])
</center></span>
fir9h2p5vsqpvs9874ek8bpqju3rxc0
प्रयोगकर्ता वार्ता:Biplab Anand
3
95
194
2022-01-04T18:17:49Z
MediaWiki message delivery
11
/* How we will see unregistered users */ नव अनुभाग
wikitext
text/x-wiki
== How we will see unregistered users ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin=content/>
Hi!
You get this message because you are an admin on a Wikimedia wiki.
When someone edits a Wikimedia wiki without being logged in today, we show their IP address. As you may already know, we will not be able to do this in the future. This is a decision by the Wikimedia Foundation Legal department, because norms and regulations for privacy online have changed.
Instead of the IP we will show a masked identity. You as an admin '''will still be able to access the IP'''. There will also be a new user right for those who need to see the full IPs of unregistered users to fight vandalism, harassment and spam without being admins. Patrollers will also see part of the IP even without this user right. We are also working on [[m:IP Editing: Privacy Enhancement and Abuse Mitigation/Improving tools|better tools]] to help.
If you have not seen it before, you can [[m:IP Editing: Privacy Enhancement and Abuse Mitigation|read more on Meta]]. If you want to make sure you don’t miss technical changes on the Wikimedia wikis, you can [[m:Global message delivery/Targets/Tech ambassadors|subscribe]] to [[m:Tech/News|the weekly technical newsletter]].
We have [[m:IP Editing: Privacy Enhancement and Abuse Mitigation#IP Masking Implementation Approaches (FAQ)|two suggested ways]] this identity could work. '''We would appreciate your feedback''' on which way you think would work best for you and your wiki, now and in the future. You can [[m:Talk:IP Editing: Privacy Enhancement and Abuse Mitigation|let us know on the talk page]]. You can write in your language. The suggestions were posted in October and we will decide after 17 January.
Thank you.
/[[m:User:Johan (WMF)|Johan (WMF)]]<section end=content/>
</div>
००:०२, ५ जनवरी २०२२ (+0545)
<!-- https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Target_lists/Admins2022(5)&oldid=22532651 पर मौजूद सूची का प्रयोग कर के User:Johan (WMF)@metawiki द्वारा भेजा गया सन्देश -->
ngr9ucsf1l5vhvxesmzc8sgto3x7dbs
प्रयोगकर्ता वार्ता:फिल्टरक दुरुपयोग
3
96
195
2022-01-04T18:18:49Z
MediaWiki message delivery
11
/* How we will see unregistered users */ नव अनुभाग
wikitext
text/x-wiki
== How we will see unregistered users ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin=content/>
Hi!
You get this message because you are an admin on a Wikimedia wiki.
When someone edits a Wikimedia wiki without being logged in today, we show their IP address. As you may already know, we will not be able to do this in the future. This is a decision by the Wikimedia Foundation Legal department, because norms and regulations for privacy online have changed.
Instead of the IP we will show a masked identity. You as an admin '''will still be able to access the IP'''. There will also be a new user right for those who need to see the full IPs of unregistered users to fight vandalism, harassment and spam without being admins. Patrollers will also see part of the IP even without this user right. We are also working on [[m:IP Editing: Privacy Enhancement and Abuse Mitigation/Improving tools|better tools]] to help.
If you have not seen it before, you can [[m:IP Editing: Privacy Enhancement and Abuse Mitigation|read more on Meta]]. If you want to make sure you don’t miss technical changes on the Wikimedia wikis, you can [[m:Global message delivery/Targets/Tech ambassadors|subscribe]] to [[m:Tech/News|the weekly technical newsletter]].
We have [[m:IP Editing: Privacy Enhancement and Abuse Mitigation#IP Masking Implementation Approaches (FAQ)|two suggested ways]] this identity could work. '''We would appreciate your feedback''' on which way you think would work best for you and your wiki, now and in the future. You can [[m:Talk:IP Editing: Privacy Enhancement and Abuse Mitigation|let us know on the talk page]]. You can write in your language. The suggestions were posted in October and we will decide after 17 January.
Thank you.
/[[m:User:Johan (WMF)|Johan (WMF)]]<section end=content/>
</div>
००:०३, ५ जनवरी २०२२ (+0545)
<!-- https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Target_lists/Admins2022(5)&oldid=22532651 पर मौजूद सूची का प्रयोग कर के User:Johan (WMF)@metawiki द्वारा भेजा गया सन्देश -->
ghyv0bs41kpznpy860yu9c87xrubawm
प्रयोगकर्ता वार्ता:Tulsi Bhagat
3
97
196
2022-01-04T18:18:49Z
MediaWiki message delivery
11
/* How we will see unregistered users */ नव अनुभाग
wikitext
text/x-wiki
== How we will see unregistered users ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin=content/>
Hi!
You get this message because you are an admin on a Wikimedia wiki.
When someone edits a Wikimedia wiki without being logged in today, we show their IP address. As you may already know, we will not be able to do this in the future. This is a decision by the Wikimedia Foundation Legal department, because norms and regulations for privacy online have changed.
Instead of the IP we will show a masked identity. You as an admin '''will still be able to access the IP'''. There will also be a new user right for those who need to see the full IPs of unregistered users to fight vandalism, harassment and spam without being admins. Patrollers will also see part of the IP even without this user right. We are also working on [[m:IP Editing: Privacy Enhancement and Abuse Mitigation/Improving tools|better tools]] to help.
If you have not seen it before, you can [[m:IP Editing: Privacy Enhancement and Abuse Mitigation|read more on Meta]]. If you want to make sure you don’t miss technical changes on the Wikimedia wikis, you can [[m:Global message delivery/Targets/Tech ambassadors|subscribe]] to [[m:Tech/News|the weekly technical newsletter]].
We have [[m:IP Editing: Privacy Enhancement and Abuse Mitigation#IP Masking Implementation Approaches (FAQ)|two suggested ways]] this identity could work. '''We would appreciate your feedback''' on which way you think would work best for you and your wiki, now and in the future. You can [[m:Talk:IP Editing: Privacy Enhancement and Abuse Mitigation|let us know on the talk page]]. You can write in your language. The suggestions were posted in October and we will decide after 17 January.
Thank you.
/[[m:User:Johan (WMF)|Johan (WMF)]]<section end=content/>
</div>
००:०३, ५ जनवरी २०२२ (+0545)
<!-- https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Target_lists/Admins2022(5)&oldid=22532651 पर मौजूद सूची का प्रयोग कर के User:Johan (WMF)@metawiki द्वारा भेजा गया सन्देश -->
ghyv0bs41kpznpy860yu9c87xrubawm