Article standards and practices

From Spherical
Jump to: navigation, search

To those who would like to contribute to the wiki and/or edit existing articles, the following is a list of finalized standards and practices for formatting an article for inclusion on the wiki. The list is subject to change (expansion, most likely) at any time as deemed necessary.

Articles documenting Sphere functions

  1. Visit the Functions list and find the function you want to create/update the article for if you don't already have the link to it.
  2. If the article exists, simply edit the appropriate section as necessary. Follow existing editing guidelines as applicable.
  3. If the article does NOT exist, create it. For legacy functions, ideally the article existed previously so the Wayback Machine might have the old copy; use the data from that if possible.

There is a template functemp you can use to create the function article. Enter the following at the top of the article, replacing each REPLACEME as needed:

{{subst:functemp|preamble=REPLACEME|function=REPLACEME|object=REPLACEME|returns=REPLACEME|params=REPLACEME}}

As a wiki template, functemp can take parameters; some are optional:

  • preamble - the introductory text that will appear before the table of contents block; use this to provide a small description of what the function is used for.
  • function - the name of the function being described; if this is a method of an object you will need to use the object parameter.
  • object (OPTIONAL) - the name of the Sphere object to which the function is attached; must be a Sphere-specific object such as Color, Font, Image, Animation, etc; if the function is not attached to an object remove it from the generated text after the page has been saved.
  • returns (OPTIONAL) - the return type of the function; if the function doesn't return an object remove it from the generated text after the page has been saved.
  • params (OPTIONAL) - the parameters the function expects; if the function doesn't take parameters remove it from the generated text after the page has been saved.

Also make sure to add {{DISPLAYTITLE:nameOfFunctionOrObject(params)}} and [[Category:Sphere 2 API]] (or Sphere 1 API where appropriate).

There are also various "navboxes" that are meant to be transcluded in the footer of function articles. Find the navbox for the function in question and transclude it at the bottom of the article.