Rozšíření:DynamicPageList (third-party)
A request to archive this extension has been made on Phabricator. See úkol T353927 for the archival request and the rationale for the request, and to leave comments about the request. |
Toto rozšíření je nekompatibilní s MediaWiki 1.35 nebo jakoukoli verzí novější! Doporučujeme nepoužívat toto rozšíření na živém webu. Dobrovolní vývojáři se vyzývají, aby přislíbili své úsilí o aktualizaci tohoto rozšíření, aby bylo kompatibilní s MediaWiki 1.41 tím, že nahradí {{Incompatible }} šablonu {{Incompatible |version=1.35|pledge=~~~~}} .Podívejte se prosím na následující alternativy, které můžete chtít nainstalovat místo tohoto rozšíření: |
Toto rozšíření není v současné době aktivně udržováno! Ačkoli to může stále fungovat, jakákoli hlášení o chybách nebo požadavky na funkce budou pravděpodobně ignorovány. Pokud máte zájem převzít úkol vývoje a údržby tohoto rozšíření, můžete požádat o vlastnictví úložiště. Jako laskavost můžete kontaktovat autora. Měli byste také odstranit tuto šablonu a uvést se jako správce rozšíření v informačním poli stránky {{Extension }}. |
DynamicPageList (third party) Stav rozšíření: bez správce |
|
---|---|
Zavádění | Značka , Funkce analyzátoru |
Popis | Umožňuje vytvářet seznamy jiných článků na základě jejich kategorie, jmenného prostoru, názvu, odkazů nebo použití šablony a zahrnutí obsahu nebo argumentů volání šablon těchto článků na vaši stránku. |
Napsal(i) | |
Nejnovější verze | Continuous updates |
MediaWiki | 1.32.x - 1.34.x only |
Změny v databázi | Ne |
Licence | GNU General Public License 2.0 nebo pozdější |
Zdrojový kód | |
Příklad | various sample reports |
viz popis |
|
Přeložte rozšíření DynamicPageList (third-party), používá-li lokalizaci z translatewiki.net | |
Problémy | Otevřené úkoly · Nahlásit chybu |
Rozšíření DynamicPageList (third-party) je nástroj pro vytváření zpráv pro MediaWiki, který uvádí členy kategorií a průniky s různými formáty a podrobnostmi. Úplnou dokumentaci naleznete v kompletní originální příručce nebo v příručce (německá příručka Hilfe:DynamicPageList).
Ve své nejzákladnější podobě DPL zobrazuje seznam stránek v jedné nebo více kategoriích. Výběr může být také založen na faktorech, jako je autor, jmenný prostor, datum, vzor názvu, použití šablon nebo odkazy na jiné články. Výstup má různé formy, z nichž některé obsahují prvky vybraných článků.
Toto rozšíření je vyvoláno funkcí analyzátoru {{#dpl: .... }}
nebo tagem analyzátoru <DPL>
.
Pomocí <DynamicPageList>
lze vyvolat implementaci určitých funkcí kompatibilní s Wikimedií.
DPL může mít za následek výpočetně náročné databázové dotazy. Nejlepšího výkonu dosáhnete, když, pokud je to možné, použijte volitelné parametry allowcachedresults a/nebo dplcache.
Instalace
- Stáhněte soubor/y a vložte je do adresáře pojmenovaného
DynamicPageList
ve vaší složceextensions/
.
Vývojáři a přispěvatelé kódu by si místo toho měli nainstalovat rozšíření from Git pomocí:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/DynamicPageList - Na konec vašeho souboru LocalSettings.php přidejte následující kód:
require_once "$IP/extensions/DynamicPageList/DynamicPageList.php";
- V případě potřeby nakonfigurujte podle požadavků
- Dokončeno – Přejděte na stránku Special:Version vaší wiki a zkontrolujte, zda bylo rozšíření úspěšně nainstalováno.
Konfigurace
Nastavení konfigurace DPL a jejich výchozí hodnoty, z příručky:
Nastavení | Výchozí | Popis |
---|---|---|
ExtDynamicPageList::$allowedNamespaces |
null
|
Má být inicializováno při prvním použití DPL, pole všech jmenných prostorů kromě Media a Special, protože pro ně nemůžeme použít DB ke generování dynamických seznamů stránek. Nelze přizpůsobit. Pro přizpůsobení použijte ExtDynamicPageList::$options['namespace'] nebo ExtDynamicPageList::$options['notnamespace'] .
|
ExtDynamicPageList::$allowUnlimitedCategories |
true |
Povolí neomezený počet kategorií v dotazu |
ExtDynamicPageList::$allowUnlimitedResults |
false |
Povolí neomezené zobrazování výsledků |
ExtDynamicPageList::$behavingLikeIntersection |
false |
Změní určité výchozí hodnoty tak, aby odpovídaly Extension:Intersection |
ExtDynamicPageList::$categoryStyleListCutoff |
6 | Maximální délka pro formátování seznamu článků rozdělených podle písmen jako seznam s odrážkami, pokud je seznam větší, uživatel ve sloupcovém formátu (stejný jako argument cutoff pro CategoryPage::formatList() )
|
ExtDynamicPageList::$fixedCategories |
empty array |
categories has been used |
ExtDynamicPageList::$functionalRichness |
0 | Množství funkcí DPL, které jsou pro uživatele dostupné; pro nastavení DynamicPageList.php a DynamicPageListMigration.php viz příkaz opravit kategorii |
ExtDynamicPageList::$maxCategoryCount |
4 | Maximální počet kategorií povolených v dotazu |
ExtDynamicPageList::$maxResultCount |
500 | Maximální povolený počet výsledků |
ExtDynamicPageList::$minCategoryCount |
0 | Minimální počet kategorií potřebných v dotazu |
ExtDynamicPageList::$options |
no options | Pokud do souboru LocalSettings.php přidáte řádek jako je následující, DPL se spustí pouze z chráněných stránek: 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 |
To vše jsou veřejné statické proměnné.
DPL respektuje i globální proměnnou $wgNonincludableNamespaces. Zabrání tomu, aby se obsah uvedených jmenných prostorů objevil ve výstupu DPL.
$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.
Funkčnost
DynamicPageList má mnoho funkcí; některé jsou náročné nebo nebezpečné ve špatných rukách. Je důležité zvolit vhodnou úroveň funkčnosti pro vaši wiki.
ExtDynamicPageList::setFunctionalRichness(0)
- ekvivalentní DPL WikimedieExtDynamicPageList::setFunctionalRichness(1)
- přidává další parametry formátováníExtDynamicPageList::setFunctionalRichness(2)
- přidává funkce ekvivalentní výkonu pro šablony a odkazy na stránkyExtDynamicPageList::setFunctionalRichness(3)
- allows more-expensive page inclusion features and regular expression queries; expect to use the dplcache parameterExtDynamicPageList::setFunctionalRichness(4)
- umožňuje exotické a potenciálně nebezpečné operace dávkové aktualizace a mazání. Nedoporučuje se pro veřejné weby
Použití
Rozšířená funkčnost DPL
DPL se vyvolá pomocí funkce analyzátoru {{#dpl: .... }}
nebo tagu rozšíření analyzátoru <DPL>...</DPL>
.
- Více vám řekneː Manual - General Usage and Invocation Syntax and Manual - DPL parameters
Funkce zpětně kompatibility
Functionality compatible with Wikimedia's DPL extension can be invoked with <DynamicPageList> .... </DynamicPageList>
.
Přehled
Předpokládejme, že jste napsali nějaké články o zemích. Tyto články budou mít obvykle tři společné věci:
- 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 generuje zprávy o článcích
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
Jaké kroky jsou nutné?
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 generuje zprávy o kategoriích
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?"
Pro hromadné úpravy lze použít 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 spolupracuje s dalšími rozšířeními
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 generate nice bar graphs or pie charts using DPL together with Ploticus, you can call 'gallery' or whatever you want...
DPL je platforma pro vytváření dalších aplikací
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 a výkon
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.
Související odkazy
Další informace
DPL can do much more than we can explain here. The complete full original manual or manual (German Manual Hilfe:DynamicPageList) describes more.
Související rozšíření
- Příručka:Správa dat v MediaWiki – An overview and comparison.
- Rozšíření:Semantic MediaWiki turns links and data in wiki pages into queryable information
- Rozšíření:NukeDPL deletes pages based on DynamicPageList; also useful for testing different DPL settings without actually deleting the pages
- Extensions incompatible with 1.35/cs
- Unmaintained extensions/cs
- Tag extensions/cs
- Parser function extensions/cs
- GPL licensed extensions/cs
- Extensions in Wikimedia version control/cs
- All extensions/cs
- Extensions not using extension registration
- Category extensions/cs
- List extensions/cs
- Namespace extensions/cs
- Special page extensions/cs
- Table extensions/cs
- Page content extensions/cs
- Tag cloud extensions/cs
- Category intersection extensions/cs