Chiyansama(留言 | 貢獻) (// Edit via Wikiplus) |
Chiyansama(留言 | 貢獻) (// Edit via Wikiplus) |
||
(未顯示同一使用者於中間所作的 3 次修訂) | |||
第1行: | 第1行: | ||
{{NoteTA|G1=IT}} |
{{NoteTA|G1=IT}} |
||
{{操作指南|H:Inputbox}} |
{{操作指南|H:Inputbox}} |
||
{{notice|本页面翻译自[[mw:Extension:InputBox]],欢迎参与补充内容。}}'''输入框'''是一个 |
{{notice|本页面翻译自[[mw:Extension:InputBox]],欢迎参与补充内容。}}'''输入框'''是一个MediaWiki扩展,由Erik Möller编写。 |
||
== 通用语法 == |
== 通用语法 == |
||
第220行: | 第220行: | ||
<inputbox> |
<inputbox> |
||
type=commenttitle |
type=commenttitle |
||
page= |
page=Help:输入框 |
||
</inputbox> |
</inputbox> |
||
</pre> |
</pre> |
||
第228行: | 第228行: | ||
<inputbox> |
<inputbox> |
||
type=commenttitle |
type=commenttitle |
||
page= |
page=Help:输入框 |
||
</inputbox> |
</inputbox> |
||
|} |
|} |
於 2023年7月31日 (一) 12:09 的最新修訂
本頁面翻譯自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=Help:输入框 </inputbox> 得到 |
所使用MediaWiki命名空間的文字只是樣例,幾乎任何頁面都可使用。