跳转到内容

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

轻之舟百科,让知识轻装启航
Qiuwen>待春
无编辑摘要
 
闲敲棋子落灯花​(留言 | 贡献)
创建页面,内容为“-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for Module:Message box. -- -------------------------------------------------------------------------------- return { -- Global styles applying to all *mboxes ['@glob…”
第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'}
}


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'
}
},
},
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 = {
},
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'
}
},
},
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 = {
},
class = 'mbox-speedy',
move = {
image = 'Cross Mark (Red).svg'
class = 'tmbox-move',
},
image = 'Merge-split-transwiki default.svg'
delete = {
},
class = 'mbox-delete',
protection = {
image = 'Alert Mark (Red).svg'
class = 'tmbox-protection',
},
image = 'Semi-protection-shackle.svg'
content = {
},
class = 'mbox-content',
notice = {
image = 'Alert Mark (Orange).svg'
class = 'tmbox-notice',
},
image = 'Information icon4.svg'
style = {
}
class = 'mbox-style',
image = 'Edit-clear.svg '
},
move = {
class = 'mbox-move',
image = 'Merge-split-transwiki default.svg'
},
},
protection = {
default              = 'notice',
class = 'mbox-protection',
showInvalidTypeError = true,
image = 'Semi-protection-shackle-keyhole.svg'
classes              = {'tmbox'},
},
usePlainlinksParam  = true,
notice = {
allowId              = true,
class = 'mbox-notice',
allowSmall          = true,
image = 'Information Mark (Blue).svg'
imageRightNone      = true,
}
imageEmptyCell      = true,
},
imageEmptyCellStyle  = true,
default              = 'notice',
templateCategory    = '討論訊息模板',
showInvalidTypeError = true,
templatestyles      = 'Template:Tmbox/style.css'
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月2日 (日) 15:03的版本

此模块的文档可以在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'
	}
}