Extension:DynamicPageList (third-party)/ja
![]() | この拡張機能は、MediaWiki 1.35 以降のあらゆるバージョンのリリースと互換性がありません。 本番環境のサイトではこの拡張機能を使用しないよう勧告します。 Volunteer developers are invited to pledge their efforts to updating this extension to make it compatible with MediaWiki 1.39 by replacing the {{Incompatible }} template with {{Incompatible |version=1.35|pledge=~~~~}} .この拡張機能の代替となる拡張機能をインストールしたい場合は、以下を参照してください: |
![]() | 現在、この拡張機能は積極的な保守が行われていません! それでも機能する可能性はありますが、バグ報告や機能の要望は無視される可能性が高くなります。 この拡張機能の開発や保守の作業を引き受けることに興味がある場合は、リポジトリの所有権を申請できます。 礼儀として、作者に問い合わせることをお勧めします。 保守を引き継いだ場合、このテンプレートは除去すべきです。また、拡張機能ページの {{extension}} 基礎情報ボックス内のリストにあなたの名前を保守担当者として追加してください。 |
![]() リリースの状態: 保守されていない |
|
---|---|
実装 | タグ , パーサー関数 |
説明 | Allows to create lists of other articles based on their category, namespace, title, references or template usage and include contents or arguments of template calls of those articles into your page. |
作者 | |
最新バージョン | Continuous updates |
MediaWiki | 1.32.x - 1.34.x only |
データベースの変更 | いいえ |
ライセンス | GNU 一般公衆利用許諾書 2.0 以降 |
ダウンロード | |
例 | various sample reports |
記述を参照 |
|
translatewiki.net で翻訳を利用できる場合は、DynamicPageList (third-party) 拡張機能の翻訳にご協力ください | |
問題点 | 未解決のタスク · バグを報告 |
The DynamicPageList (third-party) extension is a reporting tool for MediaWiki, listing category members and intersections with various formats and details. For full documentation, see the full original manual or manual (German Manual Hilfe:DynamicPageList).
最も基本的な形として、DPL は 1 つまたは複数のカテゴリに分類されたページのリストを表示します。 また、著者、名前空間、日付、名前のパターン、テンプレートの使用、他の記事への参照などの要素に基づいて選択されることもある。 アウトプットの形は様々で、中には厳選された記事の要素を取り入れたものもあります。
この拡張機能は、パーサ関数{{#dpl: .... }}
またはパーサタグ<DPL>
で呼び出される。
A Wikimedia-compatible implementation of certain features can be invoked with <DynamicPageList>
.
DPL can result in computationally-expensive database queries. For best performance, use the optional parameters allowcachedresults and/or dplcache where possible.
インストール
- ダウンロードして、ファイルを
extensions/
フォルダー内のDynamicPageList
という名前のディレクトリ内に配置します。 - 以下のコードを
LocalSettings.php
の末尾に追加します:require_once "$IP/extensions/DynamicPageList/DynamicPageList.php";
- 必要に応じて設定を変更
完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。
設定
DPL configuration settings and their default values, from the manual:
設定 | 既定 | 説明 |
---|---|---|
ExtDynamicPageList::$allowedNamespaces |
null |
To be initialized at first use of DPL, array of all namespaces except Media and Special, because we cannot use the DB for these to generate dynamic page lists. Cannot be customized. Use ExtDynamicPageList::$options['namespace'] or ExtDynamicPageList::$options['notnamespace'] for customization. |
ExtDynamicPageList::$allowUnlimitedCategories |
true |
Allow unlimited categories in the Query |
ExtDynamicPageList::$allowUnlimitedResults |
false |
Allow unlimited results to be shown |
ExtDynamicPageList::$behavingLikeIntersection |
false |
Changes certain default values to comply with Extension:Intersection |
ExtDynamicPageList::$categoryStyleListCutoff |
6 | Max length to format a list of articles chunked by letter as bullet list, if list bigger, columnar format user (same as cutoff arg for CategoryPage::formatList()) |
ExtDynamicPageList::$fixedCategories |
empty array |
categories has been used |
ExtDynamicPageList::$functionalRichness |
0 | The amount of functionality of DPL that is accesible for the user; to be set by DynamicPageList.php and DynamicPageListMigration.php see the fixcategory command |
ExtDynamicPageList::$maxCategoryCount |
4 | Maximum number of categories allowed in the Query |
ExtDynamicPageList::$maxResultCount |
500 | Maximum number of results to allow |
ExtDynamicPageList::$minCategoryCount |
0 | Minimum number of categories needed in the Query |
ExtDynamicPageList::$options |
no options | If you add a line like the following to your LocalSettings.php, DPL will only run from protected pages: ExtDynamicPageList::$options['RunFromProtectedPagesOnly'] = "Extension DPL (warning): current configuration allows execution from protected pages only."; There is a whole bunch of other options too; see DPLSetup.php.
|
ExtDynamicPageList::$respectParserCache |
false for <dpl> but true for <DynamicPageList>. |
If set to 'true' DPL will no longer behave dynamically because its output is taken from the ParserCache. In other words, false = make page dynamic ; true = execute only when parser cache is refreshed |
These are all public static variables.
The global variable $wgNonincludableNamespaces is also respected by DPL. It will prevent the contents of the listed namespaces from appearing in DPL's output.
$maxResultCount
is a LIMIT on the SQL query itself. Some DPL query parameters like includematch
are applied after the SQL query, however, so results here may easily be misleading.
機能の豊かさ
DynamicPageList has many features; some are expensive, or dangerous in the wrong hands. It is important to choose an appropriate level of functionality for your wiki.
ExtDynamicPageList::setFunctionalRichness(0)
is equivalent to Wikimedia's DPLExtDynamicPageList::setFunctionalRichness(1)
adds additional formatting parametersExtDynamicPageList::setFunctionalRichness(2)
adds performance equivalent features for templates and pagelinksExtDynamicPageList::setFunctionalRichness(3)
allows more-expensive page inclusion features and regular expression queries; expect to use the dplcache parameterExtDynamicPageList::setFunctionalRichness(4)
permits exotic and potentially dangerous batch update and delete operations; not recommended for public websites
使用法
拡張された DPL 機能
Extended DPL is invoked by using the parser function {{#dpl: .... }}
, or the parser extension tag <DPL>...</DPL>
.
後方互換性がある機能
Functionality compatible with Wikimedia's DPL extension can be invoked with <DynamicPageList> .... </DynamicPageList>
.
概要
Assume you have written some articles about countries. Typically these articles will have three things in common:
- They will belong to a common category
- They will have a similar chapter structure, i.e. they will contain paragraphs named 'Religion' or 'History'
- They will use a template which is used to present highly structured short data items ('Capital', 'Inhabitants', ..) in a nice way (e.g. as a wikitable)
DPLは、記事に関するレポートを作成します
Let us assume that there is an article on Islam. You want to give some information about the spreading of this religion over various countries. But you do not want to create redundancy by repeating information that was already given in the articles on the countries.
In our scenario the natural approach with DPL would be to generate a list of 'countries' (=category) where Islam plays a role (i.e. restrict your selection to articles of category 'Country' which contain a link to 'Islam'). Typically you would want to include part of the text chapter on 'Religion' from each of the relevant countries. You might also want to give the number of inhabitants for each country. The output should be shown as an alphabetically ordered table. It would be nice if the user could easily sort the table by inhabitants or some other criteria.
With DPL you can ..
- generate a list of all those articles (or a random sample)
- show metadata of the articles (popularity, date of last update, ..)
- show one or more chapters of the articles ('transclude' content)
- show parameter values which are passed to the common template
- order articles appropriately
- present the result in a sortable table (e.g.)
- use multi column output
どのような手順が必要なのでしょうか?
Find the articles you want to list:
- select by a logical combination (AND,OR,NOT) of categories
- specify a range for the number of categories the article must be assigned to
- select by a logical combination (AND,OR,NOT) of namespaces
- define a pattern which must match the article's name
- name a page to which the article must or must not link
- name a template which the article must or must not use
- name a text pattern which must occur within external links from a page
- exclude or include redirections
- restrict your search to stable pages or quality pages ("flagged revisions")
- use other criteria for selection like author, date of last change etc.
- define regular expressions to match the contents of pages you want to include
Order the result list of articles according to
- name
- date of last change
- popularity
- user who changed them last
- size
- restrict the output to the first n articles or to a random sample
- use descending or ascending sequence
Define attributes you want to see
- article name
- article namespace
- article size
- date of last change
- date of last access
- user who changed them last
Define contents you want to show
- whole article
- contents of certain chapters (identified by headings)
- text portions (defined by special marker tags in the article)
- values of template calls
- substitute the original template by a different one and show the output of that template
Define the output format
- specify headline and footer for your report
- use ordered list, unordered list
- use tables, sorted tables (using javascript)
- format table fields individually by applying templates to their content
- use category style listing
- create "tag clouds" by varying output text size depending on popularity of pages
- multi column output
- truncate title or contents to a certain maximum length
- add a link to the article or to one or more of its chapters
DPLは、カテゴリに関するレポートを作成します
Apart from producing a list of pages which match certain criteria, DPL can also create a list of categories a selected set of pages belongs to. This can be useful to get an idea of the semantic scope of a group of pages (which can be defined by some arbitrary criteria). One of the more useful applications would be question like: "To which categories do the pages belong which contain a reference to the current page?"
DPLを使った一括編集が可能
Sometimes you want to perform a similar editing task on many articles (like adding a template at the beginning of the text). DPL has a feature which allows you to update other articles based on regular expressions. This feature is experimental and can be disabled in the DPL config file.
DPLは他の拡張機能と相互作用します
There is a special mechanism which allows you to call your own extension inside the result loop of a DPL query. This opens doors for assembling new 'applications' without having to program on php level. For example you can create menu trees for Extension:Treeview, you can create dependency graphs or timebars with Extension:Wgraph, you can generate nice bar graphs or pie charts using DPL together with Ploticus, you can call 'gallery' or whatever you want...
DPLは他のアプリケーションを構築するためのプラットフォーム
The power of DPL makes it possible to create applications on wiki template level which would normally require PHP programming. One example of this is a light-weight "semantic wiki" approach. See the DPL demo page for details.
DPLとパフォーマンス
With a few lines of DPL code it is possible to create huge output and CPU load (think of a DPL query which tries to include the contents of all articles in your mediawiki ;-)). Normally this is not a problem because users who write DPL queries have some level of expertise. If you are afraid, however, you can restrict the execution of DPL queries to protected articles.
Apart from that the general performance of DPL on medium-size wikis is quite acceptable (see the performance tests on the dpldemo website). Use of allowcachedresults and/or dplcache where possible can improve performance.
関連項目
参考資料
DPL can do much more than we can explain here. The complete full original manual or manual (German Manual Hilfe:DynamicPageList) describes more.
関連する拡張機能
- Manual:MediaWikiのデータ管理法 – An overview and comparison.
- Extension:Semantic MediaWiki turns links and data in wiki pages into queryable information
- Extension:NukeDPL deletes pages based on DynamicPageList; also useful for testing different DPL settings without actually deleting the pages
- Extensions incompatible with 1.35/ja
- Unmaintained extensions/ja
- Tag extensions/ja
- Parser function extensions/ja
- GPL licensed extensions/ja
- Extensions in Wikimedia version control/ja
- All extensions/ja
- Category extensions/ja
- List extensions/ja
- Namespace extensions/ja
- Special page extensions/ja
- Table extensions/ja
- Page content extensions/ja
- Tag cloud extensions/ja
- Category intersection extensions/ja