Extension:Cargo

From MediaWiki.org
Jump to: navigation, search
Cargo - navigation
Basics Main pageExtension:Cargo (talk) · Download and installationExtension:Cargo/Download and installation · Quick start guideExtension:Cargo/Quick start guide · Other documentationExtension:Cargo/Other documentation · SMW migration guideExtension:Cargo/SMW migration guide
Using Cargo Storing dataExtension:Cargo/Storing data · Querying dataExtension:Cargo/Querying data (Display formatsExtension:Cargo/Display formats) · Browsing dataExtension:Cargo/Browsing data · Exporting dataExtension:Cargo/Exporting data · Other featuresExtension:Cargo/Other features
Resources for help Common problemsExtension:Cargo/Common problems · Known bugs and planned featuresExtension:Cargo/Known bugs and planned features · Getting supportExtension:Cargo/Getting support
About Cargo Authors and creditsExtension:Cargo/Authors and credits · Version historyExtension:Cargo/Version history · Sites that use CargoExtension:Cargo/Sites that use Cargo · Cargo and Semantic MediaWikiExtension:Cargo/Cargo and Semantic MediaWiki · FAQExtension:Cargo/FAQ
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Cargo

Release status:Extension status stable

Cargo logo.png
ImplementationTemplate:Extension#type Special page, API, Parser function
DescriptionTemplate:Extension#description An extension that allows for the storage and querying of data contained within templates.
Author(s)Template:Extension#username Yaron Koren <yaron57@gmail.com>
Latest versionTemplate:Extension#version 1.3 (February 2017)
MediaWikiTemplate:Extension#mediawiki 1.22 or greater
LicenseTemplate:Extension#license GNU General Public License 2.0 or later
Download See here
ExampleTemplate:Extension#example A page containing various calls to #cargo_query
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit
MakeGlobalVariablesScriptManual:Hooks/MakeGlobalVariablesScript
PageContentSaveCompleteManual:Hooks/PageContentSaveComplete
TitleMoveCompleteManual:Hooks/TitleMoveComplete
ArticleDeleteCompleteManual:Hooks/ArticleDeleteComplete
LoadExtensionSchemaUpdatesManual:Hooks/LoadExtensionSchemaUpdates
SkinTemplateTabsManual:Hooks/SkinTemplateTabs
SkinTemplateNavigationManual:Hooks/SkinTemplateNavigation
UnknownActionManual:Hooks/UnknownAction
BaseTemplateToolboxManual:Hooks/BaseTemplateToolbox
AdminLinksManual:Hooks/AdminLinks

Translate the Cargo extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

Cargo is an extension to MediaWiki that provides a lightweight way to store and query the data contained within the calls to templates, such as infoboxes.

Cargo stores all its data in database tables, which can be placed in either MediaWiki's own database (the default) or a separate database. For the most part, each stored template gets its data stored in a single DB table, with a column for each relevant template parameter. There are a few exceptions to this: the handling of template fields that hold arrays/lists of values, and of fields that hold geographical coordinates, is more complex, due to poor native handling of those data types in most DB systems. And multiple templates can be set to all store their data in one DB table.

The extension defines a number of parser functions; these three are the most important:

  • #cargo_declare - placed within the <noinclude> part of a template; it defines the schema for a table.
  • #cargo_store - stores one row to a Cargo table; usually placed within the <includeonly> part of a template.
  • #cargo_query - queries one or more Cargo data tables, using SQL components.

The other defined parser functions are:

  • #cargo_attach - defines a template as adding rows to a table declared elsewhere.
  • #cargo_compound_query - displays the results of multiple queries in one place.
  • #cargo_display_map - displays a map showing a single point.
  • #recurring_event - prints out the dates for a recurring event; for use by #cargo_store.

Cargo also defines various interfaces for viewing and drilling down through this stored data.

Cargo has been tested, and works, with the MySQL and PostgreSQL database systems. In theory, it also supports SQLite, SQL Server and Oracle, but it has not been tested with these systems and may not work.

This version of the Cargo extension requires MediaWiki 1.22 or higher.

Click through the pages in the navigation bar above to learn more about Cargo, how it works, how to use it, and how to install it.

Language:Project:Language policy English  • Deutsch