Extension:Cargo/nl

This page is a translated version of the page Extension:Cargo and the translation is 100% complete.
MediaWiki Handleiding extensies
Cargo
Release status: stabiel
Implementatie Speciale pagina , API , Parser functie
Beschrijving Een extensie die het mogelijk maakt om gegevens in sjablonen op te slaan en op te vragen.
Auteur(s) Yaron Koren <yaron57@gmail.com> (Yaron Korenoverleg)
Laatste versie 3.4.3 (juli 2023)
Compatibiliteit beleid Master onderhoudt achterwaartse compatibiliteit.
MediaWiki 1.35+
Database wijzigingen Ja
Composer mediawiki/cargo
Tabellen cargo_tables
cargo_pages
cargo_backlinks
Licentie GNU General Public Licentie 2.0 of hoger
Download
Voorbeeld Een pagina met verschillende aanroepen van #cargo_query
  • $wgCargoFileDataColumns
  • $wgCargoDrilldownLargestFontSize
  • $wgCargoDecimalMark
  • $wgCargoDefaultStringBytes
  • $wgCargoAllowedSQLFunctions
  • $wgCargoHideNamespaceName
  • $wgCargoPageDataColumns
  • $wgCargoMaxVisibleHierarchyDrilldownValues
  • $wgCargoDrilldownSmallestFontSize
  • $wgCargoIgnoreBacklinks
  • $wgCargoRecurringEventMaxInstances
  • $wgCargoDefaultMapService
  • $wgCargoStoreUseTemplateArgsFallback
  • $wgCargoLegacyNullLuaFieldsAsEmptyString
  • $wgCargoTablesPrioritizeReplacements
  • $wgCargoDigitGroupingCharacter
  • $wgCargoDefaultQueryLimit
  • $wgCargoDrilldownNumRangesForNumbers
  • $wgCargo24HourTime
  • $wgCargoMaxQueryLimit
  • $wgCargoDrilldownUseTabs
  • $wgCargoMapClusteringMinimum
  • $wgCargoDrilldownMinValuesForComboBox
Downloads kwartaal 111 (Ranked 68th)
Vertaal de extensie Cargo
Problemen Open taken · Rapporteer een bug

Cargo is een uitbreiding op MediaWiki die een lichtgewicht manier biedt om de gegevens in de aanroepen naar sjablonen, zoals infoboxen, op te slaan en op te vragen. Het is qua concept vergelijkbaar met de extensie Semantic MediaWiki , maar biedt een aantal voordelen, waaronder installatiegemak en gebruiksgemak.

Cargo slaat al zijn gegevens op in databasetabellen, die in de eigen database van MediaWiki (de standaard) of een aparte database kunnen worden geplaatst. Voor het grootste deel krijgt elke opgeslagen sjabloon zijn gegevens opgeslagen in een enkele DB-tabel, met een kolom voor elke relevante sjabloonparameter. Hierop zijn enkele uitzonderingen: de verwerking van sjabloonvelden met arrays/lijsten met waarden en van velden met geografische coördinaten is complexer vanwege de slechte interne verwerking van die gegevenstypen in de meeste database-systemen. En meerdere sjablonen kunnen worden ingesteld om hun gegevens allemaal in één database-tabel op te slaan.

De extensie definieert een aantal parserfuncties; Deze drie zijn de belangrijkste:

  • #cargo_declare - geplaatst binnen het deel ‎<noinclude> van een sjabloon; Het definieert het schema voor een tabel.
  • #cargo_store - slaat één rij op in een Cargo-tafel; meestal geplaatst binnen het deel ‎<includeonly> van een sjabloon.
  • #cargo_query - voert query's uit op een of meer Cargo-gegevenstabellen met behulp van SQL-onderdelen.

De andere gedefinieerde parserfuncties zijn:

  • #cargo_attach - definieert een sjabloon als het toevoegen van rijen aan een tabel die elders is gedeclareerd.
  • #cargo_compound_query - Hiermee worden de resultaten van meerdere query's op één plaats weergegeven.
  • #cargo_display_map - Hiermee wordt een kaart weergegeven met één punt.
  • #recurring_event - drukt de datums voor een terugkerende gebeurtenis af; voor gebruik met #cargo_store.

