跳转到内容

Template:Tmbox/doc:修订间差异

勤求古训,博采众方
删除的内容 添加的内容
开篇添加 Mbox templates 导航
 
(未显示1个用户的3个中间版本)
第1行: 第1行:
{{Mbox templates}}
{{Documentation subpage}}
{{Documentation subpage}}
{{Uses Lua|Module:Message box}}
{{Uses Lua|Module:Message box}}
{{Uses TemplateStyles|Module:Message box/tmbox.css}}
{{Mbox templates}}


'''{{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>text</code> || 消息文本
| <code>imageright</code> || 右侧图片
|-
|-
| <code>small</code> || <code>yes</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> — 仅用于快速删除模板
{{Tmbox|type=notice|text=这是一个讨论页提示。}}
* <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=notice|small=yes|text=小型讨论提示。}}
{{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=notice|text=type=<u>notice</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>
{{Tmbox|type=notice|small=yes|text=small=yes — 小型右浮消息框}}

== 参数说明 ==
<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 类确定显示风格,可更换皮肤。


== 参见 ==
== 参见 ==
{{Mbox templates}}
* {{tlx|Ambox}} — 条目消息框
* {{tlx|Ambox}} — 条目消息框
* {{tlx|Imbox}} — 文件页消息框
* {{tlx|Cmbox}} — 分类消息框
* {{tlx|Ombox}} — 其他页面消息框
* {{tlx|Fmbox}} — 页眉和页脚消息框
* {{tlx|Mbox}} — 自动检测命名空间
* {{tlx|Mbox}} — 自动检测命名空间



2026年6月22日 (一) 10:54的最新版本

消息框模板

{{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 演示

小尺寸模式

{{Tmbox|type=notice|small=yes|text=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}} — 自动检测命名空间