Extension:Cargo

From mediawiki.org
This page is a translated version of the page Extension:Cargo and the translation is 36% complete.
MediaWiki manüel uzantıları
Cargo
Sürüm durumu: kararlı
Uygulama Özel sayfa , API , Ayrıştırıcı işlevi
Açıklama Şablonlarda bulunan verilerin depolanmasına ve sorgulanmasına izin veren bir uzantı.
Yazar(lar) Yaron Koren <yaron57@gmail.com> (Yaron Korenmesaj)
En son sürüm 3.5.1 (Mart 2024)
Uyumluluk politikası Master, geriye dönük uyumluluğu korur.
MediaWiki 1.37+
Veritabanı değişiklikleri Evet
Composer mediawiki/cargo
Tablolar cargo_tables
cargo_pages
cargo_backlinks
Lisans GNU Genel Kamu Lisansı 2.0 veya üstü
İndir
Örnek #cargo_query ile çeşitli çağrıları içeren bir sayfa
  • $wgCargoFileDataColumns
  • $wgCargoDrilldownLargestFontSize
  • $wgCargoDecimalMark
  • $wgCargoDefaultStringBytes
  • $wgCargoAllowedSQLFunctions
  • $wgCargoHideNamespaceName
  • $wgCargoPageDataColumns
  • $wgCargoMaxVisibleHierarchyDrilldownValues
  • $wgCargoDrilldownSmallestFontSize
  • $wgCargoIgnoreBacklinks
  • $wgCargoRecurringEventMaxInstances
  • $wgCargoDefaultMapService
  • $wgCargoStoreUseTemplateArgsFallback
  • $wgCargoLegacyNullLuaFieldsAsEmptyString
  • $wgCargoTablesPrioritizeReplacements
  • $wgCargoDigitGroupingCharacter
  • $wgCargoDefaultQueryLimit
  • $wgCargoDrilldownNumRangesForNumbers
  • $wgCargo24HourTime
  • $wgCargoMaxQueryLimit
  • $wgCargoDrilldownUseTabs
  • $wgCargoMapClusteringMinimum
  • $wgCargoDrilldownMinValuesForComboBox
  • recreatecargodata
  • deletecargodata
  • runcargoqueries
Quarterly downloads 78 (Ranked 71st)
Cargo uzantısını çevirin
Sorunlar Açık görevler · Hata bildir

Cargo, bilgi kutuları gibi şablonlara yapılan çağrılarda yer alan verileri depolamak ve sorgulamak için basit bir yol sağlayan MediaWiki'nin bir uzantısıdır. Kavram olarak Semantic MediaWiki uzantısına benzer, ancak kurulum kolaylığı ve kullanım kolaylığı dahil olmak üzere bir dizi avantaj sunar.

Cargo, tüm verilerini MediaWiki'nin kendi veritabanına (varsayılan) veya ayrı bir veritabanına yerleştirilebilen veritabanı tablolarında depolar. Çoğunlukla, depolanan her şablon, verilerini her bir ilgili şablon parametresi için bir sütun ile tek bir DB tablosunda depolanır. Bunun birkaç istisnası vardır: Değer dizilerini/listelerini tutan şablon alanlarının ve coğrafi koordinatları tutan alanların işlenmesi, çoğu DB sisteminde bu veri türlerinin yetersiz yerel işlenmesi nedeniyle daha karmaşıktır. Ve birden çok şablon, verilerini tek bir DB tablosunda depolamak için ayarlanabilir.

Uzantı, bir dizi ayrıştırıcı işlevi tanımlar; bu üçü en önemlileridir:

  • #cargo_declare - bir şablonun ‎<noinclude> kısmına yerleştirilir; bir tablo için şemayı tanımlar.
  • #cargo_store - bir satırı bir Cargo tablosuna depolar; genellikle bir şablonun ‎<includeonly> kısmına yerleştirilir.
  • #cargo_query - SQL bileşenlerini kullanarak bir veya daha fazla Cargo veri tablosunu sorgular.

Diğer tanımlanmış ayrıştırıcı işlevleri şunlardır:

  • #cargo_attach - bir şablonu başka yerde bildirilen bir tabloya satır eklemek olarak tanımlar.
  • #cargo_compound_query - birden çok sorgunun sonuçlarını tek bir yerde görüntüler.
  • #cargo_display_map - tek bir noktayı gösteren bir harita görüntüler.
  • #recurring_event - tekrar eden bir olayın tarihlerini yazdırır; #cargo_store göre kullanım için.

Cargo ayrıca bu depolanan verileri görüntülemek ve incelemek için çeşitli arayüzler tanımlar. As such, it adds the following special pages:

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

Cargo test edilmiştir ve MySQL ve PostgreSQL veritabanı sistemleriyle çalışmaktadır. Teorik olarak SQLite'ı da destekler, ancak SQLite ile iyi test edilmemiştir ve çalışmayabilir.

Cargo uzantısının bu sürümü MediaWiki 1.35+ gerektirir.

Cargo, nasıl çalıştığı, nasıl kullanılacağı ve nasıl kurulacağı hakkında daha fazla bilgi edinmek için yukarıdaki gezinme çubuğundaki sayfalara tıklayın.

Installation

Configuration

Below are Cargo's global configuration settings along with their default values.

To configure Cargo to use a separate database instead of the MediaWiki database, the following settings are provided:

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.

For character configuration as related to numbers, the following configuring settings are provided:

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

The remaining global configuration settings are as follows:

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, 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.
$wgCargoLegacyNullLuaFieldsAsEmptyString false Null results to the Lua Cargo query function should return as string rather than nil. This allows you to rollback a breaking change from early 2022. New wikis created after this time should not enable this.
$wgCargoStoreUseTemplateArgsFallback true Enable the behavior that looks for template arguments that match the template's declared table to fill columns.


Ayrıca bakınız