Module:Message box/configuration

来自Rotaeno中文维基

可在Module:Message box/configuration/doc创建此模块的帮助文档

local ambox = {
	types = {
		speedy = {
			class = 'ambox-speedy',
			image = 'Ambox warning.png'
		},
		delete = {
			class = 'ambox-delete',
			image = 'Ambox warning.png'
		},
		content = {
			class = 'ambox-content',
			image = 'Ambox important.png'
		},
		style = {
			class = 'ambox-style',
			image = 'Ambox edit-clear.png'
		},
		move = {
			class = 'ambox-move',
			image = 'Ambox move.png'
		},
		protection = {
			class = 'ambox-protection',
			image = 'Ambox protection.png'
		},
		notice = {
			class = 'ambox-notice',
			image = 'Ambox notice.png'
		}
	},
	default                     = 'notice',
	allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
	allowSmall                  = true,
	smallParam                  = 'left',
	smallClass                  = 'mbox-small-left',
	substCheck                  = true,
	classes                     = {'metadata', 'ambox'},
	usePlainlinksParam          = true,
	allowId                     = true,
	imageEmptyCell              = true,
	imageCheckBlank             = true,
	imageSmallSize              = '20x20px',
	imageCellDiv                = true,
	useCollapsibleTextFields    = true,
	imageRightNone              = true,
	sectionDefault              = '条目',
	allowMainspaceCategories    = true,
	templateCategory            = '条目讯息模板',
        templateCategoryRequireName = true,
	templateErrorCategory       = '缺少参数的条目讯息模板',
	templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
}

local cmbox = {
	types = {
		speedy = {
			class = 'cmbox-speedy',
			image = 'Ambox warning.png'
		},
		delete = {
			class = 'cmbox-delete',
			image = 'Ambox warning.png'
		},
		content = {
			class = 'cmbox-content',
			image = 'Ambox important.png'
		},
		style = {
			class = 'cmbox-style',
			image = 'Ambox edit-clear.png'
		},
		move = {
			class = 'cmbox-move',
			image = 'Ambox move.png'
		},
		protection = {
			class = 'cmbox-protection',
			image = 'Ambox protection.png'
		},
		notice = {
			class = 'cmbox-notice',
			image = 'Ambox notice.png'
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'cmbox'},
	usePlainlinksParam   = true,
	imageEmptyCell       = true
}

local fmbox = {
	types = {
		warning = {
			class = 'fmbox-warning',
			image = 'Ambox warning.png'
		},
		editnotice = {
			class = 'fmbox-editnotice',
			image = 'Ambox notice.png'
		},
		system = {
			class = 'fmbox-system',
			image = 'Ambox notice.png'
		}
	},
	default              = 'system',
	showInvalidTypeError = true,
	allowId                = true,
	classes              = {'fmbox'},
	usePlainlinksParam   = true,
	imageEmptyCell       = false,
	imageRightNone       = false
}

local imbox = {
	types = {
		speedy = {
			class = 'imbox-speedy',
			image = 'Ambox warning.png'
		},
		delete = {
			class = 'imbox-delete',
			image = 'Ambox warning.png'
		},
		content = {
			class = 'imbox-content',
			image = 'Ambox important.png'
		},
		style = {
			class = 'imbox-style',
			image = 'Ambox edit-clear.png'
		},
		move = {
			class = 'imbox-move',
			image = 'Ambox move.png'
		},
		protection = {
			class = 'imbox-protection',
			image = 'Ambox protection.png'
		},
		notice = {
			class = 'imbox-notice',
			image = 'Ambox notice.png'
		},
		license = {
			class = 'imbox-license',
			image = 'Imbox license.png'
		},
		featured = {
			class = 'imbox-featured',
			image = 'Cscr-featured.png' -- ?
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'imbox'},
	usePlainlinksParam   = true,
	imageEmptyCell       = true,
	below                = true,
	templateCategory     = '档案信息模板'
}

local ombox = {
	types = {
		speedy = {
			class = 'ombox-speedy',
			image = 'Ambox warning.png'
		},
		delete = {
			class = 'ombox-delete',
			image = 'Ambox warning.png'
		},
		content = {
			class = 'ombox-content',
			image = 'Ambox important.png'
		},
		style = {
			class = 'ombox-style',
			image = 'Ambox edit-clear.png'
		},
		move = {
			class = 'ombox-move',
			image = 'Ambox move.png'
		},
		protection = {
			class = 'ombox-protection',
			image = 'Ambox protection.png'
		},
		notice = {
			class = 'ombox-notice',
			image = 'Ambox notice.png'
		},
		note = {
			class = 'ombox-notice',
			image = 'Ambox notice.png'
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'ombox'},
	usePlainlinksParam   = true,
	allowSmall           = true,
	imageEmptyCell       = true,
	imageRightNone       = true
}

local tmbox = {
	types = {
		speedy = {
			class = 'tmbox-speedy',
			image = 'Ambox warning.png'
		},
		delete = {
			class = 'tmbox-delete',
			image = 'Ambox warning.png'
		},
		content = {
			class = 'tmbox-content',
			image = 'Ambox important.png'
		},
		style = {
			class = 'tmbox-style',
			image = 'Ambox edit-clear.png'
		},
		move = {
			class = 'tmbox-move',
			image = 'Ambox move.png'
		},
		protection = {
			class = 'tmbox-protection',
			image = 'Ambox protection.png'
		},
		notice = {
			class = 'tmbox-notice',
			image = 'Ambox notice.png'
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'tmbox'},
	usePlainlinksParam   = true,
	allowId              = true,
	allowSmall           = true,
	imageRightNone       = true,
	imageEmptyCell       = true,
	imageEmptyCellStyle  = true,
	templateCategory     = '讨论讯息模板'
}

return {
	ambox = ambox,
	cmbox = cmbox,
	fmbox = fmbox,
	imbox = imbox,
	ombox = ombox,
	tmbox = tmbox
}