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 的修訂
本頁面翻譯自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命名空間的文字只是樣例,幾乎任何頁面都可使用。