Wikimedia New York City nycwikimedia https://nyc.wikimedia.org/wiki/Home MediaWiki 1.44.0-wmf.5 first-letter Media Special Talk User User talk Wikimedia Wikimedia talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk TimedText TimedText talk Module Module talk Home 0 1 2048 2024 2020-02-13T14:32:26Z Pharos 12 2048 wikitext text/x-wiki {{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}} <div class="topbanner"><div class="name" style="font-weight:500; letter-spacing:1px;">Wikimedia New York City</div> [[File:NYC Top of the Rock Pano banner.jpg|frameless|1800px]] <div style="padding:2em 4em;"> <div class="plainlinks" style="float:right; padding-left:2em; font-size:200%; line-height:2;"> [//en.wikipedia.org/wiki/Wikipedia:Meetup/NYC ⇒ '''Upcoming events'''] [[Membership|⇒ '''Become a member''']] [[Contact|⇒ '''Contact us''']] </div> <p style="font-size:125%; line-height:1.8; text-align:justify;"> '''We are''' the regional Wikimedia chapter serving the New York metropolitan area. We help promote free access to the world's knowledge in support of Wikipedia and the other projects of the Wikimedia Foundation.</p> <p style="font-size:125%; line-height:1.8; text-align:justify;"> Wikimedia NYC is a separate organization from the Wikimedia Foundation and has no editorial control over Wikipedia or any other project hosted by the Foundation. '''[[About|Learn more »]]'''</p> </div> [[Category:Wikimedia NYC]] 6yjolnk8mc7znb7bm3l1pabjb62omqt Template:Header1 10 5 2179 5 2020-09-25T20:49:01Z 1234qwer1234qwer4 2382 /* Usage */add [[Category:Templates]] 2179 wikitext text/x-wiki <h2 id="mp-tfp-h2" style="margin:0; background:#ddcef2; -moz-border-radius: 1em; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding:0.2em 0.4em">{{{1}}}</h2><noinclude> ===Usage=== This template should be used in the format <nowiki>{{Header1|Your text here}}</nowiki>. [[Category:Templates]]</noinclude> 37q0w0seyxnakmfmpdnl6yitpjw1tz4 Template:Header2 10 6 2180 604 2020-09-25T20:49:07Z 1234qwer1234qwer4 2382 /* Usage */add [[Category:Templates]] 2180 wikitext text/x-wiki <h2 id="mp-tfp-h2" style="margin:0; background:#cef2e0; -moz-border-radius: 1em; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:center; color:#000; padding:0.2em 0.4em">{{{1}}}</h2><noinclude> ===Usage=== This template should be used in the format <nowiki>{{Header2|Your text here}}</nowiki>. [[Category:Templates]]</noinclude> 9kcoxyki7yuxmpe7tadwfef72awguu8 Template:Header3 10 7 2181 603 2020-09-25T20:49:12Z 1234qwer1234qwer4 2382 /* Usage */add [[Category:Templates]] 2181 wikitext text/x-wiki <h2 id="mp-tfp-h2" style="margin:0; background:#cedff2; -moz-border-radius: 1em; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:center; color:#000; padding:0.2em 0.4em">{{{1}}}</h2><noinclude> ===Usage=== This template should be used in the format <nowiki>{{Header3|Your text here}}</nowiki>. [[Category:Templates]]</noinclude> icg7ptblfqqrvn95k617ukzurzmw62q Template:Header4 10 8 2182 8 2020-09-25T20:49:27Z 1234qwer1234qwer4 2382 /* Usage */add [[Category:Templates]] 2182 wikitext text/x-wiki <h2 style="margin:0; background:#F2CECE; -moz-border-radius: 1em; font-size:120%; font-weight:bold; border:1px solid #BFA3A3; text-align:left; color:#000; padding:0.2em 0.4em">{{{1}}}</h2> <noinclude> ===Usage=== This template should be used in the format <nowiki>{{Header4|Your text here}}</nowiki>. [[Category:Templates]]</noinclude> kngjv5i7cb5hdiy3t6hd3lcojschc66 Template:Random quote 10 9 2193 599 2020-09-25T20:54:34Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2193 wikitext text/x-wiki <div class="plainlinks" style="margin: 1em auto 1em auto;font-size: {{{font-size|90}}}%;border: {{{border|transparent}}};width: 80%;background: {{{background|transparent}}};"> {{cquote|quotetext={{#switch:{{random number|5}} |0=Imagine a world in which every single person on the planet is given free access to the sum of all human knowledge. That's what we're doing. |1=In vain have you acquired knowledge if you do not impart it to others. |2=If you have knowledge, let others light their candles in it. |3=To furnish the means of acquiring knowledge is... the greatest benefit that can be conferred upon mankind. |4=The advancement and diffusion of knowledge is the only guardian of true liberty. |5=Quote #5 |6=Quote #6 |7=Quote #7 |8=Quote #8 |9=Quote #9 <!-- Add new quotes above this line; see below for speakers of the quotes. --> }}|personquoted={{#switch:{{random number|5}} |0=[[Wikipedia:Jimmy Wales|Jimmy Wales]] |1=''[[Wikipedia:Deuteronomy Rabbah|Deuteronomy Rabbah]]'' |2=[[Wikipedia:Margaret Fuller|Margaret Fuller]] |3=[[Wikipedia:John Quincy Adams|John Quincy Adams]] |4=[[Wikipedia:James Madison|James Madison]] |5=Speaker #5 |6=Speaker #6 |7=Speaker #7 |8=Speaker #8 |9=Speaker #9 <!-- Add the speaker(s) of the quote(s) above this line. --> }}}}</div><noinclude>[[Category:Templates]]</noinclude> cda24yocxsxoedgr8s74uctynyffyd1 Template:Cquote 10 10 2176 598 2020-09-25T20:48:01Z 1234qwer1234qwer4 2382 add [[Category:Templates]] 2176 wikitext text/x-wiki {| align="{{{align|center}}}" style="border-collapse:collapse; border-style:none; background-color:transparent;" class="cquote2" | width="20" valign="top" style="color:#B2B7F2;font-size:{{#switch:{{{size|{{{4|{{{quotewidth|{{{width|20px}}}}}}}}}}}} |10px=20px |30px=60px |40px=80px |50px=100px |60px=120px |#default=40px}};font-family:serif;font-weight:bold;text-align:left;padding:10px 10px;" | “ | valign="top" style="padding:4px 10px;" | {{{quote|{{{1|{{{quotetext|<noinclude>Text of the quote</noinclude>}}}}}}}}} | width="20" valign="bottom" style="color:#B2B7F2;font-size:{{#switch:{{{size|{{{4|{{{quotewidth|{{{width|20px}}}}}}}}}}}} |10px=20px |30px=60px |40px=80px |50px=100px |60px=120px |#default=40px}};font-family:serif;font-weight:bold;text-align:right;padding:10px 10px;" | ” |- {{#if:{{{2|{{{personquoted|}}}}}}{{{3|{{{quotesource|}}}}}}| {{!}} &nbsp; {{!}} valign="top" {{!}}{{#if:{{{2|{{{personquoted|<noinclude>Origin</noinclude>}}}}}}|<div style="line-height:1em;text-align: right"><cite style="font-style:normal;">&mdash; {{{person|{{{2|{{{personquoted|}}}}}}}}}{{#if:{{{3|{{{quotesource|<noinclude>Source</noinclude>}}}}}}|, {{{3|{{{quotesource|}}}}}}}}</cite></div>}}}} |}<noinclude>Provides a centered, borderless quotation, with scalable, non-clickable graphic quotation marks, and optional attribution of the source of the quote. Can be used with or without the names of the parameters. === Usage === * <code><nowiki>{{cquote2|quotetext=text of the quote|personquoted=person quoted|quotesource=source of quote|quotewidth=##px|quoteheight=##px}}</nowiki></code> * <code><nowiki>{{cquote2|text of quote|person quoted|source of quote|##px|##px}}</nowiki></code> * Only the first parameter is required. [[Category:Templates]]</noinclude> eg1i9wdj9hyiqgglm79mhtsm3njxkkm Template:Random number/doc 10 11 2192 565 2020-09-25T20:53:24Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2192 wikitext text/x-wiki This template generates a [[pseudo-random]] integer between 0 and ''count''-1. ; Usage<nowiki>:</nowiki> * <tt><nowiki>{{</nowiki>Rand<nowiki>|</nowiki></tt>''count''<tt><nowiki>|</nowiki></tt>''seed''<tt><nowiki>|</nowiki></tt>''prime''<tt><nowiki>}}</nowiki></tt> * All parameters are optional and have default values. They must be integers. * The default ''count'' is 100 (so by default, this template generates values between 0 and 99) and must be non-zero. * The default ''seed'' is <nowiki>{{#time:z}}</nowiki> and can be set to any other integer value (used to generate distinct values on the same page). * The default ''prime'' is 67 and should be a [[prime number]] above 17 (used to generate distinct values on the same page). ; Examples generating numbers between 0 and 999<nowiki>:</nowiki> * <tt><nowiki>{{Random number|1000}}</nowiki></tt> = {{Random number|1000}} * <tt><nowiki>{{Random number|1000|</nowiki>{{#time:z}}<nowiki>|67}}</nowiki></tt> = {{Random number|1000|{{#time:z}}|67}} (same as above) * <tt><nowiki>{{Random number|1000|</nowiki>{{#time:z}}<nowiki>|61}}</nowiki></tt> = {{Random number|1000|{{#time:z}}|61}} (this and others should all be different) * <tt><nowiki>{{Random number|1000|6}}</nowiki></tt> = {{Random number|1000|6}} * <tt><nowiki>{{Random number|1000|5}}</nowiki></tt> = {{Random number|1000|5}} * <tt><nowiki>{{Random number|1000|4}}</nowiki></tt> = {{Random number|1000|4}} * <tt><nowiki>{{Random number|1000|3}}</nowiki></tt> = {{Random number|1000|3}} * <tt><nowiki>{{Random number|1000|2}}</nowiki></tt> = {{Random number|1000|2}} * <tt><nowiki>{{Random number|1000|1}}</nowiki></tt> = {{Random number|1000|1}} * <tt><nowiki>{{Random number|1000|0}}</nowiki></tt> = {{Random number|1000|0}} * <tt><nowiki>{{Random number|1000|1|17}}</nowiki></tt> = {{Random number|1000|0|17}} (varying the prime number) * <tt><nowiki>{{Random number|1000|1|19}}</nowiki></tt> = {{Random number|1000|0|19}} * <tt><nowiki>{{Random number|1000|1|23}}</nowiki></tt> = {{Random number|1000|0|23}} * <tt><nowiki>{{Random number|1000|1|29}}</nowiki></tt> = {{Random number|1000|0|29}} * <tt><nowiki>{{Random number|1000|1|31}}</nowiki></tt> = {{Random number|1000|0|31}} * <tt><nowiki>{{Random number|1000|1|37}}</nowiki></tt> = {{Random number|1000|0|37}} * <tt><nowiki>{{Random number|1000|1|41}}</nowiki></tt> = {{Random number|1000|0|41}} * <tt><nowiki>{{Random number|1000|1|43}}</nowiki></tt> = {{Random number|1000|0|43}} * <tt><nowiki>{{Random number|1000|1|47}}</nowiki></tt> = {{Random number|1000|0|47}} * <tt><nowiki>{{Random number|1000|1|51}}</nowiki></tt> = {{Random number|1000|0|51}} * <tt><nowiki>{{Random number|1000|1|53}}</nowiki></tt> = {{Random number|1000|0|53}} * <tt><nowiki>{{Random number|1000|1|59}}</nowiki></tt> = {{Random number|1000|0|59}} * <tt><nowiki>{{Random number|1000|1|61}}</nowiki></tt> = {{Random number|1000|0|61}} * <tt><nowiki>{{Random number|1000|1|67}}</nowiki></tt> = {{Random number|1000|0|67}} * <tt><nowiki>{{Random number|1000|1|71}}</nowiki></tt> = {{Random number|1000|0|71}} * <tt><nowiki>{{Random number|1000|1|73}}</nowiki></tt> = {{Random number|1000|0|73}} * <tt><nowiki>{{Random number|1000|1|79}}</nowiki></tt> = {{Random number|1000|0|79}} ; Note<nowiki>:</nowiki> * Varying ''seed'' linearly generates numbers that generate a linear sequence on the same page, with equal cyclic steps; * Varying ''prime'' (provided that they are odd prime numbers) generates pseudo-random that have independent random distribution. * Note that when ''count'' is even (such as 100 by default, or 1000 in the examples above), the generated numbers (on the same page) are all odd or all even when you are varying the ''seed'' or ''prime'', unless half of the calls use an even ''seed'' and the others used an odd ''seed''. However, later invokations will still alternate odd and even numbers on output (this problem only occurs on the same page where multiple random numbers are invoked). * On the same page, multiple invokations of this template with the same parameters will generate the same output value, so it is possible to create multiple links related to the same article. <includeonly>[[Category:Templates]]</includeonly> fvr6hd0c6hzwtp5gblf3r6cs72hhfxa Template:Random number 10 12 600 591 2012-03-29T08:53:12Z Pharos 12 Reverted edits by [[Special:Contributions/Kittykittykittykitty|Kittykittykittykitty]] ([[User talk:Kittykittykittykitty|talk]]) to last revision by [[User:Vigorous action|Vigorous action]] 600 wikitext text/x-wiki <includeonly>{{Mod|((({{#time:U}}+({{{2|{{#time:z}}}}}))*({{{3|67}}})+{{NUMBEROFARTICLES:R}})*({{{3|67}}})+{{NUMBEROFUSERS:R}})*({{{3|67}}})+{{NUMBEROFFILES:R}} |{{{1|100}}}}}</includeonly><noinclude>{{Random number/doc}}</noinclude> 64v8xn4ktno2q6bny5ecd6iuj2td2ta Template:Mod 10 13 602 589 2012-03-29T08:53:20Z Pharos 12 Reverted edits by [[Special:Contributions/Kittykittykittykitty|Kittykittykittykitty]] ([[User talk:Kittykittykittykitty|talk]]) to last revision by [[User:Vigorous action|Vigorous action]] 602 wikitext text/x-wiki <includeonly>{{ {{{|safesubst:}}}#ifexpr:({{{2}}})=0|0|{{ {{{|safesubst:}}}#ifexpr:(({{{1}}})/({{{2}}}))=((({{{1}}})/({{{2}}}))round 0)|0|{{ {{{|safesubst:}}}#ifexpr:(({{{1}}})/({{{2}}}))>0 and(({{{1}}})/({{{2}}}))<1|{{ {{{|safesubst:}}}#expr:{{{1}}}}}|{{ {{{|safesubst:}}}#expr:({{{1}}})-((((({{{1}}})/({{{2}}}))-0.5)round 0)*({{{2}}}))}}}}}}}}</includeonly><noinclude>{{Mod/doc}}</noinclude> iu9of4nhyl5eqa1elor8gn8hz6p459e Template:Mod/doc 10 14 2189 576 2020-09-25T20:52:40Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2189 wikitext text/x-wiki Implements the mathematical [[modulo]] operator. The returned result is always of the same sign as the ''modulus'' or nul, and its absolute value is lower than the absolute value of the ''modulus''. However, this template returns 0 if the ''modulus'' is nul (this template should never return a division by zero error). This template is '''not''' the same as the mod operator in the #expr [[m:Help:ParserFunctions|parser function]]. This template can be substituted. ; Usage<nowiki>:</nowiki> : <code><nowiki>{{</nowiki>mod|</code>''dividend''<code>|</code>''modulus''<code>}}</code> :: Computes the modulo dynamically. : <code><nowiki>{{</nowiki>subst:mod|</code>''dividend''<code>|</code>''modulus''<code>}}</code> :: Substitute the template invokation by its computed value when saving an article wiki source. ; Examples with positive integer modulus<nowiki>:</nowiki> * <code><nowiki>{{mod|12|10}}</nowiki></code> = {{mod|12|10}}. * <code><nowiki>{{mod|10.1|10}}</nowiki></code> = {{mod|10.1|10}}. * <code><nowiki>{{mod|10|10}}</nowiki></code> = {{mod|10|10}}. * <code><nowiki>{{mod|2|10}}</nowiki></code> = {{mod|2|10}}. * <code><nowiki>{{mod|0|10}}</nowiki></code> = {{mod|0|10}}. * <code><nowiki>{{mod|-2|10}}</nowiki></code> = {{mod|-2|10}}. * <code><nowiki>{{mod|-10|10}}</nowiki></code> = {{mod|-10|10}}. * <code><nowiki>{{mod|-10.1|10}}</nowiki></code> = {{mod|-10.1|10}}. * <code><nowiki>{{mod|-12|10}}</nowiki></code> = {{mod|-12|10}}. ; Examples with negative integer modulus<nowiki>:</nowiki> * <code><nowiki>{{mod|12|-10}}</nowiki></code> = {{mod|12|-10}}. * <code><nowiki>{{mod|10.1|-10}}</nowiki></code> = {{mod|10.1|-10}}. * <code><nowiki>{{mod|10|-10}}</nowiki></code> = {{mod|10|-10}}. * <code><nowiki>{{mod|2|-10}}</nowiki></code> = {{mod|2|-10}}. * <code><nowiki>{{mod|0|-10}}</nowiki></code> = {{mod|0|-10}}. * <code><nowiki>{{mod|-2|-10}}</nowiki></code> = {{mod|-2|-10}}. * <code><nowiki>{{mod|-10|-10}}</nowiki></code> = {{mod|-10|-10}}. * <code><nowiki>{{mod|-10.1|-10}}</nowiki></code> = {{mod|-10.1|-10}}. * <code><nowiki>{{mod|-12|-10}}</nowiki></code> = {{mod|-12|-10}}. ; Examples with positive non integer modulus<nowiki>:</nowiki> * <code><nowiki>{{mod|21.5|10.5}}</nowiki></code> = {{mod|21.5|10.5}}. * <code><nowiki>{{mod|21.1|10.5}}</nowiki></code> = {{mod|21.1|10.5}}. * <code><nowiki>{{mod|21|10.5}}</nowiki></code> = {{mod|21|10.5}}. * <code><nowiki>{{mod|20.9|10.5}}</nowiki></code> = {{mod|20.9|10.5}}. * <code><nowiki>{{mod|11|10.5}}</nowiki></code> = {{mod|11|10.5}}. * <code><nowiki>{{mod|10.6|10.5}}</nowiki></code> = {{mod|10.6|10.5}}. * <code><nowiki>{{mod|10.5|10.5}}</nowiki></code> = {{mod|10.5|10.5}}. * <code><nowiki>{{mod|10.1|10.5}}</nowiki></code> = {{mod|10.1|10.5}}. * <code><nowiki>{{mod|10|10.5}}</nowiki></code> = {{mod|10|10.5}}. * <code><nowiki>{{mod|2|10.5}}</nowiki></code> = {{mod|2|10.5}}. * <code><nowiki>{{mod|0|10.5}}</nowiki></code> = {{mod|0|10.5}}. * <code><nowiki>{{mod|-2|10.5}}</nowiki></code> = {{mod|-2|10.5}}. * <code><nowiki>{{mod|-10|10.5}}</nowiki></code> = {{mod|-10|10.5}}. * <code><nowiki>{{mod|-10.1|10.5}}</nowiki></code> = {{mod|-10.1|10.5}}. * <code><nowiki>{{mod|-10.5|10.5}}</nowiki></code> = {{mod|-10.5|10.5}}. * <code><nowiki>{{mod|-10.6|10.5}}</nowiki></code> = {{mod|-10.6|10.5}}. * <code><nowiki>{{mod|-11|10.5}}</nowiki></code> = {{mod|-11|10.5}}. * <code><nowiki>{{mod|-20.9|10.5}}</nowiki></code> = {{mod|-20.9|10.5}}. * <code><nowiki>{{mod|-21|10.5}}</nowiki></code> = {{mod|-21|10.5}}. * <code><nowiki>{{mod|-21.1|10.5}}</nowiki></code> = {{mod|-21.1|10.5}}. * <code><nowiki>{{mod|-21.5|10.5}}</nowiki></code> = {{mod|-21.5|10.5}}. ; Examples with nul modulus<nowiki>:</nowiki> * <code><nowiki>{{mod|2|0}}</nowiki></code> = {{mod|2|0}}. * <code><nowiki>{{mod|0|0}}</nowiki></code> = {{mod|0|0}}. * <code><nowiki>{{mod|-2|0}}</nowiki></code> = {{mod|-2|0}}. <includeonly>[[Category:Templates]]</includeonly> oz2qqs3o3y0gdrqe3pbn778t1y1cxp0 Template:! 10 15 2169 605 2020-09-25T20:45:41Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2169 wikitext text/x-wiki |<noinclude>[[Category:Templates]]</noinclude> exn33evttil1imvlbl4g7ka2tv0oa5x Template:Navimgx 10 17 2190 601 2020-09-25T20:53:06Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2190 wikitext text/x-wiki <div style="position: relative; width: {{{xsize|{{{size|}}}}}}px; height: {{{ysize|{{{size|}}}}}}px; overflow: hidden;"><div style="position: absolute; top: 0; left: 0; font-size: 200pt; width: {{{xsize|{{{size|}}}}}}px; height: {{{ysize|{{{size|}}}}}}px; overflow: hidden; line-height: {{{ysize|{{{size|}}}}}}px; z-index: 3;">[{{{link|}}} {{{linktext|&nbsp;}}}]</div><div style="position: absolute; top: 0; left: 0; z-index: 2;">[[Image:{{{image|}}}|{{{xsize|{{{size|}}}}}}px|image page]]</div></div><noinclude>[[Category:Templates]]</noinclude> dqpqsiaa2dc7iekjzct5b4rndwf2hl7 File:Paypal donate button.png 6 21 22 21 2011-06-22T18:51:38Z Rock drum 7 moved [[File:Paypa donate button.png]] to [[File:Paypal donate button.png]]: Typo 22 wikitext text/x-wiki PayPal donate button for the Main Page. sp8u4etcjfyq8n2lwgi8emrvrohz3yd Template:Box-shadow 10 23 2173 596 2020-09-25T20:47:18Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2173 wikitext text/x-wiki <includeonly>-moz-box-shadow: {{{1|4px}}} {{{2|4px}}} {{{3|4px}}} {{{4|#CCC}}}; -webkit-box-shadow: {{{1|4px}}} {{{2|4px}}} {{{3|4px}}} {{{4|#CCC}}}; box-shadow: {{{1|4px}}} {{{2|4px}}} {{{3|4px}}} {{{4|#CCC}}};</includeonly><noinclude>[[Category:Templates]]</noinclude> 4rdqetbbqkf3mcgnw2f92jloeca1pyj Template:WikimediaNYCDisclosure 10 24 2201 597 2020-09-25T20:58:37Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2201 wikitext text/x-wiki {| class="plainlinks" style="width: 100%; background: #f9f9f9; margin: 1em 0 0 0; border: 1px solid #ddd;" | style="color: #000; font-size: 80%; text-align: center;" | Wikimedia New York City, Inc. is a non-profit corporation incorporated in New York. "Wikimedia Foundation", "Wikimedia", and "Wikipedia" are trademarks of the [http://wikimediafoundation.org Wikimedia Foundation]. |}<noinclude>[[Category:Templates]]</noinclude> 8igs62hsi8520axhaycg5vueqip2z1w MediaWiki:Sp-contributions-footer 8 25 520 27 2012-03-11T20:37:10Z Hoo man 9 Bot: Security fix: [[WMFblog:2011/10/03/native-https-support-enabled-for-all-wikimedia-foundation-wikis/|protocol-relative URLs]] per https://meta.wikimedia.org/?oldid=3197161 ([[m:Stewards' noticeboard|questions?]]). 520 wikitext text/x-wiki <table class="plainlinks sp-contributions-footer" style="margin:.2em auto; border:1px solid #aaa; background:#f9f9f9; font-size:90%; text-align:center;"> <tr> <td style="padding:2px 0 2px 1.5em;">[[File:User-info.svg|40px|User info|link=]]</td> <td style="padding:.25em 1.5em; width:100%;">[[User:{{{1|$1}}}|{{{1|$1}}}]]:&nbsp;<span style="white-space:nowrap;">[[Special:Prefixindex/User:{{{1|$1}}}/|Subpages]] '''·'''</span> <span style="white-space: nowrap;">[{{fullurl:Special:ListUsers|limit=1&username={{urlencode:{{{1|$1}}}}}}} User rights] '''·'''</span> <span style="white-space:nowrap;">[//toolserver.org/~vvv/yaec.php?user={{urlencode:{{{1|$1}}}}}&wiki=commonswiki_p Edit count] '''·'''</span> [[Special:ListFiles/{{{1|$1}}}|User uploads]] <small style="white-space:nowrap;">([{{fullurl:tools:~daniel/WikiSense/Gallery.php|wikifam=commons.wikimedia.org&format=html&img_user_text={{urlencode:{{{1|$1}}}}}&order=-img_timestamp}} wikisense])</small> '''·''' <span style="white-space:nowrap;">[[Special:CentralAuth/{{{1|$1}}}|CentralAuth]] <small>([{{fullurl:tools:~vvv/sulutil.php|rights=1&user={{urlencode:{{{1|$1}}}}}}} sulutil])</small> '''·'''</span> <span style="white-space:nowrap;">[{{fullurl:tools:~luxo/contributions/contributions.php|user={{urlencode:{{{1|$1}}}}}&blocks=true}} Global contribs] '''·''' [{{fullurl:Special:ActiveUsers|limit=1&username={{urlencode:{{{1|$1}}}}}}} Recent activity]</span> </td> </tr> </table> s3z1sy8ysv0t25ubis1jzuvu5zrhsjg MediaWiki:Sidebar 8 26 2310 2308 2022-07-15T20:30:44Z Pharos 12 update 2310 wikitext text/x-wiki * Information ** mainpage|Home ** Aboutpage|About ** Donate|Donate ** Contactpage|Contact ** Interviews|Interviews *SEARCH * LEARN ** Mission|Mission * ACT ** Membership|Join ** Donate|Donate 2pjaly6wewi486oud75fuapad1b4zvn Template:User 10 28 2198 562 2020-09-25T20:56:07Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2198 wikitext text/x-wiki [[User:{{{1}}}|{{{1}}}]] ([[User talk:{{{1}}}|talk]] · [[Special:Contributions/{{{1}}}|contribs]])<noinclude>[[Category:Templates]]</noinclude> ao2f838u7hx9ye0xp5gaa29mtrkkkr2 Contact 0 29 2404 2301 2024-07-11T23:42:51Z Pharos 12 more convenient email address 2404 wikitext text/x-wiki [[File:Crystal 128 kontact.png|right]] '''Email address: :{| |- | General information:||info{{@}}wikimedianyc.org |} If you have a general inquiry about the Wikimedia projects that is not specific to the NYC area, please contact the Wikimedia community's volunteer helpdesk at info[[Image:At_sign.svg|15px|@]]wikimedia.org Contact details are also available [[Board|for individual Board members]]. '''Social media:''' : Facebook: [https://www.facebook.com/wmnyc Wikimedia New York City] : Twitter: [https://twitter.com/WikimediaNYC @WikimediaNYC] ''Please note that Wikimedia New York City, Inc. as an organization is an independent entity of the Wikimedia Foundation, the charity that operates sites such as the English Wikipedia. Wikimedia New York City has absolutely no editorial control over the contents of websites managed by the Foundation. If you wish to contact the Wikimedia Foundation, please see their [[foundation:Contact us|contact page]].'' [[Category:Wikimedia NYC]] 0hb7zd86xvccxpxvszfhifjdfusowwe Board 0 31 2281 1977 2021-11-16T12:55:15Z 67.80.99.152 update 2281 wikitext text/x-wiki {{tocright}} The Board of Directors is responsible for the everyday operations of the chapter. Members of the Board act as Directors of the company and as trustees. The original incorporators signed our non-profit charter in March 2009. The current list of board members is maintained on Meta-Wiki at [[meta:Wikimedia New York City#Board]]. [[Category:Wikimedia NYC]] 6s66d9fljequkl6op8ws1tuacj62yb4 Template:Delete 10 39 2177 53 2020-09-25T20:48:39Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2177 wikitext text/x-wiki {| style="margin:0.5em; padding:0.5em; background:#FEE; border:1px solid #999;" |- | [[Image:Icono aviso borrar.png|60px|left]] | <big>'''This page has been nominated for speedy deletion.'''</big><br />{{#if:{{{1|}}}|The reason given is "{{{1}}}". }}If you disagree with its speedy deletion, please explain why on [[{{TALKPAGENAME}}|its talk page]]. If this page obviously does not meet the criteria for speedy deletion, or you intend to fix it, please remove this notice, but do not remove this notice from a page that you have created yourself. <span class="plainlinks">''Administrators, remember to check [[Special:Whatlinkshere/{{FULLPAGENAME}}|if anything links here]] and [{{fullurl:{{FULLPAGENAME}}|action=history}} the page history] ([{{fullurl:{{FULLPAGENAME}}|diff=0}} last edit]) before [{{fullurl:{{FULLPAGENAME}}|action=delete}} deletion].''</span> |}<includeonly>{{{category|[[Category:Candidates for speedy deletion]]}}}</includeonly><noinclude>[[Category:Templates]]</noinclude> o91v8rl5j06npjmm94s66irjbc4qih2 Category:Candidates for speedy deletion 14 40 2526 2035 2024-11-14T19:24:25Z TenWhile6 5310 2526 wikitext text/x-wiki __EXPECTUNUSEDCATEGORY__ This category is used by [[m:Global sysops/Requests]] until local administrators are available. [[Category:Maintenance]] 6q4hlbg757le4d65sxsk95r3o0tvak8 Template:W 10 42 2200 57 2020-09-25T20:58:21Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2200 wikitext text/x-wiki [[:{{{3|w:en}}}:{{{1}}}|{{<includeonly>safesubst:</includeonly>#if: {{{2|}}} |{{{2}}}|{{{1}}}}}]]<noinclude>[[Category:Templates]]</noinclude> d93ekmdwvde5xh2335zxzqbauzmbpzi Template:Hidden 10 46 2183 87 2020-09-25T20:50:48Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2183 wikitext text/x-wiki {{hidden}}<noinclude>[[Category:Templates]]</noinclude> g8naqmbp8q1k1f4lztm09hx0m6k5euh MediaWiki:Deletereason-dropdown 8 47 418 91 2011-12-08T16:55:16Z Rock drum 7 + spam 418 wikitext text/x-wiki *Common delete reasons ** Author request ** Copyright violation ** Outside of scope ** Vandalism ** Spam kb7wcugi5dzb4t74ouy4snbj7oupz5a Template:Welcome 10 50 125 2011-06-24T17:39:00Z Rock drum 7 Create 125 wikitext text/x-wiki <div style="float:left;width:65px; height:65px;">[[File:Wikimedia New York City logo.svg|60px]]</div> Hello! Welcome to the website of Wikimedia NYC, the UK [[:meta:Wikimedia chapters|chapter]] of the [http://www.wikimediafoundation.org/ Wikimedia Foundation]. To find out more about us, please take a look at the [[Main Page]], and help and advice for editors (particularly those inbound from WMF projects such as Wikipedia) can be found at [[Help:Contents]]. If you haven't already, please consider [[Membership|joining]] us and getting involved with some of our [[activities]] or, if you lack the time, [[Donate|donating]] instead. If you have any questions, please let me know.<!-- Template:Welcome --><noinclude> ---- Usage: <nowiki>{{subst:Welcome}} ~~~~</nowiki> [[Category:Templates]] </noinclude> hfij3a52wasx68y5zubk81wnbs9dnhh Template:Stub 10 56 2196 2040 2020-09-25T20:55:41Z 1234qwer1234qwer4 2382 noinclude 2196 wikitext text/x-wiki [[File:Wiki letter w.svg|50px]] ''This page is a [[w:WP:stub|stub]]. You can help Wikimedia NYC by expanding it.'' [[Category:Stubs<noinclude>|*</noinclude>]] <noinclude>[[Category:Templates]]</noinclude> if59rq9x77fi6hvxypwbjipiavp5cph Category:Stubs 14 57 224 180 2011-06-28T16:40:05Z Pharos 12 [[Category:Maintenance]] 224 wikitext text/x-wiki Stub pages, make them less stubby if possible! [[Category:Maintenance]] rheukkqg082apsf31ke5uhg53q1lr3q Cultural partnerships 0 59 2036 1772 2020-02-05T23:18:15Z Sm8900 565 2036 wikitext text/x-wiki {{Outreach}} To be based mainly on [[meta:Wikimedia New York City#Wikipedia Cultural Embassy]] and [[meta:Wikimedia New York City#Wiki Workshops / Wikipedia at the Library]] '''Brooklyn Museum''' '''Brooklyn Public Library''' : Edit-a-Thon : [[Wikipedia:Brooklyn Public Library#Brooklyn Collection|Brooklyn Collection]] '''Consumer Reports''' : [[Wikipedia:Wikipedia:WikiProject Consumer Reports|Wikipedian in Residence]] [[wikipedia:User:Bluerasberry|Lane Rasberry]] '''Metropolitan Museum of Art''' : Wikipedia Loves Art '''Metropolitan New York Library Council''' : [[Wikipedia:GLAM/Metropolitan New York Library Council|GLAM Project]] : Current Wikipedian-in-Residence [[w:User: OR drohowa|Dorothy Howard]] '''Museum of Modern Art ''' : [[Wikipedia:GLAM/Museum of Modern Art|GLAM Project]] : [[Wikipedia:Wikipedia Loves Art/US-UK/Metropolitan Museum of Art rules|Wikipedia Loves Art at MoMA]] '''New York Public Library''' :[[Wikipedia:Wikipedia:GLAM/New York Public Library|GLAM Page]] : [[Wikipedia:New York Public Library Main Branch|New York Public Library Main Branch]], Edit-a-Thons : [[Wikipedia:Jefferson Market Library|Jefferson Market Library]], Edit-a-Thons : Mid-Manhattan Library ''' New York Public Library for the Performing Arts : [[Wikipedia:New York Public Library for the Performing Arts|New York Public Library for the Performing Arts]], Edit-a-Thons : Wikipedian-in-Residence [[w:User:DGG|David Goodman]] '''Queens Library''' : Central Branch, [[Wikipedia:Wikipedia:Meetup/NYC| Edit-a-Thon]] [[Category:Wikimedia NYC]] l393x30ym04eof5qyu70l66ebnacl9o Museums and libraries 0 60 203 187 2011-06-27T16:56:58Z Rock drum 7 Typo 203 wikitext text/x-wiki #REDIRECT [[Cultural partnerships]] 6jjhek8chfqk7su2wpkpksv9sk5btld Membership 0 65 2407 2405 2024-09-24T00:08:35Z Jeremyb 8 Protected "[[Membership]]": High traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) 2405 wikitext text/x-wiki {{DISPLAYTITLE:<span style="display:none">{{FULLPAGENAME}}</span>}} <div class="topbanner"><div class="name" style="font-weight:500; letter-spacing:1px;">Join Wikimedia NYC</div> [[File:Wikipedia Day New York January 2019 014.jpg|frameless|center|700px]] <div style="padding:2em 4em;"> <p style="font-size:110%; line-height:1.8; text-align:justify;"> We are only as strong as our base of members. Members of Wikimedia NYC help provide crucial support for our grassroots organization. '''Anyone can become a member.''' You don't even have to live in New York City!</p> <p style="font-size:12; line-height:1.8; text-align:justify;"> Dues are $5, and membership lasts 12 months. Members elect the Board of Directors at our annual chapter meeting and vote on the direction of the organization. Members are also invited to volunteer and provide support in other ways.</p> <div class="plainlinks" style="margin:0 auto; text-align:center; font-size:250%; padding-top:0.5em;"> '''[https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LL3K9CEJJ4W2U Join now for $5/year &raquo;]''' </div> </div> [[Category:Membership| ]] ou52170cqxajxpq4nez22nzdr7ccjwx MediaWiki:Aboutpage 8 67 284 209 2011-07-05T00:52:45Z Blurpeace 5 change to about 284 wikitext text/x-wiki About ciij5nit0pwhlb28jni0sl22sja9u7m MediaWiki:Disclaimerpage 8 69 211 2011-06-27T17:39:02Z Rock drum 7 Create 211 wikitext text/x-wiki foundation:General disclaimer bz3abwm3x7axh0ad1tdyotbeh8da1j9 Events 0 70 2370 2284 2023-11-09T05:26:54Z Wil540 art 1638 directing towards [[W:Wikipedia:Meetup/NYC]] 2370 wikitext text/x-wiki Visit [[W:Wikipedia:Meetup/NYC|Meetup/NYC]] for Wikimedia New York City's current event page. qgugca3oillbdvzkugv9i3y2epj1258 Volunteer 0 71 2400 2283 2024-07-08T18:11:04Z Wil540 art 1638 out of date 2400 wikitext text/x-wiki Note: '''''As of July 8th, 2024, this information is out of date.''''' '''Volunteer''' work will be loosely divided among four 'Teams' (Education, Financial, Media, and Tech), each focused on a different broad area. We will probably have discussion forums / mailing lists and a bit more structure for each of the 'Teams' in future. You can [[membership|join]] as an official member too. You can also help us improve documentation through the to-dos at the [[Wiki portal]]. The general discussion mailing list for teams and in-depth planning is [https://lists.wikimedia.org/mailman/listinfo/wikimedia-us-nyc-discuss wikimedia-us-nyc-discuss] (this is separate from the events announcement mailing list). <big>''Sign up for one or two Wikimedia NYC 'Teams' today!''</big> ==Biweekly updates== *Please participate directly at [[Volunteer/Updates]]! ==Teams== ===General members=== I'm very pleased to be here!! I hope to join a team, once I get a little more info on what these are all about. Thanks!! --[[User:Sm8900|Sm8900]] ([[User talk:Sm8900|talk]]) 22:52, 5 February 2020 (UTC) ===Education Team=== :''Areas: universities, libraries, museums, wiki-workshops'' sign up here: *Richard. --[[User:Pharos|Pharos]] 15:57, 14 July 2011 (UTC) *Ann M. --[[User:Amatsuuchi|Amatsuuchi]] 16:06, 14 July 2011 (UTC) *[[User:Blurpeace|<span style="color:#002BB8;">'''Blurpeace'''</span>]] 18:30, 14 July 2011 (UTC) *[[User:Peter.C|Peter.C]] 23:19, 14 July 2011 (UTC) *[[User:Frenezulo|Frenezulo]] 13:24, 15 July 2011 (UTC) *Onema A. * [[User:Jkvannort|Jkvannort]] 16:01, 18 January 2012 (UTC) * Dan E. --[[User:TheMightyHercules|TheMightyHerc...]] 22:21, 28 March 2012 (UTC) ===Financial Team=== :''Areas: budget, grants, sponsorships, memberships, legal'' sign up here: *Richard. --[[User:Pharos|Pharos]] 15:57, 14 July 2011 (UTC) *[[User:Blurpeace|<span style="color:#002BB8;">'''Blurpeace'''</span>]] 18:30, 14 July 2011 (UTC) *Joe. --[[User:Outis010|Outis010]] 21:13, 17 January 2012 (UTC) * Dan E. --[[User:TheMightyHercules|TheMightyHerc...]] 22:21, 28 March 2012 (UTC) *- ===Media Team=== :''Areas: press releases, social media, multimedia, event promotion'' sign up here: *[[User:Sandy.ordonez|Sandy.ordonez]] *[[User:GChriss|GChriss]] 16:17, 14 July 2011 (UTC) *[[User:Brycetom|Brycetom]] *Sunil bawa *[[User:amelielelarge|amelielelarge]] ===Tech Team=== :''Areas: web hosting, MediaWiki, civicrm, tools'' sign up here: *David Jensen *Peter.C [[User:Peter.c|Peter.c]] 23:19, 14 July 2011 (UTC) *[[User:Johnduhart|Johnduhart]] *-[[User:Mohamedudhuman05|Mohamedudhuman05]] *- [[Category:Membership]] sepmeop8pgfkbjht80z1nuoqr3z9xl9 Template:Split 10 73 2195 220 2020-09-25T20:54:43Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2195 wikitext text/x-wiki [[File:Split-arrows.svg|50px]] ''It has been suggested that this page be split into multiple pages.'' [[Category:Splits<noinclude>|*</noinclude>]]<noinclude>[[Category:Templates]]</noinclude> l242ly8cxdz74rfz99ulxl548jj2wgb Template:Merge 10 74 2188 221 2020-09-25T20:52:13Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2188 wikitext text/x-wiki [[File:Merge-arrows.svg|50px]] ''It has been suggested that this page be merged with another page.'' [[Category:Merges<noinclude>|*</noinclude>]]<noinclude>[[Category:Templates]]</noinclude> 7qy695jtt0u3bd6t6b0rra7sr2bqx41 Category:Merges 14 75 222 2011-06-28T16:39:49Z Pharos 12 [[Category:Maintenance]] 222 wikitext text/x-wiki [[Category:Maintenance]] it59vo5whwexpgslnlv8id1urubvc0x Category:Splits 14 76 223 2011-06-28T16:39:56Z Pharos 12 [[Category:Maintenance]] 223 wikitext text/x-wiki [[Category:Maintenance]] it59vo5whwexpgslnlv8id1urubvc0x Category:Maintenance 14 77 2034 225 2020-02-05T23:16:45Z Sm8900 565 2034 wikitext text/x-wiki For pages that need maintenance actions. [[Category:Contents]] mps0fw7qznoisvia4qpzno3ance6x3o Meetup 0 79 2401 2209 2024-07-08T18:14:48Z Wil540 art 1638 adding link to https://en.wikipedia.org/wiki/Wikipedia:Meetup/NYC 2401 wikitext text/x-wiki {{Conferences}} For active meetup calendar, see: https://en.wikipedia.org/wiki/Wikipedia:Meetup/NYC '''NYC Meetup Salons''' are general meetups intended for the Wikimedian and Free Culture communities, through partnership with the Columbia University Department of Astronomy. Held approximately every-other month since late 2008, these meetups aim to promote the sharing of ideas and increased participation in Wikimedia-related projects. Previous topics for discussion included ageism on Wikipedia, educational project involvement, adjusting to participation growth, stock photos, and language study. <div class="center">''Video and audio from previous meetups:''</div> * [http://www.archive.org/details/PseudoscienceOnWikipedia ScienceApologist on Pseudoscience on Wikipedia] on Internet Archive * [http://www.archive.org/details/Wikimedia_NYC_March_08_Presentations David Shankbone on Wikinews, DGG on Librarians' criteria for reliability, Gmaxwell on New pages patrol feature] on Internet Archive *[http://www.archive.org/details/Wikimedia_NYC_June_08_Presentations MBisanz on Admin coaching] on Internet Archive * [[:File:WMNYC Nov08.ogg|Shapiros10 on RfA and ageism, Mitchazenia on educational projects]] * [http://en.wikipedia.org/wiki/Wikipedia:Not_The_Wikipedia_Weekly/Episode_42 Becksguy on adjusting to growth] <gallery class=center> File:3.16.08NYCMeetupByLuigiNovi13.jpg|'Mindspillage' holding up a real-life replica of a Wiki-style barnstar during an NYC meetup. File:3.16.08NYCMeetupByLuigiNovi2.jpg|Meetup attendees engaging in a round-table discussion. File:2011-05-21-1917_Meetup_flaming_cheese_jeh.theora.ogv|A rather interesting dish served during the post-meetup dinner. File:3.16.08NYCMeetupByLuigiNovi4.jpg|Participants surfing the web at a meetup. File:Free_Culture_auditorium_WWH_jeh.jpg|Wikimedia NYC members watching a presentation in the Free Culture Auditorium. </gallery> [[Category:Wikimedia NYC]] pf2dcl4mjgxjj799kkllqj5z2v7f6kb Wiknic 0 80 2210 2158 2020-10-14T08:48:12Z Minorax 2160 fix [[Special:LintErrors/obsolete-tag]] 2210 wikitext text/x-wiki {{Conferences}} '''Wikinic Picnics''' have been held annually'''*''' since '''August, 2007'''. Originally named WikNYC picnic, these picnics are held as a fun, general, informal meetup for those involved in Wikimedian and Free Culture communities. '''*'''<small> Although the 2009 and 2010 Wiknics were incorporated into the annual Wiki-Conference events. </small> ==WikNYC 2007== <gallery class=center> File:WikiNYC-picnic-bagel-contemplation.jpg|'Makemi' contemplating a bagel at the 2007-08-12 Wikipedia NYC picnic meetup. File:WikiNYC-picnic-CComMack1.jpg|'CComMack' at the first Wikipedia NYC picnic meetup. File:WikiNYC-picnic-ragesoss-ftw.jpg|Come to a Wiknic picnic, you could be having '''''this much fun!''''' <small>(Sage Ross flying through the air after a frisbee).</small> File:WikiNYC-picnic-group1.jpg|A group photo of the first annual WikNYC picnic in 2007. File:WikiNYC-picnic-ssilver.jpg|Ssilvers at the 2007-08-12 Wikipedia NYC picnic meetup. </gallery> <div class="center">'''''[[WikNYC 2007 Multimedia|See more photos from the event by clicking here.]]'''''</div> '''The WikNYC picnic''' was the first annual Wikipedia NYC picnic, held on '''August 12, 2007''' in Central Park. The picnic began at 3 p.m. on the Great Lawn's southwest quadrant, just north of [http://en.wikipedia.org/wiki/Delacorte_Theater Delacorte Theater], and ran until 8 p.m. ==WikNYC 2008== <gallery class=center> File:WikNYC_Picnic_2_-_Rmrfstar_laughing.jpg|Wikipedian 'Rmrfstar' at the 2nd annual WikNYC Picnic File:WikNYC_Picnic_2_-_Nicholas.jpg|'Nicholas' of Free Culture@Columbia at the WikNYC Picnic File:WikNYC_Picnic_2_-_Lazulilasher.jpg|Wikipedian 'Lazulilasher' at the 2nd annual WikNYC Picnic File:WikNYC_Picnic_2_-_David_Shankbone_and_Little_Man.jpg|David Shankbone and 'Little Man' at the WikNYC File:WikNYC_Picnic_2_-_Jim.henderson.jpg|Wikipedian 'Jim.henderson' at the 2nd annual WikNYC Picnic </gallery> '''The 8th New York City Meetup event''' was an informal picnic on '''August 24, 2008''' from about 2:00 to 8:00 PM. The picnic took place at Prospect Park. We met by the [http://maps.google.com/maps?f=q&hl=en&geocode=&q=Picnic+House,+Prospect+Park,+Brooklyn,+New+York&ie=UTF8&ll=40.682981,-73.966656&spn=0.043218,0.154495&t=h&z=13&iwloc=A picnic house]. As the second annual WikiNYC Picnic, the goal was to have a relaxing, enjoyable meeting of Wikipedia editors (others were welcome as well) in one of the many great parks in New York City. As a stark contrast to the previous four meetups, this was ''not'' a Wikimedia NYC meeting, although we were still welcome to talk business if we feel like it. The location for this picnic was [http://en.wikipedia.org/wiki/Prospect_Park_(Brooklyn) Prospect Park] in Brooklyn. ==Wiknic 2011== <gallery class=center> File:Wikimedians_at_at_Wiknic_NYC_2011_-_3.jpg|Wikimedians chat in Central Park for the the New York Wiknic held in June. File:Wikimedians_at_at_Wiknic_NYC_2011_-_4.jpg|A picture showing the food brought to the 3rd annual Wiknic. File:Wikimedians_at_at_Wiknic_NYC_2011_-_5.jpg|Wikimedians having a discussion at the annual Wiknic. File:Wikimedians_at_at_Wiknic_NYC_2011_-_6.jpg|Wikimedians gather in Central Park for the the New York Wiknic, June 25th, 2011. File:Wikimedians_at_at_Wiknic_NYC_2011_-_8.jpg|Wikimedians play frisbee during the 3rd annual NYC Wiknic. </gallery> <div class="center">'''''[[Wiknic 2011 Multimedia|See more photos from the event by clicking here.]]'''''</div> The '''WikNYC Picnic''' was held in [http://en.wikipedia.org/wiki/Central_park Central Park] on Saturday '''June 25, 2011''', as part of the [http://en.wikipedia.org/wiki/Wikipedia:Wiknic Great American Wiknic] celebrations being held across the USA. The picnicking area was "Norman's Landscape" just inside the park at Central Park West between 86th & 90th. The picnic lasted from 1 PM - 8 PM. It was easiest to come into the park at the W 86th entrance (<span class="plainlinks">[http://maps.google.com/maps/ms?msa=0&msid=214940327905495862192.0004a5c63b2a204447008&ie=UTF8&ll=40.786244,-73.967611&spn=0.005443,0.013078&z=17 '''''directions''''']</span>). Remember it was a wiki-picnic, which meant [http://en.wikipedia.org/wiki/Potluck potluck]. There was lots of good food! [[Category:Wikimedia NYC]] is0dlmahhh20rwosozmbh8z8b7yjp3t Wikipedia Meetup NYC Salon 0 86 250 2011-06-30T03:52:08Z Pharos 12 moved [[Wikipedia Meetup NYC Salon]] to [[Meetup]]: simplify 250 wikitext text/x-wiki #REDIRECT [[Meetup]] qne0asrlb03o0ap6b84nwv3xamk9zzs Template:Conferences 10 87 2175 606 2020-09-25T20:47:29Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2175 wikitext text/x-wiki {| id="mp-topbanner" style="width:100%; -moz-border-radius: 1em; background:#fcfcfc; border:1px solid #ccc; margin-bottom: 7px;" | style="font-size:95%; text-align: center;" | '''Conferences:''' — [[Conferences|Overview]] — [[Wiki-Conference]] & [[Wiknic|Wiknic Picnic]] — [[Wikipedia Day]] — [[Meetup|Monthly Meetup Salon]] & [[Wiki-Workshop|Monthly Wiki-Workshop]] |}<noinclude>[[Category:Templates]]</noinclude> 48lol12ky8qjodj6mqv5vlhuelqomhf Template:Outreach 10 88 2191 571 2020-09-25T20:53:09Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2191 wikitext text/x-wiki {| id="mp-topbanner" style="width:100%; -moz-border-radius: 1em; background:#fcfcfc; border:1px solid #ccc; margin-bottom: 7px;" | style="font-size:95%; text-align: center;" | '''Outreach:''' — [[Conferences]] — [[Cultural partnerships]] — [[Universities]] — [[Multimedia]] |}<noinclude>[[Category:Templates]]</noinclude> hlndc8yhzp2iicls5zcg01m1vtp8tf2 MediaWiki:Mainpage 8 92 273 2011-07-04T01:49:06Z Blurpeace 5 change to Home 273 wikitext text/x-wiki Home d72gnfpe9o73ll7fk9c1dsyb578kbxh Bylaws 0 93 2520 1584 2024-09-28T18:55:36Z Pharos 12 soft redirect to metawiki 2520 wikitext text/x-wiki #REDIRECT [[m:Wikimedia New York City/Bylaws]] ry3qg27danze9bb4tbr58k7rv97xg37 Mission 0 94 1821 1816 2018-04-11T17:41:18Z Megs 838 1821 wikitext text/x-wiki The mission of Wikimedia NYC is to contribute to a brighter, broader, and better Wikimedia Movement through advancing open content and communities in partnership with the peoples and institutions of the greater New York metropolitan area. [[Category:Wikimedia NYC]] 95ja7216mc9yjlnl475fekqo4q85qkf MediaWiki:Contactpage 8 95 282 2011-07-05T00:31:42Z Blurpeace 5 create 282 wikitext text/x-wiki Contact kyn47aysqbedkq7n4k5f2m0g9awgp3e MediaWiki:Contact 8 96 289 2011-07-05T05:57:26Z Blurpeace 5 create 289 wikitext text/x-wiki Contact kyn47aysqbedkq7n4k5f2m0g9awgp3e Template:@ 10 99 2170 564 2020-09-25T20:45:46Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2170 wikitext text/x-wiki [[File:At_sign.svg|{{{1|17px}}}| at |link=]]<noinclude>[[Category:Templates]]</noinclude> rgo9wgsa5127lkip0wasuydm8vjifoz Template:Tocright 10 102 2197 563 2020-09-25T20:56:03Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2197 wikitext text/x-wiki {| cellspacing="0" cellpadding="0" style="clear: {{{clear|right}}}; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: {{{width|{{{1|auto}}}}}};" {{#if:{{{limit|}}}|class="toclimit-{{{limit}}}"}} | __TOC__ |}<noinclude>[[Category:Templates]]</noinclude> 17eqnfdsrnq5w1qwzhqi55wwacxk9j6 Template:TOC limit 10 103 308 307 2011-07-09T14:54:01Z Blurpeace 5 Protected "[[Template:TOC limit]]": Protected template ([edit=sysop] (indefinite) [move=sysop] (indefinite)) 308 wikitext text/x-wiki <div class="toclimit-{{{1|{{{limit|3}}}}}}">__TOC__</div> glz05q89ekkqdfm4ogqaz8u4k7pxrit WikNYC 2011 0 113 495 327 2012-02-12T12:11:32Z Quentinv57 91 fix double redirect 495 wikitext text/x-wiki #REDIRECT [[Wiknic]] mpk1s2hgiugsp06hlw02vp1r13v4sm2 Template:Color 10 117 2174 334 2020-09-25T20:47:22Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2174 wikitext text/x-wiki <span style="color:{{{1|}}}">{{{2|}}}</span><noinclude>[[Category:Templates]]</noinclude> oopgow2ja1q7o4yfd94fs9y8b84doop Main Page 0 120 376 2011-07-14T17:04:15Z Pharos 12 useful redirect for the old fogies 376 wikitext text/x-wiki #REDIRECT [[Home]] 72taa3j31esio4oeiryeqzvb7qdlmse About 0 146 2386 2150 2024-01-05T01:08:28Z ComplexRational 5656 link to Meta page 2386 wikitext text/x-wiki The '''Wikimedia New York City''' organization is an official chapter of the Wikimedia Foundation, known for being the parent organization behind Wikipedia. The goal of the chapter is to support the New York tri-state area with educational initiatives, development of free culture, providing free central knowledge, and advocating for the best interests of the community. More information can be found on the [[meta:Wikimedia New York City|Meta-Wiki]] page. [[Category:Wikimedia NYC]] djsglki7ks2q8flsb5k7ujo41cponmr Donate 0 151 1424 1416 2013-11-21T05:42:46Z Harej 318 Removing justify 1424 wikitext text/x-wiki <div style="padding:2em 4em;"> <div style="font-size:200%; line-height:1.2;">'''Support free knowledge in New York and around the world'''</div> <p style="font-size:125%; line-height:1.8; padding-top:1em;"> Wikimedia NYC's local programs support Wikipedia and help bring New York's and the world's knowledge to everyone. '''Will you help?'''</p> <p class="plainlinks" style="font-size:150%; line-height:1.8; text-align:justify; padding-top:1em;"> ⇒&nbsp;'''[https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=wm-nyc%40wikimedia%2eorg&lc=US&item_name=Wikimedia%20NYC&no_note=0&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHostedGuest Donate securely through PayPal]'''</p> <p style="font-size:150%; line-height:1.8; padding-top:1em;"> ⇒&nbsp;Our bitcoin address is: '''1F4Ka3nHH3Ef1P2f66AwLEqwHo6J9wFHKC'''</p> <p style="line-height:1.8; text-align:justify; padding-top:1em;"> Wikimedia New York City, Inc. is a non-profit charity established in the United States. The Internal Revenue Service (IRS) has determined that Wikimedia New York City, Inc. is an exempt organization under Internal Revenue Code Section 501(c)(3) with a classification of "public charity", and for that reason donations from persons or entities located in the United States may be eligible for deduction claim on Federal, State and/or Local income taxes. A copy of the determination letter is available upon request. (Determination letter dated December 22, 2011; exemption effective date is July 7, 2009.) Please consult your lawyer or tax adviser to determine deductibility of specific donations.</p> </div> hrq5kro9f991w3lf48fzlb7n358fnfq File:Paypal.gif 6 152 450 2011-12-28T01:33:30Z Peter.C 65 450 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 MediaWiki:Common.css 8 154 1606 1405 2014-11-26T05:31:20Z Glaisher 350 Undo revision 1197 by [[Special:Contributions/Jeremyb|Jeremyb]] ([[User talk:Jeremyb|talk]]); mobile domain now exists 1606 css text/css /* CSS placed here will be applied to all skins */ .cn-fundraising { display:none; } /* Topbanner markup lifted from Wikivoyage, can be used for multiple pages */ .topbanner { position: relative; overflow: hidden; max-width: 1800px; height: auto; } .topbanner img { max-width: 100%; height: auto; width: auto\9; } .topbanner-box { position: absolute; z-index: 2; margin-top: 1.5em; color: white; width: 50%; min-width: 20em; left: 2%; text-align: left; } .topbanner .name { position: absolute; z-index: 2; margin: 0.6em 0 0 0.4em; padding: 8px 7px; font-size: 2.2em; background: rgb(16,16,16); background: rgba(0,0,0,0.5); border-radius: 4px; color: white; white-space: nowrap; line-height: 0.9em; } 47naejqjx2y2ztsdxf6bdcxjy16u3mn Template:Softredirect 10 168 2194 498 2020-09-25T20:54:40Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2194 wikitext text/x-wiki [[file:redirect arrow without text.svg|↳|link=]]<span class="redirectText" id="softredirect">[[:{{{1}}}|{{{2|{{{1}}}}}}]]</span><br /><span style="font-size:85%; padding-left:52px;">This page is a [[w:Wikipedia:Soft redirect|soft redirect]].</span><noinclude>[[Category:Templates]]</noinclude> 0nuigyppj4esvobbzy0wziwymotxs8q Wikimedia New York City/History 0 202 1751 1734 2017-06-24T04:51:46Z Becksguy 132 Undo revision 1570 by [[Special:Contributions/87.237.44.26|87.237.44.26]] ([[User talk:87.237.44.26|talk]]) rv test edit 1751 wikitext text/x-wiki This page tracks the history of the activities of Wikimedia New York City. ==Annual calendar== {| class="wikitable" ! Monthly meetings |- |'''[[#Wikipedia Meetup NYC Salon|Wikipedia Meetup NYC Salon]]'''<br>regular discussion group |- ! Occasional series |- |'''[[#Wiki Workshops / Wikipedia at the Library|Wiki Workshops]]'''<br>public outreach classes |} {| class="wikitable" ! Summer |- |'''[[#Wiki-Conference New York / WikNYC Picnic|Wiki-Conference New York]]'''<br>free conference for everyone |- ! Fall |- |'''[[#Wikipedia Takes Manhattan|Wikipedia Takes Manhattan]]'''<br>urban photo scavenger hunt |- ! Winter |- |'''[[#Wikipedia Day NYC|Wikipedia Day NYC]]'''<br>Wikipedia's birthday bash |- ! Spring |- |?? |} *Permanent ongoing projects: [[#Wikimedia NYC Salon|Wikimedia NYC Salon]], [[#Wikipedia at the Library / Wikipedia in the Neighborhood|Wikipedia at the Library]], [[#Cultural Embassy Project|Cultural Embassy Project]] *Upcoming projects: [[#Wikipedia Day NYC|Wikipedia Day NYC]], [[#Yiddish Encyclopedia Project|Yiddish Encyclopedia Project]] *Projects that will be back on the calendar: [[#Wiki-Conference New York / WikNYC Picnic|Wiki-Conference New York]], [[#Wikipedia Loves Art|Wikipedia Loves Art]], [[#Wikipedia Takes Manhattan|Wikipedia Takes Manhattan]] ==Projects== ===Meetings=== ====Wikipedia Meetup NYC Salon==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:3.16.08NYCMeetupByLuigiNovi13.jpg|thumb|left|[[w:Wikipedia:Meetup/NYC|New York City Meetup]]—[[w:Salon (gathering)|Salon]].]] |- | Intended Audience | Wikimedian community, Free Culture community |- | Partners | Columbia University Department of Astronomy |- | Topic or theme | Presentations—Roundtable discussions. |- | Purpose | Promote sharing of ideas. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Increased online distribution in broader Wikimedia community |- | Last update | February 2011 |- | So far | * 01/2008 [[w:Wikipedia:Meetup/NYC/January 2008|ScienceApologist on Pseudoscience on Wikipedia]] * 03/2008 [[w:Wikipedia:Meetup/NYC/March 2008|David Shankbone on Wikinews, DGG on Librarians' criteria for reliability, Gmaxwell on New pages patrol feature]] * 06/2008 [[w:Wikipedia:Meetup/NYC/June 2008|MBisanz on Admin coaching]] * 11/2008 [[w:Wikipedia:Meetup/NYC/November 2008|Shapiros10 on RfA and ageism, Mitchazenia on educational projects]] * 01/2009 [[w:Wikipedia:Meetup/NYC/January 2009|Newyorkbrad on Biographies of living persons]] * 03/2009 [[w:Wikipedia:Meetup/NYC/March 2009|Dispenser on tools]] * 05/2009 [[w:Wikipedia:Meetup/NYC/May 2009|Becksguy on adjusting to growth]] * 09/2009 [[w:Wikipedia:Meetup/NYC/September 2009|Mindspillage on Wikimedia strategy, FunFan on stock photos]] * 11/2009 [[w:Wikipedia:Meetup/NYC/November 2009|DGG on fringe ethnicity topics]] * 03/2010 [[w:Wikipedia:Meetup/NYC/March 2010|RoyGoldsmith on WP:SYNTHESIS, Tomlzz1 on .nyc]] * 05/2010 [[w:Wikipedia:Meetup/NYC/May 2010|Frenezulo on language study, DGG on Wikimedia Commons controversy]] * 10/2010 [[w:Wikipedia:Meetup/NYC/October 2010|October 2010]] * 11/2010 [[w:Wikipedia:Meetup/NYC/November 2010|November 2010]] * 12/2010 [[w:Wikipedia:Meetup/NYC/December 2010|December 2010]] * 02/2011 [[w:Wikipedia:Meetup/NYC/February 2011|February 2011]] * 03/2011 [[w:Wikipedia:Meetup/NYC/March 2011|March 2011]] * 04/2011 [[w:Wikipedia:Meetup/NYC/April 2011|April 2011]] {{hidden|Chapter business meetings | * 11/2007 [[w:Wikipedia:Meetup/NYC/November 2007|November 2007]] * 01/2008 [[w:Wikipedia:Meetup/NYC/January 2008|January 2008]] * 03/2008 [[w:Wikipedia:Meetup/NYC/March 2008|March 2008]] * 06/2008 [[w:Wikipedia:Meetup/NYC/June 2008|June 2008]] * 09/2008 [[w:Wikipedia:Meetup/NYC/September 2008|September 2008]] * 11/2008 [[w:Wikipedia:Meetup/NYC/November 2008|November 2008]] * 12/2008 [[w:Wikipedia_talk:Meetup/NYC/November_2008#Mini-meetup Wednesday, Dec_3_with WMF Head of Communications Jay Walsh|December 2008]] * 01/2009 [[w:Wikipedia:Meetup/NYC/November 2008|January 2009]] * 02/2009 [[w:Wikipedia:Meetup/NYC#Feb 7 at the Brooklyn Museum|February 2009]] * 03/2009 [[w:Wikipedia:Meetup/NYC/March 2009|March 2009]] * 05/2009 [[w:Wikipedia:Meetup/NYC/May 2009|May 2009]] * 09/2009 [[w:Wikipedia:Meetup/NYC/September 2009|September 2009]] * 11/2009 [[w:Wikipedia:Meetup/NYC/November 2009|November 2009]] * 04/2010 [[Free Culture Alliance NYC|April 2010]] }} |- | Upcoming | * [[w:Wikipedia:Meetup/NYC|May 21, 2011]] |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | Video and audio: * [http://www.archive.org/details/PseudoscienceOnWikipedia ScienceApologist on Pseudoscience on Wikipedia] on Internet Archive * [http://www.archive.org/details/Wikimedia_NYC_March_08_Presentations David Shankbone on Wikinews, DGG on Librarians' criteria for reliability, Gmaxwell on New pages patrol feature] on Internet Archive *[http://www.archive.org/details/Wikimedia_NYC_June_08_Presentations MBisanz on Admin coaching] on Internet Archive * [[:File:WMNYC Nov08.ogg|Shapiros10 on RfA and ageism, Mitchazenia on educational projects]] * [[w:Wikipedia:Wikivoices/Episode 42|Becksguy on adjusting to growth]] |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:ScienceApologist|ScienceApologist]], [[w:User:Nightscream|Nightscream]], [[w:User:Daniel Case|Daniel Case]] |} ====Wiki-Conference NYC / WikNYC Picnic==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:NYC wikiconference organizing Open Space.jpg|thumb|left|[[Events#National conferences|National-scale event]]—[[w:Wikipedia:Meetup/NYC|New York City Meetup]]—[[w:Salon (gathering)|Salon]]—[[w:Picnic|Picnic]].]] |- | Intended Audience | Wikimedian community, Free Culture community |- | Partners | Free Culture NYU, Information Law Institute at NYU School of Law |- | Topic or theme | Presentations—Roundtable discussions—Celebration of Wikimedia projects. |- | Purpose | Promote sharing of ideas—Community-building. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Documentation and recordings online, preliminary ideas for 2010 |- | Last update | April 2011 |- | So far | * 08/2007 [[w:Wikipedia:Meetup/NYC/August 2007|Central Park Picnic]] (picnic only) * 08/2008 [[w:Wikipedia:Meetup/NYC/August 2008|Prospect Park Picnic]] (picnic only) * 07/2009 [[w:Wikipedia:Meetup/NYC/Wiki-Conference 2009|1st Wiki-Conference NYC]] * 08/2010 [[w:Wikipedia:Meetup/NYC/Wiki-Conference|2nd Wiki-Conference NYC]] |- | Upcoming | * Summer 2011 |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | *[[w:Wikipedia:Meetup/NYC/Wiki-Conference 2009|Wiki-Conference New York 2009]] *[http://www.archive.org/search.php?query=Wiki–Conference_New_York Wiki-Conference New York 2009] on Internet Archive *[[w:Wikipedia:Meetup/NYC/Wiki-Conference|Wiki-Conference New York 2010]] *[[Wikimania 2011/Bids/New York City]] *[[w:Wikipedia:Wiknic|The Great American Wiknic]] of Summer 2011 |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:ParkerHiggins|ParkerHiggins]], [[w:User:Reagle|Reagle]], [[w:User:johndbritton|Johndbritton]], [[w:User:Mitchazenia|Mitchazenia]] |} ====Wikipedia Day NYC==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[w:Wikipedia:Wikipedia Day|Wikipedia Day]]—[[w:Wikipedia:Meetup/NYC|New York City Meetup]]—[[w:Salon (gathering)|Salon]]—[[w:Party|Party]]. |- | Intended Audience | Wikimedian community, Free Culture community |- | Partners | Free Culture NYU |- | Topic or theme | Presentations—Roundtable discussions—Celebration of Wikimedia projects. |- | Purpose | Promote sharing of ideas—Community-building. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Documentation and recordings online, preliminary ideas for 2011 |- | Last update | May 2010 |- | So far | *01/2010 [[w:Wikipedia:Meetup/NYC|Wikipedia Day NYC 2010]] |- | Upcoming | *January 2011 |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | *[[w:Wikipedia:Meetup/NYC/Wikipedia Day 2010|Wikipedia Day NYC 2010]] *[[w:Wikipedia:Wikipedia Day|Wikipedia Day]] *<span class="plainlinks">[http://outreach.wikimedia.org/wiki/Wiki_X Wiki X]</span> (10th anniversary in 2011) on Wikimedia Outreach |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:ParkerHiggins|ParkerHiggins]], [[w:User:DGG|DGG]], [[w:User:Mozucat|Mozucat]], [[w:User:Mitchazenia|Mitchazenia]], [[w:User:Sidepocket|Sidepocket]] |} ===Learning=== ====Wiki Workshops / Wikipedia at the Library==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:New York Public Library May 2011.JPG|thumb|left|Classes—Wikipedia article writing—Library.]] |- | Intended Audience | General public, University community, Library community |- | Partners | New York Public Library, City University of New York, Princeton Theological Seminary, New Work City, Red Hat |- | Topic or theme | Media literacy—Wiki contributions. |- | Purpose | Education—Outreach—Free content creation. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Working with NYPL, BPL, CUNY, Columbia, and other libraries and educational organizations; [http://outreach.wikimedia.org/wiki/Public_Policy_Initiative Wikimedia Public Policy Initiative] at regional universities; Wiki Workshops at Red Hat |- | Last update | May 2011 |- | So far | * 07/2009 [[w:User:DGG/NYPL|Mid-Manhattan Library]] Wikipedia 1: Basics, & Wikipedia 2: Becoming a Contributor * 09/2009 [[w:User:Mozucat/workshops|CUNY LaGuardia]] Wikipedia Demystified: Content, Coverage, Controversies * 12/2009 [http://www.convergemag.com/events/CUNY-8th-Annual-IT-Conference.html CUNY IT Conference] Wikipedia in the Classroom * 03/2010 [http://library.citytech.cuny.edu/blog/2010/03/this-week-web-2-0-happy-hour-for-faculty/ City Tech Library] Is there a place for Wikipedia in the classroom? * 04/2010 [http://www.lagcc.cuny.edu/ctl/dfl/dfl0910/0409/default.htm CUNY LaGuardia Center for Teaching and Learning] Wikipedia: Overview, hands-on, ''Here Comes Everybody'' Chapter 5 * 04/2010 ''Wikipedia, Museums, Libraries, and Access to Art Collections'' Columbia University Libraries with [[w:User:Wittlylama|Wittylama]] * 05/2010 [http://www2.atla.com/nyatla/spring10.html New York Area Theological Library Association] Wikipedia for Librarians * 10/2010 [http://www.princeton.edu/academicservices/about/director/lunch-n-learn/fall2010/1013.xml Princeton University] Improving Wikipedia * 01/2011 [[w:Wikipedia:Campus Ambassadors|Wikipedia Campus Ambassadors]] with Wikimedia Foundation at CUNY LaGuardia * 01/2011 [http://ctl.laguardia.edu/dfl/dfl1011/myi/default.htm CUNY LaGuardia Center for Teaching and Learning] Follow-up and How to Edit Wikipedia: Hands-on Workshop * 02/2011 [[w:Wikipedia:Meetup/NYC/Workshop|New Work City NWCU]] Wikipedia Workshop * 04/2011 [http://fcpe.adelphi.edu/facultyday/11/2011.Teaching.Conference.Program.pdf Adelphi University Teaching with Technology Conference] The Wikipedia Campus Ambassador Program: Collaborating on Open Content and Nurturing Creative Inquiry in Students * 04/2011 [[w:Wikipedia:Meetup/NYC/Workshop|New Work City NWCU]] Wikipedia Workshop * 04/2011 [http://administration.adelphi.edu/img/wikipedia-ambassadors.php Adelphi University New Media Workshops] Join Adelphi in Wikipedia's Campus Ambassador Program |- | Upcoming | * 05/2011 [[w:Wikipedia:Meetup/NYC/Workshop|New Work City NWCU]] Wikipedia Workshop * 06/2011 [[w:Wikipedia:Meetup/NYC/Workshop|New Work City NWCU]] Wikipedia Workshop * Planning for [[Women on Wikipedia Month]] Girls in Tech NYC workshop at Red Hat |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[w:Wikipedia:Wikipedia at the Library|Wikipedia at the Library]] on Wikipedia * [[w:User:DGG/NYPL|Mid-Manhattan Library workshop notes]] on Wikipedia * [[w:User:Mozucat/workshops|LaGuardia CC workshop notes]] on Wikipedia * [http://library.laguardia.edu/files/pdf/libnotes/lnspring2010.pdf CUNY IT Conference: Wikipedia in the Classroom] CUNY LaGuardia Library Notes * [[w:User:DGG/NYCTC|City Tech Library workshop notes]] on Wikipedia * [[w:User:DG/PTS|NYATLA 1]] and [[w:User:Pharos/PTS|NYATLA 2]] workshop notes on Wikipedia * [[w:User:DGG/Princeton|Princeton University workshop notes]] on Wikipedia * [[NY Wiki Chics]] * [[w:Wikipedia:WikiProject United States Public Policy/Courses/Spring 2011/Copyright, Commerce, and Culture (Evan Hill-Ries)|First Wikipedia Campus Ambassador course @ NYU]] on Wikipedia |- | Coordination | [[w:User:DGG|DGG]], [[w:User:Pharos|Pharos]], [[w:User:Ssilvers|Ssilvers]], [[w:User:Mozucat|Mozucat]], [[w:User:Mblumber|Mblumber]] |} ====NYCwiki Neighborhoods Project==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:5 Boroughs Labels New York City Map Julius Schorzman.png|thumb|left|Neighborhoods—Wikipedia article writing.]] |- | Intended Audience | General public, Neighborhood community groups |- | Partners | Connecting NYC, Internet Society-NY, Wireless Harlem, CUNY LaGuardia [[Wiki Center]] |- | Topic or theme | Wiki contributions—City life. |- | Purpose | Education—Outreach—Free content creation. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Finding home for a neighborhoods wiki, content workshops with the public and neighborhood community groups |- | Last update | January 2011 |- | So far | * 11/2009 [http://www.wirelessharlem.org/ Wireless Harlem] Tech Saturdays * 05/2010 [http://www.isoc-ny.org/?p=1515 ISOC-NY Event: dot nyc – How are we doing?] * 09/2010 [http://hicap.blogspot.com/2010/08/september-2010-events.html Harlem Internet Computer Access Program - OneWebDay] |- | Upcoming | * 02/2011 [http://www.queenslibrary.org/index.aspx?page_id=44&branch_id=Lh Langston Hughes Library] NYCwiki workshop |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [http://nycwiki.org/ NYCwiki.org] * [http://nycwiki.org/wiki/NYCwiki:Neighborhoods NYCwiki Neighborhoods Project] on NYCwiki.org * [http://www.coactivate.org/projects/campaign-for.nyc/traditional-neighborhood-names dotNeighborhoods] on Connecting NYC * [[w:User:Pharos/NYC|ISOC-NY workshop notes]] on Wikipedia * [http://coactivate.org/projects/campaign-for.nyc/blog/2011/01/21/10-year-update-and-invitation-to-community-board/ 2011 NYCwiki workshop(s)] |- | Coordination | Interns Archana and Andrea and [[w:User:Blurpeace|Blurpeace]], [[w:User:Pharos|Pharos]], [[w:User:Tomlzz1|Tomlzz1]], [[w:User:Wwwhatsup|Wwwhatsup]] |} ====Yiddish Encyclopedia Project==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:Jidysz.lebt.svg|thumb|left|[[w:Book scanning|Book scanning]]—[[w:Yiddish Wikipedia|Yiddish Wikipedia]].]] |- | Intended Audience | Yiddish community |- | Partners | Congress for Jewish Culture (CYCO), Yugntruf |- | Topic or theme | Wikipedia—Wikisource. |- | Purpose | Free content creation—Minority language outreach. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Digitization of ''Algmeine Encyclopedie'' with Congress for Jewish Culture and Google Books |- | Last update | July 2010 |- | So far | Discussions with Congress for Jewish Culture, consideration of ''Enciclopedia Chilena'' model |- | Upcoming | * No date set |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[Wikimedia New York City/CYCO Yiddish Encyclopedia|CYCO Yiddish Encyclopedia]] at Meta * [http://www.cycobooks.org/ CYCO Publishing House] * [[:yi:|Yiddish Wikipedia]] * [[:s:yi:|Yiddish Wikisource]] * [http://wikimania2010.wikimedia.org/wiki/Submissions/Enciclopedia_Chilena:_Bringing_it_back_alive_using_Wikisource Enciclopedia Chilena: Bringing it back alive using Wikisource] at Wikimania 2010 |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:DGG|DGG]], [[w:User:Chaim Shel|Chaim Shel]], [[w:User:Ikhveysnit|Ikhveysnit]] |} ====Wikipedia Cultural Embassy==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:Jewish Museum by JiaJia Fei.jpg|thumb|left|Cultural institution—Wikipedia article writing.]] |- | Intended Audience | General public |- | Partners | Local cultural institutions (New York Public Library, Jewish Museum, Girl Scouts National Historic Preservation Center, etc), regional help with [[w:Wikipedia:GLAM/SI|Smithsonian Institution collaboration]] |- | Topic or theme | Wikipedia. |- | Purpose | Free content creation—cultural outreach. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | United Nations Photo Library image donation, further development of embassy pages, Wikipedian in Residence program |- | Last update | April 2011 |- | So far | * 06/2009 [[w:Jewish Museum (New York)|Jewish Museum]] starter article * 04/2010 [[w:Wikipedia:Culture/NYPL|New York Public Library embassy page]] prototype * 04/2010 [[:commons:Commons:Brooklyn Museum|Brooklyn Museum image donation]] with [[User:Multichill|Multichill]] * 10/2010 [[w:Brooklyn Museum|Brooklyn Museum]] fixer-upper article * 03/2011 [[:w:Commons:Geographicus|Geographicus image donation]] with [[User:Multichill|Multichill]] |- | Upcoming | * 05/2011 [[GLAMcamp NYC]] |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[w:Wikipedia:Culture|Wikipedia Cultural Embassy]] on Wikipedia * [[w:Wikipedia:Culture/NYPL]] on Wikipedia * [[w:Wikipedia:GLAM/SI]] on Wikipedia |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:Ssilvers|Ssilvers]], [[w:User:Star Mississippi|Star Mississippi]], [[w:User:Chaoticfluffy|Chaoticfluffy]] |} ===Photography=== ====Wikipedia Takes Manhattan==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:WSTM Lazy Bastards 0001.jpg|thumb|left|[[:w:en:Wikipedia:Wikipedia Takes The City|Wikipedia Take The City]]—[[commons:Commons:Photo scavenger hunts|Photo scavenger hunt]].]] |- | Intended Audience | General public |- | Partners | Free Culture Columbia, Free Culture NYU, The Open Planning Project |- | Topic or theme | Photography—Architecture—City life. |- | Purpose | Free content creation—Outreach. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Review of WTM 3 |- | Last update | October 2010 |- | So far | * 04/2008 [[w:Wikipedia:Wikipedia Takes Manhattan/Spring 2008|Wikipedia Takes Manhattan]] (WTM 1) * 10/2008 [[w:Wikipedia:Wikipedia Takes Manhattan/Fall 2008|Wikis Take Manhattan]] (WTM 2) * 10/2009 [[w:Wikipedia:Wikipedia Takes Manhattan|Wikis Take Manhattan]] (WTM 3) {{hidden|Other regional photo events | * 01/2009 [[w:Wikipedia:Wikipedia Takes the Subway|Wikipedia Takes the Subway]] * 10/2009 [[w:Wikipedia:WikiProject Philadelphia/Wikipedia Takes Philadelphia|Wikipedia Takes Philadelphia]] }} |- | Upcoming | * Planning for Spring 2011 |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[w:Wikipedia:Wikipedia Takes Manhattan/Spring 2008|Wikipedia Takes Manhattan]] on Wikipedia * [[commons:Commons:Wikipedia Takes Manhattan|Wikipedia Takes Manhattan]] on Commons * [[w:Wikipedia:Wikipedia Takes Manhattan|Wikis Take Manhattan]] on Wikipedia * [[commons:Commons:Wikis Take Manhattan|Wikis Take Manhattan]] on Commons * [http://www.livablestreets.com/projects/wikis_take_manhattan/project-home Wikis Take Manhattan] on Livable Streets * [http://www.streetfilms.org/archives/wikis-take-manhattan/ Wikis Take Manhattan] on Streetfilms |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:Mitchazenia|Mitchazenia]], [[w:User:Jeremyb|Jeremyb]], [[w:User:Becksguy|Becksguy]], [[w:User:Jim.henderson|Jim.henderson]] |} ====Wikipedia Loves Art==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:WLA moma Claude Monet Reflections of Clouds on the Water-Lily Pond.jpg|thumb|left|Museum—[[commons:Commons:Photo scavenger hunts|Photo scavenger hunt]].]] |- | Intended Audience | General public |- | Partners | Locally: Brooklyn Museum, Jewish Museum, Metropolitan Museum of Art, Museum of Modern Art, New-York Historical Society, Film Society of Lincoln Center, Free Culture Columbia, Free Culture NYU Globally: 16 cultural institutions total, cooperation with Wikimedia UK, and other regional Wikimedians |- | Topic or theme | Photography—Art. |- | Purpose | Free content creation—Outreach. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Post-event processing |- | Last update | May 2010 |- | So far | *[[w:Wikipedia:Meetup/NYC/February 2009|02/2009]] Brooklyn Museum, Jewish Museum, Metropolitan Museum of Art, Museum of Modern Art, New-York Historical Society events |- | Upcoming | * Ongoing [[w:Wikipedia:Wikipedia Loves Art|Wikipedia Loves Art]] international efforts |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[w:Wikipedia:Wikipedia Loves Art|Wikipedia Loves Art]] on Wikipedia * [[w:Wikipedia:Wikipedia Loves Art/US-UK|Wikipedia Loves Art/US-UK]] on Wikipedia * [http://www.flickr.com/groups/wikipedia_loves_art/ Wikipedia Loves Art] on Flickr |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:Becksguy|Becksguy]], [[w:User:Jeremyb|Jeremyb]] [[w:User:Star Mississippi|Star Mississippi]] |} ====Lights Camera Wiki==== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[File:Jefferson market edit 2.jpg|thumb|left|Video—Historic places—Walkthrough.]] |- | Intended Audience | General public, (architectural community) |- | Partners | Open Video Alliance, subject area project content partners, (proprietors of historic places, architectural organizations) |- | Topic or theme | Video—Architecture. |- | Purpose | Free content creation—Outreach. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | Public launch and developing more subprojects, Wikimob student workshops |- | Last update | May 2011 |- | So far | * 11/2009 Demonstration for [[Multimedia Usability Project Meeting France]]: :[[w:Jefferson Market Library|Jefferson Market Library]] prototype video, [[w:Grand Central Terminal|Grand Central Terminal]] prototype video * 03/2010 Public launch of Lights Camera Wiki / Architecture and other subprojects * 06/2010 [http://icommons.org/wp-content/uploads/2010/12/1095-1021-Attachment-04.-NPYL_summary.pdf New York Public Library] Wikimedia and Public Video Working Group * 03/2011 [[commons:Category:Videos by the World Monuments Fund|World Monuments Fund video donation]] with [[User:Adrignola|Adrignola]] * 05/2011 [[commons:Category:Videos by Alverno College Advanced Media Studies|Videos by Advanced Media Studies course at Alverno College]] |- | Upcoming | |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | * [[w:Wikipedia:Lights Camera Wiki|Lights Camera Wiki]] on Wikipedia * [[w:Wikipedia:Lights Camera Wiki/Architecture|Lights Camera Wiki/Architecture]] on Wikipedia * [[w:Wikipedia:Videos|Videos]] on Wikipedia * [[commons:Category:Lights_Camera_Wiki|Lights Camera Wiki]] on Commons * [http://www.videoonwikipedia.org/howto.html How to Post a Video to Wikipedia] on Let's Get Video on Wikipedia * [[commons:Commons:Wikipedia Video and Education|Wikipedia Video and Education Working Group]] on Commons |- | Coordination | [[w:User:Gabrielm199|Gabrielm199]], [[w:User:Pharos|Pharos]], [[w:User:Totallynuts|Totallynuts]], [[w:User:Daniel Case|Daniel Case]], [[w:User:Star Mississippi|Star Mississippi]] |} ===Chapter infrastructure=== {| width="80%" border="2" cellspacing="0" cellpadding="4" rules="all" style="margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse; background-color:#F9F9F9; font-size:95%; empty-cells:show; width=90%" ! align="left" colspan="2" bgcolor="#FFC1C1" | General project dimensions |- | Description | [[w:Wikipedia:Meetup/NYC|New York City Meetup]]—[[Wikimedia chapters|Wikimedia chapter]]. |- | Intended Audience | Wikimedian community |- | Partners | Wikimedia Foundation, Free Culture Alliance NYC |- | Topic or theme | Development of non-profit. |- | Purpose | Furthering capacity for future projects. |- ! align="left" colspan="2" bgcolor="#B4EEB4" | In Practice |- | Next step | IRS documents submission |- | Last update | January 2011 |- | So far | * Bylaws written * Approval by Wikimedia Foundation * First board established * Non-profit registered * External projects: [[w:Wikipedia:Geonotice|Geonotice]] revival, [[Free Culture Alliance NYC]], [http://groups.google.com/group/open-education-league-ny Open Education League NY], non-profit advice sharing with [http://www.ourmed.org/index.php/Main_Page Ourmed] * 2009-2010 term Internship program: Archana, Gabriel * [http://www.nwcny.com/ New Work City] coworking |- | Upcoming | * [[Wiki Center]] @ LaGuardia Community College / CUNY, and next phase of Internship program |- ! align="left" colspan="2" bgcolor="#C6E2FF" | Further information |- | Information online | {{hidden|Historical documents | * [[Wikimedia New York City/Chapters Committee|Chapters Committee IRC conversation]] on Meta * [[Wikimedia New York City/Letter to Chapters Committee|Letter to Chapters Committee]] on Meta * [[foundation:Resolution:Approval of Wikimedia New York City|Approval of Wikimedia New York City]] by the Wikimedia Foundation }} * [[Wikimedia New York City/Bylaws|Bylaws]] on Meta * [[Wikimedia New York City/Resolutions|Resolutions]] on Meta |- | Coordination | [[w:User:Pharos|Pharos]], [[w:User:Daniel Case|Daniel Case]], [[w:Becksguy|Becksguy]], [[w:User:MBisanz|MBisanz]], [[w:User:DGG|DGG]], [[w:User:Newyorkbrad|Newyorkbrad]] |} [[Category:Wikimedia NYC]] l5ol3zm6rhypzcc2r5mnrfrz6d3p9ez Category:Wikimedia NYC 14 640 2032 1540 2020-02-05T23:16:07Z Sm8900 565 2032 wikitext text/x-wiki [[Category:contents]] mfeggpnl160s779ijl2xmk8ml10p55v File:Join Wikimedia NYC.jpg 6 676 1412 1411 2013-11-13T06:40:29Z Harej 318 Harej uploaded a new version of &quot;[[File:Join Wikimedia NYC.jpg]]&quot; 1412 wikitext text/x-wiki Derived from [https://commons.wikimedia.org/wiki/File:Wikimania_Takes_Manhattan_-_Met_group_photo.JPG]; CC-BY-SA 3.0. egl7lmowr1538q9l218nily80bij3nu Friendly space policy 0 684 1449 1448 2013-12-04T04:18:49Z Jihyunb 378 1449 wikitext text/x-wiki ==Friendly Space Policy for Wikimedia Events== Wikimedia NYC is dedicated to providing a harassment-free event experience for everyone, regardless of gender, sexual orientation, gender identity or expression, disability, physical appearance, body size, race, religion, or preferred Creative Commons license (and not limited to those aspects). We do not tolerate harassment of conference participants in any form. This kind of behavior is not appropriate for any Wikimedia NYC events. Event participants violating these rules may be sanctioned or expelled from the conference at the discretion of the event organizers. We expect participants to follow these policies at all event venues and related social events. ===Definition of Harassment=== Harassment includes, but shall not be limited to, offensive verbal comments related to gender, sexual orientation, gender identity or expression, disability, physical appearance, body size, race, ethnicity, political affiliation, or religion. Harassment also includes the non-contextual display of sexual images, deliberate intimidation, stalking, unwelcome following, harassing photography or recording, sustained disruption of talks or other events, inappropriate physical contact, and unwelcome sexual attention. Participants asked to stop any harassing behavior are expected to comply immediately. ===Corrective Action=== Event organizers are responsible for ensuring this policy is followed. If they are concerned about the conduct of an individual, or receive a complaint, they will take action appropriate to the situation. In some cases this might be a private warning to the person concerned asking them to change their behaviour. In more serious cases it may be necessary to ask someone to leave. If necessary, event organizers will involve the staff of the premises where the event is being held, or the Police. If you are being harassed, notice that someone else is being harassed, or have any other concerns, please contact a member of event staff immediately. Event staff will be happy to help participants contact hotel/venue security or local law enforcement, provide escorts, or otherwise assist those experiencing harassment to feel safe for the duration of the event. Where an individual exhibits a pattern of harassing behavior, the President of Wikimedia NYC may recommend to the Board that the individual be excluded from all future Wikimedia NYC activities. Such exclusion will take effect pending a resolution of the Board. Any concerns with the implementation of this policy should be raised with the President of Wikimedia NYC in the first instance. ===Contact Information=== Phone numbers for event organizers, local hotel/venue security, local law enforcement, local sexual assault hot line, local emergency and non-emergency medical, and local taxi company to be publicized to event participants as appropriate on a per-event basis ''Similar policies exist for community events as well, such as the [[WMF:Friendly_space_policy|Wikimedia Foundation’s friendly space policy for tech events]], [[wmuk:Participation policy|Wikimedia UK's participation policy]] and [[meta:GLAMcamp DC/Friendly space policy|GLAMcamp’s friendly space policy]].'' a8dk7gtqf6i85ko9wfu3ekyn9aeposl Interviews 0 694 2360 2359 2023-07-02T06:47:21Z Hexatekin 401 2360 wikitext text/x-wiki Dorothy Howard, then Wikipedian in Residence at the Metropolitan New York Library Council, talked to Wikipedians about their work in 2013-2014. Here is a selection of interviews that were published on a new defunct Metro website. The interviews may be able to be found in the Wayback machine. ==GLAM Interviews== *[[Interview with Bob Kosovsky|"Contributing to Wikipedia Articles on Music: An Interview with Bob Kosovsky of NYPL's LPA."]] January 27th, 2014. *[[Interview with CJH's Leanora Lange|"Wikipedia for Special Collections: A Conversation with Center for Jewish History’s Leanora Lange."]] December 2nd, 2013. *[[Interview with William Blueher|"Wikipedia for Special Collections: A Conversation with Watson Library's William Blueher."]] November 13, 2013. *[http://metro.org/articles/adding-authority-archival-information-to-wikipedia-an-interview-at-the-frick/ "Adding Authority Archival Information to Wikipedia: An Interview at The Frick Collection."] February 20th, 2014. [[Category:Interviews]] csp73mdufiwxtjpyg6swh6s2wnc79iq Interview with Bob Kosovsky 0 696 2154 1581 2020-09-25T18:19:11Z 1234qwer1234qwer4 2382 added [[Category:Interviews]] using [[Help:Gadget-HotCat|HotCat]] 2154 wikitext text/x-wiki ===Contributing to Wikipedia Articles on Music: An Interview with Bob Kosovsky of NYPL's LPA=== January 27th, 2014 [[File:The New York Public Library for the Performing Arts-Entrance-Manhattan.jpg|thumb|The New York Public Library for the Performing Arts Entrance. Manhattan, NY]] '''DH: Tell us a little about your experience with Wikipedia. When did you first get started editing?''' BK: I first registered for Wikipedia in July 2006 because I kept hearing about it in the news and though it was another Web 2.0 technique that I should learn. That summer, I was working with a lot of sheet music from musicals. One of the difficulties I encountered was capturing information about the lesser-known musicals especially those from the turn of the 20th century, and having that information handy. Although I found some entries in reference books, I kept thinking that it would be helpful if I created my own reference tool, a collection of bibliographic information. As I began to collect this information, I thought "Why not add it to Wikipedia?" So I began my editing career by working on articles devoted to turn-of-the-century musicals and the people involved with them. '''What topics do you edit most as an employee of the New York Public Library at the New York Public Library for the Performing Arts?''' As a trained musician who is interested in the performing arts, I edit articles primarily dealing with the performing arts, especially on music. One pet project of mine is creating articles on some of our intellectually valuable music manuscripts. For decades we have kept a file of published journal articles on these manuscripts. Those articles have been essential in creating Wikipedia entries. Beyond that pet project, I don't have a systematic plan and edit whatever strikes my fancy within the sphere of my subject specialty. I try to edit things that I regard as being helpful to others that come to my attention as a result of work, through reference questions, or through dialogues on music-related email lists that I follow. I once had an email reference question where the patron asked who was the "Broadway Rose" mentioned in Betty Comden's and Adolph Green's lyrics to the song "Conga" from Leonard Bernstein's musical "Wonderful Town." That made me create an article on Broadway Rose. Some time ago a European music librarian lamented that Wikipedia did not have a detailed list of composer catalogs (necessary tools in field of music scholarship). So I took it upon myself to add bibliographic information to the article "Catalogues of classical compositions." Another article to which I contributed is "Retrograde (music)." In music, retrograde is the idea that one can take a melodic idea and have it played in reverse. Though it may sound odd, retrograde was an important compositional technique prior to the year 1600 and then was revived in the 20th century where it became even more important. With the help of others, I can say proudly that the Wikipedia article on retrograde is far more detailed and superior to any comparable article in any music dictionary, music encyclopedia, or in any textbook or history of music (all of which I had to consult to expand the article). I also created the article on the building where I work, the New York Public Library for the Performing Arts. Although writing Wikipedia articles is certainly not part of my job description, I was aware that authoring that article could be considered a conflict of interest. So I made sure to work on the article only when I was not at work, and included controversial comments that have appeared in the press, so as to ensure balance in the article's point of view. In that regard, I try hard not to use Wikipedia as a publicity tool, but as a source of information about the resource. (I also try to restrict most my editing activities to when I'm not at work.) Though I began to see how Wikipedia could enhance my work tasks, I've also extended my interest into other topics of which I'm knowledgeable. In the 1960s, my family purchased a townhouse in Greenwich Village near where I attended school (and near METRO's headquarters). We sold the house before moving in, but not before I discovered that it was built on top of a dried-up riverbed, that of Minetta Creek. For over 40 years I've kept up with knowledge of Minetta Creek until I realized that I could share what I knew (and find out more) by writing an article for Wikipedia. [[File:1900 BugabooMan NewYorkWorld June10 NYPL p2.jpeg|thumb|1900 Bugaboo Man. New York World, June 10. Uploaded by the New York Public Library for the Performing Arts, Music Division.]] '''Tell us a about the dynamics of your Wikipedia work at NYPL. Do you collaborate with other staff members to choose topics to edit on Wikipedia?''' My coworkers know that I am involved with Wikipedia and we have had three edit-a-thons in our building. But except for one, most of the staff has shown reluctance to join in. It might be because of the economy, where each staff member is currently saddled with doing the jobs that were previously accomplished by 2-4 people. But also I believe that because so many staff members are involved with the performing arts beyond the library, it doesn't leave enough time to easily learn and contribute to Wikipedia. So I operate alone. '''What concrete successes have you been able to track that result from your activity on Wikipedia for NYPL?''' Our first edit-a-thon received major attention from the New York Times, as well as an article in the American Library Association's American Libraries. As edit-a-thons have become more commonplace it has been harder to sustain the interest among the public without extensive publicity. I realize that any edit-a-thon must be publicized widely, far beyond those you expect to attend. It can be a great way to raise awareness among those who do not regularly consult Wikipedia. I have not systematically tracked the articles I have created as they are of specialized interest. Yet, when I see their page statistics I know that they receive probably more attention through Wikipedia than through their bibliographic records in our catalog. '''What are your goals as a Wikipedia editor at NYPL Library of the Performing Arts?''' Again, I don't see Wikipedia as a vehicle for publicity (such use is specifically forbidden by the site's rules). Rather, I see Wikipedia as a chance to integrate specialized information into the wider universe of knowledge and to provide connections between topics. I truly believe that every one of our music manuscripts plays a larger role in general history than just being a collection of music. By assimilating and presenting all the published information I can find through Wikipedia articles, I can show the world the significance of these works and their relevance within a larger context. '''What types of projects do you foresee being helpful for Wikipedia and other cultural heritage organizations?''' First there is the Wikipedia side. When many talk about "Wikipedia," we are often using that as a shorthand for the Wikimedia Foundation and its projects. There are a number of fabulous projects to which library staff could contribute. After the encyclopedia, probably the most notable is the Commons, the repository of (mostly) free imagery that anyone can use and study. This is a great counterweight to for-profit image archives, as organizations will look for free images before they pay a for-profit. Just recently, a picture I took of my institution appeared in the Huffington Post. I have also contributed to WikiQuote, a repository of notable quotations.) Then there is the library side. Since this interview is intended for METRO members, I think the combination of Wikipedia and METRO can provide a unique opportunity for librarians of different institutions to foster interlibrary collaboration by focusing on articles of mutual interest and improving our coverage in Wikipedia. One example is a project I began during the summer: Wikipedia's coverage of Special Collections. The meager article on Special Collections in Wikipedia is embarrassing to those of us who work with such materials, and I was hoping to garner support for improvement. Perhaps readers of this interview will be prompted to contribute to this and other articles in their sphere of interest. With so many dire predictions about the future of libraries that one hears, it is in the best interest of METRO members to show libraries' and librarians' value by improving those Wikipedia articles relevant to us. Then there is a side that goes beyond Wikipedia and libraries. Anyone involved with music (and other fields) is probably aware of how the extension of copyright had limited what a researcher can do with copyrighted music. Although the Copyright Term Extension Act was passed over 15 years ago, I'm always concerned that media corporations will lobby the U.S. Congress to extend the length of copyright to over a century. Therefore I think it's necessary for everyone to become involved with copyright and take a more active role. To that end, I believe that contributions to the public domain are of crucial importance. Although published work from 1923 has to wait until 2019 to enter the public domain, unpublished works by persons who died more than 70 years ago are now public domain in the United States. I believe that we should consider it a mission to strengthen the public domain by uploading this free work to Wikipedia so that it may enhance not just Wikipedia or our institutions, but culture and knowledge in general. '''What is your advice to researchers, students, and teachers that are wary of using Wikipedia as a reliable source?''' Wikipedia's reliability varies among articles, just as reliability varies in any encyclopedia or dictionary. My recommendation is to sit down with Wikipedia for at least an hour and compare articles to each other, examining how they were created by looking at their coverage of reference sources cited. Learn how to judge articles by their bibliographies, histories, and talk pages.Controversial articles can be a good way to learn how the article was written and why certain choices were made (most politicians' biographical articles are controversial, meaning that Wikipedia editors have to reconcile multiple and conflicting points of view). Be aware that Wikipedia is a social community. Before you start editing pages, register yourself and get to know the community by looking at talk pages, joining a WikiProject of interest and introducing yourself, and looking at your talk page for feedback. Once they get to know you, people will be helpful in showing you how things work. People who work in libraries -- whether they are staff or visiting researchers and patrons -- have a great opportunity to contribute what they find to Wikipedia. I highly encourage everyone to start now! '''About Bob''' Bob Kosovsky is the Curator of Rare Books and Manuscripts for the Music Division at the New York Public Library for the Performing Arts. He is also an adjunct at Mannes College The New School for Music where he teaches courses in music theory. He received his MLS from the School of Library Service at Columbia University and his Ph.D. from the Graduate Center of the City University of New York. [[Category:Interviews]] kkbi3ael4hr0c64u7jg7kgqsuzkomku Interview with William Blueher 0 697 2156 1519 2020-09-25T18:19:29Z 1234qwer1234qwer4 2382 added [[Category:Interviews]] using [[Help:Gadget-HotCat|HotCat]] 2156 wikitext text/x-wiki ==Wikipedia for Special Collections: A Conversation with Watson Library's William Blueher== November 25th, 2013 [[File:The Metropolitan Museum of Art.JPG|thumb|The Metropolitan Museum of Art]] '''Tell us a little about your experience with Wikipedia. When did you first get started editing? How has your formal education related to Wikipedia?''' In my final semester as a library school student at Pratt SILS in the spring of 2012, I did a practicum at Thomas J. Watson Library (the main research library at The Metropolitan Museum of Art, where I am now on staff). The focus of the practicum was looking at how libraries can attract users to their ever-growing collections of digitized material. The project - subtitled “If We Build It, Will They Come?” - had both a practical element (digitizing and promoting actual material from the library) and a more theoretical component, in which I reviewed the relevant literature to see what other institutions either were doing or hoped to do in order to increase usage of their digital collections. In my literature review, I stumbled across an article titled “Harnessing social networks to connect with audiences” by Dreanna L. Belden (2008), in which the author discussed how her library had added links in Wikipedia to relevant items in its digital collections, and how this helped to increase traffic to the collections. So, when I was hired on as a full-time staff member at Watson Library not long after I graduated, I proposed that we start doing the same thing. We have been adding links to Wikipedia articles since August 2012 - more than 1,500 so far - and the results have been overwhelmingly positive. '''What topics do you edit on Wikipedia?''' We edit articles related to items in our Digital Collections. Since we are an art museum library, most of the material we have is of an art historical nature. As a result, most of the Wikipedia articles we add links to relate to art in some way. A history of the articles we’ve edited can be found at my Wikipedia userpage. '''Tell us a about the dynamics of your Wikipedia work at the Watson Library. How does it relate to the work you do as a librarian?''' We see Wikipedia as a natural extension of one of our primary missions, which is to make our collections known and available to readers and researchers who can use them. By adding links in Wikipedia, we are helping ensure our material is discovered by a wide audience (Wikipedia is one of the 5 biggest websites in the world, after all), which is exactly what most libraries – and digital collections in general – strive to do. '''What concrete successes have you been able to track that result from your activity on Wikipedia for Watson Library?''' We have been monitoring the success of this initiative by using Google Analytics. Over the last 30 days, we have had 14,898 visits to the Digital Collections. Over the same period a year ago, we only had 4,928 visits. This is an increase of over 200%, with nearly 10,000 more visits in a single 30-day period this year than last. Of the 14,898 visits over the last 30 days, 57% were referred by Wikipedia (8,570), whereas a year ago, only 31% came from Wikipedia (1,552). As we’ve put more into Wikipedia, it has referred more back out to us. As these figures indicate, Wikipedia has helped us generate a dramatic increase in traffic to the Digital Collections. '''What are your goals as a Wikipedia editor at Watson Library?''' At Watson Library, we have spent the last few years digitizing tens of thousands of items and making them freely available to anyone who visits our website, either on location or remotely. We are proud of our constantly growing Digital Collections, and we want as many people as possible to use them. '''What types of projects do you foresee being helpful for Wikipedia and the Watson Library?''' I am excited to see how GLAM-Wiki NYC evolves over time, and hope to get more involved in that community. I think that libraries, as well as cultural institutions in general, can gain a lot by harnessing the immense appeal and reach of Wikipedia. '''What is your advice to researchers, students, and teachers that are wary of using Wikipedia as a reliable source?''' I know when it started in the early 2000’s people had all sorts of reservations, but I think over time it has more than proven its usefulness as an information resource and people seem to have gotten used to it. Is it flawless and infallible? Absolutely not. But no encyclopedia ever has been. It is a work-in-progress, but one with seemingly boundless potential. I mean already, in less than a decade and a half, there are over 4 million articles in English alone! Now, I would never say (and I don’t think anyone does) that Wikipedia is the only source one needs to consult when doing research, but because of its immense breadth of scope it is an absolutely indispensable resource to consult when beginning to research literally millions of different topics. '''About William''' William Blueher recently graduated with an MLIS from Pratt SILS. He also holds an MA in English Literature from the University of Pennsylvania. He currently works in the technical services department at Thomas J. Watson Library, the central research library at The Metropolitan Museum of Art. [[Category:Interviews]] 5w1e8xi0b91g38yn90sxs4lift395n4 Interview with CJH's Leanora Lange 0 698 2155 1518 2020-09-25T18:19:26Z 1234qwer1234qwer4 2382 added [[Category:Interviews]] using [[Help:Gadget-HotCat|HotCat]] 2155 wikitext text/x-wiki ===Wikipedia for Special Collections: A Conversation with Center for Jewish History’s Leanora Lange=== [[File:Center for Jewish History NYC 14.JPG|thumb|Center for Jewish History in Manhattan]] '''Tell us a little about your experience with Wikipedia. When did you first get started editing? Has your education related to your Wikipedia interests?''' CJH created an account when we had our first Edit-a-thon here at the Center for Jewish History in January 2013, hosted by my colleague Kevin Schlottmann. My interest in Wikipedia had already been sparked by my education at the Pratt Institute School of Information and Library Science. In a course on knowledge organization at Pratt, I learned that DBpedia, one of the major hubs of data that is used to create Linked Open Data, is extracted directly from Wikipedia. This means that the free encyclopedia that anyone can edit is a huge contributor to the possibility of a new kind of web, one that links data in meaningful ways rather than just linking from one document/webpage to another. I am fortunate to have the chance to work on a Linked Open Data project called Linked Jazz (linkedjazz.org) with Cristina Pattuelli, Pratt’s professor of knowledge organization, and a fantastic research team. We’ve been investigating possibilities with Wikipedia because we’ve recognized how crucial a strong Wikipedia is for the possibility of a strong web of data. '''What topics do you most edit on Wikipedia?''' I make small changes to pages that are relevant to the collections that I process at the Center for Jewish History. I mainly process collections held by the Leo Baeck Institute, one of the five partner organizations at the Center for Jewish History. Almost all of my edits have been related to German-speaking Jewry per the Leo Baeck collection. Because of the nature of the grants under which I currently work, the topics have largely centered on Jewish-German emigrants in the 1933-1945 era, the Holocaust, and post-World War II restitution claims. I most commonly make edits like adding a link to the finding aid for an individual or organization whose papers I just processed, adding authority control numbers, or adding an infobox. I've also created pages for organizations where they didn't already exist or translated pages that exist on German Wikipedia into English. My colleagues and I have been collecting ideas for larger editing projects that could be undertaken during an Edit-a-thon. '''Tell us a about the dynamics of your Wikipedia work at CJH? How does it relate to the work you do as a librarian?''' I've become involved with Wikipedia because I believe that as a professional in the field of libraries, archives, and museums, it is part of my ethical duty to make information and resources accessible. Providing a small amount of very useful information on Wikipedia, like adding a link to a finding aid, is an easy and effective way to be an active information professional. That said, the editing that I’ve been doing really ought to be seen as part of a collective effort that has been undertaken by the archivists and other colleagues with whom I work at CJH. We have incorporated Wikipedia editing into the workflow of all of the processing archivists working at the Center’s processing lab. We have a quick online report form that we fill out when we’ve finished processing a collection, and since January this report has included questions related to Wikipedia editing. There is also a space to fill out suggestions for more in-depth edits that could be made in the context of an Edit-a-thon. A few of us have become particularly enthusiastic about editing Wikipedia and have been developing a newly-created Wikipedia Subcommitee. We will discuss and assess our current editing practices, brainstorm new ideas, and plan Edit-a-thons relevant to our work at CJH. '''What concrete successes have you been able to track that result from your activity on Wikipedia for CJH?''' Our approach is simply to include Wikipedia as part of our regular workflow: every time we finish processing a collection, each of us checks to see if Wikipedia edits related to the collection are warranted. Since the end of January (that is, since our first CJH Edit-a-thon), we have created six new pages and made edits like adding links, authority numbers, and infoboxes for thirty-seven collections. While that number might not be enormous, that's at least thirty-seven Wikipedia pages that are better due to the minimal effort of just checking whether the relevant page could use a little help and improving it when beneficial. '''What are your goals as a Wikipedia editor at CJH?''' Editing Wikipedia is part of being an information professional. I cannot claim to be creating or organizing all of the world's knowledge single-handedly, but I can make contributions within the context of my work that help users connect to relevant and useful information resources. The more editors we have from diverse places and with diverse expertise, the more we will benefit from free, open access to better information and to the resources referenced within Wikipedia articles. '''What types of projects do you foresee being helpful for Wikipedia and CJH?''' I plan to play a large part in pulling together our next Edit-a-thon at CJH. Edit-a-thons create the opportunity to improve information and have the potential to be a great community outreach tool. I am also looking forward to brainstorming with others in the newly-formed Wikipedia Subcommittee at CJH on this and other future efforts. Increased interest in Wikipedia across the LAM field is beneficial for Wikipedia and for CJH. '''What is your advice to researchers, students, and teachers that are wary of using Wikipedia as a reliable source?''' Wikipedia is imperfect. So are many other reference resources. What sets Wikipedia apart is that it completely owns up to its imperfection. The source of anxiety for many researchers, students, and teachers concerning Wikipedia’s reliability is also the source of its strength: anyone can edit it. Articles may contain misinformation or information that is lacking in one way or another, and articles on certain topics may not exist at all, but when issues arise, it is far easier and quicker to correct them than it would be for a traditional reference book or encyclopedia. Wikipedia offers amazing learning opportunities about the reliability of information in any form, but particularly on the internet; the platform encourages students and researchers to approach what they read with a critical eye and question whether the information presented is complete and accurate. I’m among the librarians and archivists who see Wikipedia as a fine place to start research; it offers a quick overview of a topic and is based on the principle of citing sources. Any Wikipedia article ought to be linked to some other resources. These are not the only ones to check, obviously, but it’s a place to start. Short answer: If you don't think Wikipedia is good enough, make an account and make it better! '''About Lea''' Leanora Lange is an archivist at the Center for Jewish History, where she processes collections and coordinates digitization projects. She is also a librarian at the Cooper Union and a team member of the Linked Open Data and digital humanities project, Linked Jazz. She holds an M.S. in Library and Information Science from the Pratt Institute, an M.A. in German, and a B.A. in German and Theater. [[Category:Interviews]] 0tw9jcqfsh20kuapagxuypb0f0mr34f Template:Event 10 711 1620 1567 2014-12-26T22:40:28Z BrillLyle 398 using DC template 1620 wikitext text/x-wiki {{#iferror:{{#switch:{{{mode}}} |summary={{#ifexpr:{{is upcoming|month={{{month}}}|day={{{day}}}|year={{{year}}}}}| <span style="float:left; padding-right:10px;">{{date box|month={{{month}}}|day={{{day}}}}}</span> <p style="padding-top:5px;">[[Upcoming events#{{{month}}} {{{day}}}|'''{{{title}}}''']]</p><div style="clear:both;"></div>}} |#default={{#ifexpr:({{#switch:{{{mode}}}|upcoming=1|#default=0}} and {{is future|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or ({{#switch:{{{mode}}}|recent=1|#default=0}} and {{is recent|month={{{month}}}|day={{{day}}}|year={{{year|}}} }}) or {{#switch:{{{mode}}}|recent|upcoming=0|#default=1}}|&nbsp; <div id="calendar-entry" class="plainlinks" style="width:100%; border-top: 1px solid #BBBDBF; border-left: 1px dotted #BBBDBF; border-right: 1px dotted #BBBDBF; border-collapse:collapse; padding-bottom:1em;"> <div id="calendar-date-tab" style="vertical-align:top; background:#F4F4F4; padding-left:1em; padding-top:0.5em; padding-bottom:0.5em;"> <h3 style="display:inline; font-family:'Helvetica Neue', 'Lucida Grande', Tahoma, Verdana, sans-serif; border-bottom:0;">{{{month}}}&nbsp;{{{day}}}</h3>{{anchor|{{{month}}} {{{day}}}}} </div> <div id="calendar-event-details" class="mobile-collapse" style="-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width:40%; float:left; padding-top:1em; padding-left:2.5em;"> <h3 style="font-family:'Helvetica Neue', 'Lucida Grande', Tahoma, Verdana, sans-serif; border-bottom:0; margin-left:-1em;">{{{title}}}</h3> '''When''' : ''{{{dow}}}, {{{month}}} {{{day}}}, {{{year}}}''<br />''{{{time}}}'' '''Where''' : ''{{{place}}}''{{#if:{{{address|}}}|<br />''{{{address}}}''}} </div> <div id="calendar-event-description" class="mobile-collapse" style="-webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: 60%; float:left; right:1.5em; padding-left:2.5em; padding-right:1em; padding-top:1em;"> {{#if:{{{description|}}}|{{{description}}}|''More details forthcoming!''}} {{#if:{{{restriction|}}}|&nbsp; <span style="color:#990000; text-transform:uppercase;">'''Please note that {{{restriction}}}.'''</span> }} <div id="calendar-buttons" class="mobile-collapse"> {{#ifexpr:{{is future|month={{{month}}}|day={{{day}}}|year={{{year}}}}}|{{#if:{{{rsvp-link|}}}|<div style="padding-bottom:5px;">{{arrow button|external=yes|link={{{rsvp-link}}}|label=Sign up now}}</div>}}}}{{#if:{{{info-link|}}}|{{arrow button|external=yes|color=blue|link={{{info-link}}}|label=Learn more}}}} </div> </div> <div style="clear:both;"></div> </div> }}}}}}<noinclude> [[Category:Visual identity templates]] </noinclude> 2khwwpac8o8i2znk95a3ldyn0cpt8v6 Template:Is future 10 737 1621 2014-12-26T22:41:10Z BrillLyle 398 using DC template 1621 wikitext text/x-wiki {{#expr:{{#time:U|{{{day}}} {{{month}}} {{{year}}} +1 days}} > {{#time:U|now}}}}<noinclude>[[Category:Date templates]]</noinclude> 8jd5p4edvq16kf2t069cl8u1ygciyvl Template:Is recent 10 738 1622 2014-12-26T22:41:27Z BrillLyle 398 using DC template 1622 wikitext text/x-wiki {{#expr:({{#time:U|{{{day}}} {{{month}}} {{{year}}} +1 days}} < {{#time:U|now}}) and ({{#time:U|{{{day}}} {{{month}}} {{{year}}}}} > {{#time:U|now -3 months}})}}<noinclude>[[Category:Date templates]]</noinclude> a3f2mrgg9f5s1qpk0zxvapq6sn2kj8m Template:Anchor 10 739 1623 2014-12-26T22:44:03Z BrillLyle 398 using DC tempalte 1623 wikitext text/x-wiki <span id="{{{1|}}}"></span><noinclude>[[Category:Templates]]</noinclude> b5wxh4niukb5lqzxw8fyhy1ggzxcrr9 Template:Arrow button 10 740 1624 2014-12-26T22:44:33Z BrillLyle 398 using DC template 1624 wikitext text/x-wiki <div class="plainlinks" style="{{#if:{{{description|}}}||padding-top:0.5em; padding-bottom:0.5em;}}">{{#ifeq:{{{external}}}|yes|[{{{link}}} <span class="arrowbutton-{{{color|green}}}" style="background:#{{#switch:{{{color|green}}}|red=570f0f|green=0f5733|blue=13476c}}; color:#ffffff; font-size:{{{font-size|110%}}}; width:100px; padding-top:0.3em; padding-bottom:0.3em; padding-left:0.5em; padding-right:0.5em; line-height:1.5em;">'''⇒'''&nbsp;{{{label}}}</span>]|[[{{{link}}}|<span class="arrowbutton-{{{color|green}}}" style="background:#{{#switch:{{{color|green}}}|red=570f0f|green=0f5733|blue=13476c}}; color:#ffffff; font-size:{{{font-size|110%}}}; line-height:1.5em; width:100px; padding-top:0.3em; padding-bottom:0.3em; padding-left:0.5em; padding-right:0.5em;">'''⇒'''&nbsp;{{{label}}}</span>]]}}</div> {{#if:{{{description|}}}| :: <p style="padding-top:0.5em; padding-bottom:0.5em;">{{{description}}}</p> }}<noinclude>[[Category:Visual identity templates]]</noinclude> 83mfetdkyl7xkzzkayfnm7cgdp65ruz Template:Header title 10 741 1627 2014-12-26T22:48:25Z BrillLyle 398 adding DC template 1627 wikitext text/x-wiki {{draft|{{{status|~}}}}} {{#ifeq:{{NAMESPACENUMBER}}|0|__NOEDITSECTION__}} __NOTOC__ {{color bar}} <div style="width:100%; margin:auto; border-collapse:collapse; margin-bottom:10px; padding:10px; padding-left:0; vertical-align:top; line-height:100%; font-size: 240%; font-family:'Helvetica Neue', 'Lucida Grande', Tahoma, Verdana, sans-serif;">{{{title}}}</div> {{#ifeq:{{{toc|}}}|yes| {{TOCright}}}}<noinclude>[[Category:Visual identity templates]]</noinclude> kw8l8u49shf53c5xkmg042szzdm0nsl Template:Color bar 10 742 1628 2014-12-26T22:49:00Z BrillLyle 398 adding DC template 1628 wikitext text/x-wiki {{#ifeq:{{{hidetitle}}}|no||{{DISPLAYTITLE:<span style="display:none;">{{FULLPAGENAME}}</span>}}}}<div {{#ifexpr:{{#ifeq:{{PAGENAME}}|Home|0|1}}|style="position:relative;top:-1.2em;"}}><div style="width:25%; float:left;height:4px; background:#990000;"></div> <div style="width:25%; float:left;height:4px; background:#006699;"></div> <div style="width:25%; float:left;height:4px; background:#339966;"></div> <div style="width:25%; float:left;height:4px; background:#666666;"></div></div> <div style="clear:both;"></div><noinclude>[[Category:Visual identity templates]]</noinclude> 7qsopgsj8slt3sf3007e81lzdii2hht Template:Draft 10 743 1629 2014-12-26T22:49:22Z BrillLyle 398 using DC template 1629 wikitext text/x-wiki {{#ifexpr:{{#ifeq:{{NAMESPACENUMBER}}|0|0|1}} and ({{#ifeq:{{{status|{{{1|draft}}}}}}|draft|1|0}} or {{#ifeq:{{{status|{{{1|}}}}}}|review|1|0}} or {{#ifeq:{{{status|{{{1|}}}}}}|obsolete|1|0}})| {{{!}} style="width:100%; margin:auto; border-collapse:collapse; margin-bottom:2.5em;" {{!}}- {{!}} style="padding:10px; padding-bottom:12px; text-align: center; font-size:120%; background:#990000; color:#ffffff; font-variant:small-caps; vertical-align:top; width:100%;" {{!}} {{#switch:{{{status|{{{1|draft}}}}}} |review=this is a '''draft document''' that is currently under review<includeonly>[[Category:Draft documents under review]]</includeonly> |draft=this is a '''draft document''' that is currently under development<includeonly>[[Category:Draft documents under development]]</includeonly> }} {{!}}} }}<noinclude>[[Category:Templates]]</noinclude> rf884xce3a28wk2ug18io13scs101sl Template:FlowMention 10 768 2178 1696 2020-09-25T20:48:51Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2178 wikitext text/x-wiki @[[User:{{{1|Example}}}|{{{2|{{{1|Example}}}}}}]]<noinclude>[[Category:Templates]]</noinclude> 6phmoo6hpzl4jac5s99uc30xon6w9z6 Template:LQT Moved thread stub converted to Flow 10 774 2184 1703 2020-09-25T20:51:42Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2184 wikitext text/x-wiki This post by {{{author}}} was moved on {{{date}}}. You can find it at [[{{{title}}}]].<noinclude>[[Category:Templates]]</noinclude> 2jg1wlmy62885z6azhswn9e5xiwvasn Template:LQT page converted to Flow 10 775 2185 1704 2020-09-25T20:51:47Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2185 wikitext text/x-wiki Previous page history was archived for backup purposes at <span class='flow-link-to-archive'>[[{{{archive}}}]]</span> on {{#time: Y-m-d|{{{date}}}}}.<noinclude>[[Category:Templates]]</noinclude> a11g1yxvonbvqysjj0m9sza0kxh1sdl Template:Archive for converted LQT page 10 776 2171 1705 2020-09-25T20:46:01Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2171 wikitext text/x-wiki This page is an archived LiquidThreads page. '''Do not edit the contents of this page'''. Please direct any additional comments to the [[{{{from}}}|current talk page]].<noinclude>[[Category:Templates]]</noinclude> 9fpwg1iz1cawv1388x2hrr8jxlgwp48 Template:LQT post imported with supressed user 10 777 2187 1706 2020-09-25T20:51:53Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2187 wikitext text/x-wiki This revision was imported from LiquidThreads with a suppressed user. It has been reassigned to the current user.<noinclude>[[Category:Templates]]</noinclude> lwvtkfyeg6vit4h2mvly58g2njl06j3 Template:LQT post imported with different signature user 10 778 2186 1707 2020-09-25T20:51:50Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2186 wikitext text/x-wiki ''This post was posted by [[User:{{{authorUser}}}|{{{authorUser}}}]], but signed as [[User:{{{signatureUser}}}|{{{signatureUser}}}]].''<noinclude>[[Category:Templates]]</noinclude> jqxyun39jlvbcyge33q1g4a7k3e1ny3 Template:Wikitext talk page converted to Flow 10 779 2202 1708 2020-09-25T20:58:40Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2202 wikitext text/x-wiki Previous discussion was archived at <span class='flow-link-to-archive'>[[{{{archive}}}]]</span> on {{#time: Y-m-d|{{{date}}}}}.<noinclude>[[Category:Templates]]</noinclude> 27btf4ghktcug247snuwlpwikqkill4 Template:Archive for converted wikitext talk page 10 780 2172 1709 2020-09-25T20:46:09Z 1234qwer1234qwer4 2382 /* top */add [[Category:Templates]] 2172 wikitext text/x-wiki This page is an archive. '''Do not edit the contents of this page'''. Please direct any additional comments to the [[{{{from|{{TALKSPACE}}:{{BASEPAGENAME}}}}}|current talk page]].<noinclude>[[Category:Templates]]</noinclude> 0e61s148cvmsoc695wjfwpio0pk4i4h Category:Membership 14 945 2039 2031 2020-02-05T23:19:42Z Sm8900 565 2039 wikitext text/x-wiki [[Category: Wikimedia NYC]] [[Category: Contents]] bfdlqoo4twwf6plhniv7ux4ucazzge4 Category:Contents 14 946 2033 2020-02-05T23:16:21Z Sm8900 565 Created page with "Top level category for Wikimedia NYC" 2033 wikitext text/x-wiki Top level category for Wikimedia NYC ogmj39pks48eiooitxfvqgvtfp9oj7x Category:Templates 14 947 2041 2020-02-05T23:21:05Z Sm8900 565 Created page with "[[Category:Maintenance]]" 2041 wikitext text/x-wiki [[Category:Maintenance]] it59vo5whwexpgslnlv8id1urubvc0x Category:Interviews 14 1003 2153 2020-09-25T18:18:34Z 1234qwer1234qwer4 2382 added [[Category:Contents]] using [[Help:Gadget-HotCat|HotCat]] 2153 wikitext text/x-wiki [[Category:Contents]] 13u0b4w3b672l5qogrzbf84ekymmcjo Bylaws page 0 1004 2167 2166 2020-09-25T19:35:12Z Sm8900 565 2167 wikitext text/x-wiki #REDIRECT [[Bylaws]] [[Category: contents]] [[Category: Rules]] k3ybugbvm3zuxwruesl94kllg8a1co5 Category:Rules 14 1005 2168 2020-09-25T19:35:25Z Sm8900 565 Created page with "Category:Rules [[Category:contents]]" 2168 wikitext text/x-wiki Category:Rules [[Category:contents]] 6z66bl4igthl1tlegi4as8zlofrfahi Wikimedia:VisualEditor 4 1065 2326 2325 2023-03-24T15:22:55Z Blua lago 6627 Undo revision 2325 by [[Special:Contributions/2400:2200:680:F895:E803:EE5A:2F4C:5D5B|2400:2200:680:F895:E803:EE5A:2F4C:5D5B]] ([[User talk:2400:2200:680:F895:E803:EE5A:2F4C:5D5B|talk]]) 2326 wikitext text/x-wiki {{Softredirect|w:Wikipedia:VisualEditor}} gmocov6ag2xnhdzm38o27aya4f0gqff Template:Article wizard 10 1077 2317 2315 2022-11-11T19:50:39Z 186.96.209.67 2317 wikitext text/x-wiki <div style="text-align:center;border-bottom:1px solid #9accf6"> {{Article wizard/box|num=1|link=Introduction|label=Introduction|do={{{1|}}}}} {{Article wizard/box|num=2|link=Subject|label=Subject|do={{{2|}}}}} {{Article wizard/box|num=3|link=General notability|label=Notability|do={{{3|}}}}} {{Article wizard/box|num=4|link=Sources|label=Sources|do={{{4|}}}}} {{Article wizard/box|num=5|link=Content|label=Content|do={{{5|}}}}} {{Article wizard/box|num=6|link=Ready for submission|label=End|do={{{6|}}}}} <div style="width:0;height:0;clear:both;overflow:hidden"></div> </div><div style="float:right; margin-left: 10px; margin-bottom:10px;" class="plainlinks"><span style=" -webkit-transition-delay: 0s; -webkit-transition-duration: 0.10000000149011612s; -webkit-transition-property: all; -webkit-transition-timing-function: linear; background-color: #0064CD; background-image: linear-gradient(to bottom, rgb(4, 156, 219), rgb(0, 100, 205)); background-repeat: repeat-x; border-bottom-color: rgba(0, 0, 0, 0.246094); border-bottom-left-radius: 6px; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgba(0, 0, 0, 0.0976562); border-left-style: solid; border-left-width: 1px; border-right-color: rgba(0, 0, 0, 0.0976562); border-right-style: solid; border-right-width: 1px; border-top-color: rgba(0, 0, 0, 0.0976562); border-top-style: solid; border-top-width: 1px; box-shadow: rgba(255, 255, 255, 0.199219) 0px 1px 0px 0px inset, rgba(0, 0, 0, 0.046875) 0px 1px 2px 0px; color: white; cursor: pointer; display: inline-block; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 16px; font-style: normal; font-weight: 200; height: 18px; line-height: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-y: visible; padding-bottom: 9px; padding-left: 14px; padding-right: 14px; padding-top: 9px; text-decoration: none; text-rendering: optimizelegibility; text-shadow: rgba(0, 0, 0, 0.246094) 0px -1px 0px; width: auto;">[[{{#if:{{{link|}}}|{{#ifeq:{{str rightc|1={{{link|}}}|2=17}}|wikimedia-en-help|Wikimedia:IRC help disclaimer|{{{link}}}}}|Wikipedia:IRC help disclaimer}}|<span style="color: #FFF;">Live Help Chat</span>]]</span> <br /></div> <div style="border:1px solid #9accf6;padding:.5em 1em 1em 1em;border-top:none"> {{{content}}} <div style="width:0;height:0;clear:both;overflow:hidden"></div> </div> [[Category:Wikimedia article wizard]]{{#if:{{PROTECTIONLEVEL:edit}}|{{pp-protected|small=yes}}}}<noinclude> {{documentation}} </noinclude> 1x7g53t2wr56kew8im2v9npdxmsbpaz Template:Article wizard/box 10 1078 2316 2022-11-11T19:49:22Z 186.96.209.67 Created page with "<div style="float:left;width:12.8%; font-size:1.4em; border-radius:4px 4px 0px 0px; margin:1px 1px 0; line-height: 2em;{{#switch:{{{do}}} |italic=padding-bottom: 1px;margin-bottom: -0.2em; background-color:#F4F4F4;color:#000;border:1px solid #B4B4B4;border-bottom:0; color:#6D6D6D;"> ''{{{label}}}'' |linked=padding-bottom: 1px;background-color:#f1f9ff;color:#000;border:1px solid #9accf6;border-bottom:0"> Wikipedia:{{#ifeq:{{ROOTPAGENAME}}|Articles for creation|Article..." 2316 wikitext text/x-wiki <div style="float:left;width:12.8%; font-size:1.4em; border-radius:4px 4px 0px 0px; margin:1px 1px 0; line-height: 2em;{{#switch:{{{do}}} |italic=padding-bottom: 1px;margin-bottom: -0.2em; background-color:#F4F4F4;color:#000;border:1px solid #B4B4B4;border-bottom:0; color:#6D6D6D;"> ''{{{label}}}'' |linked=padding-bottom: 1px;background-color:#f1f9ff;color:#000;border:1px solid #9accf6;border-bottom:0"> [[Wikipedia:{{#ifeq:{{ROOTPAGENAME}}|Articles for creation|Articles for creation/Wizard-|Article wizard/version1/}}{{{link}}}|{{{label}}}]] |boxed=margin-bottom:-1px;padding-bottom: 0px;font-weight:bold;background-color:#fff;color:#000;border:1px solid #9accf6;border-bottom:0; line-height: 2.1em;"> {{{label}}} |plain |#default=margin-bottom: -0.2em;padding-bottom: 1px;background-color:#F4F4F4;color:#000;border:1px solid #B4B4B4;border-bottom:0; color:#6D6D6D; opacity: 0.30;" class="no-mobile"> {{{label}}} }}</div><noinclude> {{documentation}} </noinclude> l0fv5ql8t8qlb2qnqi1tx36fgeoxcvy Template:Please leave this line alone (sandbox heading) 10 1124 2409 2408 2024-09-24T01:03:02Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Please_leave_this_line_alone_(sandbox_heading)]] 2408 wikitext text/x-wiki #REDIRECT [[Template:Sandbox heading]] {{Redirect category shell| {{R from move}} }} 7gpue4gpo33i8l0hgjkne02agxx38ao Module:Yesno 828 1125 2411 2410 2024-09-24T01:03:02Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Yesno]] 2410 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 Module:Arguments 828 1126 2413 2412 2024-09-24T01:03:03Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Arguments]] 2412 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 Template:Redirect category shell 10 1127 2415 2414 2024-09-24T01:03:03Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Redirect_category_shell]] 2414 wikitext text/x-wiki __NONEWSECTIONLINK__{{Mbox | name = Redirect category shell | type = move | image = none | style = margin-top: 1.1em; border: solid 1px darkblue; border-left-width: 0.5em; | textstyle = padding-top: 0.9em; padding-bottom: 0.9em; | text = '''This {{Talk other|talk page|page}} is a [[Wikipedia:Redirect|redirect]]. <small>The following [[Wikipedia:Categorizing redirects|categories]] are used to track and monitor this redirect:</small>'''{{#if:{{{h|}}} |:: ''{{{h}}}'' }}<!-- Automatically detect protected redirects: --><includeonly>{{#switch: {{PROTECTIONLEVEL:move}} |sysop|templateeditor|extendedconfirmed={{pp-move|small=yes|catonly=no}} }}{{#switch: {{PROTECTIONLEVEL:edit}} |sysop={{pp-protected|small=yes}}{{R fully-protected|embed=yes}} |templateeditor={{pp-protected|small=yes}}{{R template protected|embed=yes}} |extendedconfirmed={{pp-protected|small=yes}}{{R extended-protected|embed=yes}} |autoconfirmed={{pp-protected|small=yes}}{{R semi-protected|embed=yes}} | <!--Not protected, or only semi-move-protected--> }}</includeonly>{{#if: {{{1|}}}||<includeonly> * {{red|'''Important – Please Read! {{maroon|This template should {{em|not}} be applied without parameters by bot nor by any automated or semi-automated process. It should {{em|not}} be used without parameters {{em|unless you want to learn how to categorize redirects}}. For editors who want to learn how to categorize redirects, this template is a {{em|learning tool}}. {{em|Only}} those editors who intend to return to the redirect to learn which rcats to use should apply this template without parameters, or with an empty first parameter!}}'''}}</includeonly> * '''Manifold sort''': If help is needed to determine appropriate categories, then this redirect populates '''{{Cat|Miscellaneous redirects}}'''. Monitors of that category will check this redirect and add or remove [[Wikipedia:Categorizing redirects|rcats]] as needed.{{#ifeq: {{lc:{{{nocat|false}}}}} | false |{{{category|<includeonly>[[Category:Miscellaneous redirects]]</includeonly>}}}}} }} {{#if: {{{2|}}}|{{{2}}}|{{{1|}}}}}{{#if: {{{1|}}}{{{2|}}}||{{#ifeq: {{ROOTPAGENAME}}|Redirect category shell||[[Category:Redirect category shell without parameters]]}}}} ''<small>When appropriate, [[Wikipedia:Protection policy|protection levels]] are automatically sensed, described and categorized.</small>'' }}<noinclude> {{Documentation}} </noinclude> p21zwzpenmnu6tzdzfod021s26eybft Template:Mbox 10 1128 2417 2416 2024-09-24T01:03:03Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Mbox]] 2416 wikitext text/x-wiki {{#invoke:Message box|mbox}}<noinclude> {{documentation}} <!-- Add categories to the /doc subpage; interwikis go to Wikidata, thank you! --> </noinclude> aqsrswx233se5jbjaza2b2hrk7pgx53 Template:Talk other 10 1129 2419 2418 2024-09-24T01:03:04Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Talk_other]] 2418 wikitext text/x-wiki {{#switch: <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{lc: {{{demospace}}} }} <!--Use lower case "demospace"--> | {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}} | talk | other }} }} | talk = {{{1|}}} | other | #default = {{{2|}}} }}<!--End switch--><noinclude> {{documentation}} </noinclude> jp99kuih528b90wq2so1nbhkt480jzw Template:Redirect template 10 1130 2421 2420 2024-09-24T01:03:04Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Redirect_template]] 2420 wikitext text/x-wiki {{#invoke:Redirect template|main}}<noinclude> {{Documentation}}</noinclude> 1cl28dcwjsrtge5hedu653jwub1cll3 Template:R from move 10 1131 2423 2422 2024-09-24T01:03:05Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:R_from_move]] 2422 wikitext text/x-wiki <noinclude>{{hatnote|This rcat template is automatically added to all new redirects that result from page moves; it must be added manually to older redirects when appropriate.}}{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R from move |name=From a page move |from=a page that has been moved (renamed) |info=This page was kept as a redirect to avoid breaking links, both internal and external, that may have been made to the old page name. |all category=Redirects from moves }}<includeonly>{{R from move/except}}</includeonly><noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{Documentation}} </noinclude> jb1j0dw49p25rsnw8nldcu4oogum41x Template:R from move/except 10 1132 2425 2424 2024-09-24T01:03:05Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:R_from_move/except]] 2424 wikitext text/x-wiki <noinclude>This is the exception page for {{tl|R from move}}. This page makes exceptions that include certain pages that should not inhabit either {{cat|Unsynchronized talk page redirects}} or {{cat|Redirects from moves}}. If necessary, new exceptions may be added with no need to edit the main template, {{tl|R from move}}. </noinclude>{{#switch: {{FULLPAGENAME}} |MediaWiki:Move-redirect-text= |Template:R from move/except= |#default=[[Category:Redirects from moves]] }}{{#switch: {{NAMESPACENUMBER}} |1={{#ifeq: {{#invoke:redirect|isRedirect|{{FULLPAGENAME}}}}|yes| {{#ifeq: {{#invoke:redirect|isRedirect|{{SUBJECTPAGENAME}}}}|yes| {{#ifeq: {{PAGENAME:{{#invoke:redirect|main|{{TALKPAGENAME}}}}}}|{{PAGENAME:{{#invoke:redirect|main|{{SUBJECTPAGENAME}}}}}}|| {{#ifeq: {{FULLPAGENAME}}|{{SUBJECTPAGENAME}}|| {{#ifeq: {{Str left|{{PAGENAME}}|16}}|List of ships of||[[Category:Unsynchronized talk page redirects]] }} }} }} |{{#ifexist:{{SUBJECTPAGENAME}}| {{#ifeq: {{SUBJECTPAGENAME}}|{{Target of|{{SUBJECTPAGENAME:{{Target of|{{FULLPAGENAME}}}}}}}}|[[Category:Articles with unsynchronized talk page redirects]]| {{#ifexpr: {{#invoke:string|find|{{#invoke:page|getContent|{{SUBJECTPAGENAME}}|as=raw}}|:Rfd}}|[[Category:Redirects for discussion with talk page redirects]]|[[Category:Articles with talk page redirects]]}}}} }} }} |{{error|Page is not a redirect, misplaced [[Template:R from move]]}} }} |0={{#switch:{{NAMESPACENUMBER:{{#invoke:redirect|main|{{FULLPAGENAME}}}}}}|0|4|10|12|14|100=|#default={{R from move/Cross-namespace}}}} }}<noinclude> {{Documentation|Template:R from move/doc}} </noinclude> 2a82jzb8kp50itnyti0qkq1qte99dnn Module:Message box 828 1133 2427 2426 2024-09-24T01:03:05Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Message_box]] 2426 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- 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 args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif 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 = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false 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.hasCategories = true 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 self.typeImageNeedsLink = typeData.imageNeedsLink -- 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 self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end 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 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 if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. '#' .. talk) talkText = string.format('([[%s|talk]])', talkLink) else 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 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(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", 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 -- 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%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) 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 -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles 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() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ 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 local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) 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'):addClass('mbox-image-div') 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') 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) 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('span') :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'):addClass('mbox-image-div') 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') :addClass('mbox-invalid-type') :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) sdsgc378p9apajfwmamg8asdbhb8wi2 Module:Message box/configuration 828 1134 2429 2428 2024-09-24T01:03:05Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Message_box/configuration]] 2428 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 = 'Semi-protection-shackle-keyhole.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 = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, 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 = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css' }, 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, templatestyles = 'Module:Message box/fmbox.css' }, 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 = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css' }, 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 = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, 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 = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } 8mlkapzjzi4hir1wgp29qb7kqksdzd4 Module:Redirect template 828 1135 2431 2430 2024-09-24T01:03:06Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Redirect_template]] 2430 Scribunto text/plain require('strict') local p = {} -- key is beginning of arg name. value is table with namespace number and link -- alternatively, a function taking the namespace number and returning a validity -- can be used local namespaceCategories = { all = { function() return true end }, main = { 0, '[[wp:mainspace|main]]' }, help = { 12, '[[wp:help namespace|help]]' }, portal = { 100, '[[wp:portal|portal]]' }, talk = { function(n) return n > 0 and n%2 == 1 end, '[[Help:Talk pages|talk]]' }, template = { 10, '[[wp:template namespace|template]]' }, wikipedia = { 4, '[[wp:project namespace|Wikipedia project]]' }, category = { 14, '[[wp:categorization|category]]' }, user = { 2, '[[wp:user pages|user]]' }, draft = { 118, '[[wp:drafts|draft]]' }, } -- remove whitespaces from beginning and end of args local function valueFunc(key, val) if type(val) == 'string' then val = val:match('^%s*(.-)%s*$') if val == '' then return nil end end return val end local function getPrettyName(args) for k in pairs(namespaceCategories) do if args[k .. ' category'] then return string.format("'''[[:Category:%s|%s]]''': ", args[k .. ' category'], args.name) end end return string.format("'''%s''': ", args.name) end function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Redirect template', valueFunc = valueFunc}) local namespace = mw.title.getCurrentTitle().namespace --- XXX: this is a HORRIBLE HACK. kill it with fire as soon as https://phabricator.wikimedia.org/T14974 is fixed --- [[phab:T14974]] was previously known as [[bugzilla:12974]] https://bugzilla.wikimedia.org/show_bug.cgi?id=12974 local beCompatibleWithBug14974 = args.info and (args.info:find('^[:;#*]', 1) == 1 or args.info:find('{|', 1, true) == 1) and '\n' or ' ' local content = string.format('\n<div class="rcat %s">\n*%sThis is a redirect%s%s.%s%s\n</div>', args.id and ('rcat-' .. string.gsub(args.id, ' ', '_')) or '', args.name and getPrettyName(args) or '', args.from and (' from ' .. args.from) or '', args.to and (' to ' .. args.to) or '', args.info and beCompatibleWithBug14974 or '', args.info or '' ) for k,v in pairs(namespaceCategories) do if args[k .. ' category'] then if type(v[1]) == 'function' and v[1](namespace) or v[1] == namespace then if args.sortkey then content = content .. string.format('[[Category:%s|%s]]', args[k .. ' category'], args.sortkey) else content = content .. string.format('[[Category:%s]]', args[k .. ' category']) end elseif args['other category'] then if args.sortkey then content = content .. string.format('[[Category:%s|%s]]', args['other category'], args.sortkey) else content = content .. string.format('[[Category:%s]]', args['other category']) end else content = content .. frame:expandTemplate{title = 'Incorrect redirect template', args = {v[2]}} end end end if namespace == 0 then local yesno = require('Module:Yesno') if yesno(args.printworthy) == true then return content .. '[[Category:Printworthy redirects]]' elseif yesno(args.printworthy) == false then return content .. '[[Category:Unprintworthy redirects]]' end end return content end return p st70b7nx9gq8upoveshz93h1coat7c9 Module:Unsubst 828 1136 2433 2432 2024-09-24T01:03:06Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Unsubst]] 2432 Scribunto text/plain local checkType = require('libraryUtil').checkType local p = {} local BODY_PARAM = '$B' local specialParams = { ['$params'] = 'parameter list', ['$aliases'] = 'parameter aliases', ['$flags'] = 'flags', ['$B'] = 'template content', ['$template-name'] = 'template invocation name override', } function p.main(frame, body) -- If we are substing, this function returns a template invocation, and if -- not, it returns the template body. The template body can be specified in -- the body parameter, or in the template parameter defined in the -- BODY_PARAM variable. This function can be called from Lua or from -- #invoke. -- Return the template body if we aren't substing. if not mw.isSubsting() then if body ~= nil then return body elseif frame.args[BODY_PARAM] ~= nil then return frame.args[BODY_PARAM] else error(string.format( "no template content specified (use parameter '%s' from #invoke)", BODY_PARAM ), 2) end end -- Sanity check for the frame object. if type(frame) ~= 'table' or type(frame.getParent) ~= 'function' or not frame:getParent() then error( "argument #1 to 'main' must be a frame object with a parent " .. "frame available", 2 ) end -- Find the invocation name. local mTemplateInvocation = require('Module:Template invocation') local name if frame.args['$template-name'] and '' ~= frame.args['$template-name'] then name = frame.args['$template-name'] -- override whatever the template name is with this name else name = mTemplateInvocation.name(frame:getParent():getTitle()) end -- Combine passed args with passed defaults local args = {} if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*override%s*,' ) then for k, v in pairs( frame:getParent().args ) do args[k] = v end for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end else for k, v in pairs( frame.args ) do if not specialParams[k] then if v == '__DATE__' then v = mw.getContentLanguage():formatDate( 'F Y' ) end args[k] = v end end for k, v in pairs( frame:getParent().args ) do args[k] = v end end -- Trim parameters, if not specified otherwise if not string.find( ','..(frame.args['$flags'] or '')..',', ',%s*keep%-whitespace%s*,' ) then for k, v in pairs( args ) do args[k] = mw.ustring.match(v, '^%s*(.*)%s*$') or '' end end -- Pull information from parameter aliases local aliases = {} if frame.args['$aliases'] then local list = mw.text.split( frame.args['$aliases'], '%s*,%s*' ) for k, v in ipairs( list ) do local tmp = mw.text.split( v, '%s*>%s*' ) aliases[tonumber(mw.ustring.match(tmp[1], '^[1-9][0-9]*$')) or tmp[1]] = ((tonumber(mw.ustring.match(tmp[2], '^[1-9][0-9]*$'))) or tmp[2]) end end for k, v in pairs( aliases ) do if args[k] and ( not args[v] or args[v] == '' ) then args[v] = args[k] end args[k] = nil end -- Remove empty parameters, if specified if string.find( ','..(frame.args['$flags'] or '')..',', ',%s*remove%-empty%s*,' ) then local tmp = 0 for k, v in ipairs( args ) do if v ~= '' or ( args[k+1] and args[k+1] ~= '' ) or ( args[k+2] and args[k+2] ~= '' ) then tmp = k else break end end for k, v in pairs( args ) do if v == '' then if not (type(k) == 'number' and k < tmp) then args[k] = nil end end end end -- Order parameters if frame.args['$params'] then local params, tmp = mw.text.split( frame.args['$params'], '%s*,%s*' ), {} for k, v in ipairs(params) do v = tonumber(mw.ustring.match(v, '^[1-9][0-9]*$')) or v if args[v] then tmp[v], args[v] = args[v], nil end end for k, v in pairs(args) do tmp[k], args[k] = args[k], nil end args = tmp end return mTemplateInvocation.invocation(name, args) end p[''] = p.main -- For backwards compatibility return p eu3d3ip0gtd6n65iz4vmtpogb62rxdi Module:Effective protection expiry 828 1137 2435 2434 2024-09-24T01:03:06Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Effective_protection_expiry]] 2434 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 Module:Effective protection level 828 1138 2437 2436 2024-09-24T01:03:06Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Effective_protection_level]] 2436 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' and action ~= 'undelete' then error( 'First parameter must be one of edit, move, create, upload, undelete, autoreview', 2 ) end if title.namespace == 8 then -- MediaWiki namespace if title.text:sub(-3) == '.js' or title.text:sub(-4) == '.css' or title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page return 'interfaceadmin' else -- any non-JS/CSS MediaWiki page return 'sysop' end elseif title.namespace == 2 and title.isSubpage then if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page return 'interfaceadmin' elseif title.contentModel == 'json' then -- user JSON page return 'sysop' end end if action == 'undelete' then 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 if title.namespace == 0 then return 'autoconfirmed' -- Per [[WP:ACPERM]], you need to be autoconfirmed to create pages in mainspace end 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 lcolgmzxss8hd5im4xmd1ppgpgfv6gk Module:File link 828 1139 2439 2438 2024-09-24T01:03:07Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:File_link]] 2438 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 Module:Protection banner 828 1140 2441 2440 2024-09-24T01:03:07Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Protection_banner]] 2440 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('strict') 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:isUserScript() -- Whether the page is a user JavaScript or CSS page. local title = self.title return title.namespace == 2 and ( title.contentModel == 'javascript' or title.contentModel == 'css' ) end function Protection:isProtected() return self.level ~= '*' end function Protection:shouldShowLock() -- Whether we should output a banner/padlock return self:isProtected() and not self:isUserScript() end -- Whether this page needs a protection category. Protection.shouldHaveProtectionCategory = Protection.shouldShowLock function Protection:isTemporary() return type(self.expiry) == 'number' end function Protection:makeProtectionCategory() if not self:shouldHaveProtectionCategory() then return '' end local cfg = self._cfg local title = self.title -- 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:shouldHaveProtectionCategory() 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 mw.getCurrentFrame():expandTemplate{ title="vandal-m", args={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 not yesno(args.catonly) and (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:shouldShowLock() 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 g1esh5v0eq6i86pqpylkdm09loryn3e Module:Protection banner/config 828 1141 2443 2442 2024-09-24T01:03:07Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Protection_banner/config]] 2442 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 = { default = { alt = 'Page protected with pending changes', tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users', image = 'Pending-protection-shackle.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&nbsp;policy on&nbsp;the&nbsp;biographies" .. ' of&nbsp;living&nbsp;people]].', tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on' .. ' biographies of living persons', }, 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 = 'Office-protection-shackle.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 ${PROTECTIONLEVEL}', 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 = 'Office-protection-shackle.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 = 'Office-protection-shackle.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' .. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; 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 = 'Move-protection-shackle.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 currently under extended confirmed protection', }, move = { default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]' .. ' from [[Help:Moving a page|page moves]]' }, autoreview = { default = '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]]' }, 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 unregistered 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, if semi-protection has proven to be ineffective.' .. ' Extended confirmed protection may also be applied to enforce' .. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].' .. ' Please discuss any changes on the ${TALKPAGE}; you may' .. ' ${EDITREQUEST} to ask for uncontroversial 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 = { 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 = 'Full-protection-shackle.svg', templateeditor = 'Template-protection-shackle.svg', extendedconfirmed = 'Extended-protection-shackle.svg', autoconfirmed = 'Semi-protection-shackle.svg' }, move = { default = 'Move-protection-shackle.svg', }, autoreview = { default = 'Pending-protection-shackle.svg' }, upload = { default = 'Upload-protection-shackle.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 = { default = 'Wikipedia:Protection policy#pending' }, 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 extended-confirmed-protected pages', ['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages', ['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|all|all|templateeditor|move'] = 'Wikipedia template-protected pages other than templates and modules', ['all|all|all|templateeditor|edit'] = 'Wikipedia template-protected pages other than templates and modules', ['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates', ['all|template|all|templateeditor|move'] = 'Wikipedia template-protected templates', -- move-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 fully 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|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-protected templates', ['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates', ['all|user|all|sysop|edit'] = 'Wikipedia fully 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|extendedconfirmed|edit'] = 'Wikipedia extended-confirmed-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|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|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-extended'] = {'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', catonly = 'yes'}, ['Template:Pp-move-dispute'] = {'dispute', action = 'move', catonly = 'yes'}, -- we don't need Template:Pp-move-indef ['Template:Pp-move-vandalism'] = {'vandalism', action = 'move', catonly = 'yes'}, ['Template:Pp-office'] = {'office'}, ['Template:Pp-office-dmca'] = {'dmca'}, ['Template:Pp-pc'] = {action = 'autoreview', small = true}, ['Template:Pp-pc1'] = {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 "at" H:i e', -------------------------------------------------------------------------------- -- 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'] = 'Full-protection-shackle.svg', ['image-filename-default'] = 'Transparent.gif', -------------------------------------------------------------------------------- -- End messages -------------------------------------------------------------------------------- } -------------------------------------------------------------------------------- -- End configuration -------------------------------------------------------------------------------- } bwdq6s0o76ylir1k2sdre20yoyvjw2e Template:Pp-move 10 1142 2445 2444 2024-09-24T01:03:07Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Pp-move]] 2444 wikitext text/x-wiki <includeonly>{{#invoke:Protection banner|main}}</includeonly><noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 5t6lal9n9hcpwsso2obr7pcyjbg26xc Template:Pp 10 1143 2447 2446 2024-09-24T01:03:07Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Pp]] 2446 wikitext text/x-wiki {{#invoke:Protection banner|main}}<noinclude> {{documentation}} </noinclude> 8rt1snyv5yit3jnuzrbl00negaj27e5 Template:Pp-protected 10 1144 2449 2448 2024-09-24T01:03:08Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Pp-protected]] 2448 wikitext text/x-wiki #REDIRECT [[Template:Pp]] {{Rcat shell| {{R from move}} {{R from long name}} {{R with history}} }} [[Category:Top icon protection templates]] 914mq7m1i0gyzrc3ezy4d06r9oj08mz Module:Noinclude 828 1145 2451 2450 2024-09-24T01:03:08Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Noinclude]] 2450 Scribunto text/plain local p = {} function p.noinclude(frame) return frame:getParent():preprocess("<noinclude>" .. frame.args.text .. "</noinclude>"); end return p 46540us5h0lf6rm25j7fyb26bxvq4q9 Template:Tfm/dated 10 1146 2453 2452 2024-09-24T01:03:08Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Tfm/dated]] 2452 wikitext text/x-wiki {{ {{{|safesubst:}}}#invoke:Unsubst||type= |page= |link= |help= |$B={{#ifeq:{{{bigbox|<noinclude>yes</noinclude>}}}|yes|{{Ombox |type = move |image = none |class = nomobile mbox-tfd |small = {{{small|no}}} |text = This {{#ifeq:{{lc:{{{type}}}}}|module|[[Help:Module|module]]|[[Help:Template|template]]}} is '''being considered for merging with [[{{#ifeq:{{lc:{{{type}}}}}|module|Module|Template}}:{{{otherpage}}}]].''' Please discuss this matter at [[{{{link}}}|'''this {{#ifeq:{{lc:{{{type}}}}}|module|module|template}}'s entry''']] at templates for discussion to help reach a consensus. {{#ifeq:{{{help}}}|off||---- ''<small class="plainlinks" style="line-height:1.3em;">[[Wikipedia:Maintenance|Maintenance]] use only:<br />1. [{{fullurl:{{{link}}}|action=edit&editintro=Wikipedia:Templates_for_discussion/editnotice&section=1}} Edit the TfD log] to create the discussion entry.<br />2. Please consider notifying the [{{fullurl:{{FULLPAGENAME}}|action=history}} author(s)] by placing <span class="nowrap">{{tlx|Tfmnotice|{{{page}}}|{{{otherpage}}}|subst=yes}} <nowiki>~~~~</nowiki></span> on their talk page(s).</small>'' }}}}{{category handler | all = [[Category:Templates for merging]] | nocat = {{{nocat|{{#ifeq:{{Template:FULLBASEPAGENAME|{{FULLBASEPAGENAME}}}}|Template:Tfm|true}}}}} | category2 = {{{category|¬}}} }}|{{#switch:{{lc:{{{type}}}}} |tiny = <span style="padding: 0; font-size: 85%; font-weight: bold; color: #000000; background-color: #f9f9f9;" class="tfd">[[{{{link}}}|‹See TfM›]]</span> |inline = <span style="padding: 0; font-size: 85%; color: #000; border: 1px solid #aaa; background-color: #f9f9f9;" class="tfd">‹The [[Help:Template|template]] <i>[[Template:{{{page}}}|{{{page}}}]]</i> is being [[{{{link}}}|considered for merging]].›</span>&nbsp; |infobox|box|sidebar = <div class="boilerplate metadata plainlinks tfd" id="tfd" style="background-color: transparent; padding: 0 0.2em; color: #000; text-align: center; position: relative; float: right; clear: right; width: {{#if:{{{width|}}}|{{{width}}}|20em}}"><span style="font-size: 85%;">‹&nbsp;The [[Help:Template|template]] ''[[Template:{{{page}}}|{{{page}}}]]'' is being [[{{{link}}}|considered for merging]].&nbsp;›</span></div> |disabled = <!-- No output --> |#default = <div class="boilerplate metadata plainlinks tfd" id="tfd" style="background-color: transparent; padding: 0; font-size:85%; color:#000000; text-align: center; border-bottom:1px solid #AAAAAA; overflow:hidden;">‹&nbsp;The [[Help:Template|template]] below (''[[Template:{{{page}}}|{{{page}}}]]'') is being considered for merging. See [[{{{link}}}|templates for discussion]] to help reach a consensus.&nbsp;›</div> }}}}}}<noinclude> {{Documentation}} </noinclude> c91c2drl0tqi037l0wgc7uztp8k5ya1 Template:R template-protected 10 1147 2455 2454 2024-09-24T01:03:08Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:R_template-protected]] 2454 wikitext text/x-wiki {{Tfm/dated|page=R template-protected|otherpage=R protected|link=Wikipedia:Templates for discussion/Log/2024 September 17#Template:R template-protected|bigbox={{#invoke:Noinclude|noinclude|text=yes}}}}<noinclude>{{This is a redirect/rcat}} </noinclude>{{Redirect template |id=R template-protected |name=[[:Category:Wikipedia template-protected redirects|Template-protected]] |from=a page that is template-protected from editing for any of several possible reasons. Only administrators and template editors may edit this page |info=** '''Please do not replace these redirected links''' with links directly to the target page unless expressly advised to do so below or elsewhere on this page, or if the change is supported by a policy or guideline. |template category=<!--for automatic namespace detection--> }}{{#ifeq:{{{nocat|}}}|true||{{#ifeq:{{FULLPAGENAME}}|Template:R template-protected||{{#ifeq: {{SUBPAGENAME}}|sandbox||{{#switch: {{PROTECTIONLEVEL:move}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop=[[Category:Wikipedia move-protected pages]] }}{{#switch: {{PROTECTIONLEVEL:edit}} |templateeditor=[[Category:Wikipedia template-protected redirects]] |sysop|autoconfirmed|extendedconfirmed|#default=[[Category:Wikipedia pages with incorrect protection templates]] }}}}}}}}<noinclude> <!-- Place categories on /doc subpage; interwikis go to Wikidata. --> {{documentation}} </noinclude> h1zblppwxysfwpj4orotzmncdndvsif Template:R template protected 10 1148 2457 2456 2024-09-24T01:03:08Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:R_template_protected]] 2456 wikitext text/x-wiki #REDIRECT [[Template:R template-protected]] {{Redirect category shell| {{R from alternative hyphenation}} {{R from move}} {{R to redirect template}} }} 8ij0cgmat2i1acb676dddtuf3uyvslg Module:Message box/ombox.css 828 1149 2459 2458 2024-09-24T01:03:09Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Message_box/ombox.css]] 2458 sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: var(--background-color-neutral-subtle, #f8f9fa); box-sizing: border-box; color: var(--color-base, #202122); } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ombox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } /** T367463 */ body.skin--responsive table.ombox img { max-width: none !important; } @media screen { html.skin-theme-clientpref-night .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } aknh3fw7498ygg9b1o85bvfqn56r48n Template:Sandbox heading 10 1150 2461 2460 2024-09-24T01:04:33Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Sandbox_heading]] 2460 wikitext text/x-wiki {{Ombox | image = [[File:Edit In Sandbox Icon - Color.svg|center|85px|alt=|link=]] | imageright = {{#ifeq:{{FULLPAGENAME}}|Wikipedia talk:Sandbox |{{Ombox/shortcut|WT:SB|WT:SAND|WT:SANDBOX|WT:TESTING}} | {{#ifeq:{{FULLPAGENAME}}|Wikipedia:Sandbox |{{Ombox/shortcut|WP:SB|WP:SAND|WP:SANDBOX|WP:TESTING}} }} }} | text = {{#ifeq:{{TALKPAGENAME}}|{{FULLPAGENAME}}|{{Sandbox heading/Talk}}}} Welcome to this [[Wikipedia:About the sandbox|sandbox page]], a space to experiment with editing. You can either [[Special:EditPage/{{FULLPAGENAME}}|edit]] the source code ("'''[{{fullurl:{{FULLPAGENAMEE}}|action=edit}} {{int:visualeditor-ca-editsource}}]'''" tab above) or use [[Wikipedia:VisualEditor|VisualEditor]] ("'''[{{fullurl:{{FULLPAGENAMEE}}|veaction=edit}} {{int:skin-view-edit}}]'''" tab above). Click the "'''{{int:publishchanges}}'''" button when finished. You can click "'''{{int:showpreview}}'''" to see a preview of your edits, or "'''{{int:showdiff}}'''" to see what you have changed. Anyone can edit this page and it is automatically cleared regularly (anything you write will ''not'' remain indefinitely). [{{fullurl:{{FULLPAGENAMEE}}|action=edit&preload=Template:Sandbox+reset&summary=Reset+sandbox&oldid={{#switch:{{FULLPAGENAME}} |Draft:Sandbox=1153186071 |Wikipedia:Sandbox=596189391 |User:Sandbox=1151999420 |User talk:Sandbox=1232289554 |Wikipedia talk:Sandbox=1152694269 }}}} Click here to reset the sandbox]. <span class="user-show">You can access your personal sandbox by clicking '''[{{fullurl:Special:Mypage/sandbox|action=edit&preload=Template:User_sandbox/preload}} here]''', or using the "{{int:sandboxlink-portlet-label}}" link in the top right.</span><span class="anonymous-show>[[Special:CreateAccount|Creating an account]] gives you access to a personal sandbox, [[Wikipedia:Why create an account?|among other benefits]].</span> [[Wikipedia:Misuse of the sandbox|'''Do NOT''', under any circumstances, place promotional, copyrighted, offensive, or libelous content]] in sandbox pages. Doing so '''''WILL''' get you [[Wikipedia:Blocking policy|blocked]] from editing.'' {{small|''For more info about sandboxes, see [[Wikipedia:About the sandbox]] and [[Help:My sandbox]]. New to Wikipedia? See the [[Wikipedia:Contributing to Wikipedia|contributing to Wikipedia]] page or [[Help:Introduction|our tutorial]]. Questions? Try [[Wikipedia:Teahouse|the Teahouse]]!''}} ---- {{Sandbox heading/Navigation}} [[Category:Wikipedia editing aids]] }}<!--(end Ombox) Auto-categorization:-->{{#switch:{{FULLPAGENAME}} |Wikipedia:Sandbox|Draft:Sandbox=[[Category:Wikipedia editing aids]]}}{{#ifeq:{{FULLPAGENAME}}|User:Sandbox|[[Category:Example and test user accounts]]}}<!-- --><noinclude> {{Documentation}} <!--Interwikis at [[d:q3938]]--> </noinclude> tgvjuul3oxacsvv0g1bvrt4w0f8q0d2 Template:Str endswith 10 1151 2463 2462 2024-09-24T01:04:33Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Str_endswith]] 2462 wikitext text/x-wiki {{#ifeq:{{{1|a}}}{{{2|a}}}|{{{1|b}}}{{{2|b}}}|{{#invoke:String|endswith|source={{{1}}}|pattern={{{2}}} }}|yes<!--backward compatibility -->}}<noinclude> {{documentation}} </noinclude> 2bkmp0jw2nhdh2d3fc7ha9e1kbsdc1b Template:Nowrap 10 1152 2465 2464 2024-09-24T01:04:33Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Nowrap]] 2464 wikitext text/x-wiki <span class="nowrap">{{{1}}}</span><noinclude> {{documentation}} <!-- Categories go on the /doc page; interwikis go to Wikidata. --> </noinclude> avb5tcymgupik1ikutqclidkj9tnitx Template:Tl 10 1153 2467 2466 2024-09-24T01:04:34Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Tl]] 2466 wikitext text/x-wiki #REDIRECT [[Template:Template link]] {{Redirect category shell| {{R from move}} }} p1dn3i2ckb7gtckkrbn0xh6ckx8nei1 Template:Template link 10 1154 2469 2468 2024-09-24T01:04:34Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Template_link]] 2468 wikitext text/x-wiki {{nowrap|&#123;&#123;}}[[Template:{{{1}}}|{{{1}}}]]{{nowrap|&#125;&#125;}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> g2pepcli3s1uk0e6qtef6ti8plyz4xl Module:String 828 1155 2471 2470 2024-09-24T01:04:34Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:String]] 2470 Scribunto text/plain --[[ This module is intended to provide access to basic string functions. Most of the functions provided here can be invoked with named parameters, unnamed parameters, or a mixture. If named parameters are used, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. Depending on the intended use, it may be advantageous to either preserve or remove such whitespace. Global options ignore_errors: If set to 'true' or 1, any error condition will result in an empty string being returned rather than an error message. error_category: If an error occurs, specifies the name of a category to include with the error message. The default category is [Category:Errors reported by Module String]. no_category: If set to 'true' or 1, no category will be added if an error is generated. Unit tests for this module are available at Module:String/tests. ]] local str = {} --[[ len This function returns the length of the target string. Usage: {{#invoke:String|len|target_string|}} OR {{#invoke:String|len|s=target_string}} Parameters s: The string whose length to report If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. ]] function str.len( frame ) local new_args = str._getParameters( frame.args, {'s'} ) local s = new_args['s'] or '' return mw.ustring.len( s ) end --[[ sub This function returns a substring of the target string at specified indices. Usage: {{#invoke:String|sub|target_string|start_index|end_index}} OR {{#invoke:String|sub|s=target_string|i=start_index|j=end_index}} Parameters s: The string to return a subset of i: The first index of the substring to return, defaults to 1. j: The last index of the string to return, defaults to the last character. The first character of the string is assigned an index of 1. If either i or j is a negative value, it is interpreted the same as selecting a character by counting from the end of the string. Hence, a value of -1 is the same as selecting the last character of the string. If the requested indices are out of range for the given string, an error is reported. ]] function str.sub( frame ) local new_args = str._getParameters( frame.args, { 's', 'i', 'j' } ) local s = new_args['s'] or '' local i = tonumber( new_args['i'] ) or 1 local j = tonumber( new_args['j'] ) or -1 local len = mw.ustring.len( s ) -- Convert negatives for range checking if i < 0 then i = len + i + 1 end if j < 0 then j = len + j + 1 end if i > len or j > len or i < 1 or j < 1 then return str._error( 'String subset index out of range' ) end if j < i then return str._error( 'String subset indices out of order' ) end return mw.ustring.sub( s, i, j ) end --[[ This function implements that features of {{str sub old}} and is kept in order to maintain these older templates. ]] function str.sublength( frame ) local i = tonumber( frame.args.i ) or 0 local len = tonumber( frame.args.len ) return mw.ustring.sub( frame.args.s, i + 1, len and ( i + len ) ) end --[[ _match This function returns a substring from the source string that matches a specified pattern. It is exported for use in other modules Usage: strmatch = require("Module:String")._match sresult = strmatch( s, pattern, start, match, plain, nomatch ) Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This sub-routine is exported for use in other modules function str._match( s, pattern, start, match_index, plain_flag, nomatch ) if s == '' then return str._error( 'Target string is empty' ) end if pattern == '' then return str._error( 'Pattern string is empty' ) end start = tonumber(start) or 1 if math.abs(start) < 1 or math.abs(start) > mw.ustring.len( s ) then return str._error( 'Requested start is out of range' ) end if match_index == 0 then return str._error( 'Match index is out of range' ) end if plain_flag then pattern = str._escapePattern( pattern ) end local result if match_index == 1 then -- Find first match is simple case result = mw.ustring.match( s, pattern, start ) else if start > 1 then s = mw.ustring.sub( s, start ) end local iterator = mw.ustring.gmatch(s, pattern) if match_index > 0 then -- Forward search for w in iterator do match_index = match_index - 1 if match_index == 0 then result = w break end end else -- Reverse search local result_table = {} local count = 1 for w in iterator do result_table[count] = w count = count + 1 end result = result_table[ count + match_index ] end end if result == nil then if nomatch == nil then return str._error( 'Match not found' ) else return nomatch end else return result end end --[[ match This function returns a substring from the source string that matches a specified pattern. Usage: {{#invoke:String|match|source_string|pattern_string|start_index|match_number|plain_flag|nomatch_output}} OR {{#invoke:String|match|s=source_string|pattern=pattern_string|start=start_index |match=match_number|plain=plain_flag|nomatch=nomatch_output}} Parameters s: The string to search pattern: The pattern or string to find within the string start: The index within the source string to start the search. The first character of the string has index 1. Defaults to 1. match: In some cases it may be possible to make multiple matches on a single string. This specifies which match to return, where the first match is match= 1. If a negative number is specified then a match is returned counting from the last match. Hence match = -1 is the same as requesting the last match. Defaults to 1. plain: A flag indicating that the pattern should be understood as plain text. Defaults to false. nomatch: If no match is found, output the "nomatch" value rather than an error. If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from each string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. If the match_number or start_index are out of range for the string being queried, then this function generates an error. An error is also generated if no match is found. If one adds the parameter ignore_errors=true, then the error will be suppressed and an empty string will be returned on any failure. For information on constructing Lua patterns, a form of [regular expression], see: * http://www.lua.org/manual/5.1/manual.html#5.4.1 * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns * http://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Ustring_patterns ]] -- This is the entry point for #invoke:String|match function str.match( frame ) local new_args = str._getParameters( frame.args, {'s', 'pattern', 'start', 'match', 'plain', 'nomatch'} ) local s = new_args['s'] or '' local start = tonumber( new_args['start'] ) or 1 local plain_flag = str._getBoolean( new_args['plain'] or false ) local pattern = new_args['pattern'] or '' local match_index = math.floor( tonumber(new_args['match']) or 1 ) local nomatch = new_args['nomatch'] return str._match( s, pattern, start, match_index, plain_flag, nomatch ) end --[[ pos This function returns a single character from the target string at position pos. Usage: {{#invoke:String|pos|target_string|index_value}} OR {{#invoke:String|pos|target=target_string|pos=index_value}} Parameters target: The string to search pos: The index for the character to return If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the target string. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. The first character has an index value of 1. If one requests a negative value, this function will select a character by counting backwards from the end of the string. In other words pos = -1 is the same as asking for the last character. A requested value of zero, or a value greater than the length of the string returns an error. ]] function str.pos( frame ) local new_args = str._getParameters( frame.args, {'target', 'pos'} ) local target_str = new_args['target'] or '' local pos = tonumber( new_args['pos'] ) or 0 if pos == 0 or math.abs(pos) > mw.ustring.len( target_str ) then return str._error( 'String index out of range' ) end return mw.ustring.sub( target_str, pos, pos ) end --[[ str_find This function duplicates the behavior of {{str_find}}, including all of its quirks. This is provided in order to support existing templates, but is NOT RECOMMENDED for new code and templates. New code is recommended to use the "find" function instead. Returns the first index in "source" that is a match to "target". Indexing is 1-based, and the function returns -1 if the "target" string is not present in "source". Important Note: If the "target" string is empty / missing, this function returns a value of "1", which is generally unexpected behavior, and must be accounted for separatetly. ]] function str.str_find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target'} ) local source_str = new_args['source'] or '' local target_str = new_args['target'] or '' if target_str == '' then return 1 end local start = mw.ustring.find( source_str, target_str, 1, true ) if start == nil then start = -1 end return start end --[[ find This function allows one to search for a target string or pattern within another string. Usage: {{#invoke:String|find|source_str|target_string|start_index|plain_flag}} OR {{#invoke:String|find|source=source_str|target=target_str|start=start_index|plain=plain_flag}} Parameters source: The string to search target: The string or pattern to find within source start: The index within the source string to start the search, defaults to 1 plain: Boolean flag indicating that target should be understood as plain text and not as a Lua style regular expression, defaults to true If invoked using named parameters, Mediawiki will automatically remove any leading or trailing whitespace from the parameter. In some circumstances this is desirable, in other cases one may want to preserve the whitespace. This function returns the first index >= "start" where "target" can be found within "source". Indices are 1-based. If "target" is not found, then this function returns 0. If either "source" or "target" are missing / empty, this function also returns 0. This function should be safe for UTF-8 strings. ]] function str.find( frame ) local new_args = str._getParameters( frame.args, {'source', 'target', 'start', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['target'] or '' local start_pos = tonumber(new_args['start']) or 1 local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return 0 end plain = str._getBoolean( plain ) local start = mw.ustring.find( source_str, pattern, start_pos, plain ) if start == nil then start = 0 end return start end --[[ replace This function allows one to replace a target string or pattern within another string. Usage: {{#invoke:String|replace|source_str|pattern_string|replace_string|replacement_count|plain_flag}} OR {{#invoke:String|replace|source=source_string|pattern=pattern_string|replace=replace_string| count=replacement_count|plain=plain_flag}} Parameters source: The string to search pattern: The string or pattern to find within source replace: The replacement text count: The number of occurences to replace, defaults to all. plain: Boolean flag indicating that pattern should be understood as plain text and not as a Lua style regular expression, defaults to true ]] function str.replace( frame ) local new_args = str._getParameters( frame.args, {'source', 'pattern', 'replace', 'count', 'plain' } ) local source_str = new_args['source'] or '' local pattern = new_args['pattern'] or '' local replace = new_args['replace'] or '' local count = tonumber( new_args['count'] ) local plain = new_args['plain'] or true if source_str == '' or pattern == '' then return source_str end plain = str._getBoolean( plain ) if plain then pattern = str._escapePattern( pattern ) replace = string.gsub( replace, "%%", "%%%%" ) --Only need to escape replacement sequences. end local result if count ~= nil then result = mw.ustring.gsub( source_str, pattern, replace, count ) else result = mw.ustring.gsub( source_str, pattern, replace ) end return result end --[[ simple function to pipe string.rep to templates. ]] function str.rep( frame ) local repetitions = tonumber( frame.args[2] ) if not repetitions then return str._error( 'function rep expects a number as second parameter, received "' .. ( frame.args[2] or '' ) .. '"' ) end return string.rep( frame.args[1] or '', repetitions ) end --[[ escapePattern This function escapes special characters from a Lua string pattern. See [1] for details on how patterns work. [1] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Patterns Usage: {{#invoke:String|escapePattern|pattern_string}} Parameters pattern_string: The pattern string to escape. ]] function str.escapePattern( frame ) local pattern_str = frame.args[1] if not pattern_str then return str._error( 'No pattern string specified' ) end local result = str._escapePattern( pattern_str ) return result end --[[ count This function counts the number of occurrences of one string in another. ]] function str.count(frame) local args = str._getParameters(frame.args, {'source', 'pattern', 'plain'}) local source = args.source or '' local pattern = args.pattern or '' local plain = str._getBoolean(args.plain or true) if plain then pattern = str._escapePattern(pattern) end local _, count = mw.ustring.gsub(source, pattern, '') return count end --[[ endswith This function determines whether a string ends with another string. ]] function str.endswith(frame) local args = str._getParameters(frame.args, {'source', 'pattern'}) local source = args.source or '' local pattern = args.pattern or '' if pattern == '' then -- All strings end with the empty string. return "yes" end if mw.ustring.sub(source, -mw.ustring.len(pattern), -1) == pattern then return "yes" else return "" end end --[[ join Join all non empty arguments together; the first argument is the separator. Usage: {{#invoke:String|join|sep|one|two|three}} ]] function str.join(frame) local args = {} local sep for _, v in ipairs( frame.args ) do if sep then if v ~= '' then table.insert(args, v) end else sep = v end end return table.concat( args, sep or '' ) end --[[ Helper function that populates the argument list given that user may need to use a mix of named and unnamed parameters. This is relevant because named parameters are not identical to unnamed parameters due to string trimming, and when dealing with strings we sometimes want to either preserve or remove that whitespace depending on the application. ]] function str._getParameters( frame_args, arg_list ) local new_args = {} local index = 1 local value for _, arg in ipairs( arg_list ) do value = frame_args[arg] if value == nil then value = frame_args[index] index = index + 1 end new_args[arg] = value end return new_args end --[[ Helper function to handle error messages. ]] function str._error( error_str ) local frame = mw.getCurrentFrame() local error_category = frame.args.error_category or 'Errors reported by Module String' local ignore_errors = frame.args.ignore_errors or false local no_category = frame.args.no_category or false if str._getBoolean(ignore_errors) then return '' end local error_str = '<strong class="error">String Module Error: ' .. error_str .. '</strong>' if error_category ~= '' and not str._getBoolean( no_category ) then error_str = '[[Category:' .. error_category .. ']]' .. error_str end return error_str end --[[ Helper Function to interpret boolean strings ]] function str._getBoolean( boolean_str ) local boolean_value if type( boolean_str ) == 'string' then boolean_str = boolean_str:lower() if boolean_str == 'false' or boolean_str == 'no' or boolean_str == '0' or boolean_str == '' then boolean_value = false else boolean_value = true end elseif type( boolean_str ) == 'boolean' then boolean_value = boolean_str else error( 'No boolean value found' ) end return boolean_value end --[[ Helper function that escapes all pattern characters so that they will be treated as plain text. ]] function str._escapePattern( pattern_str ) return ( string.gsub( pattern_str, "[%(%)%.%%%+%-%*%?%[%^%$%]]", "%%%0" ) ) end return str j5gx8uvupr1pa2fyqbe6td6jr0hxq00 Module:TableTools 828 1156 2473 2472 2024-09-24T01:04:34Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:TableTools]] 2472 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 local checkTypeMulti = libraryUtil.checkTypeMulti ------------------------------------------------------------------------------------ -- 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) return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity 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) return type(v) == 'number' and v ~= v 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) checkType('shallowClone', 1, t, 'table') 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(arr) checkType('removeDuplicates', 1, arr, 'table') local isNan = p.isNan local ret, exists = {}, {} for _, v in ipairs(arr) 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 elseif not exists[v] then ret[#ret + 1] = v exists[v] = true 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 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. return s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1') end prefix = prefix or '' suffix = suffix or '' prefix = cleanPattern(prefix) suffix = cleanPattern(suffix) local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$' local nums = {} for k 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 _ in pairs(t) do i = i + 1 end return i end local function defaultKeySort(item1, item2) -- "number" < "string", so numbers will be sorted before strings. local type1, type2 = type(item1), type(item2) if type1 ~= type2 then return type1 < type2 elseif type1 == 'table' or type1 == 'boolean' or type1 == 'function' then return tostring(item1) < tostring(item2) else return item1 < item2 end end ------------------------------------------------------------------------------------ -- keysToList -- -- Returns an array of the keys in a table, sorted using either a default -- comparison function or a custom keySort function. ------------------------------------------------------------------------------------ function p.keysToList(t, keySort, checked) if not checked then checkType('keysToList', 1, t, 'table') checkTypeMulti('keysToList', 2, keySort, {'function', 'boolean', 'nil'}) end local arr = {} local index = 1 for k in pairs(t) do arr[index] = k index = index + 1 end if keySort ~= false then keySort = type(keySort) == 'function' and keySort or defaultKeySort table.sort(arr, keySort) end return arr end ------------------------------------------------------------------------------------ -- sortedPairs -- -- Iterates through a table, with the keys sorted using the keysToList function. -- If there are only numerical keys, sparseIpairs is probably more efficient. ------------------------------------------------------------------------------------ function p.sortedPairs(t, keySort) checkType('sortedPairs', 1, t, 'table') checkType('sortedPairs', 2, keySort, 'function', true) local arr = p.keysToList(t, keySort, true) local i = 0 return function () i = i + 1 local key = arr[i] if key ~= nil then return key, t[key] else return nil, nil end end end ------------------------------------------------------------------------------------ -- isArray -- -- Returns true if the given value is a table and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArray(v) if type(v) ~= 'table' then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- isArrayLike -- -- Returns true if the given value is iterable and all keys are consecutive -- integers starting at 1. ------------------------------------------------------------------------------------ function p.isArrayLike(v) if not pcall(pairs, v) then return false end local i = 0 for _ in pairs(v) do i = i + 1 if v[i] == nil then return false end end return true end ------------------------------------------------------------------------------------ -- invert -- -- Transposes the keys and values in an array. For example, {"a", "b", "c"} -> -- {a = 1, b = 2, c = 3}. Duplicates are not supported (result values refer to -- the index of the last duplicate) and NaN values are ignored. ------------------------------------------------------------------------------------ function p.invert(arr) checkType("invert", 1, arr, "table") local isNan = p.isNan local map = {} for i, v in ipairs(arr) do if not isNan(v) then map[v] = i end end return map end ------------------------------------------------------------------------------------ -- listToSet -- -- Creates a set from the array part of the table. Indexing the set by any of the -- values of the array returns true. For example, {"a", "b", "c"} -> -- {a = true, b = true, c = true}. NaN values are ignored as Lua considers them -- never equal to any value (including other NaNs or even themselves). ------------------------------------------------------------------------------------ function p.listToSet(arr) checkType("listToSet", 1, arr, "table") local isNan = p.isNan local set = {} for _, v in ipairs(arr) do if not isNan(v) then set[v] = true end end return set end ------------------------------------------------------------------------------------ -- deepCopy -- -- Recursive deep copy function. Preserves identities of subtables. ------------------------------------------------------------------------------------ local function _deepCopy(orig, includeMetatable, already_seen) if type(orig) ~= "table" then return orig end -- already_seen stores copies of tables indexed by the original table. local copy = already_seen[orig] if copy ~= nil then return copy end copy = {} already_seen[orig] = copy -- memoize before any recursion, to avoid infinite loops for orig_key, orig_value in pairs(orig) do copy[_deepCopy(orig_key, includeMetatable, already_seen)] = _deepCopy(orig_value, includeMetatable, already_seen) end if includeMetatable then local mt = getmetatable(orig) if mt ~= nil then setmetatable(copy, _deepCopy(mt, true, already_seen)) end end return copy end function p.deepCopy(orig, noMetatable, already_seen) checkType("deepCopy", 3, already_seen, "table", true) return _deepCopy(orig, not noMetatable, already_seen or {}) end ------------------------------------------------------------------------------------ -- sparseConcat -- -- Concatenates all values in the table that are indexed by a number, in order. -- sparseConcat{a, nil, c, d} => "acd" -- sparseConcat{nil, b, c, d} => "bcd" ------------------------------------------------------------------------------------ function p.sparseConcat(t, sep, i, j) local arr = {} local arr_i = 0 for _, v in p.sparseIpairs(t) do arr_i = arr_i + 1 arr[arr_i] = v end return table.concat(arr, sep, i, j) end ------------------------------------------------------------------------------------ -- length -- -- Finds the length of an array, or of a quasi-array with keys such as "data1", -- "data2", etc., using an exponential search algorithm. It is similar to the -- operator #, but may return a different value when there are gaps in the array -- portion of the table. Intended to be used on data loaded with mw.loadData. For -- other tables, use #. -- Note: #frame.args in frame object always be set to 0, regardless of the number -- of unnamed template parameters, so use this function for frame.args. ------------------------------------------------------------------------------------ function p.length(t, prefix) -- requiring module inline so that [[Module:Exponential search]] which is -- only needed by this one function doesn't get millions of transclusions local expSearch = require("Module:Exponential search") checkType('length', 1, t, 'table') checkType('length', 2, prefix, 'string', true) return expSearch(function (i) local key if prefix then key = prefix .. tostring(i) else key = i end return t[key] ~= nil end) or 0 end ------------------------------------------------------------------------------------ -- inArray -- -- Returns true if searchElement is a member of the array, and false otherwise. -- Equivalent to JavaScript array.includes(searchElement) or -- array.includes(searchElement, fromIndex), except fromIndex is 1 indexed ------------------------------------------------------------------------------------ function p.inArray(array, searchElement, fromIndex) checkType("inArray", 1, array, "table") -- if searchElement is nil, error? fromIndex = tonumber(fromIndex) if fromIndex then if (fromIndex < 0) then fromIndex = #array + fromIndex + 1 end if fromIndex < 1 then fromIndex = 1 end for _, v in ipairs({unpack(array, fromIndex)}) do if v == searchElement then return true end end else for _, v in pairs(array) do if v == searchElement then return true end end end return false end ------------------------------------------------------------------------------------ -- merge -- -- Given the arrays, returns an array containing the elements of each input array -- in sequence. ------------------------------------------------------------------------------------ function p.merge(...) local arrays = {...} local ret = {} for i, arr in ipairs(arrays) do checkType('merge', i, arr, 'table') for _, v in ipairs(arr) do ret[#ret + 1] = v end end return ret end ------------------------------------------------------------------------------------ -- extend -- -- Extends the first array in place by appending all elements from the second -- array. ------------------------------------------------------------------------------------ function p.extend(arr1, arr2) checkType('extend', 1, arr1, 'table') checkType('extend', 2, arr2, 'table') for _, v in ipairs(arr2) do arr1[#arr1 + 1] = v end end return p 4n03zk6kcoeg4gz82mieeh94c1szcjy Template:Navbox 10 1157 2475 2474 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Navbox]] 2474 wikitext text/x-wiki <includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude> {{Documentation}} </noinclude> tqodcaa2vvhehqaod229udlla0wimek Template:Small 10 1158 2477 2476 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Small]] 2476 wikitext text/x-wiki <span style="font-size:85%;">{{{1}}}</span><includeonly>{{SAFESUBST:#if:{{{1|}}}||[[Category:Pages using small with an empty input parameter]]}}</includeonly><noinclude> {{Documentation}}<!--Categories and interwikis go in the /doc sub-page.--> </noinclude> dvonxxvea06kvln677gbl2xk9rrnlog Module:Navbar 828 1159 2479 2478 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbar]] 2478 Scribunto text/plain local p = {} local cfg = mw.loadData('Module:Navbar/configuration') local function get_title_arg(is_collapsible, template) local title_arg = 1 if is_collapsible then title_arg = 2 end if template then title_arg = 'template' end return title_arg end local function choose_links(template, args) -- The show table indicates the default displayed items. -- view, talk, edit, hist, move, watch -- TODO: Move to configuration. local show = {true, true, true, false, false, false} if template then show[2] = false show[3] = false local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6} -- TODO: Consider removing TableTools dependency. for _, v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do local num = index[v] if num then show[num] = true end end end local remove_edit_link = args.noedit if remove_edit_link then show[3] = false end return show end local function add_link(link_description, ul, is_mini, font_style) local l if link_description.url then l = {'[', '', ']'} else l = {'[[', '|', ']]'} end ul:tag('li') :addClass('nv-' .. link_description.full) :wikitext(l[1] .. link_description.link .. l[2]) :tag(is_mini and 'abbr' or 'span') :attr('title', link_description.html_title) :cssText(font_style) :wikitext(is_mini and link_description.mini or link_description.full) :done() :wikitext(l[3]) :done() end local function make_list(title_text, has_brackets, displayed_links, is_mini, font_style) local title = mw.title.new(mw.text.trim(title_text), cfg.title_namespace) if not title then error(cfg.invalid_title .. title_text) end local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or '' -- TODO: Get link_descriptions and show into the configuration module. -- link_descriptions should be easier... local link_descriptions = { { ['mini'] = 'v', ['full'] = 'view', ['html_title'] = 'View this template', ['link'] = title.fullText, ['url'] = false }, { ['mini'] = 't', ['full'] = 'talk', ['html_title'] = 'Discuss this template', ['link'] = talkpage, ['url'] = false }, { ['mini'] = 'e', ['full'] = 'edit', ['html_title'] = 'Edit this template', ['link'] = 'Special:EditPage/' .. title.fullText, ['url'] = false }, { ['mini'] = 'h', ['full'] = 'hist', ['html_title'] = 'History of this template', ['link'] = 'Special:PageHistory/' .. title.fullText, ['url'] = false }, { ['mini'] = 'm', ['full'] = 'move', ['html_title'] = 'Move this template', ['link'] = mw.title.new('Special:Movepage'):fullUrl('target='..title.fullText), ['url'] = true }, { ['mini'] = 'w', ['full'] = 'watch', ['html_title'] = 'Watch this template', ['link'] = title:fullUrl('action=watch'), ['url'] = true } } local ul = mw.html.create('ul') if has_brackets then ul:addClass(cfg.classes.brackets) :cssText(font_style) end for i, _ in ipairs(displayed_links) do if displayed_links[i] then add_link(link_descriptions[i], ul, is_mini, font_style) end end return ul:done() end function p._navbar(args) -- TODO: We probably don't need both fontstyle and fontcolor... local font_style = args.fontstyle local font_color = args.fontcolor local is_collapsible = args.collapsible local is_mini = args.mini local is_plain = args.plain local collapsible_class = nil if is_collapsible then collapsible_class = cfg.classes.collapsible if not is_plain then is_mini = 1 end if font_color then font_style = (font_style or '') .. '; color: ' .. font_color .. ';' end end local navbar_style = args.style local div = mw.html.create():tag('div') div :addClass(cfg.classes.navbar) :addClass(cfg.classes.plainlinks) :addClass(cfg.classes.horizontal_list) :addClass(collapsible_class) -- we made the determination earlier :cssText(navbar_style) if is_mini then div:addClass(cfg.classes.mini) end local box_text = (args.text or cfg.box_text) .. ' ' -- the concatenated space guarantees the box text is separated if not (is_mini or is_plain) then div :tag('span') :addClass(cfg.classes.box_text) :cssText(font_style) :wikitext(box_text) end local template = args.template local displayed_links = choose_links(template, args) local has_brackets = args.brackets local title_arg = get_title_arg(is_collapsible, template) local title_text = args[title_arg] or (':' .. mw.getCurrentFrame():getParent():getTitle()) local list = make_list(title_text, has_brackets, displayed_links, is_mini, font_style) div:node(list) if is_collapsible then local title_text_class if is_mini then title_text_class = cfg.classes.collapsible_title_mini else title_text_class = cfg.classes.collapsible_title_full end div:done() :tag('div') :addClass(title_text_class) :cssText(font_style) :wikitext(args[1]) end local frame = mw.getCurrentFrame() -- hlist -> navbar is best-effort to preserve old Common.css ordering. return frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } .. frame:extensionTag{ name = 'templatestyles', args = { src = cfg.templatestyles } } .. tostring(div:done()) end function p.navbar(frame) return p._navbar(require('Module:Arguments').getArgs(frame)) end return p 0iwrh6fwqy52ve4qubv886e6mqvyrcq Module:Navbar/configuration 828 1160 2481 2480 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbar/configuration]] 2480 Scribunto text/plain return { ['templatestyles'] = 'Module:Navbar/styles.css', ['hlist_templatestyles'] = 'Hlist/styles.css', ['box_text'] = 'This box: ', -- default text box when not plain or mini ['title_namespace'] = 'Template', -- namespace to default to for title ['invalid_title'] = 'Invalid title ', ['classes'] = { -- set a line to nil if you don't want it ['navbar'] = 'navbar', ['plainlinks'] = 'plainlinks', -- plainlinks ['horizontal_list'] = 'hlist', -- horizontal list class ['mini'] = 'navbar-mini', -- class indicating small links in the navbar ['this_box'] = 'navbar-boxtext', ['brackets'] = 'navbar-brackets', -- 'collapsible' is the key for a class to indicate the navbar is -- setting up the collapsible element in addition to the normal -- navbar. ['collapsible'] = 'navbar-collapse', ['collapsible_title_mini'] = 'navbar-ct-mini', ['collapsible_title_full'] = 'navbar-ct-full' } } kk8qwxitcbzsvf797c9dznp7tw3a53p Module:Navbar/styles.css 828 1161 2483 2482 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbar/styles.css]] 2482 sanitized-css text/css /* {{pp|small=yes}} */ .navbar { display: inline; font-size: 88%; font-weight: normal; } .navbar-collapse { float: left; text-align: left; } .navbar-boxtext { word-spacing: 0; } .navbar ul { display: inline-block; white-space: nowrap; line-height: inherit; } .navbar-brackets::before { margin-right: -0.125em; content: '[ '; } .navbar-brackets::after { margin-left: -0.125em; content: ' ]'; } .navbar li { word-spacing: -0.125em; } .navbar a > span, .navbar a > abbr { text-decoration: inherit; } .navbar-mini abbr { font-variant: small-caps; border-bottom: none; text-decoration: none; cursor: inherit; } .navbar-ct-full { font-size: 114%; margin: 0 7em; } .navbar-ct-mini { font-size: 114%; margin: 0 4em; } /* not the usual @media screen, we simply remove navbar in @media print */ html.skin-theme-clientpref-night .navbar li a abbr { color: var(--color-base) !important; } @media (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .navbar li a abbr { color: var(--color-base) !important; } } @media print { .navbar { display: none !important; } } a68rpqs0zynjjfzlunkhpdlpnoe6c82 Module:Navbox 828 1162 2485 2484 2024-09-24T01:04:35Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbox]] 2484 Scribunto text/plain require('strict') local p = {} local cfg = mw.loadData('Module:Navbox/configuration') local inArray = require("Module:TableTools").inArray local getArgs -- lazily initialized local format = string.format function p._navbox(args) local function striped(wikitext, border) -- Return wikitext with markers replaced for odd/even striping. -- Child (subgroup) navboxes are flagged with a category that is removed -- by parent navboxes. The result is that the category shows all pages -- where a child navbox is not contained in a parent navbox. local orphanCat = cfg.category.orphan if border == cfg.keyword.border_subgroup and args[cfg.arg.orphan] ~= cfg.keyword.orphan_yes then -- No change; striping occurs in outermost navbox. return wikitext .. orphanCat end local first, second = cfg.class.navbox_odd_part, cfg.class.navbox_even_part if args[cfg.arg.evenodd] then if args[cfg.arg.evenodd] == cfg.keyword.evenodd_swap then first, second = second, first else first = args[cfg.arg.evenodd] second = first end end local changer if first == second then changer = first else local index = 0 changer = function (code) if code == '0' then -- Current occurrence is for a group before a nested table. -- Set it to first as a valid although pointless class. -- The next occurrence will be the first row after a title -- in a subgroup and will also be first. index = 0 return first end index = index + 1 return index % 2 == 1 and first or second end end local regex = orphanCat:gsub('([%[%]])', '%%%1') return (wikitext:gsub(regex, ''):gsub(cfg.marker.regex, changer)) -- () omits gsub count end local function processItem(item, nowrapitems) if item:sub(1, 2) == '{|' then -- Applying nowrap to lines in a table does not make sense. -- Add newlines to compensate for trim of x in |parm=x in a template. return '\n' .. item ..'\n' end if nowrapitems == cfg.keyword.nowrapitems_yes then local lines = {} for line in (item .. '\n'):gmatch('([^\n]*)\n') do local prefix, content = line:match('^([*:;#]+)%s*(.*)') if prefix and not content:match(cfg.pattern.nowrap) then line = format(cfg.nowrap_item, prefix, content) end table.insert(lines, line) end item = table.concat(lines, '\n') end if item:match('^[*:;#]') then return '\n' .. item ..'\n' end return item end local function has_navbar() return args[cfg.arg.navbar] ~= cfg.keyword.navbar_off and args[cfg.arg.navbar] ~= cfg.keyword.navbar_plain and ( args[cfg.arg.name] or mw.getCurrentFrame():getParent():getTitle():gsub(cfg.pattern.sandbox, '') ~= cfg.pattern.navbox ) end -- extract text color from css, which is the only permitted inline CSS for the navbar local function extract_color(css_str) -- return nil because navbar takes its argument into mw.html which handles -- nil gracefully, removing the associated style attribute return mw.ustring.match(';' .. css_str .. ';', '.*;%s*([Cc][Oo][Ll][Oo][Rr]%s*:%s*.-)%s*;') or nil end local function renderNavBar(titleCell) if has_navbar() then local navbar = require('Module:Navbar')._navbar titleCell:wikitext(navbar{ [cfg.navbar.name] = args[cfg.arg.name], [cfg.navbar.mini] = 1, [cfg.navbar.fontstyle] = extract_color( (args[cfg.arg.basestyle] or '') .. ';' .. (args[cfg.arg.titlestyle] or '') ) }) end end local function renderTitleRow(tbl) if not args[cfg.arg.title] then return end local titleRow = tbl:tag('tr') local titleCell = titleRow:tag('th'):attr('scope', 'col') local titleColspan = 2 if args[cfg.arg.imageleft] then titleColspan = titleColspan + 1 end if args[cfg.arg.image] then titleColspan = titleColspan + 1 end titleCell :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.titlestyle]) :addClass(cfg.class.navbox_title) :attr('colspan', titleColspan) renderNavBar(titleCell) titleCell :tag('div') -- id for aria-labelledby attribute :attr('id', mw.uri.anchorEncode(args[cfg.arg.title])) :addClass(args[cfg.arg.titleclass]) :css('font-size', '114%') :css('margin', '0 4em') :wikitext(processItem(args[cfg.arg.title])) end local function getAboveBelowColspan() local ret = 2 if args[cfg.arg.imageleft] then ret = ret + 1 end if args[cfg.arg.image] then ret = ret + 1 end return ret end local function renderAboveRow(tbl) if not args[cfg.arg.above] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.aboveclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.abovestyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') -- id for aria-labelledby attribute, if no title :attr('id', (not args[cfg.arg.title]) and mw.uri.anchorEncode(args[cfg.arg.above]) or nil) :wikitext(processItem(args[cfg.arg.above], args[cfg.arg.nowrapitems])) end local function renderBelowRow(tbl) if not args[cfg.arg.below] then return end tbl:tag('tr') :tag('td') :addClass(cfg.class.navbox_abovebelow) :addClass(args[cfg.arg.belowclass]) :cssText(args[cfg.arg.basestyle]) :cssText(args[cfg.arg.belowstyle]) :attr('colspan', getAboveBelowColspan()) :tag('div') :wikitext(processItem(args[cfg.arg.below], args[cfg.arg.nowrapitems])) end local function renderListRow(tbl, index, listnum, listnums_size) local row = tbl:tag('tr') if index == 1 and args[cfg.arg.imageleft] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 2px 0 0') :cssText(args[cfg.arg.imageleftstyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.imageleft])) end local group_and_num = format(cfg.arg.group_and_num, listnum) local groupstyle_and_num = format(cfg.arg.groupstyle_and_num, listnum) if args[group_and_num] then local groupCell = row:tag('th') -- id for aria-labelledby attribute, if lone group with no title or above if listnum == 1 and not (args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group2]) then groupCell :attr('id', mw.uri.anchorEncode(args[cfg.arg.group1])) end groupCell :attr('scope', 'row') :addClass(cfg.class.navbox_group) :addClass(args[cfg.arg.groupclass]) :cssText(args[cfg.arg.basestyle]) -- If groupwidth not specified, minimize width :css('width', args[cfg.arg.groupwidth] or '1%') groupCell :cssText(args[cfg.arg.groupstyle]) :cssText(args[groupstyle_and_num]) :wikitext(args[group_and_num]) end local listCell = row:tag('td') if args[group_and_num] then listCell :addClass(cfg.class.navbox_list_with_group) else listCell:attr('colspan', 2) end if not args[cfg.arg.groupwidth] then listCell:css('width', '100%') end local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing if index % 2 == 1 then rowstyle = args[cfg.arg.oddstyle] else rowstyle = args[cfg.arg.evenstyle] end local list_and_num = format(cfg.arg.list_and_num, listnum) local listText = args[list_and_num] if inArray(cfg.keyword.subgroups, listText) then local childArgs = { [cfg.arg.border] = cfg.keyword.border_subgroup, [cfg.arg.navbar] = cfg.keyword.navbar_plain } local hasChildArgs = false for k, v in pairs(args) do k = tostring(k) for _, w in ipairs(cfg.keyword.subgroups) do w = w .. listnum .. "_" if (#k > #w) and (k:sub(1, #w) == w) then childArgs[k:sub(#w + 1)] = v hasChildArgs = true end end end listText = hasChildArgs and p._navbox(childArgs) or listText end local oddEven = cfg.marker.oddeven if listText:sub(1, 12) == '</div><table' then -- Assume list text is for a subgroup navbox so no automatic striping for this row. oddEven = listText:find(cfg.pattern.navbox_title) and cfg.marker.restart or cfg.class.navbox_odd_part end local liststyle_and_num = format(cfg.arg.liststyle_and_num, listnum) local listclass_and_num = format(cfg.arg.listclass_and_num, listnum) listCell :css('padding', '0') :cssText(args[cfg.arg.liststyle]) :cssText(rowstyle) :cssText(args[liststyle_and_num]) :addClass(cfg.class.navbox_list) :addClass(cfg.class.navbox_part .. oddEven) :addClass(args[cfg.arg.listclass]) :addClass(args[listclass_and_num]) :tag('div') :css('padding', (index == 1 and args[cfg.arg.list1padding]) or args[cfg.arg.listpadding] or '0 0.25em' ) :wikitext(processItem(listText, args[cfg.arg.nowrapitems])) if index == 1 and args[cfg.arg.image] then row :tag('td') :addClass(cfg.class.noviewer) :addClass(cfg.class.navbox_image) :addClass(args[cfg.arg.imageclass]) :css('width', '1px') -- Minimize width :css('padding', '0 0 0 2px') :cssText(args[cfg.arg.imagestyle]) :attr('rowspan', listnums_size) :tag('div') :wikitext(processItem(args[cfg.arg.image])) end end local function has_list_class(htmlclass) local patterns = { '^' .. htmlclass .. '$', '%s' .. htmlclass .. '$', '^' .. htmlclass .. '%s', '%s' .. htmlclass .. '%s' } for arg, _ in pairs(args) do if type(arg) == 'string' and mw.ustring.find(arg, cfg.pattern.class) then for _, pattern in ipairs(patterns) do if mw.ustring.find(args[arg] or '', pattern) then return true end end end end return false end -- there are a lot of list classes in the wild, so we add their TemplateStyles local function add_list_styles() local frame = mw.getCurrentFrame() local function add_list_templatestyles(htmlclass, templatestyles) if has_list_class(htmlclass) then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } else return '' end end local hlist_styles = add_list_templatestyles('hlist', cfg.hlist_templatestyles) local plainlist_styles = add_list_templatestyles('plainlist', cfg.plainlist_templatestyles) -- a second workaround for [[phab:T303378]] -- when that issue is fixed, we can actually use has_navbar not to emit the -- tag here if we want if has_navbar() and hlist_styles == '' then hlist_styles = frame:extensionTag{ name = 'templatestyles', args = { src = cfg.hlist_templatestyles } } end -- hlist -> plainlist is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because most navboxes will emit only -- one of these classes [hlist_note] return hlist_styles .. plainlist_styles end local function needsHorizontalLists(border) if border == cfg.keyword.border_subgroup or args[cfg.arg.tracking] == cfg.keyword.tracking_no then return false end return not has_list_class(cfg.pattern.hlist) and not has_list_class(cfg.pattern.plainlist) end local function hasBackgroundColors() for _, key in ipairs({cfg.arg.titlestyle, cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('background', 1, true) then return true end end return false end local function hasBorders() for _, key in ipairs({cfg.arg.groupstyle, cfg.arg.basestyle, cfg.arg.abovestyle, cfg.arg.belowstyle}) do if tostring(args[key]):find('border', 1, true) then return true end end return false end local function isIllegible() local styleratio = require('Module:Color contrast')._styleratio for key, style in pairs(args) do if tostring(key):match(cfg.pattern.style) then if styleratio{mw.text.unstripNoWiki(style)} < 4.5 then return true end end end return false end local function getTrackingCategories(border) local cats = {} if needsHorizontalLists(border) then table.insert(cats, cfg.category.horizontal_lists) end if hasBackgroundColors() then table.insert(cats, cfg.category.background_colors) end if isIllegible() then table.insert(cats, cfg.category.illegible) end if hasBorders() then table.insert(cats, cfg.category.borders) end return cats end local function renderTrackingCategories(builder, border) local title = mw.title.getCurrentTitle() if title.namespace ~= 10 then return end -- not in template space local subpage = title.subpageText if subpage == cfg.keyword.subpage_doc or subpage == cfg.keyword.subpage_sandbox or subpage == cfg.keyword.subpage_testcases then return end for _, cat in ipairs(getTrackingCategories(border)) do builder:wikitext('[[Category:' .. cat .. ']]') end end local function renderMainTable(border, listnums) local tbl = mw.html.create('table') :addClass(cfg.class.nowraplinks) :addClass(args[cfg.arg.bodyclass]) local state = args[cfg.arg.state] if args[cfg.arg.title] and state ~= cfg.keyword.state_plain and state ~= cfg.keyword.state_off then if state == cfg.keyword.state_collapsed then state = cfg.class.collapsed end tbl :addClass(cfg.class.collapsible) :addClass(state or cfg.class.autocollapse) end tbl:css('border-spacing', 0) if border == cfg.keyword.border_subgroup or border == cfg.keyword.border_none then tbl :addClass(cfg.class.navbox_subgroup) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) else -- regular navbox - bodystyle and style will be applied to the wrapper table tbl :addClass(cfg.class.navbox_inner) :css('background', 'transparent') :css('color', 'inherit') end tbl:cssText(args[cfg.arg.innerstyle]) renderTitleRow(tbl) renderAboveRow(tbl) local listnums_size = #listnums for i, listnum in ipairs(listnums) do renderListRow(tbl, i, listnum, listnums_size) end renderBelowRow(tbl) return tbl end local function add_navbox_styles(hiding_templatestyles) local frame = mw.getCurrentFrame() -- This is a lambda so that it doesn't need the frame as a parameter local function add_user_styles(templatestyles) if templatestyles and templatestyles ~= '' then return frame:extensionTag{ name = 'templatestyles', args = { src = templatestyles } } end return '' end -- get templatestyles. load base from config so that Lua only needs to do -- the work once of parser tag expansion local base_templatestyles = cfg.templatestyles local templatestyles = add_user_styles(args[cfg.arg.templatestyles]) local child_templatestyles = add_user_styles(args[cfg.arg.child_templatestyles]) -- The 'navbox-styles' div exists to wrap the styles to work around T200206 -- more elegantly. Instead of combinatorial rules, this ends up being linear -- number of CSS rules. return mw.html.create('div') :addClass(cfg.class.navbox_styles) :wikitext( add_list_styles() .. -- see [hlist_note] applied to 'before base_templatestyles' base_templatestyles .. templatestyles .. child_templatestyles .. table.concat(hiding_templatestyles) ) :done() end -- work around [[phab:T303378]] -- for each arg: find all the templatestyles strip markers, insert them into a -- table. then remove all templatestyles markers from the arg local function move_hiding_templatestyles(args) local gfind = string.gfind local gsub = string.gsub local templatestyles_markers = {} local strip_marker_pattern = '(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)' for k, arg in pairs(args) do for marker in gfind(arg, strip_marker_pattern) do table.insert(templatestyles_markers, marker) end args[k] = gsub(arg, strip_marker_pattern, '') end return templatestyles_markers end local hiding_templatestyles = move_hiding_templatestyles(args) local listnums = {} for k, _ in pairs(args) do if type(k) == 'string' then local listnum = k:match(cfg.pattern.listnum) if listnum then table.insert(listnums, tonumber(listnum)) end end end table.sort(listnums) local border = mw.text.trim(args[cfg.arg.border] or args[1] or '') if border == cfg.keyword.border_child then border = cfg.keyword.border_subgroup end -- render the main body of the navbox local tbl = renderMainTable(border, listnums) local res = mw.html.create() -- render the appropriate wrapper for the navbox, based on the border param if border == cfg.keyword.border_none then res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode( args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1] ) ) else nav:attr('aria-label', cfg.aria_label) end elseif border == cfg.keyword.border_subgroup then -- We assume that this navbox is being rendered in a list cell of a -- parent navbox, and is therefore inside a div with padding:0em 0.25em. -- We start with a </div> to avoid the padding being applied, and at the -- end add a <div> to balance out the parent's </div> res :wikitext('</div>') :node(tbl) :wikitext('<div>') else res:node(add_navbox_styles(hiding_templatestyles)) local nav = res:tag('div') :attr('role', 'navigation') :addClass(cfg.class.navbox) :addClass(args[cfg.arg.navboxclass]) :cssText(args[cfg.arg.bodystyle]) :cssText(args[cfg.arg.style]) :css('padding', '3px') :node(tbl) -- aria-labelledby title, otherwise above, otherwise lone group if args[cfg.arg.title] or args[cfg.arg.above] or (args[cfg.arg.group1] and not args[cfg.arg.group2]) then nav:attr( 'aria-labelledby', mw.uri.anchorEncode(args[cfg.arg.title] or args[cfg.arg.above] or args[cfg.arg.group1]) ) else nav:attr('aria-label', cfg.aria_label) end end if (args[cfg.arg.nocat] or cfg.keyword.nocat_false):lower() == cfg.keyword.nocat_false then renderTrackingCategories(res, border) end return striped(tostring(res), border) end function p.navbox(frame) local function readArgs(args, prefix) -- Read the arguments in the order they'll be output in, to make references -- number in the right order. local _ _ = args[prefix .. cfg.arg.title] _ = args[prefix .. cfg.arg.above] -- Limit this to 20 as covering 'most' cases (that's a SWAG) and because -- iterator approach won't work here for i = 1, 20 do _ = args[prefix .. format(cfg.arg.group_and_num, i)] if inArray(cfg.keyword.subgroups, args[prefix .. format(cfg.arg.list_and_num, i)]) then for _, v in ipairs(cfg.keyword.subgroups) do readArgs(args, prefix .. v .. i .. "_") end end end _ = args[prefix .. cfg.arg.below] end if not getArgs then getArgs = require('Module:Arguments').getArgs end local args = getArgs(frame, {wrappers = {cfg.pattern.navbox}}) readArgs(args, "") return p._navbox(args) end return p 1pon9rs0zcs8smnoe6omcal0pz52jmt Module:Navbox/configuration 828 1163 2487 2486 2024-09-24T01:04:36Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbox/configuration]] 2486 Scribunto text/plain return { aria_label = 'Navbox', nowrap_item = '%s<span class="nowrap">%s</span>', templatestyles = mw.getCurrentFrame():extensionTag{ name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' } }, hlist_templatestyles = 'Hlist/styles.css', plainlist_templatestyles = 'Plainlist/styles.css', -- do not localize marker table marker = { oddeven = '\127_ODDEVEN_\127', restart = '\127_ODDEVEN0_\127', regex = '\127_ODDEVEN(%d?)_\127' }, category = { orphan = '[[Category:Navbox orphans]]', horizontal_lists = 'Navigational boxes without horizontal lists', background_colors = 'Navboxes using background colours', illegible = 'Potentially illegible navboxes', borders = 'Navboxes using borders', }, keyword = { border_subgroup = 'subgroup', border_child = 'child', border_none = 'none', evenodd_swap = 'swap', navbar_off = 'off', navbar_plain = 'plain', nocat_false = 'false', nowrapitems_yes = 'yes', orphan_yes = 'yes', state_collapsed = 'collapsed', state_off = 'off', state_plain = 'plain', subgroups = {'subgroup', 'child', ''}, subpage_doc = 'doc', subpage_sandbox = 'sandbox', subpage_testcases = 'testcases', tracking_no = 'no' }, class = { autocollapse = 'autocollapse', collapsible = 'mw-collapsible', collapsed = 'mw-collapsed', -- Warning navbox = 'navbox', -- WMF currently hides 'navbox' from mobile, -- so you probably shouldn't change the navbox class. navbox_abovebelow = 'navbox-abovebelow', navbox_group = 'navbox-group', navbox_image = 'navbox-image', navbox_inner = 'navbox-inner', navbox_list = 'navbox-list', navbox_list_with_group = 'navbox-list-with-group', navbox_part = 'navbox-', -- do not l10n navbox_styles = 'navbox-styles', navbox_subgroup = 'navbox-subgroup', navbox_title = 'navbox-title', -- l10n only if you change pattern.navbox_title below navbox_odd_part = 'odd', -- do not l10n navbox_even_part = 'even', -- do not l10n nomobile = 'nomobile', nowraplinks = 'nowraplinks', noviewer = 'noviewer' -- used to remove images from MediaViewer }, pattern = { listnum = '^list(%d+)$', class = 'class', sandbox = '/sandbox$', navbox = 'Template:Navbox', nowrap = '^<span class="nowrap">', style = 'style$', navbox_title = '<th[^>]*"navbox%-title"', hlist = 'hlist', plainlist = 'plainlist', }, arg = { above = 'above', aboveclass = 'aboveclass', abovestyle = 'abovestyle', basestyle = 'basestyle', bodyclass = 'bodyclass', bodystyle = 'bodystyle', border = 'border', below = 'below', belowclass = 'belowclass', belowstyle = 'belowstyle', evenodd = 'evenodd', evenstyle = 'evenstyle', group1 = 'group1', group2 = 'group2', group_and_num = 'group%d', groupstyle_and_num = 'group%dstyle', groupclass = 'groupclass', groupstyle = 'groupstyle', groupwidth = 'groupwidth', innerstyle = 'innerstyle', image = 'image', imageclass = 'imageclass', imageleft = 'imageleft', imageleftstyle = 'imageleftstyle', imagestyle = 'imagestyle', list_and_num = 'list%d', listclass_and_num = 'list%dclass', liststyle_and_num = 'list%dstyle', list1padding = 'list1padding', listclass = 'listclass', listpadding = 'listpadding', liststyle = 'liststyle', name = 'name', navbar = 'navbar', navboxclass = 'navboxclass', nocat = 'nocat', nowrapitems = 'nowrapitems', oddstyle = 'oddstyle', orphan = 'orphan', state = 'state', style = 'style', templatestyles = 'templatestyles', child_templatestyles = 'child templatestyles', title = 'title', titleclass = 'titleclass', titlestyle = 'titlestyle', tracking = 'tracking' }, -- names of navbar arguments navbar = { name = 1, fontstyle = 'fontstyle', mini = 'mini' } } 6q6d0bhb0etao102qsgcjuaeigpugtk Module:Navbox/styles.css 828 1164 2489 2488 2024-09-24T01:04:36Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Navbox/styles.css]] 2488 sanitized-css text/css /* {{pp|small=y}} */ .navbox { box-sizing: border-box; border: 1px solid #a2a9b1; width: 100%; clear: both; font-size: 88%; text-align: center; padding: 1px; margin: 1em auto 0; /* Prevent preceding content from clinging to navboxes */ } .navbox .navbox { margin-top: 0; /* No top margin for nested navboxes */ } .navbox + .navbox, /* TODO: remove first line after transclusions have updated */ .navbox + .navbox-styles + .navbox { margin-top: -1px; /* Single pixel border between adjacent navboxes */ } .navbox-inner, .navbox-subgroup { width: 100%; } .navbox-group, .navbox-title, .navbox-abovebelow { padding: 0.25em 1em; line-height: 1.5em; text-align: center; } .navbox-group { white-space: nowrap; /* @noflip */ text-align: right; } .navbox, .navbox-subgroup { background-color: #fdfdfd; } .navbox-list { line-height: 1.5em; border-color: #fdfdfd; /* Must match background color */ } .navbox-list-with-group { text-align: left; border-left-width: 2px; border-left-style: solid; } /* cell spacing for navbox cells */ /* Borders above 2nd, 3rd, etc. rows */ /* TODO: figure out how to replace tr as structure; * with div structure it should be just a matter of first-child */ tr + tr > .navbox-abovebelow, tr + tr > .navbox-group, tr + tr > .navbox-image, tr + tr > .navbox-list { border-top: 2px solid #fdfdfd; /* Must match background color */ } .navbox-title { background-color: #ccf; /* Level 1 color */ } .navbox-abovebelow, .navbox-group, .navbox-subgroup .navbox-title { background-color: #ddf; /* Level 2 color */ } .navbox-subgroup .navbox-group, .navbox-subgroup .navbox-abovebelow { background-color: #e6e6ff; /* Level 3 color */ } .navbox-even { background-color: #f7f7f7; } .navbox-odd { background-color: transparent; } /* TODO: figure out how to remove reliance on td as structure */ .navbox .hlist td dl, .navbox .hlist td ol, .navbox .hlist td ul, .navbox td.hlist dl, .navbox td.hlist ol, .navbox td.hlist ul { padding: 0.125em 0; } .navbox .navbar { display: block; font-size: 100%; } .navbox-title .navbar { /* @noflip */ float: left; /* @noflip */ text-align: left; /* @noflip */ margin-right: 0.5em; } /** T367463 */ body.skin--responsive .navbox-image img { max-width: none !important; } @media print { body.ns-0 .navbox { display: none !important; } } fg3ep7u2ikj39r86m5x2aj17kpqgies Template:Ombox 10 1165 2491 2490 2024-09-24T01:04:36Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Ombox]] 2490 wikitext text/x-wiki {{#invoke:Message box|ombox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude> 1o93yrjvq6v2ylug2k0uaaltljurje2 Module:Color contrast 828 1166 2493 2492 2024-09-24T01:04:36Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Color_contrast]] 2492 Scribunto text/plain -- -- This module implements -- {{Color contrast ratio}} -- {{Greater color contrast ratio}} -- {{ColorToLum}} -- {{RGBColorToLum}} -- local p = {} local HTMLcolor = mw.loadData( 'Module:Color contrast/colors' ) local function sRGB (v) if (v <= 0.03928) then v = v / 12.92 else v = math.pow((v+0.055)/1.055, 2.4) end return v end local function rgbdec2lum(R, G, B) if ( 0 <= R and R < 256 and 0 <= G and G < 256 and 0 <= B and B < 256 ) then return 0.2126 * sRGB(R/255) + 0.7152 * sRGB(G/255) + 0.0722 * sRGB(B/255) else return '' end end local function hsl2lum(h, s, l) if ( 0 <= h and h < 360 and 0 <= s and s <= 1 and 0 <= l and l <= 1 ) then local c = (1 - math.abs(2*l - 1))*s local x = c*(1 - math.abs( math.fmod(h/60, 2) - 1) ) local m = l - c/2 local r, g, b = m, m, m if( 0 <= h and h < 60 ) then r = r + c g = g + x elseif( 60 <= h and h < 120 ) then r = r + x g = g + c elseif( 120 <= h and h < 180 ) then g = g + c b = b + x elseif( 180 <= h and h < 240 ) then g = g + x b = b + c elseif( 240 <= h and h < 300 ) then r = r + x b = b + c elseif( 300 <= h and h < 360 ) then r = r + c b = b + x end return rgbdec2lum(255*r, 255*g, 255*b) else return '' end end local function color2lum(c) if (c == nil) then return '' end -- html '#' entity c = c:gsub("&#35;", "#") -- whitespace c = c:match( '^%s*(.-)[%s;]*$' ) -- unstrip nowiki strip markers c = mw.text.unstripNoWiki(c) -- lowercase c = c:lower() -- first try to look it up local L = HTMLcolor[c] if (L ~= nil) then return L end -- convert from hsl if mw.ustring.match(c,'^hsl%([%s]*[0-9][0-9%.]*[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local h, s, l = mw.ustring.match(c,'^hsl%([%s]*([0-9][0-9%.]*)[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return hsl2lum(tonumber(h), tonumber(s)/100, tonumber(l)/100) end -- convert from rgb if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*,[%s]*[0-9][0-9]*[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*,[%s]*([0-9][0-9]*)[%s]*%)$') return rgbdec2lum(tonumber(R), tonumber(G), tonumber(B)) end -- convert from rgb percent if mw.ustring.match(c,'^rgb%([%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*,[%s]*[0-9][0-9%.]*%%[%s]*%)$') then local R, G, B = mw.ustring.match(c,'^rgb%([%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*,[%s]*([0-9][0-9%.]*)%%[%s]*%)$') return rgbdec2lum(255*tonumber(R)/100, 255*tonumber(G)/100, 255*tonumber(B)/100) end -- remove leading # (if there is one) and whitespace c = mw.ustring.match(c, '^[%s#]*([a-f0-9]*)[%s]*$') -- split into rgb local cs = mw.text.split(c or '', '') if( #cs == 6 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[2]) local G = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[4]) local B = 16*tonumber('0x' .. cs[5]) + tonumber('0x' .. cs[6]) return rgbdec2lum(R, G, B) elseif ( #cs == 3 ) then local R = 16*tonumber('0x' .. cs[1]) + tonumber('0x' .. cs[1]) local G = 16*tonumber('0x' .. cs[2]) + tonumber('0x' .. cs[2]) local B = 16*tonumber('0x' .. cs[3]) + tonumber('0x' .. cs[3]) return rgbdec2lum(R, G, B) end -- failure, return blank return '' end -- This exports the function for use in other modules. -- The colour is passed as a string. function p._lum(color) return color2lum(color) end function p._greatercontrast(args) local bias = tonumber(args['bias'] or '0') or 0 local css = (args['css'] and args['css'] ~= '') and true or false local v1 = color2lum(args[1] or '') local c2 = args[2] or '#FFFFFF' local v2 = color2lum(c2) local c3 = args[3] or '#000000' local v3 = color2lum(c3) local ratio1 = -1; local ratio2 = -1; if (type(v1) == 'number' and type(v2) == 'number') then ratio1 = (v2 + 0.05)/(v1 + 0.05) ratio1 = (ratio1 < 1) and 1/ratio1 or ratio1 end if (type(v1) == 'number' and type(v3) == 'number') then ratio2 = (v3 + 0.05)/(v1 + 0.05) ratio2 = (ratio2 < 1) and 1/ratio2 or ratio2 end if css then local c1 = args[1] or '' if mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c1, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c1 = '#' .. c1 end if mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(c2, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c2 = '#' .. c2 end if mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') or mw.ustring.match(v3, '^[A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9][A-Fa-f0-9]$') then c3 = '#' .. c3 end return 'background-color:' .. c1 .. '; color:' .. ((ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '') .. ';' end return (ratio1 > 0) and (ratio2 > 0) and ((ratio1 + bias > ratio2) and c2 or c3) or '' end function p._ratio(args) local v1 = color2lum(args[1]) local v2 = color2lum(args[2]) if (type(v1) == 'number' and type(v2) == 'number') then -- v1 should be the brighter of the two. if v2 > v1 then v1, v2 = v2, v1 end return (v1 + 0.05)/(v2 + 0.05) else return args['error'] or '?' end end function p._styleratio(args) local style = (args[1] or ''):lower() local bg, fg = 'white', 'black' local lum_bg, lum_fg = 1, 0 if args[2] then local lum = color2lum(args[2]) if lum ~= '' then bg, lum_bg = args[2], lum end end if args[3] then local lum = color2lum(args[3]) if lum ~= '' then fg, lum_fg = args[3], lum end end local slist = mw.text.split(mw.ustring.gsub(mw.ustring.gsub(style or '', '&#[Xx]23;', '#'), '&#35;', '#'), ';') for k = 1,#slist do local s = slist[k] local k,v = s:match( '^[%s]*([^:]-):([^:]-)[%s;]*$' ) k = k or '' v = v or '' if (k:match('^[%s]*(background)[%s]*$') or k:match('^[%s]*(background%-color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_bg = v, lum end elseif (k:match('^[%s]*(color)[%s]*$')) then local lum = color2lum(v) if( lum ~= '' ) then bg, lum_fg = v, lum end end end if lum_bg > lum_fg then return (lum_bg + 0.05)/(lum_fg + 0.05) else return (lum_fg + 0.05)/(lum_bg + 0.05) end end --[[ Use {{#invoke:Color contrast|somecolor}} directly or {{#invoke:Color contrast}} from a wrapper template. Parameters: -- |1= — required; A color to check. --]] function p.lum(frame) local color = frame.args[1] or frame:getParent().args[1] return p._lum(color) end function p.ratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._ratio(args) end function p.styleratio(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._styleratio(args) end function p.greatercontrast(frame) local args = frame.args[1] and frame.args or frame:getParent().args return p._greatercontrast(args) end return p 3j3oaih63ygo9p806h5yxpscaqh3xu9 Module:Color contrast/colors 828 1167 2495 2494 2024-09-24T01:04:37Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Color_contrast/colors]] 2494 Scribunto text/plain return { aliceblue = 0.92880068253475, antiquewhite = 0.84646951707754, aqua = 0.7874, aquamarine = 0.8078549208338, azure = 0.97265264954166, beige = 0.8988459998705, bisque = 0.80732327372979, black = 0, blanchedalmond = 0.85084439608156, blue = 0.0722, blueviolet = 0.12622014321946, brown = 0.098224287876511, burlywood = 0.51559844533893, cadetblue = 0.29424681085422, chartreuse = 0.76032025902623, chocolate = 0.23898526114557, coral = 0.37017930872924, cornflowerblue = 0.30318641994179, cornsilk = 0.93562110372965, crimson = 0.16042199953026, cyan = 0.7874, darkblue = 0.018640801980939, darkcyan = 0.20329317839046, darkgoldenrod = 0.27264703559993, darkgray = 0.39675523072563, darkgreen = 0.091143429047575, darkgrey = 0.39675523072563, darkkhaki = 0.45747326349994, darkmagenta = 0.07353047651207, darkolivegreen = 0.12651920884889, darkorange = 0.40016167026524, darkorchid = 0.13413142174857, darkred = 0.054889674531132, darksalmon = 0.40541471563381, darkseagreen = 0.43789249325969, darkslateblue = 0.065792846227988, darkslategray = 0.067608151928044, darkslategrey = 0.067608151928044, darkturquoise = 0.4874606277449, darkviolet = 0.10999048339343, deeppink = 0.23866895828276, deepskyblue = 0.44481603395575, dimgray = 0.14126329114027, dimgrey = 0.14126329114027, dodgerblue = 0.27442536991456, firebrick = 0.10724525535015, floralwhite = 0.95922484825004, forestgreen = 0.18920812076002, fuchsia = 0.2848, gainsboro = 0.71569350050648, ghostwhite = 0.94311261886323, gold = 0.69860877428159, goldenrod = 0.41919977809569, gray = 0.2158605001139, green = 0.15438342968146, greenyellow = 0.80609472611453, grey = 0.2158605001139, honeydew = 0.96336535554782, hotpink = 0.34658438169715, indianred = 0.21406134963884, indigo = 0.03107561486337, ivory = 0.99071270600615, khaki = 0.77012343394121, lavender = 0.80318750514521, lavenderblush = 0.90172748631046, lawngreen = 0.73905893124963, lemonchiffon = 0.94038992245622, lightblue = 0.63709141280807, lightcoral = 0.35522120733135, lightcyan = 0.94587293494829, lightgoldenrodyellow = 0.93348351018297, lightgray = 0.65140563741982, lightgreen = 0.69091979956865, lightgrey = 0.65140563741982, lightpink = 0.58566152734898, lightsalmon = 0.4780675225206, lightseagreen = 0.35050145117042, lightskyblue = 0.56195637618331, lightslategray = 0.23830165007287, lightslategrey = 0.23830165007287, lightsteelblue = 0.53983888284666, lightyellow = 0.98161818392882, lime = 0.7152, limegreen = 0.44571042246098, linen = 0.88357340984379, magenta = 0.2848, maroon = 0.045891942324215, mediumaquamarine = 0.49389703310801, mediumblue = 0.044077780212328, mediumorchid = 0.21639251153773, mediumpurple = 0.22905858091648, mediumseagreen = 0.34393112338131, mediumslateblue = 0.20284629471622, mediumspringgreen = 0.70704308194184, mediumturquoise = 0.5133827926448, mediumvioletred = 0.14371899849357, midnightblue = 0.02071786635086, mintcream = 0.97834604947588, mistyrose = 0.82183047859185, moccasin = 0.80083000991567, navajowhite = 0.76519682342785, navy = 0.015585128108224, oldlace = 0.91900633405549, olive = 0.20027537200568, olivedrab = 0.22593150951929, orange = 0.4817026703631, orangered = 0.25516243753416, orchid = 0.31348806761439, palegoldenrod = 0.78792647887614, palegreen = 0.77936759006353, paleturquoise = 0.76436077921714, palevioletred = 0.28754994117889, papayawhip = 0.87797100199835, peachpuff = 0.74905589878251, peru = 0.30113074877936, pink = 0.63271070702466, plum = 0.45734221587969, powderblue = 0.68254586500605, purple = 0.061477070432439, rebeccapurple = 0.07492341159447, red = 0.2126, rosybrown = 0.32319457649407, royalblue = 0.16663210743188, saddlebrown = 0.097922285020521, salmon = 0.36977241527596, sandybrown = 0.46628543696283, seagreen = 0.19734199706275, seashell = 0.92737862206922, sienna = 0.13697631337098, silver = 0.52711512570581, skyblue = 0.55291668518184, slateblue = 0.14784278062136, slategray = 0.20896704076536, slategrey = 0.20896704076536, snow = 0.96533341834849, springgreen = 0.73052306068529, steelblue = 0.20562642207625, tan = 0.48237604163921, teal = 0.16996855778968, thistle = 0.56818401093733, tomato = 0.30638612719415, turquoise = 0.5895536427578, violet = 0.40315452986676, wheat = 0.74909702820482, white = 1, whitesmoke = 0.91309865179342, yellow = 0.9278, yellowgreen = 0.50762957208707, } chi69ar1btd4wp6xbk3uez6sfu0vipn Template:Documentation 10 1168 2497 2496 2024-09-24T01:04:37Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Documentation]] 2496 wikitext text/x-wiki {{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}<noinclude> <!-- Add categories to the /doc subpage --> </noinclude> ii1kftoonz87mztj4siz1yhyqeg6agm Module:Documentation 828 1169 2499 2498 2024-09-24T01:04:37Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Documentation]] 2498 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- 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 return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return 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 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 -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) 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 ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. 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. -- -- 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.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.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end 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' --> '[[File: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' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] 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 = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') 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.contentModel == "Scribunto" 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. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) 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 = 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. return require('Module:Protection banner')._main{ message('protection-reason-edit'), 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. return require('Module:Protection banner')._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 or args[1] 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' -- '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 if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return "&#91;" .. viewLink .. "&#93; &#91;" .. editLink .. "&#93; &#91;" .. historyLink .. "&#93; &#91;" .. purgeLink .. "&#93;" else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return "&#91;" .. createLink .. "&#93; &#91;" .. purgeLink .. "&#93;" 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' -- '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 else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') 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 -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :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 -- --]=] -- 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 link box. 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 '') .. '<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" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) 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 [[Help: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 if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return 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:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end 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 sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, 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:canonicalUrl{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:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{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:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" 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:canonicalUrl{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 ---------------------------------------------------------------------------- -- 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 if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p ky7myqtha9rjaznz4jxomjtdpuanlqs Module:Documentation/config 828 1170 2501 2500 2024-09-24T01:04:37Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Documentation/config]] 2500 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'] = '[[File: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['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- 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 [[Help: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'] = '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['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' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- 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 a4mz1srhm8rh02cxt53a9azlcc4hx9f Module:Documentation/styles.css 828 1171 2503 2502 2024-09-24T01:04:38Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Module:Documentation/styles.css]] 2502 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid #a2a9b1; background-color: #ecfcf4; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid #aaa; margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: #0b1e1c; } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: #0b1e1c; } } 3igw4iwzymtlarkxz89qi8dgj0mdzjy Template:Sandbox other 10 1172 2505 2504 2024-09-24T01:04:38Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Sandbox_other]] 2504 wikitext text/x-wiki {{#if:{{#ifeq:{{#invoke:String|sublength|s={{SUBPAGENAME}}|i=0|len=7}}|sandbox|1}}{{#ifeq:{{SUBPAGENAME}}|doc|1}}{{#invoke:String|match|{{PAGENAME}}|/sandbox/styles.css$|plain=false|nomatch=}}|{{{1|}}}|{{{2|}}}}}<!-- --><noinclude>{{documentation}}</noinclude> h1idujwaw20aducxsd1gc4ovgnjikqa Template:Documentation subpage 10 1173 2507 2506 2024-09-24T01:04:38Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Documentation_subpage]] 2506 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 = {{strong|This is a [[Wikipedia:Template documentation|documentation]] [[Wikipedia:Subpages|subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain 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> 7onyk1v06bkcimr1a843d6yopob2nvb Template:Tlbare 10 1174 2509 2508 2024-09-24T01:04:39Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Tlbare]] 2508 wikitext text/x-wiki #REDIRECT [[Template:Template link bare]] {{Redirect category shell| {{R from move}} }} l89xpoqitv1g23dahghl12q7xp9b5q1 Template:Sandbox-related templates 10 1175 2511 2510 2024-09-24T01:04:39Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Sandbox-related_templates]] 2510 wikitext text/x-wiki {{Navbox | name = Sandbox-related templates | state = {{{state|{{{1|<includeonly>collapsed</includeonly>}}}}}} | title = [[Wikipedia:About the Sandbox|Sandbox]]-related templates | <!--colclass-->listclass = hlist | group1 = Headings | list1 = * {{tlbare|Sandbox heading}}&nbsp;({{tlbare|Sandbox heading/Talk|talk}}) * {{tlbare|Template sandbox heading}} * {{tlbare|File sandbox heading}} * {{tlbare|Tutorial sandbox heading}}&nbsp;({{tlbare|Tutorial sandbox heading/Talk|talk}}) * [[Template:Please leave this line alone (AFC sandbox heading)|Articles for creation sandbox heading]] | group2 = Reset messages | list2 = * {{tlbare|Sandbox reset}} * {{tlbare|Template sandbox reset}} | group3 = Other templates | list3 = * {{tlbare|Not a sandbox}} * {{tlbare|User sandbox}} }}<noinclude> {{Documentation | content = {{Collapsible option |statename=optional |default=collapsed}} [[Category:Sandbox templates| ]] [[Category:Documentation see also templates]] }}<!--(end Documentation)--> </noinclude> 7lq09d2sblcupynoyyqr8y63o5jymza Template:Sandbox heading/doc 10 1176 2513 2512 2024-09-24T01:04:39Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Sandbox_heading/doc]] 2512 wikitext text/x-wiki <noinclude>{{pp-template|small=yes}}</noinclude>{{Documentation subpage}} ===Usage=== This template is used to create the header for [[Wikipedia:Sandbox]]. At [[WP:Tutorial|Tutorial]] sandboxes, it calls [[Template:Tutorial sandbox heading]]. ===See also=== {{Sandbox-related templates|state=expanded}} <includeonly>{{Sandbox other|| [[Category:Sandbox templates]] }}</includeonly> <templatedata> { "params": {}, "format": "block" } </templatedata> hd7qsh8cspcanm3dmoiya0vxdgk8vh8 Template:Hlist/styles.css 10 1177 2515 2514 2024-09-24T01:04:39Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Hlist/styles.css]] 2514 sanitized-css text/css /* {{pp-protected|reason=match parent|small=yes}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: " · "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } gfbk8cwecy39b1u1zxq4sqqxyf84d2r Template:Template link bare 10 1178 2517 2516 2024-09-24T01:04:39Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Template_link_bare]] 2516 wikitext text/x-wiki {{#if:{{str endswith|{{{1}}}|%}} <!--(i.e. if {{{1}}} is a percentage)--> | [[Template:{{{2}}}|<span style="font-size:{{{1}}};">{{{3|{{{2}}}}}}</span>]] | [[Template:{{{1}}}|{{{2|{{{1}}}}}}]] }}<noinclude> {{Documentation}} </noinclude> atiz55vvk4gem0tvnnsrtowqye3jkoh Template:Sandbox heading/Navigation 10 1179 2519 2518 2024-09-24T01:04:40Z Jeremyb 8 1 revision imported from [[:wikipedia:en:Template:Sandbox_heading/Navigation]] 2518 wikitext text/x-wiki {{Navbox | name = Sandbox heading/Navigation | navbar = plain | title = Sandbox navigation | listclass = hlist | state = {{{state<includeonly>|collapsed</includeonly>}}} | above = | image = | group1 = Information | list1 = * [[Project:About the sandbox|About the sandbox]] * [[Project:Misuse of the sandbox|Misuse of the sandbox]] | group2 = Wikipedia sandboxes | list2 = * [[Project:Sandbox|Wikipedia sandbox]] * [[Project talk:Sandbox|Wikipedia talk sandbox]] | group3 = Template sandboxes | list3 = * {{tl|Template sandbox}} * {{tl|TemplateStyles sandbox}} * {{tl|X1}} * {{tl|X2}} * {{tl|X3}} * {{tl|X4}} * {{tl|X5}} * {{tl|X6}} * {{tl|X7}} * {{tl|X8}} * {{tl|X9}} * {{tl|X10}} * {{tl|X11}} * {{tl|X12}} * {{tl|X13}} * {{tl|X14}} * {{tl|X15}} * {{tl|X16}} * {{tl|X17}} * {{tl|X18}} * {{tl|X19}} * {{tl|X20}} | group4 = Draft sandboxes | list4 = * [[Draft:Sandbox|Draft sandbox]] | group5 = User sandboxes | list5 = * [[User:Sandbox|User sandbox]] * [[User talk:Sandbox|User talk sandbox]] * [[User talk:Sandbox for user warnings|User warnings sandbox]] <!-- ... --> | group6 = Module sandboxes | list6 = * [[Module:Sandbox|Module sandbox]] | group7 = File sandboxes | list7 = * [[:File:Image page sandbox.png]] * [[:File:Image page sandbox2.png]] * [[:File:Image page sandbox3.png]] * [[:File:Image page sandbox4.png]] * [[:File:Image page sandbox5.png]] * [[:File:Image page sandbox6.png]] * [[:File:Image page sandbox7.png]] * [[:File:Image page sandbox8.png]] * [[:File:Image page sandbox (API upload test).png]] * [[:File:Image page sandbox.jpeg]] | group8 = My sandboxes | list8 = * <span class="plainlinks">[{{fullurl:Special:UserLogin|returnto=Special:MyPage/sandbox}} My sandbox]</span> | group9 = Test wikis | list9 = * [[testwiki:|Test Wikipedia]] * [[test2wiki:|Test Wikipedia 2]] | below = }}<noinclude> {{documentation}} </noinclude> hlznlo1gkqjju1sgxs45emc9dnn5xsn