跳转到内容

Module:Message box/configuration:修订间差异

轻之舟百科,让知识轻装启航
删除的内容 添加的内容
闲敲棋子落灯花​(留言 | 贡献)
创建页面,内容为“-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for Module:Message box. -- -------------------------------------------------------------------------------- return { -- Global styles applying to all *mboxes ['@glob…”
IdleTap-bot​(留言 | 贡献)
配置对齐求闻版:统一 mbox-* 类,替换不配套的 Wikimedia 标准版
第1行: 第1行:
local ambox = {
--------------------------------------------------------------------------------
types = {
-- Message box configuration --
speedy = {
-- --
class = 'mbox-speedy',
-- This module contains configuration data for [[Module:Message box]]. --
image = 'Cross Mark (Red).svg'
--------------------------------------------------------------------------------
},

delete = {
return {
class = 'mbox-delete',
-- Global styles applying to all *mboxes
image = 'Alert Mark (Red).svg'
['@global'] = {
},
templatestyles = 'Module:Message box/mbox.css'
content = {
class = 'mbox-content',
image = 'Alert Mark (Orange).svg'
},
style = {
class = 'mbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'mbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'mbox-notice',
image = 'Information Mark (Blue).svg'
},
note = {
class = 'mbox-notice',
image = 'Information Mark (Blue).svg'
},
license = {
class = 'mbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'mbox-featured',
image = 'Cscr-featured.svg'
},
policy = {
class = 'mbox-policy',
image = 'Policy Mark (Green).svg'
},
guideline = {
class = 'mbox-guideline',
image = 'Policy Mark (Blue).svg'
},
rule = {
class = 'mbox-rule',
image = 'Policy Mark (Orange).svg'
},
draft = {
class = 'mbox-draft',
image = 'Edit Mark (Gray).svg'
},
setindex = {
class = 'mbox-setindex',
image = 'List gray.svg'
},
disambig = {
class = 'mbox-disambig',
image = 'Disambig gray.svg'
}
},
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'mbox', 'ambox', 'metadata', 'plainlinks'},
allowId = true,
below = 'below',
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = '条目',
allowMainspaceCategories = true,
templateCategory = '条目信息模板',
templateCategoryRequireName = true,
templateErrorCategory = '缺少参数的条目信息模板',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'}
}


ambox = {
local fmbox = {
types = {
types = {
speedy = {
warning = {
class = 'ambox-speedy',
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
image = 'Alert Mark (Red).svg'
},
delete = {
class = 'ambox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ambox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'ambox-notice',
image = 'Information icon4.svg'
}
},
},
editnotice = {
default = 'notice',
class = 'fmbox-editnotice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
image = 'Information Mark (Blue).svg'
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'},
templatestyles = 'Template:Ambox/style.css'
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'cmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'cmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
},
system = {
default = 'notice',
class = 'fmbox-system',
showInvalidTypeError = true,
image = 'Information Mark (Blue).svg'
classes = {'cmbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
templatestyles = 'Template:Cmbox/style.css'
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'Ambox warning pn.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information icon4.svg'
},
system = {
class = 'fmbox-system',
image = 'Information icon4.svg'
}
},
},
copyright = {
default = 'system',
class = 'fmbox-editnotice fmbox-copyright',
showInvalidTypeError = true,
image = 'Edit Mark (Blue).svg'
allowId = true,
}
classes = {'fmbox'},
usePlainlinksParam = true,
imageEmptyCell = false,
imageRightNone = false,
templatestyles = 'Template:Fmbox/style.css'
},
},
default = 'system',
showInvalidTypeError = true,
imbox = {
allowId = true,
types = {
below = 'below',
speedy = {
classes = {'fmbox', 'plainlinks'},
class = 'imbox-speedy',
imageEmptyCell = false,
image = 'Ambox warning pn.svg'
imageRightNone = false
},
}
delete = {

class = 'imbox-delete',
local ombox = { -- all styles migrated to mbox
image = 'Ambox warning pn.svg'
types = {
},
content = {
speedy = {
class = 'imbox-content',
class = 'mbox-speedy',
image = 'Ambox important.svg'
image = 'Cross Mark (Red).svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox-license.svg'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
},
delete = {
default = 'notice',
class = 'mbox-delete',
showInvalidTypeError = true,
image = 'Alert Mark (Red).svg'
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
below = true,
templateCategory = '檔案訊息模板',
templatestyles = 'Template:Imbox/style.css'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'ombox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'ombox-content',
image = 'Ambox important.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
},
content = {
default = 'notice',
class = 'mbox-content',
showInvalidTypeError = true,
image = 'Alert Mark (Orange).svg'
classes = {'ombox'},
},
usePlainlinksParam = true,
style = {
allowSmall = true,
class = 'mbox-style',
imageEmptyCell = true,
image = 'Edit-clear.svg'
imageRightNone = true,
},
templatestyles = 'Template:Ombox/style.css'
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'mbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'mbox-notice',
image = 'Information Mark (Blue).svg'
},
note = {
class = 'mbox-notice',
image = 'Information Mark (Blue).svg'
},
license = {
class = 'mbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'mbox-featured',
image = 'Cscr-featured.svg'
},
policy = {
class = 'mbox-policy',
image = 'Policy Mark (Green).svg'
},
guideline = {
class = 'mbox-guideline',
image = 'Policy Mark (Blue).svg'
},
rule = {
class = 'mbox-rule',
image = 'Policy Mark (Orange).svg'
},
draft = {
class = 'mbox-draft',
image = 'Edit Mark (Gray).svg'
},
setindex = {
class = 'mbox-setindex',
image = 'List gray.svg'
},
disambig = {
class = 'mbox-disambig',
image = 'Disambig gray.svg'
}
},
},
default = 'notice',
showInvalidTypeError = true,
tmbox = {
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
types = {
allowSmall = true,
speedy = {
substCheck = true,
class = 'tmbox-speedy',
classes = {'mbox', 'ombox'},
image = 'Ambox warning pn.svg'
allowId = true,
},
below = 'below',
delete = {
imageEmptyCell = true,
class = 'tmbox-delete',
imageCheckBlank = true,
image = 'Ambox warning pn.svg'
imageSmallSize = '20x20px',
},
imageCellDiv = true,
content = {
useCollapsibleTextFields = true,
class = 'tmbox-content',
imageRightNone = true,
image = 'Ambox important.svg'
}
},

style = {
local tmbox = {
class = 'tmbox-style',
types = {
image = 'Edit-clear.svg'
speedy = {
},
move = {
class = 'mbox-speedy',
class = 'tmbox-move',
image = 'Cross Mark (Red).svg'
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
},
delete = {
default = 'notice',
class = 'mbox-delete',
showInvalidTypeError = true,
image = 'Alert Mark (Red).svg'
classes = {'tmbox'},
},
usePlainlinksParam = true,
content = {
allowId = true,
class = 'mbox-content',
allowSmall = true,
image = 'Alert Mark (Orange).svg'
imageRightNone = true,
},
imageEmptyCell = true,
style = {
imageEmptyCellStyle = true,
class = 'mbox-style',
templateCategory = '討論訊息模板',
image = 'Edit-clear.svg '
templatestyles = 'Template:Tmbox/style.css'
}
},
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'mbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'mbox-notice',
image = 'Information Mark (Blue).svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'mbox', 'tmbox'},
allowId = true,
allowSmall = true,
below = 'below',
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = '讨论信息模板'
}

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

2026年8月3日 (一) 08:26的版本

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

local ambox = {
	types = {
		speedy = {
			class = 'mbox-speedy',
			image = 'Cross Mark (Red).svg'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).svg'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).svg'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.svg'
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.svg'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.svg'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).svg'
		},
		note = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).svg'
		},
		license = {
			class = 'mbox-license',
			image = 'Imbox license.png'
		},
		featured = {
			class = 'mbox-featured',
			image = 'Cscr-featured.svg'
		},
		policy = {
			class = 'mbox-policy',
			image = 'Policy Mark (Green).svg'
		},
		guideline = {
			class = 'mbox-guideline',
			image = 'Policy Mark (Blue).svg'
		},
		rule = {
			class = 'mbox-rule',
			image = 'Policy Mark (Orange).svg'
		},
		draft = {
			class = 'mbox-draft',
			image = 'Edit Mark (Gray).svg'
		},
		setindex = {
			class = 'mbox-setindex',
			image = 'List gray.svg'
		},
		disambig = {
			class = 'mbox-disambig',
			image = 'Disambig gray.svg'
		}
	},
	default                     = 'notice',
	allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
	allowSmall                  = true,
	smallParam                  = 'left',
	smallClass                  = 'mbox-small-left',
	substCheck                  = true,
	classes                     = {'mbox', 'ambox', 'metadata', 'plainlinks'},
	allowId                     = true,
    below                       = 'below',
	imageEmptyCell              = true,
	imageCheckBlank             = true,
	imageSmallSize              = '20x20px',
	imageCellDiv                = true,
	useCollapsibleTextFields    = true,
	imageRightNone              = true,
	sectionDefault              = '条目',
	allowMainspaceCategories    = true,
	templateCategory            = '条目信息模板',
	templateCategoryRequireName = true,
	templateErrorCategory       = '缺少参数的条目信息模板',
	templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
}

local fmbox = {
	types = {
		warning = {
			class = 'fmbox-warning',
			image = 'Alert Mark (Red).svg'
		},
		editnotice = {
			class = 'fmbox-editnotice',
			image = 'Information Mark (Blue).svg'
		},
		system = {
			class = 'fmbox-system',
			image = 'Information Mark (Blue).svg'
		},
		copyright = {
			class = 'fmbox-editnotice fmbox-copyright',
			image = 'Edit Mark (Blue).svg'
		}
	},
	default              = 'system',
	showInvalidTypeError = true,
	allowId              = true,
    below                = 'below',
	classes              = {'fmbox', 'plainlinks'},
	imageEmptyCell       = false,
	imageRightNone       = false
}

local ombox = { -- all styles migrated to mbox
	types = {
		speedy = {
			class = 'mbox-speedy',
			image = 'Cross Mark (Red).svg'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).svg'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).svg'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.svg'
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.svg'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.svg'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).svg'
		},
		note = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).svg'
		},
		license = {
			class = 'mbox-license',
			image = 'Imbox license.png'
		},
		featured = {
			class = 'mbox-featured',
			image = 'Cscr-featured.svg'
		},
		policy = {
			class = 'mbox-policy',
			image = 'Policy Mark (Green).svg'
		},
		guideline = {
			class = 'mbox-guideline',
			image = 'Policy Mark (Blue).svg'
		},
		rule = {
			class = 'mbox-rule',
			image = 'Policy Mark (Orange).svg'
		},
		draft = {
			class = 'mbox-draft',
			image = 'Edit Mark (Gray).svg'
		},
		setindex = {
			class = 'mbox-setindex',
			image = 'List gray.svg'
		},
		disambig = {
			class = 'mbox-disambig',
			image = 'Disambig gray.svg'
		}
	},
	default                     = 'notice',
	showInvalidTypeError        = true,
	allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
	allowSmall                  = true,
	substCheck                  = true,
	classes                     = {'mbox', 'ombox'},
	allowId                     = true,
    below                       = 'below',
	imageEmptyCell              = true,
	imageCheckBlank             = true,
	imageSmallSize              = '20x20px',
	imageCellDiv                = true,
	useCollapsibleTextFields    = true,
	imageRightNone              = true,
}

local tmbox = {
	types = {
		speedy = {
			class = 'mbox-speedy',
			image = 'Cross Mark (Red).svg'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).svg'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).svg'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.svg '
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.svg'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.svg'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).svg'
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'mbox', 'tmbox'},
	allowId              = true,
	allowSmall           = true,
    below                = 'below',
	imageRightNone       = true,
	imageEmptyCell       = true,
	imageEmptyCellStyle  = true,
	templateCategory     = '讨论信息模板'
}

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