summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/SemanticResultFormats/DefaultSettings.php
blob: b748258459630038b4eeadd8e4c08a59f65c08d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php

/**
 * Settings file for the Semantic Result Formats extension.
 *
 * @see http://www.semantic-mediawiki.org/wiki/Semantic_Result_Formats
 *
 * @author Jeroen De Dauw < jeroendedauw@gmail.com >
 * @author Daniel Werner < danweetz@web.de >
 */

if ( !defined( 'MEDIAWIKI' ) ) {
  die( "This file is part of the Semantic Result Formats extension. It is not a valid entry point.\n" );
}

// The formats you want to be able to use.
// See the INSTALL file or
// http://www.semantic-mediawiki.org/wiki/Semantic_Result_Formats#Installation
$GLOBALS['srfgFormats'] = [
	'icalendar',
	'vcard',
	'bibtex',
	'calendar',
	'eventcalendar',
	'eventline',
	'timeline',
	'outline',
	'gallery',
	'jqplotchart',
	'jqplotseries',
	'sum',
	'average',
	'min',
	'max',
	'median',
	'product',
	'tagcloud',
	'valuerank',
	'array',
	'tree',
	'ultree',
	'oltree',
	'd3chart',
	'latest',
	'earliest',
	'filtered',
	'slideshow',
	'timeseries',
	'sparkline',
	'listwidget',
	'pagewidget',
	'dygraphs',
	'media',
	'datatables',
	'spreadsheet',
	'gantt',
	'graph'
	// Boilerplate
	// Enable access to the format identifier
	// 'boilerplate',

	// Disabled by default

	// This format can influence performance during execution due to potential
	// large number of incoming properties assigned to each selected entity
	// @see Help:Incoming_format
	// 'incoming',
	
	// Still in alpha:
	// 'jitgraph', // Several issues need to be fixed before this can be enabled, most notably it does not work properly with the RL.

	// Disabled by default since they contact external sites:
	// 'googlebar',
	// 'googlepie',

	// Unstable/broken:
	// 'exhibit',
];

// Load hash format only if HashTables extension is initialised, otherwise 'Array' format is enough
// FIXME: According to the INSTALL file only formats should be enabled, that "do not require further software to be installed (besides SMW)"
if(	array_key_exists( 'ExtHashTables', $GLOBALS['wgAutoloadClasses'] ) && defined( 'ExtHashTables::VERSION' )
	&& version_compare( ExtHashTables::VERSION, '0.999', '>=' )
	|| isset( $GLOBALS['wgHashTables'] ) // Version < 1.0 alpha
) {
	$GLOBALS['srfgFormats'][] = 'hash';
}

// Used for Array and Hash formats.
// Allows value as string or object instances of Title or Article classes or an array
// where index 0 is the page title and 1 is the namespace-index (by default NS_MAIN)
// also allows defining optional template-arguments by index 'args' as array where a
// key represents an argument name and a keys associated value an argument value.
$GLOBALS['srfgArraySep'] = ', ';
$GLOBALS['srfgArrayPropSep'] = '<PROP>';
$GLOBALS['srfgArrayManySep'] = '<MANY>';
$GLOBALS['srfgArrayRecordSep'] = '<RCRD>';
$GLOBALS['srfgArrayHeaderSep'] = ' ';

/**
 * Used if Array|Hash result format is not used inline and the standard config values
 * defined in LocalSettings.php can not be used because they are page references which
 * can only be evaluated in inline queries
 *
 * @var Array
 */
$GLOBALS['srfgArraySepTextualFallbacks'] =  [
	'sep'       => $GLOBALS['srfgArraySep'],
	'propsep'   => $GLOBALS['srfgArrayPropSep'],
	'manysep'   => $GLOBALS['srfgArrayManySep'],
	'recordsep' => $GLOBALS['srfgArrayRecordSep'],
	'headersep' => $GLOBALS['srfgArrayHeaderSep']
];

// $srfgColorScheme
// Color schems are used among v1.8 jqPlot, and other printers if change
// those settings please ensure that the content of themes.js has to be
// altered as well
$GLOBALS['srfgColorScheme'] = [
	'cc124',
	'cc128',
	'cc129',
	'cc173',
	'cc210',
	'cc252',
	'cc267',
	'cc294' ,
	'cc303',
	'cc327',
	'ylgn',
	'ylgnbu',
	'gnbu',
	'bugn',
	'pubugn',
	'pubu',
	'bupu',
	'rdpu',
	'purd',
	'orrd',
	'ylorrd',
	'ylorbr',
	'purples',
	'blues',
	'greens',
	'oranges',
	'reds',
	'greys',
	'puor',
	'brbg',
	'prgn',
	'piyg',
	'rdbu',
	'rdgy',
	'rdylbu',
	'spectral',
	'rdylgn'
];