How to infobox

From Sciencemadness Wiki
Revision as of 17:38, 12 August 2015 by Zts16 (Talk | contribs) (Created page with "Infoboxes are relatively new here, and most of you are probably not sure how to make them and fill them in. Don't worry, they're pretty simple to use once you get used to them...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Infoboxes are relatively new here, and most of you are probably not sure how to make them and fill them in. Don't worry, they're pretty simple to use once you get used to them, and this page should tell you everything you need to know about them.

Creating an Infobox

When you want to add an infobox to a page (currently there are two flavors: a generic chemical infobox for chemical compounds, and an element infobox for elements, which are both somewhat modified versions of the ones that Wikipedia uses), use one of the boilerplate templates, selected by the dropdown menu at the top right, and insert it at the top of the page (second button). A giant, daunting column of text should appear in the editor. This is the code for the infobox. It contains every possible field that the infobox may have. All of them are optional, so don't feel obligated to fill in every single line. But don't delete lines that you don't use, because someone else may come along and fill them in, and leaving blank fields in the code is harmless and doesn't affect the appearance of the published infobox.

Entering Data

Each field has a title, and then a = sign. The value that needs to go in the field goes after the = sign. Some fields are smart, and have code in the module page that makes them automatically convert units and print the unit next to the number. For instance, entering a melting point in degrees Celsius in the "MeltingPtC" field (the number only) will return the value followed by °C and also return the value converted to Fahrenheit and Kelvin. It's really neat and saves a lot of work. Most fields that always use a standard unit will do this, including things like density, enthalpy, and electronegativity as well as melting and boiling point.

Adding Images

To add an image, enter the name of the image that you want to use in an image field in the infobox, such as "ImageFile". If you want to specifically size the image, you can enter a pixel width in "ImageSize" although this isn't necessary, and if it is left out, it will automatically scale it to 250p which is a good size for an infobox. Image fields with titles like "ImageFileR1" and "ImageFileL1" are used if one wishes to place two small images side by side in the infobox. This can be useful for adding an image of the substance, and then a couple different diagrams or a diagram and a different image. The "ImageName" fields are used to provide captions to go with the images.


This page is a work in progress and will be updated occasionally with more information.