Extension:Genealogy/ko
출시 상태: 안정 |
|
|---|---|
| 구현 | 파서 함수 |
| 설명 | Adds a parser function for easier linking between genealogical articles. |
| 만든 이 | Sam Wilson (samwilson토론) |
| 최신 버전 | 2.5.2 (2025-09-26) |
| 호환성 정책 | Master maintains backward compatibility. |
| MediaWiki | >= 1.43 |
| 데이터베이스 변경 | 아니오 |
| Composer | samwilson/mediawiki-extensions-genealogy |
| Licence | GNU General Public License 3.0 or later |
| 다운로드 | README.md |
| 예시 | Demo wiki on Toolforge |
| Genealogy 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
| 이슈 | 미해결 작업 · 버그 보고 |
The Genealogy extension adds a parser function that makes it easy to link between genealogical articles. Basically, for any biographical article which links to other family members, the reverse link on those other articles can be created automatically.
You can experiment with it on Toolforge.
설치
Note that you also need to install the Mermaid or Diagrams extension if you want to use the tree-drawing feature.
Install with Composer
The easiest way to install this extension is with Composer. Add this to your composer.local.json file:
{
"require": {
"samwilson/mediawiki-extensions-genealogy": "^2.0"
}
}
Then run composer update.
After that, you can enable the extension by adding the following to your LocalSettings.php file:
wfLoadExtension( 'Genealogy' );
Normal installation method
- 파일을 다운로드하고
Genealogy폴더를extensions/디렉토리에 넣어 주세요.
개발자와 코딩 기여자는 Git을 이용해 확장기능을 다운받는 것이 좋습니다.cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Genealogy
- 아래의 코드를 LocalSettings.php 코드의 마지막에 추가합니다.
wfLoadExtension( 'Genealogy' );
완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
Usage
This extension creates one parser function: {{#genealogy: … }}.
Its first first parameter is unnamed (i.e. doesn't have an equals sign) but all others are.
The following parameters are supported, four for defining data (♦) and four for reporting data (♦):
- ♦ Define and output a link to a parent:
{{#genealogy:parent|Page Name Here}} - ♦ Define a partner (no output produced; use
partnersto list):{{#genealogy:partner|Page Name Here}} - ♦ Define a page's description (see below for what that means):
{{#genealogy:description|Some description}}
A page's description is a date range or short phrase that will appear in places next to page titles to give them some more context. For example, under people's names in the tree output. - ♦ Set a "sort index" number for a person, so that they appear in this position in the lists of siblings, partners, or children (see below):
{{#genealogy:person|sort_index=3}} - ♦ List all siblings:
{{#genealogy:siblings|exclude_self=yes}}
Whereexclude_selfoptionally excludes the current page from the resulting list. - ♦ List all partners:
{{#genealogy:partners}} - ♦ List all children:
{{#genealogy:children}} - ♦ Display a tree (a connected graph):
{{#genealogy:tree|ancestors=List|descendants=List|delimiter=char|format=formatname}}
where eachListis adelimiter-separated list of page titles, andformatnameis 'graphviz' or 'mermaid' (not case sensitive). This requires the Mermaid, GraphViz, or Diagrams extension. The delimiter is a newline by default (i.e. each page title should appear on it's own line).
Templates
Example: For an example template that makes use of these parser functions, see person_template.wikitext.
Preload:
When this extension creates a link to a page that doesn't yet exist,
the text of [[Template:Person/preload]] is preloaded.
The location of this preload text can be customised
by modifying the genealogy-person-preload system message.
Person list-item:
Three types of lists of people can be generated: siblings, partners, and children.
The default behaviour is a simple bulleted list,
but this can be overridden by a template, Template:Person/list-item
(the template name is specified by the genealogy-person-list-item system message).
For example, to get a comma-separated one-line list of people, the following template code could be used:
{{{link}}}{{#if: {{{description|}}} | ({{{description}}}) }}{{#ifeq:{{{index}}}|{{{count}}}|.|,}}
There are six parameters that are available for use in the list-item template:
link— A wikitext link.title— The full page title, including namespace.pagename— The page name, without namespace.description— The page description.index— The index of this list-item in the full list, starting from 1.count— The total number of items in the full list.
Development
This extension was built by Sam Wilson and released under version 3 of the GPL (see LICENSE.txt for details).
Please report all bugs to the #Genealogy project on Phabricator.
See also
| This extension is included in the following wiki farms/hosts and/or packages: |
- Stable extensions/ko
- Parser function extensions/ko
- Extensions supporting Composer/ko
- EditPage::showEditForm:initial extensions/ko
- ParserFirstCallInit extensions/ko
- GPL licensed extensions/ko
- Extensions in Wikimedia version control/ko
- All extensions/ko
- Extensions included in Miraheze/ko
- GraphViz extensions/ko
