Template:Tmbox/doc:修订间差异
外观
删除的内容 添加的内容
将 Mbox templates 移到 doc 最顶部(跟随 mworg 做法) |
小 →小尺寸模式 |
||
| (未显示另一用户的1个中间版本) | |||
| 第2行: | 第2行: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
{{Uses Lua|Module:Message box}} |
{{Uses Lua|Module:Message box}} |
||
{{Uses TemplateStyles|Module:Message box/tmbox.css}} |
|||
'''{{tlx|Tmbox}}'''(Talk page message box,讨论页消息框)用于 |
'''{{tlx|Tmbox}}'''(Talk page message box,讨论页消息框)是用于讨论页面的消息框元模板。它提供多种颜色和预设图片,与 {{tlx|Ambox}} 参数基本相同。 |
||
== 常用参数 == |
== 常用参数 == |
||
| 第11行: | 第12行: | ||
| <code>type</code> || <code>speedy</code> / <code>delete</code> / <code>content</code> / <code>style</code> / <code>notice</code> / <code>move</code> / <code>protection</code> |
| <code>type</code> || <code>speedy</code> / <code>delete</code> / <code>content</code> / <code>style</code> / <code>notice</code> / <code>move</code> / <code>protection</code> |
||
|- |
|- |
||
| <code>image</code> || 自定义图标 |
| <code>image</code> || 自定义图标(<code>none</code> 则不显示图片) |
||
|- |
|- |
||
| <code> |
| <code>imageright</code> || 右侧图片 |
||
|- |
|- |
||
| <code> |
| <code>style</code> || 整个信息框的 CSS 样式 |
||
|- |
|||
| <code>textstyle</code> || 文字单元格的 CSS 样式 |
|||
|- |
|||
| <code>text</code> || 消息正文 |
|||
|- |
|||
| <code>small</code> || <code>yes</code> 时显示为小型右浮框 |
|||
|- |
|||
| <code>smallimage</code> || 小型模式下的左侧图片 |
|||
|- |
|||
| <code>smallimageright</code> || 小型模式下的右侧图片 |
|||
|- |
|||
| <code>smalltext</code> || 小型模式下的文字 |
|||
|} |
|} |
||
== |
== type 类型建议 == |
||
* <code>speedy</code> — 仅用于快速删除模板 |
|||
| ⚫ | |||
* <code>delete</code> — 仅用于与正在进行的删除讨论相关的模板 |
|||
{{Tmbox|type=content|text=此讨论可能偏离主题。}} |
|||
* <code>content</code> — 橙色边框,用于更重要的警告(临时用途) |
|||
* <code>style</code> — 黄色边框,用于较低重要度警告(临时用途) |
|||
* <code>notice</code> — 灰色边框,用于大部分讨论页信息框(通用类型) |
|||
* <code>move</code> — 用于移动、合并、页面相关消息框 |
|||
* <code>protection</code> — 用于页面保护模板 |
|||
== type 演示 == |
|||
{{Tmbox|type=speedy|text=type=<u>speedy</u> 快速删除}} |
|||
{{Tmbox|type=delete|text=type=<u>delete</u> 删除}} |
|||
{{Tmbox|type=content|text=type=<u>content</u> 大部分警告和提醒}} |
|||
{{Tmbox|type=style|text=type=<u>style</u> 较小警告}} |
|||
| ⚫ | |||
{{Tmbox|type=move|text=type=<u>move</u> 合并、拆分和重命名提议}} |
|||
{{Tmbox|type=protection|text=type=<u>protection</u> 页面保护}} |
|||
| ⚫ | |||
<syntaxhighlight lang="php">{{Tmbox|type=notice|small=yes|text=small=yes — 小型右浮消息框}}</syntaxhighlight> |
|||
| ⚫ | |||
== 参数说明 == |
|||
<syntaxhighlight lang="wikitext"> |
|||
{{tmbox |
|||
| type = speedy / delete / content / style / notice / move / protection |
|||
| image = none / [[File:Some image.svg|40px]] |
|||
| imageright = [[File:Some image.svg|40px]] |
|||
| style = CSS 取值 |
|||
| textstyle = CSS 取值 |
|||
| text = 消息正文 |
|||
| small = {{{small|}}} / yes |
|||
| smallimage = none / [[File:Some image.svg|30px]] |
|||
| smallimageright = none / [[File:Some image.svg|30px]] |
|||
| smalltext = 简短文字 |
|||
}} |
|||
</syntaxhighlight> |
|||
== 技术细节 == |
|||
如需在 text 参数中使用特殊字符: |
|||
<syntaxhighlight lang="wikitext"> |
|||
{{tmbox |
|||
| text = |
|||
等号 = 与前后大括号 { } 可以正常使用。 |
|||
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。 |
|||
同时使用需加 nowiki 标记 <nowiki>|}}</nowiki>。 |
|||
}} |
|||
</syntaxhighlight> |
|||
此模板使用 tmbox CSS 类确定显示风格,可更换皮肤。 |
|||
| ⚫ | |||
| ⚫ | |||
== 参见 == |
== 参见 == |
||
* {{tlx|Ambox}} — 条目消息框 |
* {{tlx|Ambox}} — 条目消息框 |
||
* {{tlx|Imbox}} — 文件页消息框 |
|||
* {{tlx|Cmbox}} — 分类消息框 |
|||
* {{tlx|Ombox}} — 其他页面消息框 |
|||
* {{tlx|Fmbox}} — 页眉和页脚消息框 |
|||
* {{tlx|Mbox}} — 自动检测命名空间 |
* {{tlx|Mbox}} — 自动检测命名空间 |
||
2026年6月22日 (一) 10:54的最新版本
| 此页面是Template:Tmbox的文档子页面。 此页面可能包含了使用说明、分类和其他内容,这些内容不属于原始Template页面。 |
| 此模板使用Lua语言: |
| 本模板使用以下模板样式: |
{{Tmbox}}(Talk page message box,讨论页消息框)是用于讨论页面的消息框元模板。它提供多种颜色和预设图片,与 {{Ambox}} 参数基本相同。
常用参数
| 参数 | 说明 |
|---|---|
type |
speedy / delete / content / style / notice / move / protection
|
image |
自定义图标(none 则不显示图片)
|
imageright |
右侧图片 |
style |
整个信息框的 CSS 样式 |
textstyle |
文字单元格的 CSS 样式 |
text |
消息正文 |
small |
yes 时显示为小型右浮框
|
smallimage |
小型模式下的左侧图片 |
smallimageright |
小型模式下的右侧图片 |
smalltext |
小型模式下的文字 |
type 类型建议
speedy— 仅用于快速删除模板delete— 仅用于与正在进行的删除讨论相关的模板content— 橙色边框,用于更重要的警告(临时用途)style— 黄色边框,用于较低重要度警告(临时用途)notice— 灰色边框,用于大部分讨论页信息框(通用类型)move— 用于移动、合并、页面相关消息框protection— 用于页面保护模板
type 演示
| type=speedy 快速删除 |
| type=delete 删除 |
| type=content 大部分警告和提醒 |
| type=style 较小警告 |
| type=notice 各类通知和信息 |
| type=move 合并、拆分和重命名提议 |
| type=protection 页面保护 |
小尺寸模式
{{Tmbox|type=notice|small=yes|text=small=yes — 小型右浮消息框}}
| small=yes — 小型右浮消息框 |
参数说明
{{tmbox
| type = speedy / delete / content / style / notice / move / protection
| image = none / [[File:Some image.svg|40px]]
| imageright = [[File:Some image.svg|40px]]
| style = CSS 取值
| textstyle = CSS 取值
| text = 消息正文
| small = {{{small|}}} / yes
| smallimage = none / [[File:Some image.svg|30px]]
| smallimageright = none / [[File:Some image.svg|30px]]
| smalltext = 简短文字
}}
技术细节
如需在 text 参数中使用特殊字符:
{{tmbox
| text =
等号 = 与前后大括号 { } 可以正常使用。
但管道符 {{!}} 与两个后大括号 <nowiki>}}</nowiki> 不能直接使用。
同时使用需加 nowiki 标记 <nowiki>|}}</nowiki>。
}}
此模板使用 tmbox CSS 类确定显示风格,可更换皮肤。
参见
{{Ambox}}— 条目消息框{{Imbox}}— 文件页消息框{{Cmbox}}— 分类消息框{{Ombox}}— 其他页面消息框{{Fmbox}}— 页眉和页脚消息框{{Mbox}}— 自动检测命名空间