The Cargo MediaWiki extension is designed to enhance MediaWiki's capabilities by providing a structured way to store and query data within wiki templates, particularly useful for managing data in infoboxes or similar structured data representations.
Cargo stands out as a powerful tool for those looking to leverage MediaWiki not just for content but for structured data management, offering a balance between complexity and usability for wiki administrators and developers. Its integration with MediaWiki's templating system makes it particularly useful for creating dynamic, data-driven content within wiki environments.
Functionality
- Data Storage: Cargo allows data to be stored in database tables, which can be either within MediaWiki's database or in a separate database for performance or security reasons. This data is typically derived from template calls, where each template invocation can define a row in a table.
- Querying Data: Users can query this data using SQL-like syntax through special pages or parser functions provided by Cargo, like #cargo_query. This allows for dynamic content generation based on the data stored.
- cargo_declare: Defines the schema for a table, placed within the <noinclude> part of a template.
- cargo_attach: Specifies that a template adds rows to a table declared elsewhere.
- cargo_store: Stores data into a Cargo table, usually within the <includeonly> part of a template.
Features
- Data Types: Cargo supports various data types including simple types like strings, dates, and numbers, to more complex ones like hierarchies, coordinates, and wikitext.
- Special Pages: Cargo includes special pages like Special:CargoQuery for direct querying and Special:Drilldown for interactive data exploration.
- Integration with MediaWiki: It integrates seamlessly with MediaWiki's existing structure, allowing for data to be linked with pages, categories, and other MediaWiki features.
- Customization: Through settings like $wgCargoDefaultStringBytes or $wgCargoMaxQueryLimit, administrators can control how Cargo behaves in terms of data storage limits or query performance.
Advantages
- Ease of Use: Compared to other extensions like Semantic MediaWiki, Cargo might be simpler to install and use for basic to intermediate data management needs within MediaWiki.
- Performance: By potentially using a separate database, Cargo can help in managing performance issues related to data queries, especially on large wikis.
- Flexibility: Its design allows for complex data structures and queries, making it suitable for wikis where structured data management is crucial.
Community and Development
- Development: Cargo has seen contributions through programs like Google Summer of Code, indicating active development and community involvement.
- Support: There's community support through forums, documentation, and the MediaWiki extension repository, where users can find help or contribute to its development.
Special pages
Map examples
Table
Dynamic table
Open Layers
[{"name":"Bryan","title":"\u003Ca href=\"\/wiki\/Bryan\" title=\"Bryan\"\u003EBryan\u003C\/a\u003E","lat":38.89814,"lon":-77.03666,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=IT&action=edit&redlink=1\" class=\"new\" title=\"IT (page does not exist)\"\u003EIT\u003C\/a\u003E"}},{"name":"Josh","title":"\u003Ca href=\"\/wiki\/Josh\" title=\"Josh\"\u003EJosh\u003C\/a\u003E","lat":41.90218,"lon":12.45393,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=European_Sales&action=edit&redlink=1\" class=\"new\" title=\"European Sales (page does not exist)\"\u003EEuropean Sales\u003C\/a\u003E"}},{"name":"Juanita","title":"\u003Ca href=\"\/wiki\/Juanita\" title=\"Juanita\"\u003EJuanita\u003C\/a\u003E","lat":40.71181,"lon":-74.01337,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=Marketing&action=edit&redlink=1\" class=\"new\" title=\"Marketing (page does not exist)\"\u003EMarketing\u003C\/a\u003E"}},{"name":"Mary","title":"\u003Ca href=\"\/wiki\/Mary\" title=\"Mary\"\u003EMary\u003C\/a\u003E","lat":32.70663,"lon":35.30482,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=HR&action=edit&redlink=1\" class=\"new\" title=\"HR (page does not exist)\"\u003EHR\u003C\/a\u003E \u003Cspan class=\"CargoDelimiter\"\u003E•\u003C\/span\u003E \u003Ca href=\"\/w\/index.php?title=Marketing&action=edit&redlink=1\" class=\"new\" title=\"Marketing (page does not exist)\"\u003EMarketing\u003C\/a\u003E"}},{"name":"Peter","title":"\u003Ca href=\"\/wiki\/Peter\" title=\"Peter\"\u003EPeter\u003C\/a\u003E","lat":38.8977,"lon":-77.03655,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=HR&action=edit&redlink=1\" class=\"new\" title=\"HR (page does not exist)\"\u003EHR\u003C\/a\u003E"}}]
Leaflet
[{"name":"Bryan","title":"\u003Ca href=\"\/wiki\/Bryan\" title=\"Bryan\"\u003EBryan\u003C\/a\u003E","lat":38.89814,"lon":-77.03666,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=IT&action=edit&redlink=1\" class=\"new\" title=\"IT (page does not exist)\"\u003EIT\u003C\/a\u003E"}},{"name":"Josh","title":"\u003Ca href=\"\/wiki\/Josh\" title=\"Josh\"\u003EJosh\u003C\/a\u003E","lat":41.90218,"lon":12.45393,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=European_Sales&action=edit&redlink=1\" class=\"new\" title=\"European Sales (page does not exist)\"\u003EEuropean Sales\u003C\/a\u003E"}},{"name":"Juanita","title":"\u003Ca href=\"\/wiki\/Juanita\" title=\"Juanita\"\u003EJuanita\u003C\/a\u003E","lat":40.71181,"lon":-74.01337,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=Marketing&action=edit&redlink=1\" class=\"new\" title=\"Marketing (page does not exist)\"\u003EMarketing\u003C\/a\u003E"}},{"name":"Mary","title":"\u003Ca href=\"\/wiki\/Mary\" title=\"Mary\"\u003EMary\u003C\/a\u003E","lat":32.70663,"lon":35.30482,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=HR&action=edit&redlink=1\" class=\"new\" title=\"HR (page does not exist)\"\u003EHR\u003C\/a\u003E \u003Cspan class=\"CargoDelimiter\"\u003E•\u003C\/span\u003E \u003Ca href=\"\/w\/index.php?title=Marketing&action=edit&redlink=1\" class=\"new\" title=\"Marketing (page does not exist)\"\u003EMarketing\u003C\/a\u003E"}},{"name":"Peter","title":"\u003Ca href=\"\/wiki\/Peter\" title=\"Peter\"\u003EPeter\u003C\/a\u003E","lat":38.8977,"lon":-77.03655,"otherValues":{"Department":"\u003Ca href=\"\/w\/index.php?title=HR&action=edit&redlink=1\" class=\"new\" title=\"HR (page does not exist)\"\u003EHR\u003C\/a\u003E"}}]
Related
Resources
Links
Example wikis