Chiyansama(留言 | 貢獻) (// Edit via Wikiplus) |
Chiyansama(留言 | 貢獻) (// Edit via Wikiplus) |
||
第1行: | 第1行: | ||
{{NoteTA|G1=IT}} |
{{NoteTA|G1=IT}} |
||
{{操作指南|H:Inputbox}} |
{{操作指南|H:Inputbox}} |
||
{{notice|本页面翻译自[[mw:Extension:InputBox]],欢迎参与补充内容。}}'''输入框'''是一个 |
{{notice|本页面翻译自[[mw:Extension:InputBox]],欢迎参与补充内容。}}'''输入框'''是一个MediaWiki扩展,由Erik Möller编写。 |
||
== 通用语法 == |
== 通用语法 == |
於 2023年7月13日 (四) 14:36 的修訂
![](/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命名空間的文本只是樣例,幾乎任何頁面都可使用。