Draft:Help:Modules
A module on Bulbapedia is a page containing a programmed script intended for use on other articles. They are created by utilizing the Lua programming language available through the Scribunto MediaWiki extension. All modules on Bulbapedia are contained in the Module namespace, and are called via templates.
- For a more dedicated general explanation, see Wikipedia:Lua.
General aims and purpose
Bulbapedia and the Bulbagarden Archives utilize modules to create specific solutions to narrow problems. However, the use of templates is preferred in place of modules whenever possible. Because modules rely on programming code that is significantly different from the wikicode used on the rest of the encyclopedia, additional time and effort are required for editors to understand how they work. To ensure accessibility for all skill levels, the amount of new material editors must learn is intentionally kept to a minimum. Thus, the situations in which modules may be used are purposefully limited.
Use guidelines
The situations that utilize modules on Bulbapedia include, but are not limited to, functions not easily done with templates alone, and functions currently utilizing templates in a convoluted way but can be heavily simplified by means of modules.
Modules are not to be directly called into mainspace pages: each module must be included within a template, with said templates then called into mainspace pages. Consequently, if a specific functionality could make an equal amount of sense as part of the template or part of the module, it is expected to be on the template side. Modules should primarily be concerned with the underlying logic, whereas templates should primarily be concerned with the structure and styling. If a module requires a set of data to function, necessary data is stored on a related page in the Data namespace.
In order for a module to be implemented into the wiki mainspaces, it must have the following:
- An appropriate use-case approved by the Leadership Board
- A sample template that shows examples of the aforementioned use-case
- A documentation page detailing the function and use, with design comments and maintenance notes as needed to facilitate updates
Access
As part of the finalization process for modules, all completed modules are protected to prevent unnecessary server load and vandalism. Noticed issues, suggested changes, and update requests for completed modules can be made on the respective talk pages for said modules. Otherwise, the Module namespace can be edited freely, with the understanding that only approved modules can be implemented.
Due to the wide-reaching implementation of certain modules, editing the associated Data namespace is restricted to Extended Confirmed users, with access granted or revoked as needed.
Approval
In order to ensure the standards for modules are being met, each new use-case for a module must be approved by the Leadership Board. It is recommended to seek approval prior to creating a module. Proposals can be made on Help talk:Module or Bulbapedia Project talk pages. New modules can be drafted at [[Module:<draft>]]. Once modules have been drafted and tested, and their respective design and maintenance documentation and wrapper templates created, they will be reviewed by the Leadership Board for implementation. Drafted modules that do not meet the standards necessary may be deleted at the discretion of Bulbapedia:Staff. Module pages left unfinished for an extended period of time will be deleted.
List of approved modules and functions
- Module:Repeat - to repeat a provided input a specified number of times
- Module:TypeEffectiveness – to simplify the amount of exceptions affecting Weakness and Resistance caused by Abilities, items, and other circumstances
- Module:GameLink <tentative> – to simplify linking to sequential games with varied page titles
- Module:Epicode2Title <tentative> – to provide a singular place to update for templates calling epicodes
- No categories associated with this article