跳转到内容

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

轻之舟百科,让知识轻装启航
删除的内容 添加的内容
Qiuwen>待春
无编辑摘要
 
zhwiki>Shizhao
小无编辑摘要
第1行: 第1行:
--------------------------------------------------------------------------------
local ambox = {
-- Message box configuration --
types = {
-- --
speedy = {
-- This module contains configuration data for [[Module:Message box]]. --
class = 'mbox-speedy',
--------------------------------------------------------------------------------
image = 'Cross Mark (Red).svg'

},
return {
delete = {
-- Global styles applying to all *mboxes
class = 'mbox-delete',
['@global'] = {
image = 'Alert Mark (Red).svg'
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'}
}


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

image = 'Ambox warning pn.svg'
local ombox = { -- all styles migrated to mbox
},
types = {
speedy = {
content = {
class = 'mbox-speedy',
class = 'imbox-content',
image = 'Cross Mark (Red).svg'
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'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
},
default = 'notice',
delete = {
showInvalidTypeError = true,
class = 'mbox-delete',
classes = {'imbox'},
image = 'Alert Mark (Red).svg'
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'
}
},
},
default = 'notice',
content = {
showInvalidTypeError = true,
class = 'mbox-content',
classes = {'ombox'},
image = 'Alert Mark (Orange).svg'
usePlainlinksParam = true,
},
allowSmall = true,
style = {
imageEmptyCell = true,
class = 'mbox-style',
imageRightNone = true,
image = 'Edit-clear.svg'
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',
tmbox = {
showInvalidTypeError = true,
types = {
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
speedy = {
allowSmall = true,
class = 'tmbox-speedy',
substCheck = true,
image = 'Ambox warning pn.svg'
classes = {'mbox', 'ombox'},
},
allowId = true,
delete = {
below = 'below',
class = 'tmbox-delete',
imageEmptyCell = true,
image = 'Ambox warning pn.svg'
imageCheckBlank = true,
},
imageSmallSize = '20x20px',
content = {
imageCellDiv = true,
class = 'tmbox-content',
useCollapsibleTextFields = true,
image = 'Ambox important.svg'
imageRightNone = true,
},
}
style = {

class = 'tmbox-style',
local tmbox = {
image = 'Edit-clear.svg'
types = {
},
speedy = {
class = 'mbox-speedy',
move = {
image = 'Cross Mark (Red).svg'
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',
delete = {
showInvalidTypeError = true,
class = 'mbox-delete',
classes = {'tmbox'},
image = 'Alert Mark (Red).svg'
usePlainlinksParam = true,
},
allowId = true,
content = {
allowSmall = true,
class = 'mbox-content',
imageRightNone = true,
image = 'Alert Mark (Orange).svg'
imageEmptyCell = true,
},
imageEmptyCellStyle = true,
style = {
templateCategory = '討論訊息模板',
class = 'mbox-style',
templatestyles = 'Template:Tmbox/style.css'
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
}
}

2025年7月3日 (四) 11:24的版本

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

--------------------------------------------------------------------------------
--                          Message box configuration                         --
--                                                                            --
-- This module contains configuration data for [[Module:Message box]].        --
--------------------------------------------------------------------------------

return {
	-- Global styles applying to all *mboxes
	['@global'] = {
		templatestyles = 'Module:Message box/mbox.css'
	},

	ambox = {
		types = {
			speedy = {
				class = 'ambox-speedy',
				image = 'Ambox warning pn.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'
			}
		},
		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'},
		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'
			}
		},
		default              = 'notice',
		showInvalidTypeError = true,
		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'
			}
		},
		default              = 'system',
		showInvalidTypeError = true,
		allowId              = true,
		classes              = {'fmbox'},
		usePlainlinksParam   = true,
		imageEmptyCell       = false,
		imageRightNone       = false,
		templatestyles       = 'Template:Fmbox/style.css'
	},
	
	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'
			},
			featured = {
				class = 'imbox-featured',
				image = 'Cscr-featured.svg'
			},
			notice = {
				class = 'imbox-notice',
				image = 'Information icon4.svg'
			}
		},
		default              = 'notice',
		showInvalidTypeError = true,
		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'
			}
		},
		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'
	}
}