Help:Guide for Administrators/Templates Modules and MediaWiki namespace
Guide for Administrators Templates, modules and the MediaWiki namespace |
A. Introduction[edit]
Templates are used to represent information in a consistent way across many different pages. In most cases, the information you pass to a template is the information you are trying to present in a standard way. Templates can be extended to perform some simple logic operations using parser functions. If the logic operation is not supported with parser functions alone you will need to use a module. Modules are scripted in Lua and one module can contain several different functions to perform different programing operations. The MediaWiki namespace is used to hold variables and other information meant to be presented in a consistent way across the site for things related to the MediaWiki software itself. All system variables are listed here.
B. Templates[edit]
Template:Page. The primary template for inserting page numbers and the scans of page images. Some templates were created to fix numbering errors and they are Template:Swpage and Template:Bwpage that use Module:SotW and Module:BahaiWorld respectively to calculate the correct page.
Template:Sic. Undocumented, this template allows editors to preserve mistakes in the original publication. When the template exists on a page there will be a toggle in the footer to see the original (with the errors) a comparison, or the corrected version (default). See the bottom of this page for an example.
Template:Ocr. This template notifies users that the page contains unproofread text, it also adds the page to the tracking category Category:Pages needing proofreading so it's important to include the template on public pages. This template is not used on private pages.
Template:Ps. This template is for tracking proofreading status (P.S.) of pages. The input is the number of times the page was proofread, and the page is then added to the appropriate tracking category. Eg if {{ps|1}} the page would appear in Category:Pages proofread once. The output of the template also links to the discussion page so that the user who completed the proofreading can sign their work and describe what has been done. For examples see these pages.
Template:T. A time tracking template used in transcripts of audio and video files. The expected input is the time in the audio corresponding to the transcript. It functions like the page template in that it offsets the info to the left of the page and also acts like a url anchor. Usage: {{t|5:43}}.
C. Modules[edit]
We do not use many modules here but the two listed above are Module:SotW and Module:BahaiWorld. I had uploaded a new version of some Baha'i World volumes and the new PDF had a different number of pages compared with the old one. Instead of re-running the OCR or going through and editing hundreds of page numbers on the site I created a module which accepts the volume and page number as an input, calculates the corresponding page in the PDF file, and then uses those values to populate a duplicate of the page template again (Template:Bwpage).
D. MediaWiki namespace[edit]
MediaWiki:Edittools is how you control the shortcuts below the "Save changes" button (in edit mode) that insert custom characters like Á Ú Ḍ Ḥ etc.
MediaWiki:Common.css applies the stylesheet across the entire site, for all skins.
MediaWiki:Common.js applies this javascript across the entire site.
MediaWiki:Chameleon.css applies this stylesheet only for those users of the 'Chameleon' skin (the default skin).
MediaWiki:Sidebar controls the items listed in the dropdown menus on this site, or in other MediaWikis the links that would appear in the sidebar on each page.
Note: Some style pages require adding the privilege 'interface administrator' to the user account before editing is allowed, to add privileges to an account see Special:UserRights.
Finding MediaWiki pages - Special:AllMessages is where you will find system generated words, text and sentences. Under "Items per page:" select 5,000 and then press filter. You can then search for the words or phrase in the system message to find the appropriate MediaWiki page. For example, on Category:1976 you will see Pages in category "1976" and This category contains 23 pages. This text will be controlled by some page in the MediaWiki namespace and you can figure out which page by looking in Special:AllMessages. After filtering to 5,000 rows search for "Pages in category" and you will find a reference to MediaWiki:Category header. You could edit that page to change the words Pages in category... that appears at the top of every category page.