Cargo definieert ook verschillende interfaces voor het bekijken en inzoomen van de opgeslagen gegevens. Deze extensie voegt de volgende speciale pagina's toe:

  • Special:CargoQuery
  • Special:CargoTableDiagram
  • Special:CargoTables
  • Special:Drilldown

Cargo is getest en werkt met de MySQL- en PostgreSQL-databasesystemen. In theorie ondersteunt het ook SQLite, maar het is niet goed getest met SQLite en werkt mogelijk niet.

Deze versie van de Cargo-extensie vereist MediaWiki 1.35+.

Klik door de pagina's in de navigatiebalk hierboven voor meer informatie over Cargo, hoe het werkt, hoe het te gebruiken en hoe het te installeren.

Installatie

See Download and Installation.

Configuratie

Hieronder vindt u de algemene configuratie-instellingen van Cargo, samen met de standaardwaarden.

Om Cargo te configureren om een aparte database te gebruiken in plaats van de MediaWiki-database, zijn er de volgende instellingen:

Separate Database Configuration Settings
Setting Default Description
$wgCargoDBtype null Database type.
$wgCargoDBserver null Host name or IP address of database server.
$wgCargoDBname null Name of the database.
$wgCargoDBuser null Database username.
$wgCargoDBpassword null The password for $wgCargoDBuser.
$wgCargoDBprefix null Database table name prefix.
$wgCargoDBRowFormat null Data base row format.

Voor karakterconfiguratie in verband met getallen zijn er de volgende instellingen:

Character Configuration Settings
Setting Default Description
$wgCargoDecimalMark . Decimal character for numbers.
$wgCargoDigitGroupingCharacter , Thousands digit separator.

De overige globale instellingen zijn als volgt:

Setting Default Description
$wgCargoAllowedSQLFunctions [] Sets allowed SQL functions. See Using SQL Functions for defaults.
$wgCargoRecurringEventMaxInstances 100 The number of max instances to store for recurring events with no set end date.
$wgCargoDefaultStringBytes 300 The default number of characters for fields of type Page, String, Wikitext string, File, URL, and Email.
$wgCargoDefaultQueryLimit 100 Number of results to show for #cargo_query if no limit is set
$wgCargoMaxQueryLimit 5000 The maximum allowed number of results for

#cargo_query

$wgCargo24HourTime false If true uses 24-hour time for Datetime field types.
$wgCargoDefaultMapService OpenLayers Sets the default map service to Google Maps, if set to googlemaps, to Leaflet if set to leaflet, and to OpenLayers if set to openlayers.
$wgCargoGoogleMapsKey null API key for Google Maps, for the googlemaps display format.
$wgCargoMapClusteringMinimum 80 If the number of map points displayed is greater than the value of $wgCargoMapClusteringMinimum, the map displays the locations in "clusters" instead of individual points, for readability. If set to a very high number, does not display clustering.
$wgCargoDrilldownUseTabs true Displays Special:Drilldown table names as tabs at the top instead of a vertical list at the side.
$wgCargoDrilldownSmallestFontSize -1 If set to a positive number, sets the smallest font size, in pixels, for a tag-cloud-style display of filter values.
$wgCargoDrilldownLargestFontSize -1 If set to a positive number, sets the largest font size, in pixels, for a tag-cloud-style display of filter values.
$wgCargoDrilldownMinValuesForComboBox 40 Sets the minimum number of values before their display is converted to a combo box, instead of individual links.
$wgCargoDrilldownNumRangesForNumbers 5 For fields/filters of type Integer or Float, specifies the number of "buckets" into which values are divided.
$wgCargoMaxVisibleHierarchyDrilldownValues 30 If set to a positive integer, specifies the maximum number of values shown at a time for any hierarchy field (All the top-level values are shown irrespective of this value). The values are hidden beyond a certain depth of the hierarchy such that the count of total visible values is at most this number.
$wgCargoTablesPrioritizeReplacements false If true, all tables having a replacement appear at the top of the Special:CargoTables page, instead displaying them in alphabetical order.
$wgCargoPageDataColumns [] The set of fields to store in the _pageData Cargo table. See Storing page data.
$wgCargoFileDataColumns [] The set of fields to store in the _fileData Cargo table. See Storing file data.
$wgCargoHideNamespaceName [6] Array of namespaces to hide from query results.

Zie ook