Help:Editing

From Glossary of Meteorology

This page documents the improvements that were made to the editing of the glossary wiki. Broadly, the improvements were:

  1. adding Template:Term and Form:Term to format the appearance of term pages
  2. installing the math extension
  3. improving control over where ads are shown
  4. moving the copyright notice to the site footer rather than a template

Improvement to the Glossary Pages[edit source]

A form, Form:Term, was created for the PageForms extension. The form allows for inputting the different parts of a term into distinct fields that are then automatically converted to the appropriate template calls in the wikitext.

The fields used are:

  • the version of the title to display (optional, defaults to the page name with the first letter automatically capitalized by MediaWiki)
  • the definitions (at least one is required)
  • a single page with more details to link to (optional)
  • a list of pages with related content to link to (optional)

and the overall term gets rendered using Template:Term.

Terms can have more than one definition, where each definition includes:

  • the ordinal number of the definition in the term (defaults to 1, only used if there are multiple definitions on a page)
  • a short definition (recommended)
  • an abbreviation (optional)
  • a more detailed explanation of the definition (optional)
  • a list of pages for synonyms to link to (optional)

The individual definitions are then rendered using Template:Definition.

While the form can be manually triggered on a page, e.g. Special:FormEdit/term/Amplitude allows editing the page Amplitude using the form, usually forms are accessed via a helpful input bar that provides a place to specify the title and search for existing pages on the wiki. The form then loads for the specified page and will be pre-filled with content if the page already exists. You can start at the form page itself, Form:Term, or below:


The input bar above, along with the one on Form:Term, is created with the following wikitext, which can be used on other pages as well:

{{#forminput: form=Term
  |button text=Add or Edit Term
  |autocomplete on category=Terms
  |Term[Display title]
}}

Converting existing terms manually[edit source]

This process can be used to convert existing terms to use the new system:

  1. Edit the Term page.
  2. Copy all the raw wikitext out of the page into a word processor or similar application.
  3. Blank the wiki page and save it.
  4. Enter the title of the (now blank) page into the form input above.
  5. Manually copy and paste the old contents of the page from your word processor into the form.

Installed Math[edit source]

We installed the math extension on this wiki to improve the display of mathematical formulae. While formulae can be written directly into the wikitext, the math extension also integrates very well with the the VisualEditor extension to produce a simpler process for editing math snippets.

VisualEditor Formula Insert Menu-en.png

To add a new mathematical formula to the page, place your cursor where you want it to be inserted and press on the "Math formula" icon ("Σ") in the "Insert" menu on the toolbar. See the screenshot on the left.

VisualEditor formula-en.png

A window will open in which you can type the formula using LaTeX syntax. The visual editor will update the formula as you type it, so you can see how it will look as you make changes. Once you are happy with the formula, press the "Insert" button. See the screenshot on the right.


VisualEditor - editing existing mathematical formula.png

To edit an existing mathematical formula on the page, press on it and then press on the "Σ" icon that appears. This will open up the formula window, where you make changes.

Mathematical formulae can be placed inline or centered as a block.

VisualEditor mathematic formula inline.png

Improved Google Ad Slot[edit source]

To control where Google ads should be shown, add the following snippet to the HTML output of the page:

<div id="div-gpt-ad-1651607437305-0"></div>

This can be done either on a per-page basis or for multiple pages by adding it within a template (like all terms via Template:Term). It can also be inserted automatically in the site configuration to appear on every page if requested.

Improved Copyright Section[edit source]

Previously, a dedicated template, Template:TermFooter, was used to include a copyright statement. This had the disadvantage of needing to be included on every page that the copyright warning should be displayed.

Instead, on this wiki a system message, MediaWiki:Ametsoc-in-footer-disclaimer, is shown at the bottom of every page. As a result of living in the "MediaWiki namespace" this page can only be edited by users with the editinterface user right, usually limited to site administrators. The message text was created based on the copyright notice from the template. But, instead of hard-coding the year of the copyright, the message will now be updated automatically through the #time parser function (using {{#time: Y}}).

The message is displayed through a feature of the Chameleon skin, which is currently the only skin installed. Note that if another skin is installed on this wiki, the message will not be shown when using that skin unless additional handling is added.

Copyright 2024 American Meteorological Society (AMS). For permission to reuse any portion of this work, please contact permissions@ametsoc.org. Any use of material in this work that is determined to be “fair use” under Section 107 of the U.S. Copyright Act (17 U.S. Code § 107) or that satisfies the conditions specified in Section 108 of the U.S.Copyright Act (17 USC § 108) does not require AMS’s permission. Republication, systematic reproduction, posting in electronic form, such as on a website or in a searchable database, or other uses of this material, except as exempted by the above statement, require written permission or a license from AMS. Additional details are provided in the AMS Copyright Policy statement.