跳转到内容

模块:Message box/configuration:修订间差异

来自维基百科
Admin留言 | 贡献
导入1个版本
imported>Shizhao
无编辑摘要
第1行: 第1行:
local ambox = {
--------------------------------------------------------------------------------
types = {
--                          Message box configuration                        --
speedy = {
--                                                                            --
class = 'ambox-speedy',
-- This module contains configuration data for [[Module:Message box]].       --
image = 'Ambox warning pn.svg'
--------------------------------------------------------------------------------
},
 
delete = {
return {
class = 'ambox-delete',
-- Global styles applying to all *mboxes
image = 'Ambox warning pn.svg'
['@global'] = {
},
templatestyles = 'Module:Message box/mbox.css'
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-keyhole.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'}
}


local cmbox = {
ambox = {
types = {
types = {
speedy = {
speedy = {
class = 'cmbox-speedy',
class = 'ambox-speedy',
image = 'Ambox warning pn.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'
}
},
},
delete = {
default                    = 'notice',
class = 'cmbox-delete',
allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
image = 'Ambox warning pn.svg'
allowSmall                  = true,
},
smallParam                  = 'left',
content = {
smallClass                  = 'mbox-small-left',
class = 'cmbox-content',
substCheck                  = true,
image = 'Ambox important.svg'
classes                    = {'metadata', 'ambox'},
},
usePlainlinksParam          = true,
style = {
allowId                    = true,
class = 'cmbox-style',
imageEmptyCell              = true,
image = 'Edit-clear.svg'
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'
}
},
},
move = {
default              = 'notice',
class = 'cmbox-move',
showInvalidTypeError = true,
image = 'Merge-split-transwiki default.svg'
classes              = {'cmbox'},
},
usePlainlinksParam  = true,
protection = {
imageEmptyCell      = true,
class = 'cmbox-protection',
templatestyles      = 'Template:Cmbox/style.css'
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
},
default              = 'notice',
showInvalidTypeError = true,
fmbox = {
classes              = {'cmbox'},
types = {
usePlainlinksParam  = true,
warning = {
imageEmptyCell      = true
class = 'fmbox-warning',
}
image = 'Ambox warning pn.svg'
 
},
local fmbox = {
editnotice = {
types = {
class = 'fmbox-editnotice',
warning = {
image = 'Information icon4.svg'
class = 'fmbox-warning',
},
image = 'Ambox warning pn.svg'
system = {
},
class = 'fmbox-system',
editnotice = {
image = 'Information icon4.svg'
class = 'fmbox-editnotice',
}
image = 'Information icon4.svg'
},
},
system = {
default              = 'system',
class = 'fmbox-system',
showInvalidTypeError = true,
image = 'Information icon4.svg'
allowId              = true,
}
classes              = {'fmbox'},
usePlainlinksParam  = true,
imageEmptyCell      = false,
imageRightNone      = false,
templatestyles      = 'Template:Fmbox/style.css'
},
},
default              = 'system',
showInvalidTypeError = true,
imbox = {
allowId                = true,
types = {
classes              = {'fmbox'},
speedy = {
usePlainlinksParam  = true,
class = 'imbox-speedy',
imageEmptyCell      = false,
image = 'Ambox warning pn.svg'
imageRightNone      = false
},
}
delete = {
 
class = 'imbox-delete',
local imbox = {
image = 'Ambox warning pn.svg'
types = {
},
speedy = {
content = {
class = 'imbox-speedy',
class = 'imbox-content',
image = 'Ambox warning pn.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 = 'imbox-delete',
showInvalidTypeError = true,
image = 'Ambox warning pn.svg'
classes              = {'imbox'},
},
usePlainlinksParam  = true,
content = {
imageEmptyCell      = true,
class = 'imbox-content',
below                = true,
image = 'Ambox important.svg'
templateCategory    = '檔案訊息模板',
},
templatestyles      = 'Template:Imbox/style.css'
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-keyhole.svg'
},
license = {
class = 'imbox-license',
image = 'Imbox license.png'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
},
default              = 'notice',
showInvalidTypeError = true,
ombox = {
classes              = {'imbox'},
types = {
usePlainlinksParam  = true,
speedy = {
imageEmptyCell      = true,
class = 'ombox-speedy',
below                = true,
image = 'Ambox warning pn.svg'
templateCategory    = '檔案訊息模板'
},
}
delete = {
 
class = 'ombox-delete',
local ombox = {
image = 'Ambox warning pn.svg'
types = {
},
speedy = {
content = {
class = 'ombox-speedy',
class = 'ombox-content',
image = 'Ambox warning pn.svg'
image = 'Ambox important.svg'
},
},
delete = {
style = {
class = 'ombox-delete',
class = 'ombox-style',
image = 'Ambox warning pn.svg'
image = 'Edit-clear.svg'
},
},
content = {
move = {
class = 'ombox-content',
class = 'ombox-move',
image = 'Ambox important.svg'
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
},
style = {
default              = 'notice',
class = 'ombox-style',
showInvalidTypeError = true,
image = 'Edit-clear.svg'
classes              = {'ombox'},
},
usePlainlinksParam  = true,
move = {
allowSmall          = true,
class = 'ombox-move',
imageEmptyCell      = true,
image = 'Merge-split-transwiki default.svg'
imageRightNone      = true,
},
templatestyles      = 'Template:Ombox/style.css'
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
},
note = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
},
default              = 'notice',
showInvalidTypeError = true,
tmbox = {
classes              = {'ombox'},
types = {
usePlainlinksParam  = true,
speedy = {
allowSmall          = true,
class = 'tmbox-speedy',
imageEmptyCell      = true,
image = 'Ambox warning pn.svg'
imageRightNone      = true
},
}
delete = {
 
class = 'tmbox-delete',
local tmbox = {
image = 'Ambox warning pn.svg'
types = {
},
speedy = {
content = {
class = 'tmbox-speedy',
class = 'tmbox-content',
image = 'Ambox warning pn.svg'
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'
}
},
},
delete = {
default             = 'notice',
class = 'tmbox-delete',
showInvalidTypeError = true,
image = 'Ambox warning pn.svg'
classes              = {'tmbox'},
},
usePlainlinksParam  = true,
content = {
allowId              = true,
class = 'tmbox-content',
allowSmall          = true,
image = 'Ambox important.svg'
imageRightNone      = true,
},
imageEmptyCell      = true,
style = {
imageEmptyCellStyle  = true,
class = 'tmbox-style',
templateCategory    = '討論訊息模板',
image = 'Edit-clear.svg '
templatestyles      = 'Template:Tmbox/style.css'
},
}
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.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    = '討論訊息模板'
}
 
return {
ambox = ambox,
cmbox = cmbox,
fmbox = fmbox,
imbox = imbox,
ombox = ombox,
tmbox = tmbox
}
}

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

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