跳转到内容

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

轻之舟百科,让知识轻装启航
删除的内容 添加的内容
闲敲棋子落灯花​(留言 | 贡献)
创建页面,内容为“-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for Module:Message box. -- -------------------------------------------------------------------------------- return { -- Global styles applying to all *mboxes ['@glob…”
CaelLab-import​(留言 | 贡献)
补 cmbox/imbox 两类配置(来自中文维基百科当前版本,修复 Cmbox/Imbox 家族渲染)
 
(未显示2个用户的4个中间版本)
第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).png'
--------------------------------------------------------------------------------
},
delete = {
class = 'mbox-delete',
image = 'Alert Mark (Red).png'
},
content = {
class = 'mbox-content',
image = 'Alert Mark (Orange).png'
},
style = {
class = 'mbox-style',
image = 'Edit-clear.png'
},
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.png'
},
protection = {
class = 'mbox-protection',
image = 'Semi-protection-shackle-keyhole.png'
},
notice = {
class = 'mbox-notice',
image = 'Information Mark (Blue).png'
},
note = {
class = 'mbox-notice',
image = 'Information Mark (Blue).png'
},
license = {
class = 'mbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'mbox-featured',
image = 'Cscr-featured.png'
},
policy = {
class = 'mbox-policy',
image = 'Policy Mark (Green).png'
},
guideline = {
class = 'mbox-guideline',
image = 'Policy Mark (Blue).png'
},
rule = {
class = 'mbox-rule',
image = 'Policy Mark (Orange).png'
},
draft = {
class = 'mbox-draft',
image = 'Edit Mark (Gray).png'
},
setindex = {
class = 'mbox-setindex',
image = 'List gray.png'
},
disambig = {
class = 'mbox-disambig',
image = 'Disambig gray.png'
}
},
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 = {
return {
types = {
-- Global styles applying to all *mboxes
['@global'] = {
warning = {
class = 'fmbox-warning',
templatestyles = 'Module:Message box/mbox.css'
image = 'Alert Mark (Red).png'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'Information Mark (Blue).png'
},
system = {
class = 'fmbox-system',
image = 'Information Mark (Blue).png'
},
copyright = {
class = 'fmbox-editnotice fmbox-copyright',
image = 'Edit Mark (Blue).png'
}
},
},
default = 'system',
showInvalidTypeError = true,
allowId = true,
below = 'below',
classes = {'fmbox', 'plainlinks'},
imageEmptyCell = false,
imageRightNone = false
}


local ombox = { -- all styles migrated to mbox
ambox = {
types = {
types = {
speedy = {
speedy = {
class = 'ambox-speedy',
class = 'mbox-speedy',
image = 'Ambox warning pn.svg'
image = 'Cross Mark (Red).png'
},
},
delete = {
delete = {
class = 'ambox-delete',
class = 'mbox-delete',
image = 'Ambox warning pn.svg'
image = 'Alert Mark (Red).png'
},
},
content = {
content = {
class = 'ambox-content',
class = 'mbox-content',
image = 'Ambox important.svg'
image = 'Alert Mark (Orange).png'
},
},
style = {
style = {
class = 'ambox-style',
class = 'mbox-style',
image = 'Edit-clear.svg'
image = 'Edit-clear.png'
},
},
move = {
move = {
class = 'ambox-move',
class = 'mbox-move',
image = 'Merge-split-transwiki default.svg'
image = 'Merge-split-transwiki default.png'
},
},
protection = {
protection = {
class = 'ambox-protection',
class = 'mbox-protection',
image = 'Semi-protection-shackle.svg'
image = 'Semi-protection-shackle-keyhole.png'
},
},
notice = {
notice = {
class = 'ambox-notice',
class = 'mbox-notice',
image = 'Information icon4.svg'
image = 'Information Mark (Blue).png'
}
},
note = {
class = 'mbox-notice',
image = 'Information Mark (Blue).png'
},
license = {
class = 'mbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'mbox-featured',
image = 'Cscr-featured.png'
},
policy = {
class = 'mbox-policy',
image = 'Policy Mark (Green).png'
},
guideline = {
class = 'mbox-guideline',
image = 'Policy Mark (Blue).png'
},
},
rule = {
default = 'notice',
class = 'mbox-rule',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
image = 'Policy Mark (Orange).png'
allowSmall = true,
},
smallParam = 'left',
draft = {
smallClass = 'mbox-small-left',
class = 'mbox-draft',
substCheck = true,
image = 'Edit Mark (Gray).png'
classes = {'metadata', 'ambox'},
},
usePlainlinksParam = true,
setindex = {
allowId = true,
class = 'mbox-setindex',
imageEmptyCell = true,
image = 'List gray.png'
imageCheckBlank = true,
},
imageSmallSize = '20x20px',
disambig = {
imageCellDiv = true,
class = 'mbox-disambig',
useCollapsibleTextFields = true,
image = 'Disambig gray.png'
imageRightNone = true,
}
sectionDefault = '條目',
allowMainspaceCategories = true,
templateCategory = '條目訊息模板',
templateCategoryRequireName = true,
templateErrorCategory = '缺少參數的條目訊息模板',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'},
templatestyles = 'Template:Ambox/style.css'
},
},
default = 'notice',
showInvalidTypeError = true,
cmbox = {
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).png'
},
delete = {
class = 'mbox-delete',
image = 'Alert Mark (Red).png'
},
content = {
class = 'mbox-content',
image = 'Alert Mark (Orange).png'
},
style = {
class = 'mbox-style',
image = 'Edit-clear.png'
},
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.png'
},
protection = {
class = 'mbox-protection',
image = 'Semi-protection-shackle-keyhole.png'
},
notice = {
class = 'mbox-notice',
image = 'Information Mark (Blue).png'
},
license = {
class = 'mbox-license',
image = 'Imbox license.png'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'mbox', 'tmbox'},
allowId = true,
allowSmall = true,
below = 'below',
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = '讨论信息模板'
}

