Chiyansama(留言 | 贡献) (创建页面,内容为“{{NoteTA|G1=IT}} {{操作指南|H:Inputbox}} {{notice|本页面翻译自mw:Extension:InputBox,欢迎参与补充内容。}}'''输入框'''是一个MediaWiki扩展,由Erik Möller编写。 == 通用语法 == 输入框的结构大致如下: <pre> <inputbox> type=类型 参数1=值1 参数2=值3 ... </inputbox> </pre> “type”参数必须要有。其他参数可自选。 == 类型 == {| class="wikitable" !类型 !样例 |- ! type=search…”) |
Chiyansama(留言 | 贡献) (// Edit via Wikiplus) |
||
第52行: | 第52行: | ||
<inputbox> |
<inputbox> |
||
type=commenttitle |
type=commenttitle |
||
page=Wikipedia:Wikipedia_talk:新手入 |
page=Wikipedia:Wikipedia_talk:新手入门 |
||
</inputbox> |
</inputbox> |
||
|- |
|- |
||
第143行: | 第143行: | ||
|--- |
|--- |
||
|'''{{anchor|par_editintro}}editintro='''<br>''comment'', ''create'' |
|'''{{anchor|par_editintro}}editintro='''<br>''comment'', ''create'' |
||
|width="30%"|在 |
|width="30%"|在编辑页显示MediaWiki:Missingcommenttext |
||
| |
| |
||
<pre> |
<pre> |
||
第195行: | 第195行: | ||
</inputbox> |
</inputbox> |
||
|--- |
|--- |
||
|'''{{anchor|par_break}}break='''<br>''所有 |
|'''{{anchor|par_break}}break='''<br>''所有类型'' |
||
|width="30%"|输入框和按钮之间是否换行。 |
|width="30%"|输入框和按钮之间是否换行。 |
||
| |
| |
||
第220行: | 第220行: | ||
<inputbox> |
<inputbox> |
||
type=commenttitle |
type=commenttitle |
||
page=Qiuwen_talk:新手入 |
page=Qiuwen_talk:新手入门 |
||
</inputbox> |
</inputbox> |
||
</pre> |
</pre> |
||
第228行: | 第228行: | ||
<inputbox> |
<inputbox> |
||
type=commenttitle |
type=commenttitle |
||
page=Qiuwen_talk:新手入 |
page=Qiuwen_talk:新手入门 |
||
</inputbox> |
</inputbox> |
||
|} |
|} |
2023年7月13日 (四) 14:35的版本
![](/images/thumb/9/9b/%E7%9A%AE%E7%9A%AE%E6%B3%A8%E6%84%8F%E7%89%8C%EF%BC%88%E8%93%9D%EF%BC%89.svg/50px-%E7%9A%AE%E7%9A%AE%E6%B3%A8%E6%84%8F%E7%89%8C%EF%BC%88%E8%93%9D%EF%BC%89.svg.png)
本页面翻译自mw:Extension:InputBox,欢迎参与补充内容。
输入框是一个MediaWiki扩展,由Erik Möller编写。
通用语法
输入框的结构大致如下:
<inputbox> type=类型 参数1=值1 参数2=值3 ... </inputbox>
“type”参数必须要有。其他参数可自选。
类型
类型 | 样例 |
---|---|
type=search | |
默认宽度为50字符。按钮文字可设置,默认为MediaWiki:inputbox-tryexact和MediaWiki:inputbox-searchfulltext。下同。 | |
type=create | |
创建新页面。 | |
type=comment | |
为文本框中指定的页面新增章节,若该页面不存在则创建。 | |
type=commenttitle | |
为page参数指定的页面新增章节,若该页面不存在则创建。文本框的内容为章节标题。 |
参数
参数 类型范围 |
描述 | 样例 |
---|---|---|
bgcolor= |
设置背景色。不要设置引用。 |
<inputbox> type=search bgcolor=#eeeeff </inputbox> 得到: |
width= |
设置输入框宽度。 |
<inputbox> type=create width=6 </inputbox> 得到: |
default= |
在输入框中放置默认文字。 |
<inputbox> type=comment default=User talk:Mountain </inputbox> 得到: |
preload= comment, create |
在新创建的页面文字框中预装文字。 |
<inputbox> type=create width=20 preload=Template:Lorem_Ipsum/core </inputbox> 得到: |
editintro= comment, create |
在编辑页显示MediaWiki:Missingcommenttext |
<inputbox> type=comment width=20 editintro=MediaWiki:Missingcommenttext </inputbox> 得到: |
buttonlabel= All types |
按钮文字。 |
<inputbox> type=comment buttonlabel=来造谣 </inputbox> 得到: |
searchbuttonlabel= search |
此标示用作搜索全文。 |
<inputbox> type=search searchbuttonlabel=深度优先搜索 </inputbox> 得到: |
break= 所有类型 |
输入框和按钮之间是否换行。 |
<inputbox> type=create width=30 break=no </inputbox> 得到 |
page= commenttitle |
创建哪一个页面的新段落。 |
<inputbox> type=commenttitle page=Qiuwen_talk:新手入门 </inputbox> 得到 |
所使用MediaWiki名字空间的文本只是样例,几乎任何页面都可使用。