Jump to content

Module:Message box/doc

From Simple English Wikipedia, the free encyclopedia
Revision as of 09:12, 8 October 2013 by Mr. Stradivarius (talk | changes) (add basic param table and type info)

This is the documentation page for Module:Message box


This module implements the message box templates {{mbox}}, {{ambox}}, {{cmbox}}, {{fmbox}}, {{imbox}}, {{ombox}}, and {{tmbox}}. It uses the same basic code for each of these templates; the differences between each of them are configured using the data at Module:Message box/configuration.

Usage from #invoke

{{#invoke:Message box|box type|parameters}}

There are seven available box types:

  • mbox - for message boxes to be used in multiple namespaces
  • ambox - for article message boxes
  • cmbox - for category message boxes
  • fmbox - for interface message boxes
  • imbox - for file namespace message boxes
  • tmbox - for talk page message boxes
  • ombox - for message boxes in other namespaces

Parameters

Parameters available to all box types

Parameters available to all box types
{{#invoke:Message box|box type
| type       = 
| id         = 
| style      = 
| textstyle  = 
| text       = 
| image      = 
| imageright = 
| nocat      = 
| page       = 
| demospace  = 
}}
type

The type parameter sets a standard box style and a standard image. These styles are based on commonly used message box functions. For example, there is a speedy type for speedy deletion messages, and an editnotice type for edit notices. Different templates support different types; you can find which templates support which types in the table below.

Type Supported by
speedy ambox, cmbox, imbox, ombox, tmbox
delete ambox, cmbox, imbox, ombox, tmbox
content ambox, cmbox, imbox, ombox, tmbox
style ambox, cmbox, imbox, ombox, tmbox
move ambox, cmbox, imbox, ombox, tmbox
protection ambox, cmbox, imbox, ombox, tmbox
notice ambox, cmbox, imbox, ombox, tmbox
warning fmbox
editnotice fmbox
system fmbox
license imbox
featured imbox

Parameters limited to specific box types

  • subst - depends on cfg.substCheck
  • small - depends on cfg.allowSmall
  • plainlinks - depends on cfg.usePlainlinksParam
  • name - depends on cfg.useCollapsibleTextFields
  • sect - depends on cfg.useCollapsibleTextFields
  • issue - depends on cfg.useCollapsibleTextFields
  • talk - depends on cfg.useCollapsibleTextFields
  • fix - depends on cfg.useCollapsibleTextFields
  • date - depends on cfg.useCollapsibleTextFields
  • info - depends on cfg.useCollapsibleTextFields
  • smalltext - depends on cfg.allowSmall
  • below - depends on cfg.below
  • smallimage - depends on cfg.allowSmall
  • smallimageright - depends on cfg.allowSmall
  • cat, cat1, cat2, cat3, ... - depends on cfg.useMainspaceCategories
  • category, category1, category2, category3, ... - depends on cfg.useMainspaceCategories
  • all, all1, all2, all3, ... - depends on cfg.useMainspaceCategories