local cmbox = {
types = {
types = {
speedy = {
speedy = {
第100行: 第281行:
showInvalidTypeError = true,
showInvalidTypeError = true,
classes = {'cmbox'},
classes = {'cmbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
imageEmptyCell = true,
templatestyles = 'Template:Cmbox/style.css'
templatestyles = 'Template:Cmbox/style.css'
},
}

fmbox = {
local imbox = {
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'
}
},
default = 'system',
showInvalidTypeError = true,
allowId = true,
classes = {'fmbox'},
usePlainlinksParam = true,
imageEmptyCell = false,
imageRightNone = false,
templatestyles = 'Template:Fmbox/style.css'
},
imbox = {
types = {
types = {
speedy = {
speedy = {
第158行: 第313行:
license = {
license = {
class = 'imbox-license licensetpl',
class = 'imbox-license licensetpl',
image = 'Imbox-license.svg'
},
["license-related"] = {
class = 'imbox-license',
image = 'Imbox-license.svg'
image = 'Imbox-license.svg'
},
},
featured = {
featured = {
class = 'imbox-featured',
class = 'imbox-featured',
image = 'Cscr-featured.svg'
image = 'Cscr-featured.svg',
imageNeedsLink = true
},
},
notice = {
notice = {
第172行: 第332行:
showInvalidTypeError = true,
showInvalidTypeError = true,
classes = {'imbox'},
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
imageEmptyCell = true,
below = true,
below = true,
templateCategory = '檔案訊息模板',
templateCategory = '檔案訊息模板',
templatestyles = 'Template:Imbox/style.css'
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'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
usePlainlinksParam = true,
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true,
templatestyles = 'Template:Ombox/style.css'
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'Ambox warning pn.svg'
},
delete = {
class = 'tmbox-delete',
image = 'Ambox warning pn.svg'
},
content = {
class = 'tmbox-content',
image = 'Ambox important.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
usePlainlinksParam = true,
allowId = true,
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = '討論訊息模板',
templatestyles = 'Template:Tmbox/style.css'
}
}

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

2026年11月19日 (四) 15:29的最新版本

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

local ambox = {
	types = {
		speedy = {
			class = 'mbox-speedy',
			image = 'Cross Mark (Red).png'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).png'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).png'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.png'
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.png'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.png'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).png'
		},
		note = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).png'
		},
		license = {
			class = 'mbox-license',
			image = 'Imbox license.png'
		},
		featured = {
			class = 'mbox-featured',
			image = 'Cscr-featured.png'
		},
		policy = {
			class = 'mbox-policy',
			image = 'Policy Mark (Green).png'
		},
		guideline = {
			class = 'mbox-guideline',
			image = 'Policy Mark (Blue).png'
		},
		rule = {
			class = 'mbox-rule',
			image = 'Policy Mark (Orange).png'
		},
		draft = {
			class = 'mbox-draft',
			image = 'Edit Mark (Gray).png'
		},
		setindex = {
			class = 'mbox-setindex',
			image = 'List gray.png'
		},
		disambig = {
			class = 'mbox-disambig',
			image = 'Disambig gray.png'
		}
	},
	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).png'
		},
		editnotice = {
			class = 'fmbox-editnotice',
			image = 'Information Mark (Blue).png'
		},
		system = {
			class = 'fmbox-system',
			image = 'Information Mark (Blue).png'
		},
		copyright = {
			class = 'fmbox-editnotice fmbox-copyright',
			image = 'Edit Mark (Blue).png'
		}
	},
	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).png'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).png'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).png'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.png'
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.png'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.png'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).png'
		},
		note = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).png'
		},
		license = {
			class = 'mbox-license',
			image = 'Imbox license.png'
		},
		featured = {
			class = 'mbox-featured',
			image = 'Cscr-featured.png'
		},
		policy = {
			class = 'mbox-policy',
			image = 'Policy Mark (Green).png'
		},
		guideline = {
			class = 'mbox-guideline',
			image = 'Policy Mark (Blue).png'
		},
		rule = {
			class = 'mbox-rule',
			image = 'Policy Mark (Orange).png'
		},
		draft = {
			class = 'mbox-draft',
			image = 'Edit Mark (Gray).png'
		},
		setindex = {
			class = 'mbox-setindex',
			image = 'List gray.png'
		},
		disambig = {
			class = 'mbox-disambig',
			image = 'Disambig gray.png'
		}
	},
	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).png'
		},
		delete = {
			class = 'mbox-delete',
			image = 'Alert Mark (Red).png'
		},
		content = {
			class = 'mbox-content',
			image = 'Alert Mark (Orange).png'
		},
		style = {
			class = 'mbox-style',
			image = 'Edit-clear.png'
		},
		move = {
			class = 'mbox-move',
			image = 'Merge-split-transwiki default.png'
		},
		protection = {
			class = 'mbox-protection',
			image = 'Semi-protection-shackle-keyhole.png'
		},
		notice = {
			class = 'mbox-notice',
			image = 'Information Mark (Blue).png'
		},
		license = {
			class = 'mbox-license',
			image = 'Imbox license.png'
		}
	},
	default              = 'notice',
	showInvalidTypeError = true,
	classes              = {'mbox', 'tmbox'},
	allowId              = true,
	allowSmall           = true,
    below                = 'below',
	imageRightNone       = true,
	imageEmptyCell       = true,
	imageEmptyCellStyle  = true,
	templateCategory     = '讨论信息模板'
}

local 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'
			}
		},
		default              = 'notice',
		showInvalidTypeError = true,
		classes              = {'cmbox'},
		imageEmptyCell       = true,
		templatestyles       = 'Template:Cmbox/style.css'
	}

local imbox = {
		types = {
			speedy = {
				class = 'imbox-speedy',
				image = 'Ambox warning pn.svg'
			},
			delete = {
				class = 'imbox-delete',
				image = 'Ambox warning pn.svg'
			},
			content = {
				class = 'imbox-content',
				image = 'Ambox important.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'
			},
			["license-related"] = {
				class = 'imbox-license',
				image = 'Imbox-license.svg'
			},
			featured = {
				class = 'imbox-featured',
				image = 'Cscr-featured.svg',
				imageNeedsLink = true
			},
			notice = {
				class = 'imbox-notice',
				image = 'Information icon4.svg'
			}
		},
		default              = 'notice',
		showInvalidTypeError = true,
		classes              = {'imbox'},
		imageEmptyCell       = true,
		below                = true,
		templateCategory     = '檔案訊息模板',
		templatestyles       = 'Template:Imbox/style.css'
	}

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