Jump to content

Extension:SelectTag/ko

From mediawiki.org
This page is a translated version of the page Extension:SelectTag and the translation is 11% complete.
미디어위키 확장 기능 설명서
SelectTag
출시 상태: 안정
구현 파서 함수
설명 Adds customisable ‎<select> for inserting text via database fetching.
만든 이 Khaled El Mansoury토론
최신 버전 1.2.0 (2022-11-05)
호환성 정책 스냅샷은 미디어위키와 함께 릴리스됩니다. Master is not backward compatible.
데이터베이스 변경 아니오
$wgSelectTag
‎<select>
Licence GNU General Public License 3.0 or later
다운로드
README
예시 ExpressProgs TestWiki
SelectTag 확장 기능 번역 (translatewiki.net에서 가능한 경우)

The SelectTag extension that can be used for embedding any kind of text (incl. HTML) into a wiki page via a new tag ‎<select> tag. It selects the data to be displayed from a database table in the same database as MediaWiki is installed in.

It is fully customisable via the LocalSettings.php file to include as many attributes as needed.

설치

  • 파일을 다운로드하고 SelectTag 폴더를 extensions/ 디렉토리에 넣어 주세요.
    개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.
    cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/SelectTag
    
  • 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
    wfLoadExtension( 'SelectTag' );
    
  • Yes 완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.

Configuration

LocalSettings.php

$wgSelectTag[ 'examplesource' ][ '_dbname' ] = 'exampletbl';
$wgSelectTag[ 'examplesource' ][ 'attr1' ] = 'field1';
$wgSelectTag[ 'examplesource' ][ 'attr2' ] = 'field2';
$wgSelectTag[ 'examplesource' ][ 'attr3' ] = 'field3';
$wgSelectTag[ 'examplesource' ][ '_show' ][ 'show1' ] = 'field4';
$wgSelectTag[ 'examplesource' ][ '_showDefault' ] = 'show1';

Page

<select _source="examplesource" arr1="value1" arr2="value2" arr3="value3" _show="show1" />

Resulting SQL query

SELECT field1, field2, field3 FROM exampletbl
WHERE arr1='value1' AND arr2='value2' AND arr3='value3';