확장기능:InputBox
InputBox 출시 상태: 안정 |
|
---|---|
![]() |
|
구현 | 태그 , Page action , 검색 |
설명 | 사용자가 미리 정의한 HTML 폼을 문서에 추가할 수 있게 합니다. |
만든이 |
|
최신 버전 | Continuous updates |
MediaWiki | 1.30+ |
데이터베이스 변경 | 아니오 |
라이선스 | MIT License |
다운로드 | |
* <inputbox> |
|
InputBox 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
이슈 | 미해결 작업 · 버그 보고 |
InputBox 확장 기능은 미리 만들어둔 HTML 폼을 위키 문서에 추가합니다. 사용자들은 이 폼을 “채워서” (글자를 적거나 메뉴를 고르거나 하는 등) 글자를 상자 안으로 넣을 수 있습니다.
InputBox는 처음에는 Wikinews에 새 문서 만들기 상자를 추가하기 위해 Erik Möller에 의해 제작되었습니다.
설치
- 파일을 다운로드해서,
extensions/
폴더 내의InputBox
이라는 이름의 디렉터리 내에 설치합니다. - 아래의 코드를 LocalSettings.php의 말미에 추가합니다:
wfLoadExtension( 'InputBox' );
완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
미디어위키 1.24 이하를 실행 중인 사용자에게:
위의 지시사항은 wfLoadExtension()
을 사용하여 이 확장기능을 설치하는 새로운 방법을 기술한 것으로,
wfLoadExtension( 'InputBox' );
대신 초기 버전(미디어위키 1.24 이하)에 이 확장기능을 설치하려면 다음을 사용해야 합니다:
require_once "$IP/extensions/InputBox/InputBox.php";
예시
새 문서를 시작하기 위한 상자.
위키 코드
<inputbox> type=create break=no </inputbox>
결과
일반적인 구문
Input box는 다음과 같은 구조를 같습니다.
<inputbox>
type=
bgcolor=
width=
page=
default=
preload=
editintro=
buttonlabel=
hidden=
searchbuttonlabel=
fulltextbutton=
labeltext=
break=
namespaces=
prefix=
placeholder=
minor=
nosummary=
summary=
id=
inline=
dir=
preloadparams[]=
searchfilter=
useve=
arialabel=
</inputbox>
|
type 매개변수는 필수 항목입니다. 다른 매개변수들은 생략될 수 있습니다. preloadparams[]는 여러 번 나타날 수 있습니다.
박스 종류
제출 버튼은 기본적으로 상자 아래에 나타납니다.
“제출” 버튼은 line break 매개 변수를 다음과 같이 사용하면 상자와 버튼 사이의 줄바꿈이 제거되어 상자의 오른쪽으로 갑니다: break=no
.
제출 버튼을 오른쪽에 두는 것은 검색어 제안들이 검색 버튼을 덮어 버리는 것을 막을 때 유용합니다.
종류 | 예시 | 설명 |
---|---|---|
type=search | 50 글자가 들어가는 기본 너비의 검색창을 만듭니다. 텍스트 상자 안에는 검색을 위한 정보가 적힙니다. | |
type=create | 새 문서 만들기. 텍스트 박스에 추가될 정보는 편집될 문서의 이름입니다. | |
type=comment | 텍스트 박스에 적힌 문서의 제일 아래에 새 문단을 추가합니다. | |
type=commenttitle | 텍스트 박스에 적힌 제목으로 된 새 문단을 만듭니다. 제목은 default= 매개변수로 지정될 수 있으며 문서는 page= 로 명시되어야 합니다. (introduced in rev:47203)
| |
type=fulltext | “보기” 버튼 없이 전체 글 검색 버튼만을 사용하여 검색합니다. (introduced in rev:45269) | |
type=move | 다른 이름으로 이동하기. (introduced in gerrit:97559) |
type=search2
의 경우 검색 버튼의 기본 위치는 오른쪽입니다.
현재 이 InputBox에 다른 매개 변수를 추가할 수 없는 것으로 보입니다.
이 검색 상자는 위치한 위키 전체를 검색합니다.
종류 | 예시 |
---|---|
type=search2 |
변수
변수 | 설명 | 목적 | 호환성 | 예시 | 결과 | |
---|---|---|---|---|---|---|
arialabel= | Supply the aria-label attribute to the inputbox to allow generated markup be accessible to screen readers | All types |
|
<inputbox> type=search arialabel=Search the Wiki </inputbox> |
||
bgcolor= | 표의 배경 색상(HTML 색상 값)을 설정합니다. 따옴표를 사용하지 마세요. | 모든 종류 | ? | <inputbox> type=search bgcolor=#eeeeff </inputbox> |
||
width= | InputBox의 너비를 글자수로 설정합니다. | 모든 종류 | ? | <inputbox> type=create width=24 </inputbox> |
||
default= | 기본 텍스트를 InputBox에 넣기. | 모든 종류 | ? | <inputbox> type=comment default=User talk:Eloquence </inputbox> |
||
preload= | 새 문서를 생성할 때 이 제목의 문서가 빈 편집 창에 preload됩니다(Manual:Creating pages with preloaded text 참조). | create, comment, commenttitle | ? | <inputbox> type=create preload=Log </inputbox> |
||
효과를 각각 알아보기 위해 위 혹은 아래의 InputBox에 존재하지 않는 문서 이름을 적어 넣고 Enter를 누르거나 문서 만들기 혹은 새 문단를 클릭하십시오. | ||||||
editintro= | The page which is given under this parameter will be shown, as instructions, above the editing window. | create, comment | ? | <inputbox> type=comment editintro=MediaWiki:Missingcommenttext </inputbox> |
||
buttonlabel= | This label will be used for the main button of the form. | 모든 종류 | ? | <inputbox> type=comment buttonlabel=Add new rumor </inputbox> |
||
hidden= | This specifies that there is no InputBox. It is used with parameter "default", now not being a default, but the fixed value of the name of the page. |
create, comment | ? | <inputbox> type=comment editintro=Extension:InputBox/editintro comment preload=Extension:InputBox/preload hidden=yes default=Extension talk:InputBox buttonlabel=토론 문서에 의견 달기 </inputbox> |
||
searchbuttonlabel= | This label will be used for the "Search full text" button of the search form. | search, fulltext | ? | <inputbox> type=search searchbuttonlabel=Dig deeperee </inputbox> |
||
fulltextbutton= | Show the full text search button on search2 form | search2 | ? | <inputbox> type=search2 searchbuttonlabel=Dig deeper fulltextbutton=true </inputbox> |
||
labeltext= | Text to print beside the button | search2 | ? | <inputbox> type=search2 searchbuttonlabel=Dig deeper labeltext=찾기: </inputbox> |
||
break= | Whether or not to insert a line break between the input box and the button(s). Defaults to yes (use a line break). | 모든 종류 | ? | <inputbox> type=create width=24 break=no </inputbox> |
||
namespaces= | Support for namespace checkboxes in fulltext search. 일반, " |
search, fulltext | ? | <inputbox> type=search namespaces=Main**,Help </inputbox> |
||
prefix= |
Remark: underscores aren't recognized as spaces. |
search, fulltext, create | ? | <inputbox> type=search prefix={{FULLPAGENAME}}/Archive </inputbox> |
The button below prefixes the name with | |
placeholder= | Define placeholder text that will display in the input box when it is empty. | 모든 종류 |
|
<inputbox> type=search placeholder=이 위키를 둘러보기 </inputbox> |
||
page= | Page to posts comment to, or page to move. | comment, move | <inputbox> type=comment page=Project:Sandbox </inputbox> |
|||
minor= | 사소한 편집. | comment, create | <inputbox> type=comment page=Project:Sandbox minor=true </inputbox> |
|||
nosummary= | Edit summary (headline) not required for new comment. | comment | <inputbox> type=comment page=Project:Sandbox nosummary=true </inputbox> |
|||
summary= | Edit summary or move reason. | create, move | <inputbox> type=create default=Special:Mypage/inputbox test summary=Foo </inputbox> |
|||
id= | id attribute for <form>. | 모든 종류 |
|
<inputbox> type=comment page=Project:Sandbox summary=Foo id=bar </inputbox> |
||
inline= | Make the InputBox be an inline element (no line break at beginning). | search2 | Text here: <inputbox> type=search2 inline=true width=10 </inputbox> |
Text here: | ||
dir= | Right to left (rtl) or left to right (ltr). Defaults to directionality of the page's language. | 모든 종류 | <inputbox> dir=rtl type=comment page=Project:Sandbox summary=Foo </inputbox> |
|||
preloadparams[]= | Specify parameters to the preload text. See Creating pages with preloaded text. | create, comment, commenttitle |
|
<inputbox> type=create preload=Log preloadparams[]=param1 preloadparams[]=param2 </inputbox> |
||
searchfilter= | Specify parameters to append to the search | search |
|
<inputbox> type=search searchfilter=insource:foo </inputbox> |
||
useve= | When creating a page the input box will use the new visual editor, if the extension is installed, and this parameter is set to true. | create, comment | <inputbox> type=create break=no useve=true </inputbox> |
Applying create to an existing page simply gives the edit page.
In that case preload
is ignored.
Applying comment for a new page works.
The texts taken from the MediaWiki:
namespace are of course only examples, any existing page can be used for editintro
or preload
.
Unfortunately preload
does not yet work for the Upload summary.
정렬
If you want to create an inputbox on the right side of the page, do something like:
<div style="float:{{dir|{{pagelang}}|left|right}}; width:42em">
<inputbox>
type=create
</inputbox>
</div>
파서 함수
Using InputBox in a template
In order to create many similar input boxes, InputBox can be used in a template.
However, passing template parameters to InputBox parameters only works if the <inputbox>...</inputbox>
tag is written as {{#tag:inputbox | ...}}
inside the template.
The following example is a template to create a new wiki page from a named template:
{{#tag:inputbox |
type=create
buttonlabel=새 {{{1|글}}} 만들기
preload={{{2|Template:Article}}} }}
When instantiating the template, the first parameter gives the item that is created (default: article
) as spelled out in the button, the second parameter gives the name of the template used to create the item (default: Template:Article
).
E.g., the code for an input box to create a new project from a project template might look like this:
{{Template:CreateNew|project|Template:Project}}
같이 보기
![]() | This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
- Extensions bundled with MediaWiki 1.21/ko
- Stable extensions/ko
- Tag extensions/ko
- Page action extensions/ko
- Search extensions/ko
- MIT licensed extensions/ko
- Extensions in Wikimedia version control/ko
- MediaWikiPerformAction extensions/ko
- ParserFirstCallInit extensions/ko
- SpecialPageBeforeExecute extensions/ko
- All extensions/ko
- Extensions used on Wikimedia/ko
- Form extensions/ko
- Page creation extensions/ko
- Search widget extensions/ko
- Edit box extensions/ko