(建立内容为“{{main|mediawikiwiki:{{FULLPAGENAME}}}} The "format=" parameter lets you set in which format to display the results. If no format is specified, <code>list</code>…”的新页面) |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{main|mediawikiwiki:{{FULLPAGENAME}}}} | {{main|mediawikiwiki:{{FULLPAGENAME}}/zh}} | ||
The "format=" parameter lets you set in which format to display the results. | The "format=" parameter lets you set in which format to display the results. | ||
第6行: | 第6行: | ||
The Cargo extension supports the following formats: | The Cargo extension supports the following formats: | ||
== | == 列表== | ||
=== | === 清单=== | ||
Displays results in a delimited list. | Displays results in a delimited list. | ||
'' | '' 参数:'' | ||
*<code>delimiter</code> - sets the separator character (default is comma). "\n" placed within this value will get translated into a newline. | *<code>delimiter</code> - sets the separator character (default is comma). "\n" placed within this value will get translated into a newline. | ||
=== | === 无序列表=== | ||
Displays results in a bulleted list. | Displays results in a bulleted list. | ||
'' | '' 参数:'' | ||
*<code>columns</code> - sets the number of columns (default is 1) | *<code>columns</code> - sets the number of columns (default is 1) | ||
'' | '' 例子:'' [http://discoursedb.org/wiki/Latest_items Discourse DB latest items], [http://econterms.net/aero/USPC_114 Inventing Aviation patents listing] | ||
=== | === 有序列表=== | ||
用编号的列表显示结果。 | |||
'' | '' 参数:'' | ||
*<code>columns</code> - | *<code>columns</code> - 设置列号(缺省是 1 ) | ||
'' | '' 例子:'' [https://dicoado.org/dico/Dico:Liste_de_tous_les_mots DicoAdo List of all words] | ||
=== | === 分类=== | ||
用 MediaWiki 分类的样式显示结果。 | |||
'' | '' 参数:'' | ||
*<code>columns</code> - sets the number of columns (default is 3) | *<code>columns</code> - sets the number of columns (default is 3) | ||
'' | '' 例子:'' [http://www.chileru.org/Коммуны chileru.org Коммуны] | ||
== | == 更复杂的文本显示== | ||
=== | === 模板=== | ||
Displays results using a MediaWiki template that formats each row of results. By default, the template in question should use unnamed parameters, i.e. it should refer to its parameters as <nowiki>{{{1|}}}, {{{2|}}}</nowiki> etc. | Displays results using a MediaWiki template that formats each row of results. By default, the template in question should use unnamed parameters, i.e. it should refer to its parameters as <nowiki>{{{1|}}}, {{{2|}}}</nowiki> etc. | ||
'' | '' 参数:'' | ||
*<code>template</code> - specifies the name of the template to use (mandatory) | *<code>template</code> - specifies the name of the template to use (mandatory) | ||
第56行: | 第56行: | ||
''Examples:'' [http://discoursedb.org/wiki/Nomination_of_Robert_Gates_as_U.S._Secretary_of_Defense_/_Gates_was_a_good_choice Discourse DB "position" page] (queries [http://discoursedb.org/w/index.php?title=Template:Position&action=edit here], template [https://discoursedb.org/w/index.php?title=Template:Item_full_display&action=edit here]), [https://anothereden.miraheze.org/wiki/Chronos%27_Umbra Another Eden Wiki > Chronos' Umbra] (template [https://anothereden.miraheze.org/w/index.php?title=Template:Enemy_row&action=edit here]) | ''Examples:'' [http://discoursedb.org/wiki/Nomination_of_Robert_Gates_as_U.S._Secretary_of_Defense_/_Gates_was_a_good_choice Discourse DB "position" page] (queries [http://discoursedb.org/w/index.php?title=Template:Position&action=edit here], template [https://discoursedb.org/w/index.php?title=Template:Item_full_display&action=edit here]), [https://anothereden.miraheze.org/wiki/Chronos%27_Umbra Another Eden Wiki > Chronos' Umbra] (template [https://anothereden.miraheze.org/w/index.php?title=Template:Enemy_row&action=edit here]) | ||
=== | === 嵌入=== | ||
显示每个查询页面的全文(仅使用查询的第一个字段)。(没有参数。) | |||
=== | === 概述=== | ||
用概述格式显示结果。 | |||
'' | '' 参数:'' | ||
*<code>outline fields</code> - holds a comma-separated list of the query's fields (without the table name part); these fields are used to define the outline, by which the results are grouped together (mandatory) | *<code>outline fields</code> - holds a comma-separated list of the query's fields (without the table name part); these fields are used to define the outline, by which the results are grouped together (mandatory) | ||
'' | '' 例子:'' [http://www.chileru.org/Статьи chileru.org Статьи] | ||
=== | === 树=== | ||
用树图格式显示结果,其中一个字段定义了“子”页面和“父”页面之间的所有关系。 | |||
'' | '' 参数:'' | ||
*<code>parent field</code> - holds the name of this connector field (mandatory) | *<code>parent field</code> - holds the name of this connector field (mandatory) | ||
=== | === 表=== | ||
用表格显示结果。 | |||
'' | '' 参数:'' | ||
*<code>merge similar cells</code> - if set to "yes", causes adjacent cells in the same column that hold the same value to be merged together, to make for easier reading. | *<code>merge similar cells</code> - if set to "yes", causes adjacent cells in the same column that hold the same value to be merged together, to make for easier reading. | ||
'' | '' 例子:'' [https://spcodex.wiki/wiki/Bootlegs SPCodex bootlegs list], [https://antwiki.org/wiki/Canada#Fossils_known_from_Canada AntWiki fossils known from Canada] | ||
=== | === 动态表=== | ||
Displays results in a "dynamic" table that includes sorting, pagination and searching, using the [http://www.datatables.net/ DataTables] JavaScript library. | Displays results in a "dynamic" table that includes sorting, pagination and searching, using the [http://www.datatables.net/ DataTables] JavaScript library. | ||
'' | '' 参数:'' | ||
*<code>rows per page</code> - sets the number of rows that are initially shown on every "page" of the table (default is 10) | *<code>rows per page</code> - sets the number of rows that are initially shown on every "page" of the table (default is 10) | ||
第98行: | 第98行: | ||
*<code>details fields</code> - specifies the fields should not have a column but rather should be included in a special "details section" under each row. (Note that each such field must be included in the <code>fields</code> parameter as well.) | *<code>details fields</code> - specifies the fields should not have a column but rather should be included in a special "details section" under each row. (Note that each such field must be included in the <code>fields</code> parameter as well.) | ||
*<code>hidden fields</code> - specifies the fields that should not be included in the table by default but can be added in by the user via a "Toggle columns" link. (Note that each such field must be listed in the <code>fields</code> parameter as well.) | *<code>hidden fields</code> - specifies the fields that should not be included in the table by default but can be added in by the user via a "Toggle columns" link. (Note that each such field must be listed in the <code>fields</code> parameter as well.) | ||
*<code>column widths</code> - holds a comma-separated list of widths for each column. Not every column width needs to be specified. | *<code>column widths</code> - holds a comma-separated list of widths for each column. Not every column width needs to be specified. 例子: <code>column widths=10px, 20px,,,14%</code> | ||
*<code>header tooltips</code> - holds a comma-separated list of additional explanations for any column, which will be displayed as [[wikipedia:Tooltip|tooltips]] after the header for any column. The format matches that of <code>column widths</code>. | *<code>header tooltips</code> - holds a comma-separated list of additional explanations for any column, which will be displayed as [[wikipedia:Tooltip|tooltips]] after the header for any column. The format matches that of <code>column widths</code>. | ||
'' | '' 例子:'' [https://wiki.travellerrpg.com/Race/summary#Sophonts Traveller Wiki - list of sophonts], [https://hues.empa.ch/index.php/List_of_technology_entries HUES list of technology entries] | ||
=== | === 标签云=== | ||
Shows results in a "tag cloud" format, where the number corresponding to each string value dictates the font size for that string. At least one of the queried fields must be an Integer value, used to determine the font size for that entry. "tag cloud" is commonly used with the "group by" parameter for queries, with the two displayed fields being the grouped-by parameter and "COUNT(*)". | Shows results in a "tag cloud" format, where the number corresponding to each string value dictates the font size for that string. At least one of the queried fields must be an Integer value, used to determine the font size for that entry. "tag cloud" is commonly used with the "group by" parameter for queries, with the two displayed fields being the grouped-by parameter and "COUNT(*)". | ||
'' | '' 参数:'' | ||
*<code>min size</code> - the percentage of normal font size that the smallest text displays will have (default is 80) | *<code>min size</code> - the percentage of normal font size that the smallest text displays will have (default is 80) | ||
第113行: | 第113行: | ||
*<code>template</code> - specifies the name of a template to use to display each result | *<code>template</code> - specifies the name of a template to use to display each result | ||
'' | '' 例子'' : [http://discoursedb.org/wiki/Special:ViewData?tables=Sources&fields=Type%2CCOUNT%28*%29&group_by=Type&format=tag+cloud Sample query on Discourse DB] | ||
== | == 图像显示== | ||
=== | === 画廊=== | ||
Displays a gallery of images, in the style of the MediaWiki <gallery> tag. The images must be files that were uploaded to the wiki; they can either be the pages that are directly queried (if the image pages call a Cargo-based template), or fields, of type "File", of other pages. | Displays a gallery of images, in the style of the MediaWiki <gallery> tag. The images must be files that were uploaded to the wiki; they can either be the pages that are directly queried (if the image pages call a Cargo-based template), or fields, of type "File", of other pages. | ||
'' | '' 参数:'' | ||
*<code>mode</code> - sets the display mode of the gallery; can be <code>traditional</code> (the default), <code>nolines</code>, <code>packed</code>, <code>packed-overlay</code> or <code>packed-hover</code>. [[Help:Images#Mode_parameter|See here]] for a demonstration of these options. | *<code>mode</code> - sets the display mode of the gallery; can be <code>traditional</code> (the default), <code>nolines</code>, <code>packed</code>, <code>packed-overlay</code> or <code>packed-hover</code>. [[Help:Images#Mode_parameter|See here]] for a demonstration of these options. | ||
第134行: | 第134行: | ||
*<code>link field</code> - specifies the name of a query field whose value should be used as the name of the page that the image links to | *<code>link field</code> - specifies the name of a query field whose value should be used as the name of the page that the image links to | ||
'' | '' 例子:'' [http://absitomen.com/lexicon/User:Kelly Absit Omen Lexicon user page] generated by [https://absitomen.com/wiki/index.php?title=template:member&action=edit this template] | ||
=== | === 幻灯片=== | ||
Displays a "slideshow" of images on the page. | Displays a "slideshow" of images on the page. | ||
'' | '' 参数:'' | ||
* <code>slides per screen</code> - sets the number of side-by-side images to show on the screen at once (default is 1) | * <code>slides per screen</code> - sets the number of side-by-side images to show on the screen at once (default is 1) | ||
第147行: | 第147行: | ||
*<code>link field</code> - specifies the name of a query field whose value should be used as the name of the page that the image links to | *<code>link field</code> - specifies the name of a query field whose value should be used as the name of the page that the image links to | ||
== | == 基于时间的显示== | ||
=== | === 日历=== | ||
Displays results in a calendar, using the [http://fullcalendar.io/ FullCalendar] JavaScript library. | Displays results in a calendar, using the [http://fullcalendar.io/ FullCalendar] JavaScript library. | ||
第155行: | 第155行: | ||
For this format to work, the query must contain at least one field of type Date or Datetime, as well as the <code>_pageName</code> field (with no alias), or another field with the "=name" alias. | For this format to work, the query must contain at least one field of type Date or Datetime, as well as the <code>_pageName</code> field (with no alias), or another field with the "=name" alias. | ||
'' | '' 参数:'' | ||
*<code>width</code> - sets the width of the calendar (default is 100%) | *<code>width</code> - sets the width of the calendar (default is 100%) | ||
第176行: | 第176行: | ||
* <code>end</code> - used for multi-day events; sets the end date | * <code>end</code> - used for multi-day events; sets the end date | ||
'' | '' 例子:'' [http://discoursedb.org/wiki/Opinion_calendar Discourse DB opinion calendar], [https://icannwiki.org/IG_Hub/Calendar ICANNWiki IG Hub Calendar] | ||
=== | === 时间线=== | ||
Displays results in a timeline, using the [http://www.simile-widgets.org/timeline/ SIMILE Timeline] library. | Displays results in a timeline, using the [http://www.simile-widgets.org/timeline/ SIMILE Timeline] library. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the timeline (default is 350px) | *<code>height</code> - sets the height of the timeline (default is 350px) | ||
第189行: | 第189行: | ||
''Examples:'' [http://discoursedb.org/wiki/Colombia-United_States_Free_Trade_Agreement Discourse DB topic] (see bottom of page), [http://www.mentalhealthlaw.co.uk/Events_timeline MHLO events timeline] | ''Examples:'' [http://discoursedb.org/wiki/Colombia-United_States_Free_Trade_Agreement Discourse DB topic] (see bottom of page), [http://www.mentalhealthlaw.co.uk/Events_timeline MHLO events timeline] | ||
== | == 数字显示== | ||
=== | === 柱状图=== | ||
Displays results in a bar chart (with horizontal bars), using the [http://nvd3.org/ NVD3] JavaScript library. | Displays results in a bar chart (with horizontal bars), using the [http://nvd3.org/ NVD3] JavaScript library. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the bar chart (default is based on the number of bars) | *<code>height</code> - sets the height of the bar chart (default is based on the number of bars) | ||
第202行: | 第202行: | ||
''Examples:'' [http://discoursedb.org/wiki/Bar_chart_demo Discourse DB most popular authors], [https://hues.empa.ch/index.php/Technology_database_contents_analysis HUES technology database contents analysis] (see bottom of page) | ''Examples:'' [http://discoursedb.org/wiki/Bar_chart_demo Discourse DB most popular authors], [https://hues.empa.ch/index.php/Technology_database_contents_analysis HUES technology database contents analysis] (see bottom of page) | ||
=== | === 饼状图=== | ||
Displays results in a pie chart, using the [http://nvd3.org/ NVD3] JavaScript library. | Displays results in a pie chart, using the [http://nvd3.org/ NVD3] JavaScript library. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the pie chart | *<code>height</code> - sets the height of the pie chart | ||
第213行: | 第213行: | ||
*<code>hide legend</code> - if set to "yes", removes the chart legend that shows up | *<code>hide legend</code> - if set to "yes", removes the chart legend that shows up | ||
'' | '' 例子:'' [https://grandorder.wiki/Servant_Heights GrandOrder Wiki Servant Heights] | ||
== | == 地图== | ||
To display a map, one of the selected fields in a query must be of type <code>Coordinates</code>. | To display a map, one of the selected fields in a query must be of type <code>Coordinates</code>. | ||
=== | === 谷歌地图=== | ||
Displays results in a map, using the [https://developers.google.com/maps/ Google Maps] service. | Displays results in a map, using the [https://developers.google.com/maps/ Google Maps] service. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the map (default is 400px) | *<code>height</code> - sets the height of the map (default is 400px) | ||
第238行: | 第238行: | ||
''Examples:'' [http://www.funtoo.org/Usermap Funtoo UserMap], [http://discoursedb.org/wiki/Map_test Discourse DB map test] | ''Examples:'' [http://www.funtoo.org/Usermap Funtoo UserMap], [http://discoursedb.org/wiki/Map_test Discourse DB map test] | ||
=== | ===Leaflet=== | ||
Displays results in a map, using the [https://leafletjs.com/ Leaflet] JS library. | Displays results in a map, using the [https://leafletjs.com/ Leaflet] JS library. | ||
'' | '' 参数:'' same as for <code>googlemaps</code>, plus one additional parameter: | ||
*<code>image</code> - sets an image to be the background for the map display, instead of a standard geographical map; specified image must be an image that has been uploaded to the wiki. | *<code>image</code> - sets an image to be the background for the map display, instead of a standard geographical map; specified image must be an image that has been uploaded to the wiki. | ||
=== | ===OpenLayers=== | ||
Displays results in a map, using the [http://openlayers.org/ OpenLayers] service. | Displays results in a map, using the [http://openlayers.org/ OpenLayers] service. | ||
'' | '' 参数:'' same as for <code>googlemaps</code>. | ||
'' | '' 例子:'' [https://archives.org.au/Items/Map ArchivesWiki items map] | ||
=== | === 地图=== | ||
Displays result in a map, using the default map service (It can be set by adding <code>$wgCargoDefaultMapService</code> setting to LocalSettings.php. It 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' (default is 'openlayers')) | Displays result in a map, using the default map service (It can be set by adding <code>$wgCargoDefaultMapService</code> setting to LocalSettings.php. It 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' (default is 'openlayers')) | ||
'' | '' 参数:'' same as for <code>googlemaps</code>. | ||
== | == 更复杂的显示== | ||
=== | === 业务流程建模符号=== | ||
Displays results as a [[wikipedia:Business Process Model and Notation|BPMN | Displays results as a [[wikipedia:Business Process Model and Notation|BPMN 图]], using the bpmn-js JavaScript library. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the chart (default is 350px) | *<code>height</code> - sets the height of the chart (default is 350px) | ||
第276行: | 第276行: | ||
* <code>target</code> - sets the name of the element that this element links to, if any | * <code>target</code> - sets the name of the element that this element links to, if any | ||
=== | === 甘特图=== | ||
Displays results as a [[wikipedia:Gantt chart| | Displays results as a [[wikipedia:Gantt chart| 甘特图]]. | ||
'' | '' 参数:'' | ||
*<code>height</code> - sets the height of the chart (default is 350px) | *<code>height</code> - sets the height of the chart (default is 350px) | ||
*<code>width</code> - sets the width of the chart (default is 100%) | *<code>width</code> - sets the width of the chart (default is 100%) | ||
=== | ===Exhibit=== | ||
Displays results in a browsable interface, using the [http://www.simile-widgets.org/exhibit3/ SIMILE Exhibit] library/service. | Displays results in a browsable interface, using the [http://www.simile-widgets.org/exhibit3/ SIMILE Exhibit] library/service. | ||
'' | '' 参数:'' | ||
*<code>view</code> - sets the view(s) that will be displayed, separated by comma if more than one. Valid values are <code>map</code>, <code>tabular</code> and <code>timeline</code>. If not set, the view(s) will be set based on the types of the fields in the query. | *<code>view</code> - sets the view(s) that will be displayed, separated by comma if more than one. Valid values are <code>map</code>, <code>tabular</code> and <code>timeline</code>. If not set, the view(s) will be set based on the types of the fields in the query. | ||
第302行: | 第302行: | ||
*<code>bottompx</code> - sets the width, in pixels, for each interval in the bottom band | *<code>bottompx</code> - sets the width, in pixels, for each interval in the bottom band | ||
== | == 导出== | ||
Five export-based display formats are defined: '''<code>bibtex</code>''', '''<code>csv</code>''', '''<code>excel</code>''', '''<code>icalendar</code>''', '''<code>json</code>''' and '''<code>zip</code>'''. See [[Extension:Cargo/Exporting data|Exporting data]] for documentation on these. In addition, the "exhibit" format displays an orange toolbox that lets you download the current data in various export formats: BibTex, RDF/XML, JSON, Semantic Wikitext and TSV. | Five export-based display formats are defined: '''<code>bibtex</code>''', '''<code>csv</code>''', '''<code>excel</code>''', '''<code>icalendar</code>''', '''<code>json</code>''' and '''<code>zip</code>'''. See [[mediawikiwiki:Extension:Cargo/Exporting data|Exporting data]] for documentation on these. In addition, the "exhibit" format displays an orange toolbox that lets you download the current data in various export formats: BibTex, RDF/XML, JSON, Semantic Wikitext and TSV. |
2022年4月14日 (四) 00:25的最新版本
The "format=" parameter lets you set in which format to display the results.
If no format is specified, list
is the default format if there is only a single field being displayed in the results, while table
is the default format if there is more than one field.
The Cargo extension supports the following formats:
列表
清单
Displays results in a delimited list.
参数:
delimiter
- sets the separator character (default is comma). "\n" placed within this value will get translated into a newline.
无序列表
Displays results in a bulleted list.
参数:
columns
- sets the number of columns (default is 1)
例子: Discourse DB latest items, Inventing Aviation patents listing
有序列表
用编号的列表显示结果。
参数:
columns
- 设置列号(缺省是 1)
分类
用 MediaWiki 分类的样式显示结果。
参数:
columns
- sets the number of columns (default is 3)
更复杂的文本显示
模板
Displays results using a MediaWiki template that formats each row of results. By default, the template in question should use unnamed parameters, i.e. it should refer to its parameters as {{{1|}}}, {{{2|}}} etc.
参数:
template
- specifies the name of the template to use (mandatory)named args
- if set to "yes", specifies that the template should instead have named parameters, where the parameter names are the names (or aliases, if they are set) of the query fieldsdelimiter
- sets the separator string (default is no separator). "\n" placed within this value will get translated into a newline.
Examples: Discourse DB "position" page (queries here, template here), Another Eden Wiki > Chronos' Umbra (template here)
嵌入
显示每个查询页面的全文(仅使用查询的第一个字段)。(没有参数。)
概述
用概述格式显示结果。
参数:
outline fields
- holds a comma-separated list of the query's fields (without the table name part); these fields are used to define the outline, by which the results are grouped together (mandatory)
树
用树图格式显示结果,其中一个字段定义了“子”页面和“父”页面之间的所有关系。
参数:
parent field
- holds the name of this connector field (mandatory)
表
用表格显示结果。
参数:
merge similar cells
- if set to "yes", causes adjacent cells in the same column that hold the same value to be merged together, to make for easier reading.
例子: SPCodex bootlegs list, AntWiki fossils known from Canada
动态表
Displays results in a "dynamic" table that includes sorting, pagination and searching, using the DataTables JavaScript library.
参数:
rows per page
- sets the number of rows that are initially shown on every "page" of the table (default is 10)searchable columns
- if set to "yes", causes fields to have a special search input above their columnsdetails fields
- specifies the fields should not have a column but rather should be included in a special "details section" under each row. (Note that each such field must be included in thefields
parameter as well.)hidden fields
- specifies the fields that should not be included in the table by default but can be added in by the user via a "Toggle columns" link. (Note that each such field must be listed in thefields
parameter as well.)column widths
- holds a comma-separated list of widths for each column. Not every column width needs to be specified. 例子:column widths=10px, 20px,,,14%
header tooltips
- holds a comma-separated list of additional explanations for any column, which will be displayed as tooltips after the header for any column. The format matches that ofcolumn widths
.
例子: Traveller Wiki - list of sophonts, HUES list of technology entries
标签云
Shows results in a "tag cloud" format, where the number corresponding to each string value dictates the font size for that string. At least one of the queried fields must be an Integer value, used to determine the font size for that entry. "tag cloud" is commonly used with the "group by" parameter for queries, with the two displayed fields being the grouped-by parameter and "COUNT(*)".
参数:
min size
- the percentage of normal font size that the smallest text displays will have (default is 80)max size
- the percentage of normal font size that the largest text displays will have (default is 200)template
- specifies the name of a template to use to display each result
例子: Sample query on Discourse DB
图像显示
画廊
Displays a gallery of images, in the style of the MediaWiki <gallery> tag. The images must be files that were uploaded to the wiki; they can either be the pages that are directly queried (if the image pages call a Cargo-based template), or fields, of type "File", of other pages.
参数:
mode
- sets the display mode of the gallery; can betraditional
(the default),nolines
,packed
,packed-overlay
orpacked-hover
. See here for a demonstration of these options.show bytes
- if set to "0", hides the file size of each image (it is shown by default)show dimensions
- if set to "0", hides the dimensions of each image (they are shown by default)show filename
- if set to "0", hides the name of each image (it is shown by default)per row
- specifies the number of images displayed on each rowimage width
- specifies the width, in pixels, at which to display each imageimage height
- specifies the height, in pixels, at which to display each imagecaption field
- specifies the name of a query field whose value should be used for each image captionalt field
- specifies the name of a query field whose value should be used as the "alt text" for each imagelink field
- specifies the name of a query field whose value should be used as the name of the page that the image links to
例子: Absit Omen Lexicon user page generated by this template
幻灯片
Displays a "slideshow" of images on the page.
参数:
slides per screen
- sets the number of side-by-side images to show on the screen at once (default is 1)autoplay speed
- the number of seconds to wait before advancing to the next slide(s) (by default, the slideshow does not autoplay at all, and the user must advance it manually)caption field
- specifies the name of a query field whose value should be used for each image captionlink field
- specifies the name of a query field whose value should be used as the name of the page that the image links to
基于时间的显示
日历
Displays results in a calendar, using the FullCalendar JavaScript library.
For this format to work, the query must contain at least one field of type Date or Datetime, as well as the _pageName
field (with no alias), or another field with the "=name" alias.
参数:
width
- sets the width of the calendar (default is 100%)height
- sets the height of the calendar (default is for the height to fit the content to be displayed)start date
- sets the date at which to display the calendar (default is the current date)view
- sets the starting display of the calendar - options are 'day', 'week', or 'month' (default is month)color
- sets the color for the bubble around names of events; useful within #compound_query (default is set by the FullCalendar library)text color
- sets the color of the text of event names (default is white)
Special aliases:
- These are specific field aliases that can be set, so that that field's values become attributes of each corresponding event. For instance, having a component like "EventName=name" in the "fields" parameter in #cargo_query will let you use a field other than the page name to set the name of each event.
name
- sets the name of the eventdescription
- sets an event description, displayed when the event is hovered overlink
- sets the page that will be linked to for each eventcolor
- same behavior as the "color" parametertext color
- same behavior as the "text color" parameterstart
- used for multi-day events; sets the start dateend
- used for multi-day events; sets the end date
例子: Discourse DB opinion calendar, ICANNWiki IG Hub Calendar
时间线
Displays results in a timeline, using the SIMILE Timeline library.
参数:
height
- sets the height of the timeline (default is 350px)width
- sets the width of the timeline (default is 100%)
Examples: Discourse DB topic (see bottom of page), MHLO events timeline
数字显示
柱状图
Displays results in a bar chart (with horizontal bars), using the NVD3 JavaScript library.
参数:
height
- sets the height of the bar chart (default is based on the number of bars)width
- sets the width of the bar chart (default is 100%)
Examples: Discourse DB most popular authors, HUES technology database contents analysis (see bottom of page)
饼状图
Displays results in a pie chart, using the NVD3 JavaScript library.
参数:
height
- sets the height of the pie chartwidth
- sets the width of the pie chart (default is 100%)colors
- a comma-separated list of colors fort the pie chart "slices"hide legend
- if set to "yes", removes the chart legend that shows up
例子: GrandOrder Wiki Servant Heights
地图
To display a map, one of the selected fields in a query must be of type Coordinates
.
谷歌地图
Displays results in a map, using the Google Maps service.
参数:
height
- sets the height of the map (default is 400px)width
- sets the width of the map (default is 700px)icon
- sets a custom icon to be used to display points; value must be the name of a file that has been uploaded to the wiki. This is especially useful within #compound_query.zoom
- sets the zoom level, i.e. an integer value from around 0 to around 20, with higher numbers being more zoomed in (default is based on the area of the set of points being displayed).cluster
- if set to "yes", automatically applies marker clustering (see below) to the map, and if set to "no", turns off marker clustering. Otherwise, the use of clustering is based on the number of points on the map.center
- sets the center point of the map.
You may need to get an API key for Google Maps to work - once you get an API key, you should set it in LocalSettings.php via the "$wgCargoGoogleMapsKey" variable.
If the number of points being displayed is greater than the variable of the global setting $wgCargoMapClusteringMinimum, the map displays the locations in "clusters" instead of individual points, which makes maps a little more readable. You can change this variable to any value in LocalSettings.php; you can set it to a very high number if you do not want clustering at all.
Examples: Funtoo UserMap, Discourse DB map test
Leaflet
Displays results in a map, using the Leaflet JS library.
参数: same as for googlemaps
, plus one additional parameter:
image
- sets an image to be the background for the map display, instead of a standard geographical map; specified image must be an image that has been uploaded to the wiki.
OpenLayers
Displays results in a map, using the OpenLayers service.
参数: same as for googlemaps
.
地图
Displays result in a map, using the default map service (It can be set by adding $wgCargoDefaultMapService
setting to LocalSettings.php. It 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' (default is 'openlayers'))
参数: same as for googlemaps
.
更复杂的显示
业务流程建模符号
Displays results as a BPMN 图, using the bpmn-js JavaScript library.
参数:
height
- sets the height of the chart (default is 350px)width
- sets the width of the chart (default is 100%)
Special aliases:
name
- sets the name of the BPMN element (if not set, the first queried field is used)label
- sets the label for the element, if anytype
- sets the type of the element; should be one of "startEvent", "endEvent", "sequenceFlow", "task" or "exclusiveGateway"target
- sets the name of the element that this element links to, if any
甘特图
Displays results as a 甘特图.
参数:
height
- sets the height of the chart (default is 350px)width
- sets the width of the chart (default is 100%)
Exhibit
Displays results in a browsable interface, using the SIMILE Exhibit library/service.
参数:
view
- sets the view(s) that will be displayed, separated by comma if more than one. Valid values aremap
,tabular
andtimeline
. If not set, the view(s) will be set based on the types of the fields in the query.facets
- sets the fields to be used for the facets/filters, separated by comma if more than one. A maximum of three are allowed. If not set, the first three fields of the result are used.datalabel
- sets the label that refers to the data. Default is "Item".`
- for the "timeline" view:
end
- sets the name of the field holding the end time for each event (if any)color
- sets the name of the field used to color-code the markers (if any)topunit
- sets the unit for the top band:millisecond
,second
,minute
,hour
,day
,week
,month
,year
,decade
,century
,millennium
toppx
- sets the width, in pixels, for each interval in the top bandbottompx
- sets the width, in pixels, for each interval in the bottom band
导出
Five export-based display formats are defined: bibtex
, csv
, excel
, icalendar
, json
and zip
. See Exporting data for documentation on these. In addition, the "exhibit" format displays an orange toolbox that lets you download the current data in various export formats: BibTex, RDF/XML, JSON, Semantic Wikitext and TSV.