https://wiki.raregamingdump.ca/api.php?action=feedcontributions&user=Abequinn&feedformat=atomRare Gaming Dump - User contributions [en]2024-03-29T06:46:42ZUser contributionsMediaWiki 1.34.0https://wiki.raregamingdump.ca/index.php?title=Waikiki&diff=4365Waikiki2021-06-17T20:27:30Z<p>Abequinn: Navbox</p>
<hr />
<div>[[File:Waikiki.png|thumb]]<br />
The '''Waikiki''' is a special debug device used for early bringup testing of the Wii and Wii U, as well as for manufacturing purposes as part of the [[Wii Factory Process]]. The Waikiki is a serial debugger that goes from the [[EXI]] port (GC memory card slot) on the console to a USB port on a PC, similar to the [[GameCube EXI-to-USB Adapter|GameCube USB adapter]]. Unlike said adapter, the Waikiki has a special chipset which allows it to be automatically controlled and used to access a PC filesystem, as is done by the WK/WKMC (Waikiki Multi Connect) libraries for [[RVL_EMU]]. <br />
<br />
Several programs in [[RVL_DIAG]] use or require the Waikiki, with the adapter playing a key role in the Wii factory process as it allows for console-unique data and prewrite images to be transferred and flashed.<br />
<br />
The initial version of Waikiki was made available in October 2005, with a second version being released sometime around January 2006.<br />
<br />
{{Template:WiiNavbox}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Wii_factory_process&diff=2739Wii factory process2020-02-17T16:25:57Z<p>Abequinn: Make a bit smaller</p>
<hr />
<div>{{Template:WIP}}<br />
<br />
This article presents known information concerning the factory process of the Nintendo Wii.<br />
<br />
Please note that our information on this topic is limited. It is mostly based on information from old HackMii articles, assumptions, [[uid.sys]] dumps, and the few pieces of the process ([[RVL_DIAG]], [[RVL_UJI_DIAG]], & [[Data Check & Log Check]]) that have leaked publicly. Since most pieces of this process are not publicly available, we can only piece together how the entire process works from the information which is available, so this may not be a perfect description of the process. <br />
<br />
=== Basic Overview === <br />
<br />
* During hardware manufacturing, [[boot0]] is imprinted into the Mask ROM inside the [[Starlet]].<br />
<br />
* During initial programming of the NAND chip, unknown versions of [[boot1]] and [[boot2]] are flashed to NAND provisionally, along with an unknown (likely [[NDEV Menu|NDEV]]) System Menu and a corresponding [[IOS]] version.<br />
<br />
* Setup begins by inserting a disc with the game ID of "123J". This disc most likely generates the console-unique NAND keys and other console-unique data, and writes them to the [[OTP]] chip along with encrypting the NAND with said keys. It may also update boot1, since this can only be done before the NAND keys are written to OTP.<br />
<br />
* Another disc is ran. This disc is known as "0000dead" or "DE AD" in hex as it appears in [[uid.sys]]. This disc's TMD content index matches that of [[RVL_DIAG]] as dumped from an [[RVT-H Reader]]; while the development version of RVL_DIAG uses the IDs "100J" and "0000", it is likely to be the same as the retail 0000dead disc. This disc runs a variety of stress tests known as "aging tests" on the system, and registers the system's serial number over a [[Waikiki]] using PC software.<br />
<br />
* Another disc known as [[RVL_UJI_DIAG]] (or 121J) is inserted. It is unknown what role this disc serves during the manufacturing process exactly, as the publicly available version sourced from an [[RVT-H Reader]] is similar to the aforementioned 100J, but with a few more test programs and newer software. 121J includes programs which perform tests on the system and write the results to [[testlog.txt]] in addition to checking this file, so it can be assumed that it is at this phase of the setup process where these tests are executed.<br />
<br />
* Then, [[Data Check & Log Check]] (aka 0002) is installed to NAND via "DataChk.wad". This program checks the logs written by RVL_UJI_DIAG, as well as other test data, to ensure that the testing process was successful.<br />
<br />
* 122E is then ran, an update partition-only disc which installs the base set of software (retail System Menu, channels, IOS, etc.) before the Wii is shipped.<br />
<br />
* Some [[LU64+]] Wiis have a disc ID of "0003" in their [[uid.sys]] as well. It's currently unknown what it does, but it is generally found immediately after 122E and right before any signs of retail usage (typically seen as the 00010000-00555045 of a disc's UPDATE partition.) <br />
<br />
__TOC__<br />
<br />
== Preloading ==<br />
Every Wii is preloaded at the hardware level with a couple pieces of software; these are already present on the Wii and will run when the Wii is powered on at the factory. The first of these pieces of software is boot0, the first piece of code ran on the Wii after power-on (which will stay the same from when it is physically programmed onto the chip to after factory setup, since it cannot physically be modified), which will check the Wii's OTP (one-time programmable) memory chip, and seeing that it is blank (as it is written to later in the process, using up its one opportunity to program it), determines that it is in the factory and continues with boot by loading boot1 from the NAND; after factory setup, there are keys present within this area, which boot0 uses to verify your copy of boot1, but during first factory boot this is neither possible nor needed, so boot0 skips it. Next, boot1 loads from the NAND. Boot1 works as usual by verifying the signature of the boot2 on the NAND, then loading it; this process is identical as long as the console has a properly signed boot2, so there's no special factory behavior that boot1 has here.<br />
<br />
Next, [[boot2]] loads; the version of boot2 installed on a Wii once it comes out of the factory can only handle an encrypted NAND filesystem; the problem with that in the factory is that at this point the OTP has not been programmed, and since the OTP contains the console-unique NAND keys, it is impossible to have the NAND encrypted at this point. As such, the NAND is unencrypted, which the production version of boot2 cannot handle; presumably, a special factory version of boot2 (possibly boot2v0) is programmed on Wiis at this point, which can boot from unencrypted NAND filesystems and as such will continue boot as normal. The next thing to be loaded is the System Menu. While it isn't clear what exactly this System Menu is, it is most likely a version of the [[NDEV Menu]]. It's unknown what version of the NDEV menu is used or what IOS is associated with it; it is possible that this changed over the Wii's lifespan with updates to the menu and its associated IOS.<br />
<br />
== Setup ==<br />
At this point, a disc would be inserted to begin the process of setting up the system. While this disc presumably has an official name which is currently unknown, it will be referred to as "123J", as 123J is the [[GameID]] of the disc (as evidenced by its presence in the [[uid.sys]] logs of all Wiis, as well as other NAND remnants). This disc most likely runs on IOS4 or IOS9 (it is possible that this changed over the Wii's lifecycle as well with updates to the disc), and, as far as we are aware, serves one main purpose; writing to the OTP chip and encrypting the NAND filesystem. However, there is one other possible task that 123J may have performed, which is updating boot1. As Nintendo issued various updates to boot1 throughout the Wii's lifecycle (most infamously the update that fixed the trucha bug within it, aka disabling bootmii/boot2 on newer Wiis), the most logical way to issue these updates would be by implementing a function to update boot1 within 123J before writing to the OTP area (since the OTP area contains the hash of boot1, if you want to update boot1, you have to update it before writing the hash). Nintendo also could have simply updated the boot1 version in their pre-prepared set of files programmed onto the system physically before it even hits the factory stations, although doing this through 123J seems more logical.<br />
<br />
After writing data to the OTP (therefore locking boot1, and setting all of the sysem's console-unique encryption keys), 123J encrypts the console's NAND filesystem using the newly generated NAND keys; these are the very same keys you get in your keys.bin file along with a BootMii dump, which are needed to decrypt the NAND. Next, [[RVL_DIAG|a disc known as 100J, also titled 0000dead and RVL_DIAG]] is inserted. This disc contains several test programs which could be used to verify the Wii's hardware as part of a quality control process. However, it is unknown what purpose this disc serves exactly during the retail Wii manufacturing process, as the [[RVL_UJI_DIAG]] (121J) disc which runs next has almost all of the same content as 100J, with a few extra programs and more recent software revisions. As the publicly available copies of both of these discs were dumped from [[RVT-H Reader]] units, it could be that the manufacturing & testing process for development kits differs from that of retail units, and as such, this ID could represent a completely different disc during the retail manufacturing process.<br />
<br />
The next disc inserted is the aforementioned [[RVL_UJI_DIAG]], with [[GameID]] 121J. The copy of this disc obtained from an RVT-H Reader includes several testing programs which could be used to ensure the integrity of a unit's hardware, as well as programs that run pre-defined tests, the results of which are then written to [[testlog.txt]]. It also contains [[serNoReg]], the program which registers the console's serial number using a mentioned but unseen piece of PC software. The retail version of 121J appears to include an additional step not present in the RVT-H version, as it installs a WAD titled 'DataChk.wad' to the NAND via a second partition with the ID '0002'. While this title is normally deleted from NAND after it is used, it is left behind on some Wiis for unknown reasons, and as such it has been obtained publicly and its behavior is detailed below.<br />
<br />
== Data Check and Log Check's role == <br />
[[File:0002-2.png|thumb|PUSH SD CARD, THEN REMOVE IT]]<br />
[[File:0002-3.png|thumb|PUSH RESET BUTTON]]<br />
''See also: [[Data Check and Log Check]]''<br />
<br />
This disc and accompanying WAD file are known as "0002", but the in-program name is "DATA CHECK & LOG CHECK". There are two known versions of this file, both dumped from separate Wiis; 1.5.0 and 1.5.1.<br />
<br />
0002's exact purpose is unknown; it appears to verify the results of 121J by checking files on NAND as well as files from an SD card, in particular [[all.ini]]. all.ini is a list of tests near-identical to that which is present in 121J under the filename "master.dat"; it is unknown why 0002 requests this file, or why it was copied to NAND and therefore able to be retrieved from a retail Wii system.<br />
<br />
== 122E ==<br />
<br />
The final step is to install the System Menu, IOSes, and channels. This process is akin to a standard disc update, where a disc is inserted, the contents of it are read, and WAD files are installed from those contents. The disc that handles this is known as 122E. This disc appears to simply be an update partition, as the [[main.dol]] file which it leaves behind in the [[cache.dat]] of a system after it is inserted is a non-functional DOL file similar to those which are found in the update partitions of retail Wii discs. It can be presumed that Nintendo may have pressed several versions of this disc to keep the Wii's preinstalled software updated throughout its production run; however, none have been found publicly, nor is it known what the actual name or appearance of the disc is.<br />
<br />
Once 122E has finished installing the base set of titles, the system's initial manufacturing & testing process is complete, and on the next boot the system will be running the retail [[Wii Menu]] on the initial setup screen.<br />
<br />
{{Template:WiiNavbox}}<br />
<br />
[[Category:Wii]]<br />
<br />
[[Category:Factory]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Wii_U_GamePad&diff=2738Wii U GamePad2020-02-17T16:14:34Z<p>Abequinn: Add navbox</p>
<hr />
<div>{{stub}}<br />
<br />
The '''Wii U GamePad''' went through multiple revisions during development.<br />
<br />
== Pre-2011 ==<br />
The Pre-2011 GamePad was one of the first pieces of hardware conceptualized for the Wii U, consisting of a screen connected to two Wii Remotes.<br />
<br />
By late 2010, the Wii U's [[Cafe SDK]] reached a point of usability, and may have been released to third-party developers; there is documentation featuring references to the GamePad technology being a part of the SDK during this time.<br />
<br />
== 2011 ==<br />
The E3 2011 GamePad was similar to the released version, but with many design differences, most notably the presence of circle pads instead of analog sticks. However, this was not the only 2011 prototype GamePad; there was also the CAT-DEV v2 GamePad, which was an even earlier version of this GamePad which was black and rectangular, being somewhat similar to the pre-dev tool v3 Wii Remote in appearance.<br />
<br />
Depictions of the E3 2011 GamePad can be seen in screenshots found within the data of the Wii U's System Settings application, showing very early versions of this application.<br />
<br />
[[File:WiiPad.jpg|thumb|E3 2011 GamePad displaying [[New Super Mario Bros. Mii]]]]<br />
<br />
== 2012 ==<br />
By E3 2012, the GamePad was finalized.<br />
[[Category:Wii U]]<br />
<br />
[[Category:Controllers]]<br />
<br />
{{WiiUNavbox}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Wii_U_Developers_program&diff=2737Wii U Developers program2020-02-17T16:13:26Z<p>Abequinn: Add navbox</p>
<hr />
<div>The '''Wii U Developers program''' was a program hosted by Nintendo in 2013 and 2014, preceding the creation of the [[Nintendo Developer Portal]]. It offered Unity-based Wii U development SDKs and resources to aspiring indie developers, including those who were underage and/or did not have a separate office to their home.<br />
<br />
Little is known about the program due to a lack of surviving leaks.<br />
<br />
[[Category:Wii U]]<br />
<br />
[[Category:Development]]<br />
<br />
[[Category:Websites]]<br />
<br />
{{WiiUNavbox}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:WiiUNavbox&diff=2736Template:WiiUNavbox2020-02-17T16:13:03Z<p>Abequinn: add category</p>
<hr />
<div>{{Navbox<br />
| name = WiiUNavbox<br />
| title = Wii U<br />
| listclass = hlist<br />
| state = <br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = System<br />
| list1 = [[vWii]]<br />
| group2 = Misc<br />
| list2 = [[43DB]]<br />
| below =<br />
}}<includeonly>[[Category:Wii U]]</includeonly></div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:WIP&diff=2735Template:WIP2020-02-17T16:09:45Z<p>Abequinn: overhaul</p>
<hr />
<div>{{ambox<br />
|name=WIP<br />
|image=[[File:Ambox clock.svg.png|40px]]<br />
|type=Notice<br />
|issue=This article '''is a work in progress'''.<br />
|cat=Pages that are a work-in-progress<br />
|fix=More information on the topic will be added soon.<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=File:Ambox_clock.svg.png&diff=2734File:Ambox clock.svg.png2020-02-17T16:05:55Z<p>Abequinn: Tiktok</p>
<hr />
<div>== Summary ==<br />
Tiktok</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=CAT-DEV&diff=2717CAT-DEV2020-02-13T23:58:44Z<p>Abequinn: Add navbox</p>
<hr />
<div>The '''CAT-DEV''' is the primary Wii U development kit. It is analogous to the Wii's [[NDEV]].<br />
<br />
Known revisions:<br />
<br />
* CAT-DEV V1<br />
<br />
* CAT-DEV V2<br />
<br />
* CAT-DEV V3 (documents available)<br />
<br />
* CAT-DEV V4<br />
<br />
* CAT-DEV MP1<br />
<br />
* CAT-DEV MP2 (final, documents available on the [[Nintendo Developer Portal]])<br />
{{WiiUNavbox}}<br />
<br />
[[Category:Wii U]]<br />
<br />
[[Category:Development]]<br />
<br />
[[Category:Development Kits]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Category:Stubs&diff=2716Category:Stubs2020-02-13T23:56:47Z<p>Abequinn: Clarify</p>
<hr />
<div>'''Stubs''' are articles that are usually very short<ref>Some can be longer (such as [[Unknown DSi Prototype]]), but otherwise articles listed here need expansion.</ref> and ''can'' be expanded ([[Template:Brief|some articles can not]]). Editors are strongly suggested to improve stubs by pressing the "edit this page" button on the template.<br />
<br />
All pages listed here were automatically added by the [[Template:Stub|stub template]]. For the sake of organization, please do not add pages here manually.</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Stub&diff=2715Template:Stub2020-02-13T23:54:22Z<p>Abequinn: Add line break</p>
<hr />
<div>{{ambox<br />
|name=Stub<br />
|image=[[File:Paper-and-pencil.png|40px]]<br />
|type=style<br />
|issue=This article '''is a stub'''.<br />
|cat=Stubs<br />
|fix=You can help the RDGWiki by editing this article.<br \>{{Clickable button 2|Edit this article|url={{fullurl:{{FULLPAGENAME}}|action=edit}}|class=mw-ui-progressive}}}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Category:Stubs&diff=2714Category:Stubs2020-02-13T23:53:13Z<p>Abequinn: add description</p>
<hr />
<div>'''Stubs''' are articles that are very short and ''can'' be expanded ([[Template:Brief|some articles can not]]). Editors are strongly suggested to improve stubs by pressing the "edit this page" button on the template.<br />
<br />
All pages listed here were automatically added by the [[Template:Stub|stub template]]. For the sake of organization, please do not add pages here manually.</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:NintendoNavbox&diff=2705Template:NintendoNavbox2020-02-12T21:10:38Z<p>Abequinn: Add wii U</p>
<hr />
<div>{{Navboxes<br />
|title = Nintendo<br />
|titlestyle = background: red; color: white<br />
|list=<br />
{{WiiNavbox}}<br />
{{GamecubeNavbox}}<br />
{{DSNavbox}}<br />
{{DSINavbox}}<br />
{{WiiUNavbox}}<br />
{{CompanyNavbox}}<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Main_Page&diff=2704Main Page2020-02-12T20:54:44Z<p>Abequinn: /* Pages of Interest */ replace navbox</p>
<hr />
<div>__NOTOC__<br />
'''Welcome to Rare Gaming Dump Wiki (RGDWiki), a wiki for prototype, development, unused, and otherwise interesting content about video game systems, with a particular focus on Nintendo video game systems. Currently, we mainly cover information related to the Nintendo Wii.'''<br />
<br />
{{Template:Featured}}<br />
<br />
We currently cover prototype content, development information, repair and factory titles, and lots more about the Wii. Right now the Wii is our main focus, but we plan to add content about more platforms soon, such as the Wii U and PlayStation 2, along with Nintendo handhelds. Of course, we don't exclusively cover Nintendo platforms, and everyone is welcome to contribute. If you're knowledgeable about a particular platform or topic, sign up for an account and make a page! If you need help creating or editing pages, just click on the Help link in the sidebar.<br />
<br />
We're currently looking both for new content on topics and areas we don't currently cover, as well as help with formatting/templates, so we would be ''very grateful'' for contributors in these areas.<br />
<br />
'''Bored? [[Special:Random|Try a random page]]!'''<br />
<br />
This wiki also loads on the Wii, DSi, and other Nintendo device browsers.<br />
<br />
== Pages of Interest ==<br />
<br />
{{NintendoNavbox}}<br />
<br />
('''If you see a section heading above this line, you are using the mobile site and are missing link collections essential to navigating the wiki. Switch to desktop mode or use the random page button to navigate.''')<br />
<br />
Many of our pages have '''not yet been categorized into one of these navboxes''', so please try the random page button to find new content!<br />
<br />
Meta pages (WIP, outdated, do not use as a reference except for Wanted Pages):<br />
<br />
[[Meta:Editing Guidelines|Editing Guidelines]] - General guidelines that should be followed when editing<br />
<br />
[[Meta:Needed Improvements|Needed Improvements]] - Things we need fixed at the moment<br />
<br />
[[Special:WantedPages|Wanted Pages]] - Topics that we need to document<br />
<br />
We apologize for the wiki being a bit sparse right now, but this is a pretty huge effort to catalog a lot of random information that we've collected, so it's going to take a while to fill in.<br />
<br />
== Contact ==<br />
'''The Rare Gaming Dump Discord server can be joined by clicking on the embed link below. If you are interested in contributing to the wiki or joining our community, we would be glad to have you as a member. Even if you have no experience or knowledge in the type of content on this wiki, you are still more than welcome to join and see what we have to offer.'''<br />
<br />
'''This wiki is owned by RedBees#3366 and Larsenv#2020, who can be contacted at the Discord server embedded in the following section.'''<br />
<br />
== Discord ==<br />
<br />
{{#widget:Discord<br />
| id = 370011926823960576<br />
| theme = light<br />
}}<br />
<br />
== Statistics ==<br />
{| class="wikitable"<br />
!Number<br />
!Statistic<br />
|-<br />
|'''{{NUMBEROFARTICLES}}'''<br />
|'''articles'''<br />
|-<br />
|'''{{NUMBEROFEDITS}}''' <br />
|'''edits'''<br />
|-<br />
|'''{{NUMBEROFUSERS}}''' <br />
|'''users'''<br />
|}<br />
<br />
----<br />
''Main page designed by [[User:Bobzilla]], aka B̡̨o̢͝b̶zil̴̀l̢͝a҉#4895 on Discord.''</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=File:Ambox_clock.svg&diff=2703File:Ambox clock.svg2020-02-12T20:50:34Z<p>Abequinn: CLOCKS!!!</p>
<hr />
<div>== Summary ==<br />
CLOCKS!!!</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Brief&diff=2702Template:Brief2020-02-12T20:42:19Z<p>Abequinn: fix</p>
<hr />
<div>{{ambox<br />
|name=Brief<br />
|image=[[File:Paper-and-pencil.png|40px]]<br />
|type=delete<br />
|issue=This article '''is brief'''.<br />
|cat=Brief pages<br />
|fix=That's because we don't know a lot about its topic. If you have any information we don't, you can help out by editing this article.<br \>{{Clickable button 2|Edit this article|url={{fullurl:{{FULLPAGENAME}}|action=edit}}|class=mw-ui-progressive}}}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:CompanyNavbox&diff=2701Template:CompanyNavbox2020-02-12T20:40:35Z<p>Abequinn: Add page</p>
<hr />
<div>{{Navbox<br />
| name = CompanyNavbox<br />
| title = Companies<br />
| listclass = hlist<br />
| state = <br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = Nintendo First Parties<br />
| list1 = '''[[:Category:Nintendo|Nintendo]]''' · [[Nintendo EPD]] · [[Nintendo PTD]] · [[NERD]] · [[Nintendo of America]] · [[Nintendo of Europe]] · [[Nintendo of Canada]] · [[Nintendo of Korea]]<br />
<br />
| group2 = Nintendo Second Parties<br />
| list2 = [[Arzest]] · [[Denyu-sha]] · [[Good-Feel]] · [[iQue]] · [[Skip Ltd.]] · [[Vanpool]] <br />
<br />
| group2 = Middleware Providers<br />
| list2 = [[Acer Cloud Technology]] · [[AiLive]] · [[eSOL]] · [[Mobiclip]] · [[Zi Corporation]] · [[Nintendo Relations]]<br />
<br />
| group3 = Third Party Developers<br />
| list3 = [[Barking Lizards Technologies]] · [[Factor 5]] · [[Arzest]]<br />
| below = <br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Rare_Gaming_Dump:Needed_Improvements&diff=2699Rare Gaming Dump:Needed Improvements2020-02-12T20:39:26Z<p>Abequinn: Abequinn moved page Meta:Needed Improvements to RGDWiki:Needed Improvements: moving to namespace</p>
<hr />
<div>Some needed improvements to the wiki:<br />
<br />
* Fill out page gaps (check the Wanted Pages list)<br />
<br />
* More images in articles<br />
<br />
* Expand existing articles; particularly [[RVL_DIAG]], [[Wii Shop Channel]], and [[Wii Factory Process]] (the latter needing information about [[RVL_DIAG]], as it was written prior to its discovery)<br />
<br />
* Add a proper main page so we can do away with the core page list<br />
<br />
[[Category:Meta]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Meta:Needed_Improvements&diff=2700Meta:Needed Improvements2020-02-12T20:39:26Z<p>Abequinn: Abequinn moved page Meta:Needed Improvements to RGDWiki:Needed Improvements: moving to namespace</p>
<hr />
<div>#REDIRECT [[RGDWiki:Needed Improvements]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Rare_Gaming_Dump:Editing_Guidelines&diff=2697Rare Gaming Dump:Editing Guidelines2020-02-12T20:38:24Z<p>Abequinn: Abequinn moved page Meta:Editing Guidelines to RGDWiki:Editing Guidelines: moving to namespace</p>
<hr />
<div>We'll allow you a fair bit of freedom in editing, and breaking these guidelines will certainly not get you banned (just probably will get your page edited to fix them), but here are some things you should do while editing.<br />
<br />
* '''Bold''' article titles in the lead section and bold variant titles. For a good example, see [[BroadOn]].<br />
**Most list articles do not need bolding.<br />
<br />
* Use templates. We have a few templates such as [[Template:Stub]] and [[Template:Formatting]], and you should use them whenever possible. In particular, if you have made a page which is short, add [[Template:Stub]] to it.<br />
<br />
* Follow our help pages such as [[Help:Infoboxes]] and [[Help:Templates]].<br />
<br />
* Include images whenever possible; make sure your images are appropriately sized and preferably include image descriptions. Do not upload overly large images, as we have limited server space.<br />
<br />
* Use the Help link in the sidebar to understand MediaWiki syntax before doing complicated edits.<br />
<br />
* Try to keep writing style and grammar somewhat proper. Don't be the person who didn't capitalize country names on an entire page and you had to leave it to us to spend minutes fixing it.<br />
<br />
{{Template:MetaNavbox}}<br />
<br />
[[Category:Meta]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Meta:Editing_Guidelines&diff=2698Meta:Editing Guidelines2020-02-12T20:38:24Z<p>Abequinn: Abequinn moved page Meta:Editing Guidelines to RGDWiki:Editing Guidelines: moving to namespace</p>
<hr />
<div>#REDIRECT [[RGDWiki:Editing Guidelines]]</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Brief&diff=2696Template:Brief2020-02-12T20:37:25Z<p>Abequinn: overhaul again</p>
<hr />
<div>{{ambox<br />
|name=Brief<br />
|image=[[File:Paper-and-pencil.png|40px]]<br />
|type=delete<br />
|issue=This article '''is brief'''.<br />
|cat=Stubs<br />
|fix=That's because we don't know a lot about its topic. If you have any information we don't, you can help out by editing this article.<br \>{{Clickable button 2|Edit this article|url={{fullurl:{{FULLPAGENAME}}|action=edit}}|class=mw-ui-progressive}}}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Stub&diff=2695Template:Stub2020-02-12T20:29:38Z<p>Abequinn: add category</p>
<hr />
<div>{{ambox<br />
|name=Stub<br />
|image=[[File:Paper-and-pencil.png|40px]]<br />
|type=style<br />
|issue=This article '''is a stub'''.<br />
|cat=Stubs<br />
|fix=You can help the RDGWiki by editing this article. {{Clickable button 2|Edit this article|url={{fullurl:{{FULLPAGENAME}}|action=edit}}|class=mw-ui-progressive}}}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Stub&diff=2694Template:Stub2020-02-12T20:25:56Z<p>Abequinn: overhaul</p>
<hr />
<div>{{ambox<br />
|name=Stub<br />
|image=[[File:Paper-and-pencil.png|40px]]<br />
|type=style<br />
|issue=This article '''is a stub'''.<br />
|fix=You can help the RDGWiki by editing this article. {{Clickable button 2|Edit this article|url={{fullurl:{{FULLPAGENAME}}|action=edit}}|class=mw-ui-progressive}}}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Namespace_detect/config&diff=2693Module:Namespace detect/config2020-02-12T20:16:33Z<p>Abequinn: </p>
<hr />
<div>local cfg = {}<br />
cfg.demopage = 'page'<br />
return cfg</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Namespace_detect/config&diff=2690Module:Namespace detect/config2020-02-12T20:11:24Z<p>Abequinn: Created page with "local cfg = {} cfg.demopage = 'page'"</p>
<hr />
<div>local cfg = {}<br />
cfg.demopage = 'page'</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Namespace_detect/data&diff=2689Module:Namespace detect/data2020-02-12T20:10:39Z<p>Abequinn: Created page with "-------------------------------------------------------------------------------- -- Namespace detect data -- -- This modul..."</p>
<hr />
<div>--------------------------------------------------------------------------------<br />
-- Namespace detect data --<br />
-- This module holds data for [[Module:Namespace detect]] to be loaded per --<br />
-- page, rather than per #invoke, for performance reasons. --<br />
--------------------------------------------------------------------------------<br />
<br />
local cfg = require('Module:Namespace detect/config')<br />
<br />
local function addKey(t, key, defaultKey)<br />
if key ~= defaultKey then<br />
t[#t + 1] = key<br />
end<br />
end<br />
<br />
-- Get a table of parameters to query for each default parameter name.<br />
-- This allows wikis to customise parameter names in the cfg table while<br />
-- ensuring that default parameter names will always work. The cfg table<br />
-- values can be added as a string, or as an array of strings.<br />
<br />
local defaultKeys = {<br />
'main',<br />
'talk',<br />
'other',<br />
'subjectns',<br />
'demospace',<br />
'demopage'<br />
}<br />
<br />
local argKeys = {}<br />
for i, defaultKey in ipairs(defaultKeys) do<br />
argKeys[defaultKey] = {defaultKey}<br />
end<br />
<br />
for defaultKey, t in pairs(argKeys) do<br />
local cfgValue = cfg[defaultKey]<br />
local cfgValueType = type(cfgValue)<br />
if cfgValueType == 'string' then<br />
addKey(t, cfgValue, defaultKey)<br />
elseif cfgValueType == 'table' then<br />
for i, key in ipairs(cfgValue) do<br />
addKey(t, key, defaultKey)<br />
end<br />
end<br />
cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more.<br />
end<br />
<br />
local function getParamMappings()<br />
--[[<br />
-- Returns a table of how parameter names map to namespace names. The keys<br />
-- are the actual namespace names, in lower case, and the values are the<br />
-- possible parameter names for that namespace, also in lower case. The<br />
-- table entries are structured like this:<br />
-- {<br />
-- [''] = {'main'},<br />
-- ['wikipedia'] = {'wikipedia', 'project', 'wp'},<br />
-- ...<br />
-- }<br />
--]]<br />
local mappings = {}<br />
local mainNsName = mw.site.subjectNamespaces[0].name<br />
mainNsName = mw.ustring.lower(mainNsName)<br />
mappings[mainNsName] = mw.clone(argKeys.main)<br />
mappings['talk'] = mw.clone(argKeys.talk)<br />
for nsid, ns in pairs(mw.site.subjectNamespaces) do<br />
if nsid ~= 0 then -- Exclude main namespace.<br />
local nsname = mw.ustring.lower(ns.name)<br />
local canonicalName = mw.ustring.lower(ns.canonicalName)<br />
mappings[nsname] = {nsname}<br />
if canonicalName ~= nsname then<br />
table.insert(mappings[nsname], canonicalName)<br />
end<br />
for _, alias in ipairs(ns.aliases) do<br />
table.insert(mappings[nsname], mw.ustring.lower(alias))<br />
end<br />
end<br />
end<br />
return mappings<br />
end<br />
<br />
return {<br />
argKeys = argKeys,<br />
cfg = cfg,<br />
mappings = getParamMappings()<br />
}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Category_handler/shared&diff=2688Module:Category handler/shared2020-02-12T20:09:51Z<p>Abequinn: Created page with "-- This module contains shared functions used by Module:Category handler -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern..."</p>
<hr />
<div>-- This module contains shared functions used by [[Module:Category handler]]<br />
-- and its submodules.<br />
<br />
local p = {}<br />
<br />
function p.matchesBlacklist(page, blacklist)<br />
for i, pattern in ipairs(blacklist) do<br />
local match = mw.ustring.match(page, pattern)<br />
if match then<br />
return true<br />
end<br />
end<br />
return false<br />
end<br />
<br />
function p.getParamMappings(useLoadData)<br />
local dataPage = 'Module:Namespace detect/data'<br />
if useLoadData then<br />
return mw.loadData(dataPage).mappings<br />
else<br />
return require(dataPage).mappings<br />
end<br />
end<br />
<br />
function p.getNamespaceParameters(titleObj, mappings)<br />
-- We don't use title.nsText for the namespace name because it adds<br />
-- underscores.<br />
local mappingsKey<br />
if titleObj.isTalkPage then<br />
mappingsKey = 'talk'<br />
else<br />
mappingsKey = mw.site.namespaces[titleObj.namespace].name<br />
end<br />
mappingsKey = mw.ustring.lower(mappingsKey)<br />
return mappings[mappingsKey] or {}<br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Category_handler/blacklist&diff=2687Module:Category handler/blacklist2020-02-12T20:08:07Z<p>Abequinn: Created page with "-- This module contains the blacklist used by Module:Category handler. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is ex..."</p>
<hr />
<div>-- This module contains the blacklist used by [[Module:Category handler]].<br />
-- Pages that match Lua patterns in this list will not be categorised unless<br />
-- categorisation is explicitly requested.<br />
<br />
return {<br />
'^Main Page$', -- don't categorise the main page.<br />
<br />
-- Don't categorise the following pages or their subpages.<br />
-- "%f[/\0]" matches if the next character is "/" or the end of the string.<br />
'^User:UBX%f[/\0]', -- The userbox "template" space.<br />
'^User talk:UBX%f[/\0]',<br />
<br />
-- Don't categorise archives.<br />
'/[aA]rchive',<br />
}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Category_handler/config&diff=2686Module:Category handler/config2020-02-12T20:05:37Z<p>Abequinn: Created page with "-------------------------------------------------------------------------------- -- Module:Category handler configuration data -- -- Lang..."</p>
<hr />
<div>--------------------------------------------------------------------------------<br />
-- [[Module:Category handler]] configuration data --<br />
-- Language-specific parameter names and values can be set here. --<br />
-- For blacklist config, see [[Module:Category handler/blacklist]]. --<br />
--------------------------------------------------------------------------------<br />
<br />
local cfg = {} -- Don't edit this line.<br />
<br />
--------------------------------------------------------------------------------<br />
-- Start configuration data --<br />
--------------------------------------------------------------------------------<br />
<br />
--------------------------------------------------------------------------------<br />
-- Parameter names --<br />
-- These configuration items specify custom parameter names. --<br />
-- To add one extra name, you can use this format: --<br />
-- --<br />
-- foo = 'parameter name', --<br />
-- --<br />
-- To add multiple names, you can use this format: --<br />
-- --<br />
-- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, --<br />
--------------------------------------------------------------------------------<br />
<br />
cfg.parameters = {<br />
<br />
-- The nocat and categories parameter suppress<br />
-- categorisation. They are used with Module:Yesno, and work as follows:<br />
--<br />
-- cfg.nocat:<br />
-- Result of yesno() Effect<br />
-- true Categorisation is suppressed<br />
-- false Categorisation is allowed, and<br />
-- the blacklist check is skipped<br />
-- nil Categorisation is allowed<br />
--<br />
-- cfg.categories:<br />
-- Result of yesno() Effect<br />
-- true Categorisation is allowed, and<br />
-- the blacklist check is skipped<br />
-- false Categorisation is suppressed<br />
-- nil Categorisation is allowed<br />
nocat = 'nocat',<br />
categories = 'categories',<br />
<br />
-- The parameter name for the legacy "category2" parameter. This skips the<br />
-- blacklist if set to the cfg.category2Yes value, and suppresses<br />
-- categorisation if present but equal to anything other than<br />
-- cfg.category2Yes or cfg.category2Negative.<br />
category2 = 'category2',<br />
<br />
-- cfg.subpage is the parameter name to specify how to behave on subpages.<br />
subpage = 'subpage',<br />
<br />
-- The parameter for data to return in all namespaces.<br />
all = 'all',<br />
<br />
-- The parameter name for data to return if no data is specified for the<br />
-- namespace that is detected.<br />
other = 'other',<br />
<br />
-- The parameter name used to specify a page other than the current page;<br />
-- used for testing and demonstration.<br />
demopage = 'page',<br />
}<br />
<br />
--------------------------------------------------------------------------------<br />
-- Parameter values --<br />
-- These are set values that can be used with certain parameters. Only one --<br />
-- value can be specified, like this: --<br />
-- --<br />
-- cfg.foo = 'value name' -- --<br />
--------------------------------------------------------------------------------<br />
<br />
-- The following settings are used with the cfg.category2 parameter. Setting<br />
-- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2<br />
-- is present but equal to anything other than cfg.category2Yes or<br />
-- cfg.category2Negative then it supresses cateogrisation.<br />
cfg.category2Yes = 'yes'<br />
cfg.category2Negative = '¬'<br />
<br />
-- The following settings are used with the cfg.subpage parameter.<br />
-- cfg.subpageNo is the value to specify to not categorise on subpages;<br />
-- cfg.subpageOnly is the value to specify to only categorise on subpages.<br />
cfg.subpageNo = 'no'<br />
cfg.subpageOnly = 'only'<br />
<br />
--------------------------------------------------------------------------------<br />
-- Default namespaces --<br />
-- This is a table of namespaces to categorise by default. The keys are the --<br />
-- namespace numbers. --<br />
--------------------------------------------------------------------------------<br />
<br />
cfg.defaultNamespaces = {<br />
[ 0] = true, -- main<br />
[ 6] = true, -- file<br />
[ 12] = true, -- help<br />
[ 14] = true, -- category<br />
[100] = true, -- portal<br />
[108] = true, -- book<br />
}<br />
<br />
--------------------------------------------------------------------------------<br />
-- Wrappers --<br />
-- This is a wrapper template or a list of wrapper templates to be passed to --<br />
-- [[Module:Arguments]]. --<br />
--------------------------------------------------------------------------------<br />
<br />
cfg.wrappers = 'Template:Category handler'<br />
<br />
--------------------------------------------------------------------------------<br />
-- End configuration data --<br />
--------------------------------------------------------------------------------<br />
<br />
return cfg -- Don't edit this line.</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Category_handler/data&diff=2685Module:Category handler/data2020-02-12T20:04:59Z<p>Abequinn: Created page with "-- This module assembles data to be passed to Module:Category handler using -- mw.loadData. This includes the configuration data and whether the current -- page matches th..."</p>
<hr />
<div>-- This module assembles data to be passed to [[Module:Category handler]] using<br />
-- mw.loadData. This includes the configuration data and whether the current<br />
-- page matches the title blacklist.<br />
<br />
local data = require('Module:Category handler/config')<br />
local mShared = require('Module:Category handler/shared')<br />
local blacklist = require('Module:Category handler/blacklist')<br />
local title = mw.title.getCurrentTitle()<br />
<br />
data.currentTitleMatchesBlacklist = mShared.matchesBlacklist(<br />
title.prefixedText,<br />
blacklist<br />
)<br />
<br />
data.currentTitleNamespaceParameters = mShared.getNamespaceParameters(<br />
title,<br />
mShared.getParamMappings()<br />
)<br />
<br />
return data</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Category_handler&diff=2684Module:Category handler2020-02-12T20:03:19Z<p>Abequinn: Created page with "-------------------------------------------------------------------------------- -- -- --..."</p>
<hr />
<div>--------------------------------------------------------------------------------<br />
-- --<br />
-- CATEGORY HANDLER --<br />
-- --<br />
-- This module implements the {{category handler}} template in Lua, --<br />
-- with a few improvements: all namespaces and all namespace aliases --<br />
-- are supported, and namespace names are detected automatically for --<br />
-- the local wiki. This module requires [[Module:Namespace detect]] --<br />
-- and [[Module:Yesno]] to be available on the local wiki. It can be --<br />
-- configured for different wikis by altering the values in --<br />
-- [[Module:Category handler/config]], and pages can be blacklisted --<br />
-- from categorisation by using [[Module:Category handler/blacklist]]. --<br />
-- --<br />
--------------------------------------------------------------------------------<br />
<br />
-- Load required modules<br />
local yesno = require('Module:Yesno')<br />
<br />
-- Lazily load things we don't always need<br />
local mShared, mappings<br />
<br />
local p = {}<br />
<br />
--------------------------------------------------------------------------------<br />
-- Helper functions<br />
--------------------------------------------------------------------------------<br />
<br />
local function trimWhitespace(s, removeBlanks)<br />
if type(s) ~= 'string' then<br />
return s<br />
end<br />
s = s:match('^%s*(.-)%s*$')<br />
if removeBlanks then<br />
if s ~= '' then<br />
return s<br />
else<br />
return nil<br />
end<br />
else<br />
return s<br />
end<br />
end<br />
<br />
--------------------------------------------------------------------------------<br />
-- CategoryHandler class<br />
--------------------------------------------------------------------------------<br />
<br />
local CategoryHandler = {}<br />
CategoryHandler.__index = CategoryHandler<br />
<br />
function CategoryHandler.new(data, args)<br />
local obj = setmetatable({ _data = data, _args = args }, CategoryHandler)<br />
<br />
-- Set the title object<br />
do<br />
local pagename = obj:parameter('demopage')<br />
local success, titleObj<br />
if pagename then<br />
success, titleObj = pcall(mw.title.new, pagename)<br />
end<br />
if success and titleObj then<br />
obj.title = titleObj<br />
if titleObj == mw.title.getCurrentTitle() then<br />
obj._usesCurrentTitle = true<br />
end<br />
else<br />
obj.title = mw.title.getCurrentTitle()<br />
obj._usesCurrentTitle = true<br />
end<br />
end<br />
<br />
-- Set suppression parameter values<br />
for _, key in ipairs{'nocat', 'categories'} do<br />
local value = obj:parameter(key)<br />
value = trimWhitespace(value, true)<br />
obj['_' .. key] = yesno(value)<br />
end<br />
do<br />
local subpage = obj:parameter('subpage')<br />
local category2 = obj:parameter('category2')<br />
if type(subpage) == 'string' then<br />
subpage = mw.ustring.lower(subpage)<br />
end<br />
if type(category2) == 'string' then<br />
subpage = mw.ustring.lower(category2)<br />
end<br />
obj._subpage = trimWhitespace(subpage, true)<br />
obj._category2 = trimWhitespace(category2) -- don't remove blank values<br />
end<br />
return obj<br />
end<br />
<br />
function CategoryHandler:parameter(key)<br />
local parameterNames = self._data.parameters[key]<br />
local pntype = type(parameterNames)<br />
if pntype == 'string' or pntype == 'number' then<br />
return self._args[parameterNames]<br />
elseif pntype == 'table' then<br />
for _, name in ipairs(parameterNames) do<br />
local value = self._args[name]<br />
if value ~= nil then<br />
return value<br />
end<br />
end<br />
return nil<br />
else<br />
error(string.format(<br />
'invalid config key "%s"',<br />
tostring(key)<br />
), 2)<br />
end<br />
end<br />
<br />
function CategoryHandler:isSuppressedByArguments()<br />
return<br />
-- See if a category suppression argument has been set.<br />
self._nocat == true<br />
or self._categories == false<br />
or (<br />
self._category2<br />
and self._category2 ~= self._data.category2Yes<br />
and self._category2 ~= self._data.category2Negative<br />
)<br />
<br />
-- Check whether we are on a subpage, and see if categories are<br />
-- suppressed based on our subpage status.<br />
or self._subpage == self._data.subpageNo and self.title.isSubpage<br />
or self._subpage == self._data.subpageOnly and not self.title.isSubpage<br />
end<br />
<br />
function CategoryHandler:shouldSkipBlacklistCheck()<br />
-- Check whether the category suppression arguments indicate we<br />
-- should skip the blacklist check.<br />
return self._nocat == false<br />
or self._categories == true<br />
or self._category2 == self._data.category2Yes<br />
end<br />
<br />
function CategoryHandler:matchesBlacklist()<br />
if self._usesCurrentTitle then<br />
return self._data.currentTitleMatchesBlacklist<br />
else<br />
mShared = mShared or require('Module:Category handler/shared')<br />
return mShared.matchesBlacklist(<br />
self.title.prefixedText,<br />
mw.loadData('Module:Category handler/blacklist')<br />
)<br />
end<br />
end<br />
<br />
function CategoryHandler:isSuppressed()<br />
-- Find if categories are suppressed by either the arguments or by<br />
-- matching the blacklist.<br />
return self:isSuppressedByArguments()<br />
or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist()<br />
end<br />
<br />
function CategoryHandler:getNamespaceParameters()<br />
if self._usesCurrentTitle then<br />
return self._data.currentTitleNamespaceParameters<br />
else<br />
if not mappings then<br />
mShared = mShared or require('Module:Category handler/shared')<br />
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData<br />
end<br />
return mShared.getNamespaceParameters(<br />
self.title,<br />
mappings<br />
)<br />
end<br />
end<br />
<br />
function CategoryHandler:namespaceParametersExist()<br />
-- Find whether any namespace parameters have been specified.<br />
-- We use the order "all" --> namespace params --> "other" as this is what<br />
-- the old template did.<br />
if self:parameter('all') then<br />
return true<br />
end<br />
if not mappings then<br />
mShared = mShared or require('Module:Category handler/shared')<br />
mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData<br />
end<br />
for ns, params in pairs(mappings) do<br />
for i, param in ipairs(params) do<br />
if self._args[param] then<br />
return true<br />
end<br />
end<br />
end<br />
if self:parameter('other') then<br />
return true<br />
end<br />
return false<br />
end<br />
<br />
function CategoryHandler:getCategories()<br />
local params = self:getNamespaceParameters()<br />
local nsCategory<br />
for i, param in ipairs(params) do<br />
local value = self._args[param]<br />
if value ~= nil then<br />
nsCategory = value<br />
break<br />
end<br />
end<br />
if nsCategory ~= nil or self:namespaceParametersExist() then<br />
-- Namespace parameters exist - advanced usage.<br />
if nsCategory == nil then<br />
nsCategory = self:parameter('other')<br />
end<br />
local ret = {self:parameter('all')}<br />
local numParam = tonumber(nsCategory)<br />
if numParam and numParam >= 1 and math.floor(numParam) == numParam then<br />
-- nsCategory is an integer<br />
ret[#ret + 1] = self._args[numParam]<br />
else<br />
ret[#ret + 1] = nsCategory<br />
end<br />
if #ret < 1 then<br />
return nil<br />
else<br />
return table.concat(ret)<br />
end<br />
elseif self._data.defaultNamespaces[self.title.namespace] then<br />
-- Namespace parameters don't exist, simple usage.<br />
return self._args[1]<br />
end<br />
return nil<br />
end<br />
<br />
--------------------------------------------------------------------------------<br />
-- Exports<br />
--------------------------------------------------------------------------------<br />
<br />
local p = {}<br />
<br />
function p._exportClasses()<br />
-- Used for testing purposes.<br />
return {<br />
CategoryHandler = CategoryHandler<br />
}<br />
end<br />
<br />
function p._main(args, data)<br />
data = data or mw.loadData('Module:Category handler/data')<br />
local handler = CategoryHandler.new(data, args)<br />
if handler:isSuppressed() then<br />
return nil<br />
end<br />
return handler:getCategories()<br />
end<br />
<br />
function p.main(frame, data)<br />
data = data or mw.loadData('Module:Category handler/data')<br />
local args = require('Module:Arguments').getArgs(frame, {<br />
wrappers = data.wrappers,<br />
valueFunc = function (k, v)<br />
v = trimWhitespace(v)<br />
if type(k) == 'number' then<br />
if v ~= '' then<br />
return v<br />
else<br />
return nil<br />
end<br />
else<br />
return v<br />
end<br />
end<br />
})<br />
return p._main(args, data)<br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Ambox&diff=2683Template:Ambox2020-02-12T20:02:33Z<p>Abequinn: Created page with "{{#invoke:Message box|ambox}}{{#ifeq:{{{small}}}|left|Category:Articles using small message boxes}}"</p>
<hr />
<div>{{#invoke:Message box|ambox}}{{#ifeq:{{{small}}}|left|[[Category:Articles using small message boxes]]}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Clickable_button_2&diff=2682Module:Clickable button 22020-02-12T19:59:48Z<p>Abequinn: Created page with "-- This module implements {{clickable button 2}}. local yesno = require('Module:Yesno') local p = {} function p.main(frame) local args = require('Module:Arguments').getArg..."</p>
<hr />
<div>-- This module implements {{clickable button 2}}.<br />
<br />
local yesno = require('Module:Yesno')<br />
<br />
local p = {}<br />
<br />
function p.main(frame)<br />
local args = require('Module:Arguments').getArgs(frame, {<br />
wrappers = 'Template:Clickable button 2'<br />
})<br />
return p.luaMain(args)<br />
end<br />
<br />
function p.luaMain(args)<br />
if not args[1] and not args.url then<br />
return ''<br />
end<br />
local data = p.makeLinkData(args)<br />
local link = p.renderLink(data)<br />
local trackingCategories = p.renderTrackingCategories(args)<br />
return link .. trackingCategories<br />
end<br />
<br />
function p.makeLinkData(args)<br />
local data = {}<br />
<br />
-- Get the link and display values, and find whether we are outputting a<br />
-- wikilink or a URL.<br />
if args.url then<br />
data.isUrl = true<br />
data.link = args.url<br />
if args[1] then<br />
data.display = args[1]<br />
else<br />
data.display = args.url<br />
end<br />
else<br />
data.isUrl = false<br />
data.link = args[1]<br />
if args[2] then<br />
data.display = args[2]<br />
else<br />
data.display = args[1]<br />
end<br />
end<br />
<br />
-- Classes<br />
local class = args.class and args.class:lower()<br />
data.classes = {}<br />
if class == 'ui-button-green'<br />
or class == 'ui-button-blue'<br />
or class == 'ui-button-red'<br />
then<br />
table.insert(<br />
data.classes,<br />
'submit ui-button ui-widget ui-state-default ui-corner-all'<br />
.. ' ui-button-text-only ui-button-text'<br />
)<br />
else<br />
table.insert(data.classes, 'mw-ui-button')<br />
end<br />
if class then<br />
table.insert(data.classes, class)<br />
end<br />
<br />
-- Styles<br />
do<br />
--[[<br />
-- Check whether we are on the same page as we have specified in<br />
-- args[1], but not if we are using a URL link, as then args[1] is only<br />
-- a display value. If we are currently on the page specified in<br />
-- args[1] make the button colour darker so that it stands out from<br />
-- other buttons on the page.<br />
--]]<br />
local success, linkTitle, currentTitle<br />
if not data.isUrl then<br />
currentTitle = mw.title.getCurrentTitle()<br />
success, linkTitle = pcall(mw.title.new, args[1])<br />
end<br />
if success<br />
and linkTitle<br />
and mw.title.equals(currentTitle, linkTitle)<br />
then<br />
if class == 'ui-button-blue'<br />
or class == 'mw-ui-progressive'<br />
or class == 'mw-ui-constructive'<br />
then<br />
data.backgroundColor = '#2962CB'<br />
elseif class == 'ui-button-green' then<br />
data.backgroundColor = '#008B6D'<br />
elseif class == 'ui-button-red' or class == 'mw-ui-destructive' then<br />
data.backgroundColor = '#A6170F'<br />
else<br />
data.backgroundColor = '#CCC'<br />
data.color = '#666'<br />
end<br />
end<br />
-- Add user-specified styles.<br />
data.style = args.style<br />
end<br />
<br />
return data<br />
end<br />
<br />
function p.renderLink(data)<br />
-- Render the display span tag.<br />
local display<br />
do<br />
local displaySpan = mw.html.create('span')<br />
for i, class in ipairs(data.classes or {}) do<br />
displaySpan:addClass(class)<br />
end<br />
displaySpan<br />
:css{<br />
['background-color'] = data.backgroundColor,<br />
color = data.color<br />
}<br />
if data.style then<br />
displaySpan:cssText(data.style)<br />
end<br />
displaySpan:wikitext(data.display)<br />
display = tostring(displaySpan)<br />
end<br />
<br />
-- Render the link<br />
local link <br />
if data.isUrl then<br />
link = string.format('[%s %s]', data.link, display)<br />
else<br />
link = string.format('[[%s|%s]]', data.link, display)<br />
end<br />
<br />
return string.format('<span class="plainlinks">%s</span>', link)<br />
end<br />
<br />
function p.renderTrackingCategories(args)<br />
if yesno(args.category) == false then<br />
return ''<br />
end<br />
local class = args.class and args.class:lower()<br />
if class == 'ui-button-green'<br />
or class == 'ui-button-blue'<br />
or class == 'ui-button-red'<br />
then<br />
return '[[Category:Pages using old style ui-button-color]]'<br />
else<br />
return ''<br />
end<br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Clickable_button_2&diff=2681Template:Clickable button 22020-02-12T19:59:07Z<p>Abequinn: buttons!</p>
<hr />
<div>{{#invoke:Clickable button 2|main}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:Stub&diff=2675Template:Stub2020-02-12T19:28:43Z<p>Abequinn: </p>
<hr />
<div><span style="color: black;background: yellow; border: 2px orange solid; padding: 2px 1px 2px 4px;"><b><br />
[[File:Paper-and-pencil.png |14px|14px]] This article/section is a stub.</b> <i>You can help the RGDWiki by [{{fullurl:{{FULLPAGENAME}}|action=edit}} editing this article].</i></span> <includeonly>{{main other|[[Category:Stubs]]|USE THIS ON ARTICLES ONLY PLZ}}</includeonly></div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:NintendoNavbox&diff=2672Template:NintendoNavbox2020-02-12T19:23:46Z<p>Abequinn: truncate</p>
<hr />
<div>{{Navboxes<br />
|title = Nintendo<br />
|titlestyle = background: red; color: white<br />
|list=<br />
{{WiiNavbox}}<br />
{{GamecubeNavbox}}<br />
{{DSNavbox}}<br />
{{DSINavbox}}<br />
{{CompanyNavbox}}<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:WiiNavbox&diff=2671Template:WiiNavbox2020-02-12T19:22:06Z<p>Abequinn: boom</p>
<hr />
<div>{{Navbox<br />
| name = WiiNavbox<br />
| title = Wii<br />
| titlestyle = background: black; color: white<br />
| groupstyle = background: white<br />
| listclass = hlist<br />
| state = autocollapse<br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = Channels<br />
| list1 = [[Forecast Channel]] · [[News Channel]] · [[Wii Shop Channel]] · [[Wii + Internet Channel]]<br />
<br />
| group2 = Development<br />
| list2 = [[DiskCheck]] · [[Full Wii History]] · [[Maintenance Mode]] · [[NDEV]] · [[Nmenu]] · [[NWC24Editor]] · [[Pre-Production Boards]] · [[Prototype Revolution SDK]] · [[RVL Product Codes]] · [[Revolution Emulator]] · [[Revolution SDK]] · [[Waikiki]]<br />
<br />
| group3 = Discs<br />
| list3 = [[DiscUpdate Disc]] · [[Mii Support Disc]] · [[Movie-Ch Install Disc]] · [[Wii Backup Disc]] · [[Wii Startup Disc]]<br />
<br />
| group4 = Peripherals<br />
| list4 = [[Cyberbike Magnetic Edition]] · [[GyroPod]] · [[Logitech Classic Keyboard 200]] · [[Logitech Cordless Keyboard for Wii]] · [[Logitech Speed Force Racing Wheel]] · [[RVT-H Reader]] · [[RVT-R Disc]] · [[RVT-R Reader]] · [[RVT-R Writer]] · [[Starlight Fun Center]] · [[Wii Remote]] · [[Wii Vitality Sensor]]<br />
<br />
| group5 = System<br />
| list5 = [[43DB]] · [[all.ini]] · [[ASH (File Format)]] · [[Bannerbomb]] · [[boot0]] · [[boot1]] · [[boot2]] · [[DiskCheck]] · [[E3 2005 Revolution Case]] · [[GameID]] · [[Hollywood]] · [[IOS]] · [[OSGetConsoleType]] · [[OTP]] · [[NDEV Menu]] · [[Revolution Arcade]] · [[Startup Disc Menu]] · [[Wii DVD Support]] · [[Wii Menu Changer]] · [[Wii Menu Uninstaller]] · [[Wii Mini]] · [[Wii System Menu]] · [[testlog.txt]] · [[uid.sys]] · [[vWii]]<br />
<br />
| group6 = Other<br />
| list6 = [[Acer Cloud Technology]] · [[AiLive]] · [[Barking Lizards Technologies]] · [[CodeWarrior IDE]] · [[Data Check and Log Check]] · [[DVDFatal]] · [[E3 2005]] · [[E3 2006]] · [[ESOL]] · [[Guide on Modifying the Wii Shop Channel To Access Your Own Websites]] · [[NNGC]] · [[List of Korean games released for the Nintendo Wii]] · [[RVL_DIAG]] · [[SDK Library Strings]] · [[TGS 2005]] · [[Wii Development Items]] · [[Wii Factory Process]] · [[Wii SDK Middleware]]<br />
<br />
| group7 = Games<br />
| list7 = [[Virtual Console]] · [[Wii Play: Motion]]<br />
| below = <br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:DSINavbox&diff=2670Template:DSINavbox2020-02-12T19:20:06Z<p>Abequinn: change color</p>
<hr />
<div>{{Navbox<br />
| name = DSINavbox<br />
| title = DSi<br />
| listclass = hlist<br />
| state = autocollapse<br />
| titlestyle = background: #800020; color: white<br />
| groupstyle = background: lightblue<br />
<br />
| group1 = Development<br />
| list1 = [[NandFiler]] · [[TwlNmenu]] · [[SystemUpdater]]<br />
<br />
| group2 = Hardware<br />
| list2 = [[Japanese Nintendo DSi Prototype]] · [[Nintendo DS(i) Classroom]] · [[Unknown DSi Prototype]]<br />
<br />
| group3 = Misc<br />
| list3 = [[Flowerz Demo]] · [[List of WFC-enabled DSiWare]] · [[List of dumped NANDs from the Nintendo DSi]] · [[Pokémon (PWC2010) Save Data Tools]]<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:DSNavbox&diff=2669Template:DSNavbox2020-02-12T19:18:18Z<p>Abequinn: change color</p>
<hr />
<div>{{Navbox<br />
| name = DSNavbox<br />
| title = DS<br />
| listclass = hlist<br />
| state = autocollapse<br />
| titlestyle = background: blue; color: white<br />
<br />
| group1 = Hardware<br />
| list1 = [[Iris]] · [[Nintendo Zone Box]]<br />
<br />
| group2 = Misc<br />
| list2 = [[CrashMe]] · [[GameID]]<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:GamecubeNavbox&diff=2668Template:GamecubeNavbox2020-02-12T19:14:52Z<p>Abequinn: change color</p>
<hr />
<div>{{Navbox<br />
| name = GamecubeNavbox<br />
| title = GameCube<br />
| titlestyle = background: purple; color: white<br />
| groupstyle = background: silver<br />
| listclass = hlist<br />
| state = autocollapse<br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = Development<br />
| list1 = [[CodeWarrior IDE]] · [[Dolphin Emulator]] · [[Dolphin SDK]]<br />
<br />
| group2 = Hardware<br />
| list2 = [[Arthur]] · [[GDEV]] · [[HW1]] · [[Minnow]] · [[TDEV]] · [[Waikiki]]<br />
<br />
| group3 = Misc<br />
| list3 = [[Factor 5]] · [[GameID]] · [[OSGetConsoleType]]<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:WiiNavbox&diff=2666Template:WiiNavbox2020-02-12T19:13:09Z<p>Abequinn: change color</p>
<hr />
<div>{{Navbox<br />
| name = WiiNavbox<br />
| title = Wii<br />
| titlestyle = background: white<br />
| groupstyle = background: white<br />
| listclass = hlist<br />
| state = autocollapse<br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = Channels<br />
| list1 = [[Forecast Channel]] · [[News Channel]] · [[Wii Shop Channel]] · [[Wii + Internet Channel]]<br />
<br />
| group2 = Development<br />
| list2 = [[DiskCheck]] · [[Full Wii History]] · [[Maintenance Mode]] · [[NDEV]] · [[Nmenu]] · [[NWC24Editor]] · [[Pre-Production Boards]] · [[Prototype Revolution SDK]] · [[RVL Product Codes]] · [[Revolution Emulator]] · [[Revolution SDK]] · [[Waikiki]]<br />
<br />
| group3 = Discs<br />
| list3 = [[DiscUpdate Disc]] · [[Mii Support Disc]] · [[Movie-Ch Install Disc]] · [[Wii Backup Disc]] · [[Wii Startup Disc]]<br />
<br />
| group4 = Peripherals<br />
| list4 = [[Cyberbike Magnetic Edition]] · [[GyroPod]] · [[Logitech Classic Keyboard 200]] · [[Logitech Cordless Keyboard for Wii]] · [[Logitech Speed Force Racing Wheel]] · [[RVT-H Reader]] · [[RVT-R Disc]] · [[RVT-R Reader]] · [[RVT-R Writer]] · [[Starlight Fun Center]] · [[Wii Remote]] · [[Wii Vitality Sensor]]<br />
<br />
| group5 = System<br />
| list5 = [[43DB]] · [[all.ini]] · [[ASH (File Format)]] · [[Bannerbomb]] · [[boot0]] · [[boot1]] · [[boot2]] · [[DiskCheck]] · [[E3 2005 Revolution Case]] · [[GameID]] · [[Hollywood]] · [[IOS]] · [[OSGetConsoleType]] · [[OTP]] · [[NDEV Menu]] · [[Revolution Arcade]] · [[Startup Disc Menu]] · [[Wii DVD Support]] · [[Wii Menu Changer]] · [[Wii Menu Uninstaller]] · [[Wii Mini]] · [[Wii System Menu]] · [[testlog.txt]] · [[uid.sys]] · [[vWii]]<br />
<br />
| group6 = Other<br />
| list6 = [[Acer Cloud Technology]] · [[AiLive]] · [[Barking Lizards Technologies]] · [[CodeWarrior IDE]] · [[Data Check and Log Check]] · [[DVDFatal]] · [[E3 2005]] · [[E3 2006]] · [[ESOL]] · [[Guide on Modifying the Wii Shop Channel To Access Your Own Websites]] · [[NNGC]] · [[List of Korean games released for the Nintendo Wii]] · [[RVL_DIAG]] · [[SDK Library Strings]] · [[TGS 2005]] · [[Wii Development Items]] · [[Wii Factory Process]] · [[Wii SDK Middleware]]<br />
<br />
| group7 = Games<br />
| list7 = [[Virtual Console]] · [[Wii Play: Motion]]<br />
| below = <br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:NintendoNavbox&diff=2665Template:NintendoNavbox2020-02-12T19:09:50Z<p>Abequinn: Add company navbox</p>
<hr />
<div>{{Navboxes<br />
|title = Nintendo<br />
|titlestyle = background: red; color: white<br />
|list=<br />
{{CompanyNavbox}}<br />
{{Template:WiiNavbox}}<br />
{{Template:GamecubeNavbox}}<br />
{{Template:DSNavbox}}<br />
{{Template:DSINavbox}}<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:CompanyNavbox&diff=2664Template:CompanyNavbox2020-02-12T19:09:01Z<p>Abequinn: fix</p>
<hr />
<div>{{Navbox<br />
| name = CompanyNavbox<br />
| title = Companies<br />
| listclass = hlist<br />
| state = <br />
<br />
| above = <br />
| image =<br />
<br />
| group1 = Nintendo First Parties<br />
| list1 = '''[[:Category:Nintendo|Nintendo]]''' · [[Nintendo EPD]] · [[Nintendo PTD]] · [[NERD]] · [[Nintendo of America]] · [[Nintendo of Europe]] · [[Nintendo of Canada]] · [[Nintendo of Korea]]<br />
<br />
| group2 = Nintendo Second Parties<br />
| list2 = [[Arzest]] · [[Denyu-sha]] · [[Good-Feel]] · [[iQue]] · [[Skip Ltd.]] · [[Vanpool]] <br />
<br />
| group2 = Middleware Providers<br />
| list2 = [[Acer Cloud Technology]] · [[AiLive]] · [[eSOL]] · [[Mobiclip]] · [[Zi Corporation]] · [[Nintendo Relations]]<br />
<br />
| group3 = Third Party Developers<br />
| list3 = [[Barking Lizards Technologies]] · [[Factor 5]]<br />
| below = <br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Template:NintendoNavbox&diff=2662Template:NintendoNavbox2020-02-12T19:05:31Z<p>Abequinn: Created page with "{{Navboxes |title = Nintendo |titlestyle = background: red; color: white; border: red |list= {{Template:WiiNavbox}} {{Template:GamecubeNavbox}} {{Template:DSNavbox}} {{Templat..."</p>
<hr />
<div>{{Navboxes<br />
|title = Nintendo<br />
|titlestyle = background: red; color: white; border: red<br />
|list=<br />
{{Template:WiiNavbox}}<br />
{{Template:GamecubeNavbox}}<br />
{{Template:DSNavbox}}<br />
{{Template:DSINavbox}}<br />
}}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Protection_banner/config&diff=2651Module:Protection banner/config2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>-- This module provides configuration data for [[Module:Protection banner]].<br />
<br />
return {<br />
<br />
--------------------------------------------------------------------------------<br />
--<br />
-- BANNER DATA<br />
--<br />
--------------------------------------------------------------------------------<br />
<br />
--[[<br />
-- Banner data consists of six fields:<br />
-- * text - the main protection text that appears at the top of protection<br />
-- banners.<br />
-- * explanation - the text that appears below the main protection text, used<br />
-- to explain the details of the protection.<br />
-- * tooltip - the tooltip text you see when you move the mouse over a small<br />
-- padlock icon.<br />
-- * link - the page that the small padlock icon links to.<br />
-- * alt - the alt text for the small padlock icon. This is also used as tooltip<br />
-- text for the large protection banners.<br />
-- * image - the padlock image used in both protection banners and small padlock<br />
-- icons.<br />
--<br />
-- The module checks in three separate tables to find a value for each field.<br />
-- First it checks the banners table, which has values specific to the reason<br />
-- for the page being protected. Then the module checks the defaultBanners<br />
-- table, which has values specific to each protection level. Finally, the<br />
-- module checks the masterBanner table, which holds data for protection<br />
-- templates to use if no data has been found in the previous two tables.<br />
--<br />
-- The values in the banner data can take parameters. These are specified<br />
-- using ${TEXTLIKETHIS} (a dollar sign preceding a parameter name<br />
-- enclosed in curly braces).<br />
--<br />
-- Available parameters:<br />
--<br />
-- ${CURRENTVERSION} - a link to the page history or the move log, with the<br />
-- display message "current-version-edit-display" or<br />
-- "current-version-move-display".<br />
--<br />
-- ${EDITREQUEST} - a link to create an edit request for the current page.<br />
--<br />
-- ${EXPLANATIONBLURB} - an explanation blurb, e.g. "Please discuss any changes<br />
-- on the talk page; you may submit a request to ask an administrator to make<br />
-- an edit if it is minor or supported by consensus."<br />
--<br />
-- ${IMAGELINK} - a link to set the image to, depending on the protection<br />
-- action and protection level.<br />
--<br />
-- ${INTROBLURB} - the PROTECTIONBLURB parameter, plus the expiry if an expiry<br />
-- is set. E.g. "Editing of this page by new or unregistered users is currently <br />
-- disabled until dd Month YYYY."<br />
--<br />
-- ${INTROFRAGMENT} - the same as ${INTROBLURB}, but without final punctuation<br />
-- so that it can be used in run-on sentences.<br />
--<br />
-- ${PAGETYPE} - the type of the page, e.g. "article" or "template".<br />
-- Defined in the cfg.pagetypes table.<br />
--<br />
-- ${PROTECTIONBLURB} - a blurb explaining the protection level of the page, e.g.<br />
-- "Editing of this page by new or unregistered users is currently disabled"<br />
--<br />
-- ${PROTECTIONDATE} - the protection date, if it has been supplied to the<br />
-- template.<br />
--<br />
-- ${PROTECTIONLEVEL} - the protection level, e.g. "fully protected" or<br />
-- "semi-protected".<br />
--<br />
-- ${PROTECTIONLOG} - a link to the protection log or the pending changes log,<br />
-- depending on the protection action.<br />
--<br />
-- ${TALKPAGE} - a link to the talk page. If a section is specified, links<br />
-- straight to that talk page section.<br />
--<br />
-- ${TOOLTIPBLURB} - uses the PAGETYPE, PROTECTIONTYPE and EXPIRY parameters to<br />
-- create a blurb like "This template is semi-protected", or "This article is<br />
-- move-protected until DD Month YYYY".<br />
--<br />
-- ${VANDAL} - links for the specified username (or the root page name)<br />
-- using Module:Vandal-m.<br />
--<br />
-- Functions<br />
--<br />
-- For advanced users, it is possible to use Lua functions instead of strings<br />
-- in the banner config tables. Using functions gives flexibility that is not<br />
-- possible just by using parameters. Functions take two arguments, the<br />
-- protection object and the template arguments, and they must output a string.<br />
--<br />
-- For example:<br />
--<br />
-- text = function (protectionObj, args)<br />
-- if protectionObj.level == 'autoconfirmed' then<br />
-- return 'foo'<br />
-- else<br />
-- return 'bar'<br />
-- end<br />
-- end<br />
--<br />
-- Some protection object properties and methods that may be useful:<br />
-- protectionObj.action - the protection action<br />
-- protectionObj.level - the protection level<br />
-- protectionObj.reason - the protection reason<br />
-- protectionObj.expiry - the expiry. Nil if unset, the string "indef" if set<br />
-- to indefinite, and the protection time in unix time if temporary.<br />
-- protectionObj.protectionDate - the protection date in unix time, or nil if<br />
-- unspecified.<br />
-- protectionObj.bannerConfig - the banner config found by the module. Beware<br />
-- of editing the config field used by the function, as it could create an<br />
-- infinite loop.<br />
-- protectionObj:isProtected - returns a boolean showing whether the page is<br />
-- protected.<br />
-- protectionObj:isTemporary - returns a boolean showing whether the expiry is<br />
-- temporary.<br />
-- protectionObj:isIncorrect - returns a boolean showing whether the protection<br />
-- template is incorrect.<br />
--]]<br />
<br />
-- The master banner data, used if no values have been found in banners or<br />
-- defaultBanners.<br />
masterBanner = {<br />
text = '${INTROBLURB}',<br />
explanation = '${EXPLANATIONBLURB}',<br />
tooltip = '${TOOLTIPBLURB}',<br />
link = '${IMAGELINK}',<br />
alt = 'Page ${PROTECTIONLEVEL}'<br />
},<br />
<br />
-- The default banner data. This holds banner data for different protection<br />
-- levels.<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
defaultBanners = {<br />
edit = {},<br />
move = {},<br />
autoreview = {<br />
default = {<br />
alt = 'Page protected with pending changes',<br />
tooltip = 'All edits by unregistered and new users are subject to review prior to becoming visible to unregistered users',<br />
image = 'Pending-protection-shackle.svg'<br />
}<br />
},<br />
upload = {}<br />
},<br />
<br />
-- The banner data. This holds banner data for different protection reasons.<br />
-- In fact, the reasons specified in this table control which reasons are<br />
-- valid inputs to the first positional parameter.<br />
--<br />
-- There is also a non-standard "description" field that can be used for items<br />
-- in this table. This is a description of the protection reason for use in the<br />
-- module documentation.<br />
--<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
banners = {<br />
edit = {<br />
blp = {<br />
description = 'For pages protected to promote compliance with the'<br />
.. ' [[Wikipedia:Biographies of living persons'<br />
.. '|biographies of living persons]] policy',<br />
text = '${INTROFRAGMENT} to promote compliance with'<br />
.. ' [[Wikipedia:Biographies of living persons'<br />
.. "|Wikipedia's&nbsp;policy on&nbsp;the&nbsp;biographies"<br />
.. ' of&nbsp;living&nbsp;people]].',<br />
tooltip = '${TOOLTIPFRAGMENT} to promote compliance with the policy on'<br />
.. ' biographies of living persons',<br />
},<br />
dmca = {<br />
description = 'For pages protected by the Wikimedia Foundation'<br />
.. ' due to [[Digital Millennium Copyright Act]] takedown requests',<br />
explanation = function (protectionObj, args)<br />
local ret = 'Pursuant to a rights owner notice under the Digital'<br />
.. ' Millennium Copyright Act (DMCA) regarding some content'<br />
.. ' in this article, the Wikimedia Foundation acted under'<br />
.. ' applicable law and took down and restricted the content'<br />
.. ' in question.'<br />
if args.notice then<br />
ret = ret .. ' A copy of the received notice can be found here: '<br />
.. args.notice .. '.'<br />
end<br />
ret = ret .. ' For more information, including websites discussing'<br />
.. ' how to file a counter-notice, please see'<br />
.. " [[Wikipedia:Office actions]] and the article's ${TALKPAGE}."<br />
.. "'''Do not remove this template from the article until the"<br />
.. " restrictions are withdrawn'''."<br />
return ret<br />
end,<br />
image = 'Office-protection-shackle.svg',<br />
},<br />
dispute = {<br />
description = 'For pages protected due to editing disputes',<br />
text = function (protectionObj, args)<br />
-- Find the value of "disputes".<br />
local display = 'disputes'<br />
local disputes<br />
if args.section then<br />
disputes = string.format(<br />
'[[%s:%s#%s|%s]]',<br />
mw.site.namespaces[protectionObj.title.namespace].talk.name,<br />
protectionObj.title.text,<br />
args.section,<br />
display<br />
)<br />
else<br />
disputes = display<br />
end<br />
<br />
-- Make the blurb, depending on the expiry.<br />
local msg<br />
if type(protectionObj.expiry) == 'number' then<br />
msg = '${INTROFRAGMENT} or until editing %s have been resolved.'<br />
else<br />
msg = '${INTROFRAGMENT} until editing %s have been resolved.'<br />
end<br />
return string.format(msg, disputes)<br />
end,<br />
explanation = "This protection is '''not''' an endorsement of the"<br />
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',<br />
tooltip = '${TOOLTIPFRAGMENT} due to editing disputes',<br />
},<br />
ecp = {<br />
description = 'For articles in topic areas authorized by'<br />
.. ' [[Wikipedia:Arbitration Committee|ArbCom]] or'<br />
.. ' meets the criteria for community use',<br />
tooltip = 'This ${PAGETYPE} is extended-confirmed protected',<br />
alt = 'Extended-protected ${PAGETYPE}',<br />
},<br />
mainpage = {<br />
description = 'For pages protected for being displayed on the [[Main Page]]',<br />
text = 'This file is currently'<br />
.. ' [[Wikipedia:This page is protected|protected]] from'<br />
.. ' editing because it is currently or will soon be displayed'<br />
.. ' on the [[Main Page]].',<br />
explanation = 'Images on the Main Page are protected due to their high'<br />
.. ' visibility. Please discuss any necessary changes on the ${TALKPAGE}.'<br />
.. '<br /><span style="font-size:90%;">'<br />
.. "'''Administrators:''' Once this image is definitely off the Main Page,"<br />
.. ' please unprotect this file, or reduce to semi-protection,'<br />
.. ' as appropriate.</span>',<br />
},<br />
office = {<br />
description = 'For pages protected by the Wikimedia Foundation',<br />
text = function (protectionObj, args)<br />
local ret = 'This ${PAGETYPE} is currently under the'<br />
.. ' scrutiny of the'<br />
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'<br />
.. ' and is protected.'<br />
if protectionObj.protectionDate then<br />
ret = ret .. ' It has been protected since ${PROTECTIONDATE}.'<br />
end<br />
return ret<br />
end,<br />
explanation = "If you can edit this page, please discuss all changes and"<br />
.. " additions on the ${TALKPAGE} first. '''Do not remove protection from this"<br />
.. " page unless you are authorized by the Wikimedia Foundation to do"<br />
.. " so.'''",<br />
image = 'Office-protection-shackle.svg',<br />
},<br />
reset = {<br />
description = 'For pages protected by the Wikimedia Foundation and'<br />
.. ' "reset" to a bare-bones version',<br />
text = 'This ${PAGETYPE} is currently under the'<br />
.. ' scrutiny of the'<br />
.. ' [[Wikipedia:Office actions|Wikimedia Foundation Office]]'<br />
.. ' and is protected.',<br />
explanation = function (protectionObj, args)<br />
local ret = ''<br />
if protectionObj.protectionDate then<br />
ret = ret .. 'On ${PROTECTIONDATE} this ${PAGETYPE} was'<br />
else<br />
ret = ret .. 'This ${PAGETYPE} has been'<br />
end<br />
ret = ret .. ' reduced to a'<br />
.. ' simplified, "bare bones" version so that it may be completely'<br />
.. ' rewritten to ensure it meets the policies of'<br />
.. ' [[WP:NPOV|Neutral Point of View]] and [[WP:V|Verifiability]].'<br />
.. ' Standard Wikipedia policies will apply to its rewriting—which'<br />
.. ' will eventually be open to all editors—and will be strictly'<br />
.. ' enforced. The ${PAGETYPE} has been ${PROTECTIONLEVEL} while'<br />
.. ' it is being rebuilt.\n\n'<br />
.. 'Any insertion of material directly from'<br />
.. ' pre-protection revisions of the ${PAGETYPE} will be removed, as'<br />
.. ' will any material added to the ${PAGETYPE} that is not properly'<br />
.. ' sourced. The associated talk page(s) were also cleared on the'<br />
.. " same date.\n\n"<br />
.. "If you can edit this page, please discuss all changes and"<br />
.. " additions on the ${TALKPAGE} first. '''Do not override"<br />
.. " this action, and do not remove protection from this page,"<br />
.. " unless you are authorized by the Wikimedia Foundation"<br />
.. " to do so. No editor may remove this notice.'''"<br />
<br />
return ret<br />
end,<br />
image = 'Office-protection-shackle.svg',<br />
},<br />
sock = {<br />
description = 'For pages protected due to'<br />
.. ' [[Wikipedia:Sock puppetry|sock puppetry]]',<br />
text = '${INTROFRAGMENT} to prevent [[Wikipedia:Sock puppetry|sock puppets]] of'<br />
.. ' [[Wikipedia:Blocking policy|blocked]] or'<br />
.. ' [[Wikipedia:Banning policy|banned users]]'<br />
.. ' from editing it.',<br />
tooltip = '${TOOLTIPFRAGMENT} to prevent sock puppets of blocked or banned users from'<br />
.. ' editing it',<br />
},<br />
template = {<br />
description = 'For [[Wikipedia:High-risk templates|high-risk]]'<br />
.. ' templates and Lua modules',<br />
text = 'This is a permanently [[Help:Protection|protected]] ${PAGETYPE},'<br />
.. ' as it is [[Wikipedia:High-risk templates|high-risk]].',<br />
explanation = 'Please discuss any changes on the ${TALKPAGE}; you may'<br />
.. ' ${EDITREQUEST} to ask an'<br />
.. ' [[Wikipedia:Administrators|administrator]] or'<br />
.. ' [[Wikipedia:Template editor|template editor]] to make an edit if'<br />
.. ' it is [[Help:Minor edit#When to mark an edit as a minor edit'<br />
.. '|uncontroversial]] or supported by'<br />
.. ' [[Wikipedia:Consensus|consensus]]. You can also'<br />
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'<br />
.. ' unprotected.',<br />
tooltip = 'This high-risk ${PAGETYPE} is permanently ${PROTECTIONLEVEL}'<br />
.. ' to prevent vandalism',<br />
alt = 'Permanently protected ${PAGETYPE}',<br />
},<br />
usertalk = {<br />
description = 'For pages protected against disruptive edits by a'<br />
.. ' particular user',<br />
text = '${INTROFRAGMENT} to prevent ${VANDAL} from using it to make disruptive edits,'<br />
.. ' such as abusing the'<br />
.. ' &#123;&#123;[[Template:unblock|unblock]]&#125;&#125; template.',<br />
explanation = 'If you cannot edit this user talk page and you need to'<br />
.. ' make a change or leave a message, you can'<br />
.. ' [[Wikipedia:Requests for page protection'<br />
.. '#Current requests for edits to a protected page'<br />
.. '|request an edit]],'<br />
.. ' [[Wikipedia:Requests for page protection'<br />
.. '#Current requests for reduction in protection level'<br />
.. '|request unprotection]],'<br />
.. ' [[Special:Userlogin|log in]],'<br />
.. ' or [[Special:UserLogin/signup|create an account]].',<br />
},<br />
vandalism = {<br />
description = 'For pages protected against'<br />
.. ' [[Wikipedia:Vandalism|vandalism]]',<br />
text = '${INTROFRAGMENT} due to [[Wikipedia:Vandalism|vandalism]].',<br />
explanation = function (protectionObj, args)<br />
local ret = ''<br />
if protectionObj.level == 'sysop' then<br />
ret = ret .. "This protection is '''not''' an endorsement of the"<br />
.. ' ${CURRENTVERSION}. '<br />
end<br />
return ret .. '${EXPLANATIONBLURB}'<br />
end,<br />
tooltip = '${TOOLTIPFRAGMENT} due to vandalism',<br />
}<br />
},<br />
move = {<br />
dispute = {<br />
description = 'For pages protected against page moves due to'<br />
.. ' disputes over the page title',<br />
explanation = "This protection is '''not''' an endorsement of the"<br />
.. ' ${CURRENTVERSION}. ${EXPLANATIONBLURB}',<br />
image = 'Move-protection-shackle.svg'<br />
},<br />
vandalism = {<br />
description = 'For pages protected against'<br />
.. ' [[Wikipedia:Vandalism#Page-move vandalism'<br />
.. ' |page-move vandalism]]'<br />
}<br />
},<br />
autoreview = {},<br />
upload = {}<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
--<br />
-- GENERAL DATA TABLES<br />
--<br />
--------------------------------------------------------------------------------<br />
<br />
--------------------------------------------------------------------------------<br />
-- Protection blurbs<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table produces the protection blurbs available with the<br />
-- ${PROTECTIONBLURB} parameter. It is sorted by protection action and<br />
-- protection level, and is checked by the module in the following order:<br />
-- 1. page's protection action, page's protection level<br />
-- 2. page's protection action, default protection level<br />
-- 3. "edit" protection action, default protection level<br />
--<br />
-- It is possible to use banner parameters inside this table.<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
protectionBlurbs = {<br />
edit = {<br />
default = 'This ${PAGETYPE} is currently [[Help:Protection|'<br />
.. 'protected]] from editing',<br />
autoconfirmed = 'Editing of this ${PAGETYPE} by [[Wikipedia:User access'<br />
.. ' levels#New users|new]] or [[Wikipedia:User access levels#Unregistered'<br />
.. ' users|unregistered]] users is currently [[Help:Protection|disabled]]',<br />
extendedconfirmed = 'This ${PAGETYPE} is currently under extended confirmed protection',<br />
},<br />
move = {<br />
default = 'This ${PAGETYPE} is currently [[Help:Protection|protected]]'<br />
.. ' from [[Help:Moving a page|page moves]]'<br />
},<br />
autoreview = {<br />
default = 'All edits made to this ${PAGETYPE} by'<br />
.. ' [[Wikipedia:User access levels#New users|new]] or'<br />
.. ' [[Wikipedia:User access levels#Unregistered users|unregistered]]'<br />
.. ' users are currently'<br />
.. ' [[Wikipedia:Pending changes|subject to review]]'<br />
},<br />
upload = {<br />
default = 'Uploading new versions of this ${PAGETYPE} is currently disabled'<br />
}<br />
},<br />
<br />
<br />
--------------------------------------------------------------------------------<br />
-- Explanation blurbs<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table produces the explanation blurbs available with the<br />
-- ${EXPLANATIONBLURB} parameter. It is sorted by protection action,<br />
-- protection level, and whether the page is a talk page or not. If the page is<br />
-- a talk page it will have a talk key of "talk"; otherwise it will have a talk<br />
-- key of "subject". The table is checked in the following order:<br />
-- 1. page's protection action, page's protection level, page's talk key<br />
-- 2. page's protection action, page's protection level, default talk key<br />
-- 3. page's protection action, default protection level, page's talk key<br />
-- 4. page's protection action, default protection level, default talk key<br />
--<br />
-- It is possible to use banner parameters inside this table.<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
explanationBlurbs = {<br />
edit = {<br />
autoconfirmed = {<br />
subject = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'<br />
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'<br />
.. ' ${EDITREQUEST}, discuss changes on the ${TALKPAGE},'<br />
.. ' [[Wikipedia:Requests for page protection'<br />
.. '#Current requests for reduction in protection level'<br />
.. '|request unprotection]], [[Special:Userlogin|log in]], or'<br />
.. ' [[Special:UserLogin/signup|create an account]].',<br />
default = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details. If you'<br />
.. ' cannot edit this ${PAGETYPE} and you wish to make a change, you can'<br />
.. ' [[Wikipedia:Requests for page protection'<br />
.. '#Current requests for reduction in protection level'<br />
.. '|request unprotection]], [[Special:Userlogin|log in]], or'<br />
.. ' [[Special:UserLogin/signup|create an account]].',<br />
},<br />
extendedconfirmed = {<br />
default = 'Extended confirmed protection prevents edits from all unregistered editors'<br />
.. ' and registered users with fewer than 30 days tenure and 500 edits.'<br />
.. ' The [[Wikipedia:Protection policy#extended|policy on community use]]'<br />
.. ' specifies that extended confirmed protection can be applied to combat'<br />
.. ' disruption, if semi-protection has proven to be ineffective.'<br />
.. ' Extended confirmed protection may also be applied to enforce'<br />
.. ' [[Wikipedia:Arbitration Committee|arbitration sanctions]].'<br />
.. ' Please discuss any changes on the ${TALKPAGE}; you may'<br />
.. ' ${EDITREQUEST} to ask for uncontroversial changes supported by'<br />
.. ' [[Wikipedia:Consensus|consensus]].'<br />
},<br />
default = {<br />
subject = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' Please discuss any changes on the ${TALKPAGE}; you'<br />
.. ' may ${EDITREQUEST} to ask an'<br />
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'<br />
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'<br />
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'<br />
.. '|consensus]]. You may also [[Wikipedia:Requests for'<br />
.. ' page protection#Current requests for reduction in protection level'<br />
.. '|request]] that this page be unprotected.',<br />
default = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' You may [[Wikipedia:Requests for page'<br />
.. ' protection#Current requests for edits to a protected page|request an'<br />
.. ' edit]] to this page, or [[Wikipedia:Requests for'<br />
.. ' page protection#Current requests for reduction in protection level'<br />
.. '|ask]] for it to be unprotected.'<br />
}<br />
},<br />
move = {<br />
default = {<br />
subject = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' The page may still be edited but cannot be moved'<br />
.. ' until unprotected. Please discuss any suggested moves on the'<br />
.. ' ${TALKPAGE} or at [[Wikipedia:Requested moves]]. You can also'<br />
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'<br />
.. ' unprotected.',<br />
default = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' The page may still be edited but cannot be moved'<br />
.. ' until unprotected. Please discuss any suggested moves at'<br />
.. ' [[Wikipedia:Requested moves]]. You can also'<br />
.. ' [[Wikipedia:Requests for page protection|request]] that the page be'<br />
.. ' unprotected.'<br />
}<br />
},<br />
autoreview = {<br />
default = {<br />
default = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' Edits to this ${PAGETYPE} by new and unregistered users'<br />
.. ' will not be visible to readers until they are accepted by'<br />
.. ' a reviewer. To avoid the need for your edits to be'<br />
.. ' reviewed, you may'<br />
.. ' [[Wikipedia:Requests for page protection'<br />
.. '#Current requests for reduction in protection level'<br />
.. '|request unprotection]], [[Special:Userlogin|log in]], or'<br />
.. ' [[Special:UserLogin/signup|create an account]].'<br />
},<br />
},<br />
upload = {<br />
default = {<br />
default = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' The page may still be edited but new versions of the file'<br />
.. ' cannot be uploaded until it is unprotected. You can'<br />
.. ' request that a new version be uploaded by using a'<br />
.. ' [[Wikipedia:Edit requests|protected edit request]], or you'<br />
.. ' can [[Wikipedia:Requests for page protection|request]]'<br />
.. ' that the file be unprotected.'<br />
}<br />
}<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Protection levels<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table provides the data for the ${PROTECTIONLEVEL} parameter, which<br />
-- produces a short label for different protection levels. It is sorted by<br />
-- protection action and protection level, and is checked in the following<br />
-- order:<br />
-- 1. page's protection action, page's protection level<br />
-- 2. page's protection action, default protection level<br />
-- 3. "edit" protection action, default protection level<br />
--<br />
-- It is possible to use banner parameters inside this table.<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
protectionLevels = {<br />
edit = {<br />
default = 'protected',<br />
templateeditor = 'template-protected',<br />
extendedconfirmed = 'extended-protected',<br />
autoconfirmed = 'semi-protected',<br />
},<br />
move = {<br />
default = 'move-protected'<br />
},<br />
autoreview = {<br />
},<br />
upload = {<br />
default = 'upload-protected'<br />
}<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Images<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table lists different padlock images for each protection action and<br />
-- protection level. It is used if an image is not specified in any of the<br />
-- banner data tables, and if the page does not satisfy the conditions for using<br />
-- the ['image-filename-indef'] image. It is checked in the following order:<br />
-- 1. page's protection action, page's protection level<br />
-- 2. page's protection action, default protection level<br />
images = {<br />
edit = {<br />
default = 'Full-protection-shackle.svg',<br />
templateeditor = 'Template-protection-shackle.svg',<br />
extendedconfirmed = 'Extended-protection-shackle.svg',<br />
autoconfirmed = 'Semi-protection-shackle.svg'<br />
},<br />
move = {<br />
default = 'Move-protection-shackle.svg',<br />
},<br />
autoreview = {<br />
default = 'Pending-protection-shackle.svg'<br />
},<br />
upload = {<br />
default = 'Upload-protection-shackle.svg'<br />
}<br />
},<br />
<br />
-- Pages with a reason specified in this table will show the special "indef"<br />
-- padlock, defined in the 'image-filename-indef' message, if no expiry is set.<br />
indefImageReasons = {<br />
template = true<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Image links<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table provides the data for the ${IMAGELINK} parameter, which gets<br />
-- the image link for small padlock icons based on the page's protection action<br />
-- and protection level. It is checked in the following order:<br />
-- 1. page's protection action, page's protection level<br />
-- 2. page's protection action, default protection level<br />
-- 3. "edit" protection action, default protection level<br />
--<br />
-- It is possible to use banner parameters inside this table.<br />
-- *required* - this table needs edit, move, autoreview and upload subtables.<br />
imageLinks = {<br />
edit = {<br />
default = 'Wikipedia:Protection policy#full',<br />
templateeditor = 'Wikipedia:Protection policy#template',<br />
extendedconfirmed = 'Wikipedia:Protection policy#extended',<br />
autoconfirmed = 'Wikipedia:Protection policy#semi'<br />
},<br />
move = {<br />
default = 'Wikipedia:Protection policy#move'<br />
},<br />
autoreview = {<br />
default = 'Wikipedia:Protection policy#pending'<br />
},<br />
upload = {<br />
default = 'Wikipedia:Protection policy#upload'<br />
}<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Padlock indicator names<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table provides the "name" attribute for the <indicator> extension tag<br />
-- with which small padlock icons are generated. All indicator tags on a page<br />
-- are displayed in alphabetical order based on this attribute, and with<br />
-- indicator tags with duplicate names, the last tag on the page wins.<br />
-- The attribute is chosen based on the protection action; table keys must be a<br />
-- protection action name or the string "default".<br />
padlockIndicatorNames = {<br />
autoreview = 'pp-autoreview',<br />
default = 'pp-default'<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Protection categories<br />
--------------------------------------------------------------------------------<br />
<br />
--[[<br />
-- The protection categories are stored in the protectionCategories table.<br />
-- Keys to this table are made up of the following strings:<br />
--<br />
-- 1. the expiry date<br />
-- 2. the namespace<br />
-- 3. the protection reason (e.g. "dispute" or "vandalism")<br />
-- 4. the protection level (e.g. "sysop" or "autoconfirmed")<br />
-- 5. the action (e.g. "edit" or "move")<br />
-- <br />
-- When the module looks up a category in the table, first it will will check to<br />
-- see a key exists that corresponds to all five parameters. For example, a<br />
-- user page semi-protected from vandalism for two weeks would have the key<br />
-- "temp-user-vandalism-autoconfirmed-edit". If no match is found, the module<br />
-- changes the first part of the key to "all" and checks the table again. It<br />
-- keeps checking increasingly generic key combinations until it finds the<br />
-- field, or until it reaches the key "all-all-all-all-all".<br />
--<br />
-- The module uses a binary matrix to determine the order in which to search.<br />
-- This is best demonstrated by a table. In this table, the "0" values<br />
-- represent "all", and the "1" values represent the original data (e.g.<br />
-- "indef" or "file" or "vandalism").<br />
--<br />
-- expiry namespace reason level action<br />
-- order<br />
-- 1 1 1 1 1 1<br />
-- 2 0 1 1 1 1<br />
-- 3 1 0 1 1 1<br />
-- 4 0 0 1 1 1<br />
-- 5 1 1 0 1 1<br />
-- 6 0 1 0 1 1<br />
-- 7 1 0 0 1 1<br />
-- 8 0 0 0 1 1<br />
-- 9 1 1 1 0 1<br />
-- 10 0 1 1 0 1<br />
-- 11 1 0 1 0 1<br />
-- 12 0 0 1 0 1<br />
-- 13 1 1 0 0 1<br />
-- 14 0 1 0 0 1<br />
-- 15 1 0 0 0 1<br />
-- 16 0 0 0 0 1<br />
-- 17 1 1 1 1 0<br />
-- 18 0 1 1 1 0<br />
-- 19 1 0 1 1 0<br />
-- 20 0 0 1 1 0<br />
-- 21 1 1 0 1 0<br />
-- 22 0 1 0 1 0<br />
-- 23 1 0 0 1 0<br />
-- 24 0 0 0 1 0<br />
-- 25 1 1 1 0 0<br />
-- 26 0 1 1 0 0<br />
-- 27 1 0 1 0 0<br />
-- 28 0 0 1 0 0<br />
-- 29 1 1 0 0 0<br />
-- 30 0 1 0 0 0<br />
-- 31 1 0 0 0 0<br />
-- 32 0 0 0 0 0<br />
--<br />
-- In this scheme the action has the highest priority, as it is the last<br />
-- to change, and the expiry has the least priority, as it changes the most.<br />
-- The priorities of the expiry, the protection level and the action are<br />
-- fixed, but the priorities of the reason and the namespace can be swapped<br />
-- through the use of the cfg.bannerDataNamespaceHasPriority table.<br />
--]]<br />
<br />
-- If the reason specified to the template is listed in this table,<br />
-- namespace data will take priority over reason data in the protectionCategories<br />
-- table.<br />
reasonsWithNamespacePriority = {<br />
vandalism = true,<br />
},<br />
<br />
-- The string to use as a namespace key for the protectionCategories table for each<br />
-- namespace number.<br />
categoryNamespaceKeys = {<br />
[ 2] = 'user',<br />
[ 3] = 'user',<br />
[ 4] = 'project',<br />
[ 6] = 'file',<br />
[ 8] = 'mediawiki',<br />
[ 10] = 'template',<br />
[ 12] = 'project',<br />
[ 14] = 'category',<br />
[100] = 'portal',<br />
[828] = 'module',<br />
},<br />
<br />
protectionCategories = {<br />
['all|all|all|all|all'] = 'Wikipedia fully protected pages',<br />
['all|all|office|all|all'] = 'Wikipedia Office-protected pages',<br />
['all|all|reset|all|all'] = 'Wikipedia Office-protected pages',<br />
['all|all|dmca|all|all'] = 'Wikipedia Office-protected pages',<br />
['all|all|mainpage|all|all'] = 'Wikipedia fully-protected main page files',<br />
['all|all|all|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages',<br />
['all|all|ecp|extendedconfirmed|all'] = 'Wikipedia extended-confirmed-protected pages',<br />
['all|template|all|all|edit'] = 'Wikipedia fully protected templates',<br />
['all|all|all|autoconfirmed|edit'] = 'Wikipedia semi-protected pages',<br />
['indef|all|all|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected pages',<br />
['all|all|blp|autoconfirmed|edit'] = 'Wikipedia indefinitely semi-protected biographies of living people',<br />
['temp|all|blp|autoconfirmed|edit'] = 'Wikipedia temporarily semi-protected biographies of living people',<br />
['all|all|dispute|autoconfirmed|edit'] = 'Wikipedia pages semi-protected due to dispute',<br />
['all|all|sock|autoconfirmed|edit'] = 'Wikipedia pages semi-protected from banned users',<br />
['all|all|vandalism|autoconfirmed|edit'] = 'Wikipedia pages semi-protected against vandalism',<br />
['all|category|all|autoconfirmed|edit'] = 'Wikipedia semi-protected categories',<br />
['all|file|all|autoconfirmed|edit'] = 'Wikipedia semi-protected files',<br />
['all|portal|all|autoconfirmed|edit'] = 'Wikipedia semi-protected portals',<br />
['all|project|all|autoconfirmed|edit'] = 'Wikipedia semi-protected project pages',<br />
['all|talk|all|autoconfirmed|edit'] = 'Wikipedia semi-protected talk pages',<br />
['all|template|all|autoconfirmed|edit'] = 'Wikipedia semi-protected templates',<br />
['all|user|all|autoconfirmed|edit'] = 'Wikipedia semi-protected user and user talk pages',<br />
['all|template|all|templateeditor|edit'] = 'Wikipedia template-protected templates',<br />
['all|all|blp|sysop|edit'] = 'Wikipedia indefinitely protected biographies of living people',<br />
['temp|all|blp|sysop|edit'] = 'Wikipedia temporarily protected biographies of living people',<br />
['all|all|dispute|sysop|edit'] = 'Wikipedia pages protected due to dispute',<br />
['all|all|sock|sysop|edit'] = 'Wikipedia pages protected from banned users',<br />
['all|all|vandalism|sysop|edit'] = 'Wikipedia pages protected against vandalism',<br />
['all|category|all|sysop|edit'] = 'Wikipedia fully protected categories',<br />
['all|file|all|sysop|edit'] = 'Wikipedia fully-protected files',<br />
['all|project|all|sysop|edit'] = 'Wikipedia fully-protected project pages',<br />
['all|talk|all|sysop|edit'] = 'Wikipedia fully-protected talk pages',<br />
['all|template|all|sysop|edit'] = 'Wikipedia fully protected templates',<br />
['all|user|all|sysop|edit'] = 'Wikipedia fully protected user and user talk pages',<br />
['all|module|all|all|edit'] = 'Wikipedia fully-protected modules',<br />
['all|module|all|templateeditor|edit'] = 'Wikipedia template-protected modules',<br />
['all|module|all|autoconfirmed|edit'] = 'Wikipedia semi-protected modules',<br />
['all|all|all|sysop|move'] = 'Wikipedia move-protected pages',<br />
['indef|all|all|sysop|move'] = 'Wikipedia indefinitely move-protected pages',<br />
['all|all|dispute|sysop|move'] = 'Wikipedia pages move-protected due to dispute',<br />
['all|all|vandalism|sysop|move'] = 'Wikipedia pages move-protected due to vandalism',<br />
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',<br />
['all|portal|all|sysop|move'] = 'Wikipedia move-protected portals',<br />
['all|project|all|sysop|move'] = 'Wikipedia move-protected project pages',<br />
['all|talk|all|sysop|move'] = 'Wikipedia move-protected talk pages',<br />
['all|template|all|sysop|move'] = 'Wikipedia move-protected templates',<br />
['all|user|all|sysop|move'] = 'Wikipedia move-protected user and user talk pages',<br />
['all|all|all|autoconfirmed|autoreview'] = 'Wikipedia pending changes protected pages',<br />
['all|file|all|all|upload'] = 'Wikipedia upload-protected files',<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Expiry category config<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table configures the expiry category behaviour for each protection<br />
-- action.<br />
-- * If set to true, setting that action will always categorise the page if<br />
-- an expiry parameter is not set.<br />
-- * If set to false, setting that action will never categorise the page.<br />
-- * If set to nil, the module will categorise the page if:<br />
-- 1) an expiry parameter is not set, and<br />
-- 2) a reason is provided, and<br />
-- 3) the specified reason is not blacklisted in the reasonsWithoutExpiryCheck<br />
-- table.<br />
<br />
expiryCheckActions = {<br />
edit = nil,<br />
move = false,<br />
autoreview = true,<br />
upload = false<br />
},<br />
<br />
reasonsWithoutExpiryCheck = {<br />
blp = true,<br />
template = true,<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Pagetypes<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table produces the page types available with the ${PAGETYPE} parameter.<br />
-- Keys are namespace numbers, or the string "default" for the default value.<br />
pagetypes = {<br />
[0] = 'article',<br />
[6] = 'file',<br />
[10] = 'template',<br />
[14] = 'category',<br />
[828] = 'module',<br />
default = 'page'<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Strings marking indefinite protection<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table contains values passed to the expiry parameter that mean the page<br />
-- is protected indefinitely.<br />
indefStrings = {<br />
['indef'] = true,<br />
['indefinite'] = true,<br />
['indefinitely'] = true,<br />
['infinite'] = true,<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Group hierarchy<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table maps each group to all groups that have a superset of the original<br />
-- group's page editing permissions.<br />
hierarchy = {<br />
sysop = {},<br />
reviewer = {'sysop'},<br />
filemover = {'sysop'},<br />
templateeditor = {'sysop'},<br />
extendedconfirmed = {'sysop'},<br />
autoconfirmed = {'reviewer', 'filemover', 'templateeditor', 'extendedconfirmed'},<br />
user = {'autoconfirmed'},<br />
['*'] = {'user'}<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- Wrapper templates and their default arguments<br />
--------------------------------------------------------------------------------<br />
<br />
-- This table contains wrapper templates used with the module, and their<br />
-- default arguments. Templates specified in this table should contain the<br />
-- following invocation, and no other template content:<br />
--<br />
-- {{#invoke:Protection banner|main}}<br />
--<br />
-- If other content is desired, it can be added between<br />
-- <noinclude>...</noinclude> tags.<br />
--<br />
-- When a user calls one of these wrapper templates, they will use the<br />
-- default arguments automatically. However, users can override any of the<br />
-- arguments.<br />
wrappers = {<br />
['Template:Pp'] = {},<br />
['Template:Pp-extended'] = {'ecp'},<br />
['Template:Pp-blp'] = {'blp'},<br />
-- we don't need Template:Pp-create<br />
['Template:Pp-dispute'] = {'dispute'},<br />
['Template:Pp-main-page'] = {'mainpage'},<br />
['Template:Pp-move'] = {action = 'move'},<br />
['Template:Pp-move-dispute'] = {'dispute', action = 'move'},<br />
-- we don't need Template:Pp-move-indef<br />
['Template:Pp-move-vandalism'] = {'vandalism', action = 'move'},<br />
['Template:Pp-office'] = {'office'},<br />
['Template:Pp-office-dmca'] = {'dmca'},<br />
['Template:Pp-pc'] = {action = 'autoreview', small = true},<br />
['Template:Pp-pc1'] = {action = 'autoreview', small = true},<br />
['Template:Pp-reset'] = {'reset'},<br />
['Template:Pp-semi-indef'] = {small = true},<br />
['Template:Pp-sock'] = {'sock'},<br />
['Template:Pp-template'] = {'template', small = true},<br />
['Template:Pp-upload'] = {action = 'upload'},<br />
['Template:Pp-usertalk'] = {'usertalk'},<br />
['Template:Pp-vandalism'] = {'vandalism'},<br />
},<br />
<br />
--------------------------------------------------------------------------------<br />
-- <br />
-- MESSAGES<br />
-- <br />
--------------------------------------------------------------------------------<br />
<br />
msg = {<br />
<br />
--------------------------------------------------------------------------------<br />
-- Intro blurb and intro fragment<br />
--------------------------------------------------------------------------------<br />
<br />
-- These messages specify what is produced by the ${INTROBLURB} and<br />
-- ${INTROFRAGMENT} parameters. If the protection is temporary they use the<br />
-- intro-blurb-expiry or intro-fragment-expiry, and if not they use<br />
-- intro-blurb-noexpiry or intro-fragment-noexpiry.<br />
-- It is possible to use banner parameters in these messages.<br />
['intro-blurb-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY}.',<br />
['intro-blurb-noexpiry'] = '${PROTECTIONBLURB}.',<br />
['intro-fragment-expiry'] = '${PROTECTIONBLURB} until ${EXPIRY},',<br />
['intro-fragment-noexpiry'] = '${PROTECTIONBLURB}',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Tooltip blurb<br />
--------------------------------------------------------------------------------<br />
<br />
-- These messages specify what is produced by the ${TOOLTIPBLURB} parameter.<br />
-- If the protection is temporary the tooltip-blurb-expiry message is used, and<br />
-- if not the tooltip-blurb-noexpiry message is used.<br />
-- It is possible to use banner parameters in these messages.<br />
['tooltip-blurb-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY}.',<br />
['tooltip-blurb-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}.',<br />
['tooltip-fragment-expiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL} until ${EXPIRY},',<br />
['tooltip-fragment-noexpiry'] = 'This ${PAGETYPE} is ${PROTECTIONLEVEL}',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Special explanation blurb<br />
--------------------------------------------------------------------------------<br />
<br />
-- An explanation blurb for pages that cannot be unprotected, e.g. for pages<br />
-- in the MediaWiki namespace.<br />
-- It is possible to use banner parameters in this message.<br />
['explanation-blurb-nounprotect'] = 'See the [[Wikipedia:Protection policy|'<br />
.. 'protection policy]] and ${PROTECTIONLOG} for more details.'<br />
.. ' Please discuss any changes on the ${TALKPAGE}; you'<br />
.. ' may ${EDITREQUEST} to ask an'<br />
.. ' [[Wikipedia:Administrators|administrator]] to make an edit if it'<br />
.. ' is [[Help:Minor edit#When to mark an edit as a minor edit'<br />
.. '|uncontroversial]] or supported by [[Wikipedia:Consensus'<br />
.. '|consensus]].',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Protection log display values<br />
--------------------------------------------------------------------------------<br />
<br />
-- These messages determine the display values for the protection log link<br />
-- or the pending changes log link produced by the ${PROTECTIONLOG} parameter.<br />
-- It is possible to use banner parameters in these messages.<br />
['protection-log-display'] = 'protection log',<br />
['pc-log-display'] = 'pending changes log',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Current version display values<br />
--------------------------------------------------------------------------------<br />
<br />
-- These messages determine the display values for the page history link<br />
-- or the move log link produced by the ${CURRENTVERSION} parameter.<br />
-- It is possible to use banner parameters in these messages.<br />
['current-version-move-display'] = 'current title',<br />
['current-version-edit-display'] = 'current version',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Talk page<br />
--------------------------------------------------------------------------------<br />
<br />
-- This message determines the display value of the talk page link produced<br />
-- with the ${TALKPAGE} parameter.<br />
-- It is possible to use banner parameters in this message.<br />
['talk-page-link-display'] = 'talk page',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Edit requests<br />
--------------------------------------------------------------------------------<br />
<br />
-- This message determines the display value of the edit request link produced<br />
-- with the ${EDITREQUEST} parameter.<br />
-- It is possible to use banner parameters in this message.<br />
['edit-request-display'] = 'submit an edit request',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Expiry date format<br />
--------------------------------------------------------------------------------<br />
<br />
-- This is the format for the blurb expiry date. It should be valid input for<br />
-- the first parameter of the #time parser function.<br />
['expiry-date-format'] = 'F j, Y "at" H:i e',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Tracking categories<br />
--------------------------------------------------------------------------------<br />
<br />
-- These messages determine which tracking categories the module outputs.<br />
['tracking-category-incorrect'] = 'Wikipedia pages with incorrect protection templates',<br />
['tracking-category-template'] = 'Wikipedia template-protected pages other than templates and modules',<br />
<br />
--------------------------------------------------------------------------------<br />
-- Images<br />
--------------------------------------------------------------------------------<br />
<br />
-- These are images that are not defined by their protection action and protection level.<br />
['image-filename-indef'] = 'Full-protection-shackle.svg',<br />
['image-filename-default'] = 'Transparent.gif',<br />
<br />
--------------------------------------------------------------------------------<br />
-- End messages<br />
--------------------------------------------------------------------------------<br />
}<br />
<br />
--------------------------------------------------------------------------------<br />
-- End configuration<br />
--------------------------------------------------------------------------------<br />
}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Sidebar&diff=2653Module:Sidebar2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>--<br />
-- This module implements {{Sidebar}}<br />
--<br />
require('Module:No globals')<br />
<br />
local p = {}<br />
<br />
local getArgs = require('Module:Arguments').getArgs<br />
local navbar = require('Module:Navbar')._navbar<br />
<br />
local function trimAndAddAutomaticNewline(s)<br />
-- For compatibility with the original {{sidebar with collapsible lists}}<br />
-- implementation, which passed some parameters through {{#if}} to trim<br />
-- their whitespace. This also triggered the automatic newline behavior.<br />
-- ([[meta:Help:Newlines and spaces#Automatic newline]])<br />
s = mw.ustring.gsub(s, "^%s*(.-)%s*$", "%1")<br />
if mw.ustring.find(s, '^[#*:;]') or mw.ustring.find(s, '^{|') then<br />
return '\n' .. s<br />
else<br />
return s<br />
end<br />
end<br />
<br />
local function hasSubgroup(s)<br />
if mw.ustring.find(s, 'vertical%-navbox%-subgroup') then<br />
return true<br />
else<br />
return false<br />
end<br />
end<br />
<br />
function p.sidebar(frame, args)<br />
if not args then<br />
args = getArgs(frame)<br />
end<br />
local root = mw.html.create()<br />
local child = args.child and mw.text.trim(args.child) == 'yes'<br />
<br />
root = root:tag('table')<br />
if not child then<br />
root <br />
:addClass('vertical-navbox')<br />
:addClass(args.wraplinks ~= 'true' and 'nowraplinks' or nil)<br />
:addClass(args.bodyclass or args.class)<br />
:css('float', args.float or 'right')<br />
:css('clear', (args.float == 'none' and 'both') or args.float or 'right')<br />
:css('width', args.width or '22.0em')<br />
:css('margin', args.float == 'left' and '0 1.0em 1.0em 0' or '0 0 1.0em 1.0em')<br />
:css('background', '#f9f9f9')<br />
:css('border', '1px solid #aaa')<br />
:css('padding', '0.2em')<br />
:css('border-spacing', '0.4em 0')<br />
:css('text-align', 'center')<br />
:css('line-height', '1.4em')<br />
:css('font-size', '88%')<br />
:cssText(args.bodystyle or args.style)<br />
<br />
if args.outertitle then<br />
root<br />
:tag('caption')<br />
:addClass(args.outertitleclass)<br />
:css('padding-bottom', '0.2em')<br />
:css('font-size', '125%')<br />
:css('line-height', '1.2em')<br />
:css('font-weight', 'bold')<br />
:cssText(args.outertitlestyle)<br />
:wikitext(args.outertitle)<br />
end<br />
<br />
if args.topimage then<br />
local imageCell = root:tag('tr'):tag('td')<br />
<br />
imageCell<br />
:addClass(args.topimageclass)<br />
:css('padding', '0.4em 0')<br />
:cssText(args.topimagestyle)<br />
:wikitext(args.topimage)<br />
<br />
if args.topcaption then<br />
imageCell<br />
:tag('div')<br />
:css('padding-top', '0.2em')<br />
:css('line-height', '1.2em')<br />
:cssText(args.topcaptionstyle)<br />
:wikitext(args.topcaption)<br />
end<br />
end<br />
<br />
if args.pretitle then<br />
root<br />
:tag('tr')<br />
:tag('td')<br />
:addClass(args.pretitleclass)<br />
:cssText(args.basestyle)<br />
:css('padding-top', args.topimage and '0.2em' or '0.4em')<br />
:css('line-height', '1.2em')<br />
:cssText(args.pretitlestyle)<br />
:wikitext(args.pretitle)<br />
end<br />
else<br />
root<br />
:addClass('vertical-navbox-subgroup')<br />
:css('width', '100%')<br />
:css('margin', '0px')<br />
:css('border-spacing', '0px')<br />
:addClass(args.bodyclass or args.class)<br />
:cssText(args.bodystyle or args.style)<br />
end<br />
<br />
if args.title then<br />
if child then<br />
root<br />
:wikitext(args.title)<br />
else<br />
root<br />
:tag('tr')<br />
:tag('th')<br />
:addClass(args.titleclass)<br />
:cssText(args.basestyle)<br />
:css('padding', '0.2em 0.4em 0.2em')<br />
:css('padding-top', args.pretitle and 0)<br />
:css('font-size', '145%')<br />
:css('line-height', '1.2em')<br />
:cssText(args.titlestyle)<br />
:wikitext(args.title)<br />
end<br />
end<br />
<br />
if args.image then<br />
local imageCell = root:tag('tr'):tag('td')<br />
<br />
imageCell<br />
:addClass(args.imageclass)<br />
:css('padding', '0.2em 0 0.4em')<br />
:cssText(args.imagestyle)<br />
:wikitext(args.image)<br />
<br />
if args.caption then<br />
imageCell<br />
:tag('div')<br />
:css('padding-top', '0.2em')<br />
:css('line-height', '1.2em')<br />
:cssText(args.captionstyle)<br />
:wikitext(args.caption)<br />
end<br />
end<br />
<br />
if args.above then<br />
root<br />
:tag('tr')<br />
:tag('td')<br />
:addClass(args.aboveclass)<br />
:css('padding', '0.3em 0.4em 0.3em')<br />
:css('font-weight', 'bold')<br />
:cssText(args.abovestyle)<br />
:newline() -- newline required for bullet-points to work<br />
:wikitext(args.above)<br />
end<br />
<br />
local rowNums = {}<br />
for k, v in pairs(args) do<br />
k = '' .. k<br />
local num = k:match('^heading(%d+)$') or k:match('^content(%d+)$')<br />
if num then table.insert(rowNums, tonumber(num)) end<br />
end<br />
table.sort(rowNums)<br />
-- remove duplicates from the list (e.g. 3 will be duplicated if both heading3 and content3 are specified)<br />
for i = #rowNums, 1, -1 do<br />
if rowNums[i] == rowNums[i - 1] then<br />
table.remove(rowNums, i)<br />
end<br />
end<br />
<br />
for i, num in ipairs(rowNums) do<br />
local heading = args['heading' .. num]<br />
if heading then<br />
root<br />
:tag('tr')<br />
:tag('th')<br />
:addClass(args.headingclass)<br />
:css('padding', '0.1em')<br />
:cssText(args.basestyle)<br />
:cssText(args.headingstyle)<br />
:cssText(args['heading' .. num .. 'style'])<br />
:newline()<br />
:wikitext(heading)<br />
end<br />
<br />
local content = args['content' .. num]<br />
if content then<br />
root<br />
:tag('tr')<br />
:tag('td')<br />
:addClass(args.contentclass)<br />
:css('padding', hasSubgroup(content) and '0.1em 0 0.2em' or '0 0.1em 0.4em')<br />
:cssText(args.contentstyle)<br />
:cssText(args['content' .. num .. 'style'])<br />
:newline()<br />
:wikitext(content)<br />
:done()<br />
:newline() -- Without a linebreak after the </td>, a nested list like "* {{hlist| ...}}" doesn't parse correctly.<br />
end<br />
end<br />
<br />
if args.below then<br />
root<br />
:tag('tr')<br />
:tag('td')<br />
:addClass(args.belowclass)<br />
:css('padding', '0.3em 0.4em 0.3em')<br />
:css('font-weight', 'bold')<br />
:cssText(args.belowstyle)<br />
:newline()<br />
:wikitext(args.below)<br />
end<br />
<br />
if not child then<br />
local navbarArg = args.navbar or args.tnavbar<br />
if navbarArg ~= 'none' and navbarArg ~= 'off' and (args.name or frame:getParent():getTitle():gsub('/sandbox$', '') ~= 'Template:Sidebar') then<br />
root<br />
:tag('tr')<br />
:tag('td')<br />
:css('text-align', 'right')<br />
:css('font-size', '115%')<br />
:cssText(args.navbarstyle or args.tnavbarstyle)<br />
:wikitext(navbar{<br />
args.name,<br />
mini = 1,<br />
fontstyle = args.navbarfontstyle or args.tnavbarfontstyle<br />
})<br />
end<br />
end<br />
<br />
return tostring(root) .. (child and '[[Category:Pages using sidebar with the child parameter]]' or '')<br />
end<br />
<br />
function p.collapsible(frame)<br />
local args = getArgs(frame)<br />
<br />
args.abovestyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.abovestyle or '')<br />
args.belowstyle = 'border-top: 1px solid #aaa; border-bottom: 1px solid #aaa;' .. (args.belowstyle or '')<br />
args.navbarstyle = 'padding-top: 0.6em;' .. (args.navbarstyle or args.tnavbarstyle or '')<br />
if not args.name and frame:getParent():getTitle():gsub('/sandbox$', '') == 'Template:Sidebar with collapsible lists' then<br />
args.navbar = 'none'<br />
end<br />
<br />
local contentArgs = {}<br />
<br />
for k, v in pairs(args) do<br />
local num = string.match(k, '^list(%d+)$')<br />
if num then<br />
local expand = args.expanded and (args.expanded == 'all' or args.expanded == args['list' .. num .. 'name'])<br />
<br />
local row = mw.html.create('div')<br />
row<br />
:addClass('NavFrame')<br />
:addClass((not expand) and 'collapsed' or nil)<br />
:css('border', 'none')<br />
:css('padding', 0)<br />
:cssText(args.listframestyle)<br />
:cssText(args['list' .. num .. 'framestyle'])<br />
:tag('div')<br />
:addClass('NavHead')<br />
:addClass(args.listtitleclass)<br />
:css('font-size', '105%')<br />
:css('background', 'transparent')<br />
:css('text-align', 'left')<br />
:cssText(args.basestyle)<br />
:cssText(args.listtitlestyle)<br />
:cssText(args['list' .. num .. 'titlestyle'])<br />
:wikitext(trimAndAddAutomaticNewline(args['list' .. num .. 'title'] or 'List'))<br />
:done()<br />
:tag('div')<br />
:addClass('NavContent')<br />
:addClass(args.listclass)<br />
:addClass(args['list' .. num .. 'class'])<br />
:css('font-size', '105%')<br />
:css('padding', '0.2em 0 0.4em')<br />
:css('text-align', 'center')<br />
:cssText(args.liststyle)<br />
:cssText(args['list' .. num .. 'style'])<br />
:wikitext(trimAndAddAutomaticNewline(args['list' .. num]))<br />
<br />
contentArgs['content' .. num] = tostring(row)<br />
end<br />
end<br />
<br />
for k, v in pairs(contentArgs) do<br />
args[k] = v<br />
end<br />
<br />
return p.sidebar(frame, args)<br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:TableTools&diff=2655Module:TableTools2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>--[[<br />
------------------------------------------------------------------------------------<br />
-- TableTools --<br />
-- --<br />
-- This module includes a number of functions for dealing with Lua tables. --<br />
-- It is a meta-module, meant to be called from other Lua modules, and should --<br />
-- not be called directly from #invoke. --<br />
------------------------------------------------------------------------------------<br />
--]]<br />
<br />
local libraryUtil = require('libraryUtil')<br />
<br />
local p = {}<br />
<br />
-- Define often-used variables and functions.<br />
local floor = math.floor<br />
local infinity = math.huge<br />
local checkType = libraryUtil.checkType<br />
local checkTypeMulti = libraryUtil.checkTypeMulti<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- isPositiveInteger<br />
--<br />
-- This function returns true if the given value is a positive integer, and false<br />
-- if not. Although it doesn't operate on tables, it is included here as it is<br />
-- useful for determining whether a given table key is in the array part or the<br />
-- hash part of a table.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.isPositiveInteger(v)<br />
return type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- isNan<br />
--<br />
-- This function returns true if the given number is a NaN value, and false<br />
-- if not. Although it doesn't operate on tables, it is included here as it is<br />
-- useful for determining whether a value can be a valid table key. Lua will<br />
-- generate an error if a NaN is used as a table key.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.isNan(v)<br />
return type(v) == 'number' and tostring(v) == '-nan'<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- shallowClone<br />
--<br />
-- This returns a clone of a table. The value returned is a new table, but all<br />
-- subtables and functions are shared. Metamethods are respected, but the returned<br />
-- table will have no metatable of its own.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.shallowClone(t)<br />
local ret = {}<br />
for k, v in pairs(t) do<br />
ret[k] = v<br />
end<br />
return ret<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- removeDuplicates<br />
--<br />
-- This removes duplicate values from an array. Non-positive-integer keys are<br />
-- ignored. The earliest value is kept, and all subsequent duplicate values are<br />
-- removed, but otherwise the array order is unchanged.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.removeDuplicates(t)<br />
checkType('removeDuplicates', 1, t, 'table')<br />
local isNan = p.isNan<br />
local ret, exists = {}, {}<br />
for i, v in ipairs(t) do<br />
if isNan(v) then<br />
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.<br />
ret[#ret + 1] = v<br />
else<br />
if not exists[v] then<br />
ret[#ret + 1] = v<br />
exists[v] = true<br />
end<br />
end <br />
end<br />
return ret<br />
end <br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- numKeys<br />
--<br />
-- This takes a table and returns an array containing the numbers of any numerical<br />
-- keys that have non-nil values, sorted in numerical order.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.numKeys(t)<br />
checkType('numKeys', 1, t, 'table')<br />
local isPositiveInteger = p.isPositiveInteger<br />
local nums = {}<br />
for k, v in pairs(t) do<br />
if isPositiveInteger(k) then<br />
nums[#nums + 1] = k<br />
end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- affixNums<br />
--<br />
-- This takes a table and returns an array containing the numbers of keys with the<br />
-- specified prefix and suffix. For example, for the table<br />
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will<br />
-- return {1, 3, 6}.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.affixNums(t, prefix, suffix)<br />
checkType('affixNums', 1, t, 'table')<br />
checkType('affixNums', 2, prefix, 'string', true)<br />
checkType('affixNums', 3, suffix, 'string', true)<br />
<br />
local function cleanPattern(s)<br />
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.<br />
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')<br />
return s<br />
end<br />
<br />
prefix = prefix or ''<br />
suffix = suffix or ''<br />
prefix = cleanPattern(prefix)<br />
suffix = cleanPattern(suffix)<br />
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'<br />
<br />
local nums = {}<br />
for k, v in pairs(t) do<br />
if type(k) == 'string' then <br />
local num = mw.ustring.match(k, pattern)<br />
if num then<br />
nums[#nums + 1] = tonumber(num)<br />
end<br />
end<br />
end<br />
table.sort(nums)<br />
return nums<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- numData<br />
--<br />
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table<br />
-- of subtables in the format <br />
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }<br />
-- Keys that don't end with an integer are stored in a subtable named "other".<br />
-- The compress option compresses the table so that it can be iterated over with<br />
-- ipairs.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.numData(t, compress)<br />
checkType('numData', 1, t, 'table')<br />
checkType('numData', 2, compress, 'boolean', true)<br />
local ret = {}<br />
for k, v in pairs(t) do<br />
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')<br />
if num then<br />
num = tonumber(num)<br />
local subtable = ret[num] or {}<br />
if prefix == '' then<br />
-- Positional parameters match the blank string; put them at the start of the subtable instead.<br />
prefix = 1<br />
end<br />
subtable[prefix] = v<br />
ret[num] = subtable<br />
else<br />
local subtable = ret.other or {}<br />
subtable[k] = v<br />
ret.other = subtable<br />
end<br />
end<br />
if compress then<br />
local other = ret.other<br />
ret = p.compressSparseArray(ret)<br />
ret.other = other<br />
end<br />
return ret<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- compressSparseArray<br />
--<br />
-- This takes an array with one or more nil values, and removes the nil values<br />
-- while preserving the order, so that the array can be safely traversed with<br />
-- ipairs.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.compressSparseArray(t)<br />
checkType('compressSparseArray', 1, t, 'table')<br />
local ret = {}<br />
local nums = p.numKeys(t)<br />
for _, num in ipairs(nums) do<br />
ret[#ret + 1] = t[num]<br />
end<br />
return ret<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- sparseIpairs<br />
--<br />
-- This is an iterator for sparse arrays. It can be used like ipairs, but can<br />
-- handle nil values.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
function p.sparseIpairs(t)<br />
checkType('sparseIpairs', 1, t, 'table')<br />
local nums = p.numKeys(t)<br />
local i = 0<br />
local lim = #nums<br />
return function ()<br />
i = i + 1<br />
if i <= lim then<br />
local key = nums[i]<br />
return key, t[key]<br />
else<br />
return nil, nil<br />
end<br />
end<br />
end<br />
<br />
--[[<br />
------------------------------------------------------------------------------------<br />
-- size<br />
--<br />
-- This returns the size of a key/value pair table. It will also work on arrays,<br />
-- but for arrays it is more efficient to use the # operator.<br />
------------------------------------------------------------------------------------<br />
--]]<br />
<br />
function p.size(t)<br />
checkType('size', 1, t, 'table')<br />
local i = 0<br />
for k in pairs(t) do<br />
i = i + 1<br />
end<br />
return i<br />
end<br />
<br />
<br />
local function defaultKeySort(item1, item2)<br />
-- "number" < "string", so numbers will be sorted before strings.<br />
local type1, type2 = type(item1), type(item2)<br />
if type1 ~= type2 then<br />
return type1 < type2<br />
else -- This will fail with table, boolean, function.<br />
return item1 < item2<br />
end<br />
end<br />
<br />
--[[<br />
Returns a list of the keys in a table, sorted using either a default<br />
comparison function or a custom keySort function.<br />
]]<br />
function p.keysToList(t, keySort, checked)<br />
if not checked then<br />
checkType('keysToList', 1, t, 'table')<br />
checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })<br />
end<br />
<br />
local list = {}<br />
local index = 1<br />
for key, value in pairs(t) do<br />
list[index] = key<br />
index = index + 1<br />
end<br />
<br />
if keySort ~= false then<br />
keySort = type(keySort) == 'function' and keySort or defaultKeySort<br />
<br />
table.sort(list, keySort)<br />
end<br />
<br />
return list<br />
end<br />
<br />
--[[<br />
Iterates through a table, with the keys sorted using the keysToList function.<br />
If there are only numerical keys, sparseIpairs is probably more efficient.<br />
]]<br />
function p.sortedPairs(t, keySort)<br />
checkType('sortedPairs', 1, t, 'table')<br />
checkType('sortedPairs', 2, keySort, 'function', true)<br />
<br />
local list = p.keysToList(t, keySort, true)<br />
<br />
local i = 0<br />
return function()<br />
i = i + 1<br />
local key = list[i]<br />
if key ~= nil then<br />
return key, t[key]<br />
else<br />
return nil, nil<br />
end<br />
end<br />
end<br />
<br />
--[[<br />
Returns true if all keys in the table are consecutive integers starting at 1.<br />
--]]<br />
function p.isArray(t)<br />
checkType("isArray", 1, t, "table")<br />
<br />
local i = 0<br />
for k, v in pairs(t) do<br />
i = i + 1<br />
if t[i] == nil then<br />
return false<br />
end<br />
end<br />
return true<br />
end<br />
<br />
-- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 }<br />
function p.invert(array)<br />
checkType("invert", 1, array, "table")<br />
<br />
local map = {}<br />
for i, v in ipairs(array) do<br />
map[v] = i<br />
end<br />
<br />
return map<br />
end<br />
<br />
--[[<br />
{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }<br />
--]]<br />
function p.listToSet(t)<br />
checkType("listToSet", 1, t, "table")<br />
<br />
local set = {}<br />
for _, item in ipairs(t) do<br />
set[item] = true<br />
end<br />
<br />
return set<br />
end<br />
<br />
--[[<br />
Recursive deep copy function.<br />
Preserves identities of subtables.<br />
<br />
]]<br />
local function _deepCopy(orig, includeMetatable, already_seen)<br />
-- Stores copies of tables indexed by the original table.<br />
already_seen = already_seen or {}<br />
<br />
local copy = already_seen[orig]<br />
if copy ~= nil then<br />
return copy<br />
end<br />
<br />
if type(orig) == 'table' then<br />
copy = {}<br />
for orig_key, orig_value in pairs(orig) do<br />
copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)<br />
end<br />
already_seen[orig] = copy<br />
<br />
if includeMetatable then<br />
local mt = getmetatable(orig)<br />
if mt ~= nil then<br />
local mt_copy = deepcopy(mt, includeMetatable, already_seen)<br />
setmetatable(copy, mt_copy)<br />
already_seen[mt] = mt_copy<br />
end<br />
end<br />
else -- number, string, boolean, etc<br />
copy = orig<br />
end<br />
return copy<br />
end<br />
<br />
function p.deepCopy(orig, noMetatable, already_seen)<br />
checkType("deepCopy", 3, already_seen, "table", true)<br />
<br />
return _deepCopy(orig, not noMetatable, already_seen)<br />
end<br />
<br />
--[[<br />
Concatenates all values in the table that are indexed by a number, in order.<br />
sparseConcat{ a, nil, c, d } => "acd"<br />
sparseConcat{ nil, b, c, d } => "bcd"<br />
]]<br />
function p.sparseConcat(t, sep, i, j)<br />
local list = {}<br />
<br />
local list_i = 0<br />
for _, v in p.sparseIpairs(t) do<br />
list_i = list_i + 1<br />
list[list_i] = v<br />
end<br />
<br />
return table.concat(list, sep, i, j)<br />
end<br />
<br />
--[[<br />
-- Finds the length of an array, or of a quasi-array with keys such<br />
-- as "data1", "data2", etc., using an exponental search algorithm. <br />
-- It is similar to the operator #, but may return<br />
-- a different value when there are gaps in the array portion of the table.<br />
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.<br />
-- Note: #frame.args in frame object always be set to 0, regardless of <br />
-- the number of unnamed template parameters, so use this function for<br />
-- frame.args.<br />
--]]<br />
<br />
function p.length(t, prefix)<br />
-- requiring module inline so that [[Module:Exponental search]]<br />
-- which is only needed by this one function<br />
-- doesn't get millions of transclusions<br />
local expSearch = require("Module:Exponential search")<br />
checkType('length', 1, t, 'table')<br />
checkType('length', 2, prefix, 'string', true)<br />
return expSearch(function(i)<br />
local key<br />
if prefix then<br />
key = prefix .. tostring(i)<br />
else<br />
key = i<br />
end<br />
return t[key] ~= nil<br />
end) or 0<br />
end<br />
function p.inArray(arr, valueToFind)<br />
checkType("inArray", 1, arr, "table")<br />
<br />
-- if valueToFind is nil, error?<br />
<br />
for _, v in ipairs(arr) do<br />
if v == valueToFind then<br />
return true<br />
end<br />
end<br />
<br />
return false<br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Transclusion_count&diff=2657Module:Transclusion count2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>local p = {}<br />
<br />
function p.fetch(frame)<br />
local template = nil<br />
local return_value = nil<br />
<br />
-- Use demo parameter if it exists, otherswise use current template name<br />
local namespace = mw.title.getCurrentTitle().namespace<br />
if frame.args["demo"] and frame.args["demo"] ~= "" then<br />
template = frame.args["demo"]<br />
elseif namespace == 10 then -- Template namespace<br />
template = mw.title.getCurrentTitle().text<br />
elseif namespace == 828 then -- Module namespace<br />
template = (mw.site.namespaces[828].name .. ":" .. mw.title.getCurrentTitle().text)<br />
end<br />
<br />
-- If in template or module namespace, look up count in /data<br />
if template ~= nil then<br />
namespace = mw.title.new(template, "Template").namespace<br />
if namespace == 10 or namespace == 828 then<br />
template = mw.ustring.gsub(template, "/doc$", "") -- strip /doc from end<br />
local index = mw.ustring.sub(mw.title.new(template).text,1,1)<br />
local data = mw.loadData('Module:Transclusion_count/data/' .. (mw.ustring.find(index, "%a") and index or "other"))<br />
return_value = tonumber(data[mw.ustring.gsub(template, " ", "_")])<br />
end<br />
end<br />
<br />
-- If database value doesn't exist, use value passed to template<br />
if return_value == nil and frame.args[1] ~= nil then<br />
local arg1=mw.ustring.match(frame.args[1], '[%d,]+')<br />
return_value = tonumber(frame:callParserFunction('formatnum', arg1, 'R'))<br />
end<br />
<br />
return return_value <br />
end<br />
<br />
return p</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Transclusion_count/data/N&diff=2659Module:Transclusion count/data/N2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>return {<br />
["N"] = 4700,<br />
["N/A"] = 14000,<br />
["N/a"] = 34000,<br />
["NA-Class"] = 14000,<br />
["NASTRO_comment"] = 27000,<br />
["NBA_Draft_template_list"] = 3100,<br />
["NBA_Year"] = 4900,<br />
["NBA_color"] = 4100,<br />
["NBA_color_cell"] = 4100,<br />
["NBA_color_cell2"] = 3100,<br />
["NBA_player_statistics_legend"] = 2700,<br />
["NBA_player_statistics_start"] = 2500,<br />
["NBbox"] = 3400,<br />
["NBbox/1"] = 3400,<br />
["NCAA_color_cell"] = 5200,<br />
["NCAA_secondary_color_cell"] = 2900,<br />
["NED"] = 8300,<br />
["NFLAltPrimaryColor"] = 6400,<br />
["NFLAltPrimaryStyle"] = 2700,<br />
["NFLAltSecondaryColor"] = 6900,<br />
["NFLPrimaryColor"] = 2600,<br />
["NFLPrimaryStyle"] = 24000,<br />
["NFLSecondaryColor"] = 16000,<br />
["NFL_Roster_navbox_template_list"] = 2400,<br />
["NFL_Year"] = 18000,<br />
["NFL_predraft"] = 3000,<br />
["NFL_predraft/check"] = 3000,<br />
["NFL_predraft/ftin"] = 3000,<br />
["NFT"] = 3500,<br />
["NFT_player"] = 25000,<br />
["NGA"] = 2600,<br />
["NHLE"] = 13000,<br />
["NHLS_url"] = 2100,<br />
["NLD"] = 9800,<br />
["NLM_content"] = 2800,<br />
["NOINDEX"] = 334000,<br />
["NOR"] = 7700,<br />
["NRDB_species"] = 3600,<br />
["NRHP-PA"] = 2600,<br />
["NRHPGoogleMapFootnote"] = 2400,<br />
["NRHP_Focus"] = 73000,<br />
["NRHP_color"] = 3600,<br />
["NRHP_date_for_lists"] = 3000,<br />
["NRHP_date_for_lists/dates"] = 3000,<br />
["NRHP_header"] = 3200,<br />
["NRHP_navigation_box"] = 5000,<br />
["NRHP_row"] = 3300,<br />
["NRHP_style"] = 67000,<br />
["NRHP_url"] = 27000,<br />
["NRHP_url/core"] = 29000,<br />
["NRISref"] = 71000,<br />
["NSWcity"] = 2300,<br />
["NSWcity/core"] = 2300,<br />
["NUMBEROFSECTIONS"] = 4100,<br />
["NYCS_br"] = 2600,<br />
["NYCS_time_2"] = 3000,<br />
["NZL"] = 6300,<br />
["NZ_electorate_link"] = 2100,<br />
["Nac"] = 4100,<br />
["Namespace_detect"] = 111000,<br />
["Namespace_detect_showall"] = 4200,<br />
["Nastaliq"] = 8400,<br />
["National_Heritage_List_for_England"] = 16000,<br />
["National_Rail_style"] = 4400,<br />
["National_Register_of_Historic_Places"] = 30000,<br />
["National_Register_of_Historic_Places_in_Massachusetts"] = 4300,<br />
["National_Register_of_Historic_Places_in_New_York"] = 5500,<br />
["National_Register_of_Historic_Places_in_North_Carolina"] = 2900,<br />
["National_Register_of_Historic_Places_in_Pennsylvania"] = 3200,<br />
["National_Register_of_Historic_Places_in_Virginia"] = 3100,<br />
["National_basketball_squad"] = 3200,<br />
["National_field_hockey_squad"] = 2800,<br />
["National_football_squad_end"] = 2500,<br />
["National_football_squad_start/styles.css"] = 2100,<br />
["National_squad"] = 26000,<br />
["National_squad_no_numbers"] = 11000,<br />
["Native_name"] = 8400,<br />
["Navbar"] = 8670000,<br />
["Navbar-collapsible"] = 12000,<br />
["Navbar-header"] = 57000,<br />
["Navbox"] = 2720000,<br />
["Navbox_Canada"] = 11000,<br />
["Navbox_Canada/styles.css"] = 11000,<br />
["Navbox_GR_munic"] = 3400,<br />
["Navbox_Musical_artist"] = 11000,<br />
["Navbox_decade_list"] = 9600,<br />
["Navbox_musical_artist"] = 201000,<br />
["Navbox_musical_artist/color"] = 201000,<br />
["Navbox_rugby_league_squad"] = 4700,<br />
["Navbox_season_by_team"] = 2900,<br />
["Navbox_with_collapsible_groups"] = 113000,<br />
["Navbox_with_collapsible_sections"] = 2300,<br />
["Navbox_with_columns"] = 21000,<br />
["Navboxes"] = 39000,<br />
["Navboxes_colour"] = 9100,<br />
["Navseasoncats"] = 242000,<br />
["Navseasoncats_with_decades_below_year"] = 115000,<br />
["Navsource"] = 2500,<br />
["Navy"] = 16000,<br />
["Navy/core"] = 16000,<br />
["Nay"] = 7900,<br />
["Nbay"] = 4900,<br />
["Nbsp"] = 365000,<br />
["Nbsp_to_space"] = 13000,<br />
["Ndash"] = 9400,<br />
["Nee"] = 2100,<br />
["NeilBrownPlayers"] = 3000,<br />
["New_York_Stock_Exchange"] = 2100,<br />
["New_user_bar"] = 57000,<br />
["Newbot"] = 3800,<br />
["Next_period"] = 15000,<br />
["Nihongo"] = 91000,<br />
["Nihongo2"] = 12000,<br />
["No"] = 5300,<br />
["No."] = 14000,<br />
["No2"] = 6900,<br />
["NoSpam"] = 4000,<br />
["NoSpamEmail"] = 17000,<br />
["No_footnotes"] = 53000,<br />
["No_ping"] = 329000,<br />
["No_plot"] = 3400,<br />
["No_redirect"] = 425000,<br />
["No_spam"] = 217000,<br />
["Nobold"] = 144000,<br />
["Nobold/styles.css"] = 144000,<br />
["Nobr"] = 2900,<br />
["Nobreak"] = 12000,<br />
["Noflag"] = 2000,<br />
["Noindex"] = 4500,<br />
["Noitalic"] = 3900,<br />
["Noitalic/styles.css"] = 3900,<br />
["Nom"] = 25000,<br />
["Nominated"] = 4400,<br />
["Non-admin_closure"] = 4900,<br />
["Non-diffusing_subcategory"] = 8800,<br />
["Non-free_2D_art"] = 5700,<br />
["Non-free_album_cover"] = 182000,<br />
["Non-free_audio_sample"] = 8800,<br />
["Non-free_biog-pic"] = 15000,<br />
["Non-free_book_cover"] = 45000,<br />
["Non-free_comic"] = 11000,<br />
["Non-free_fair_use"] = 17000,<br />
["Non-free_fair_use_in"] = 14000,<br />
["Non-free_film_screenshot"] = 5300,<br />
["Non-free_game_cover"] = 3900,<br />
["Non-free_game_screenshot"] = 3200,<br />
["Non-free_historic_image"] = 14000,<br />
["Non-free_image_data"] = 9100,<br />
["Non-free_image_rationale"] = 10000,<br />
["Non-free_in_US"] = 2200,<br />
["Non-free_logo"] = 152000,<br />
["Non-free_magazine_cover"] = 7000,<br />
["Non-free_media"] = 642000,<br />
["Non-free_media_data"] = 10000,<br />
["Non-free_media_rationale"] = 11000,<br />
["Non-free_movie_poster"] = 15000,<br />
["Non-free_poster"] = 83000,<br />
["Non-free_promotional"] = 9400,<br />
["Non-free_seal"] = 3200,<br />
["Non-free_symbol"] = 6400,<br />
["Non-free_television_screenshot"] = 16000,<br />
["Non-free_title-card"] = 3600,<br />
["Non-free_use_rationale"] = 427000,<br />
["Non-free_use_rationale_2"] = 152000,<br />
["Non-free_use_rationale_album_cover"] = 122000,<br />
["Non-free_use_rationale_book_cover"] = 16000,<br />
["Non-free_use_rationale_logo"] = 97000,<br />
["Non-free_use_rationale_poster"] = 36000,<br />
["Non-free_use_rationale_video_cover"] = 5600,<br />
["Non-free_use_rationale_video_game_cover"] = 7200,<br />
["Non-free_video_cover"] = 15000,<br />
["Non-free_video_game_cover"] = 17000,<br />
["Non-free_video_game_cover/platform"] = 16000,<br />
["Non-free_video_game_screenshot"] = 8700,<br />
["Non-free_video_game_screenshot/platform"] = 8100,<br />
["Non-free_with_permission"] = 2200,<br />
["Noping"] = 327000,<br />
["Noprint"] = 3700,<br />
["Noredirect"] = 7400,<br />
["Normalwraplink"] = 2800,<br />
["NorthAmNative"] = 2600,<br />
["North_America_topic"] = 3500,<br />
["Northern_Ireland_tasks"] = 18000,<br />
["NorwayProject"] = 2000,<br />
["Nospam"] = 9200,<br />
["Not-PD-US-expired-min-year"] = 27000,<br />
["Not_a_ballot"] = 6700,<br />
["Not_a_forum"] = 6300,<br />
["Not_a_typo"] = 5600,<br />
["Not_done"] = 15000,<br />
["Notability"] = 68000,<br />
["Notdone"] = 4500,<br />
["Note"] = 28000,<br />
["Note_label"] = 9600,<br />
["Notelist"] = 81000,<br />
["Notelist-lr"] = 2400,<br />
["Notelist-ua"] = 3500,<br />
["Notes"] = 5300,<br />
["Notice"] = 44000,<br />
["NovelsWikiProject"] = 22000,<br />
["Nowiki_="] = 3800,<br />
["Nowrap"] = 1170000,<br />
["Nrut"] = 2300,<br />
["Ns0"] = 255000,<br />
["Ns_has_subpages"] = 1510000,<br />
["Nsmdns"] = 2200,<br />
["Nts"] = 18000,<br />
["Ntsh"] = 2700,<br />
["Number_of_defined_parameters"] = 3500,<br />
["Number_table_sorting"] = 27000,<br />
["Number_table_sorting_hidden"] = 2700,<br />
["Numismaticnotice"] = 2200,<br />
["Nutshell"] = 3400,<br />
["Nw="] = 3800,<br />
["Module:NUMBEROF"] = 4100,<br />
["Module:Namespace_detect"] = 10400000,<br />
["Module:Namespace_detect/config"] = 12300000,<br />
["Module:Namespace_detect/data"] = 12300000,<br />
["Module:National_squad"] = 34000,<br />
["Module:Navbar"] = 14200000,<br />
["Module:Navbox"] = 3910000,<br />
["Module:Navbox_Canada"] = 11000,<br />
["Module:Navbox_with_collapsible_groups"] = 113000,<br />
["Module:Navboxes"] = 39000,<br />
["Module:Navseasoncats"] = 242000,<br />
["Module:Navseasoncats/navyear"] = 196000,<br />
["Module:No_globals"] = 14600000,<br />
["Module:No_ping"] = 329000,<br />
["Module:Ns_has_subpages"] = 1510000,<br />
["Module:Number_table_sorting"] = 29000,<br />
}</div>Abequinnhttps://wiki.raregamingdump.ca/index.php?title=Module:Yesno&diff=2661Module:Yesno2020-02-12T18:51:54Z<p>Abequinn: 1 revision imported</p>
<hr />
<div>-- Function allowing for consistent treatment of boolean-like wikitext input.<br />
-- It works similarly to the template {{yesno}}.<br />
<br />
return function (val, default)<br />
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you<br />
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the<br />
-- following line.<br />
val = type(val) == 'string' and val:lower() or val<br />
if val == nil then<br />
return nil<br />
elseif val == true <br />
or val == 'yes'<br />
or val == 'y'<br />
or val == 'true'<br />
or val == 't'<br />
or val == 'on'<br />
or tonumber(val) == 1<br />
then<br />
return true<br />
elseif val == false<br />
or val == 'no'<br />
or val == 'n'<br />
or val == 'false'<br />
or val == 'f'<br />
or val == 'off'<br />
or tonumber(val) == 0<br />
then<br />
return false<br />
else<br />
return default<br />
end<br />
end</div>Abequinn