00001 <?php
00002
00008 #################################################################
00009 # CHANGING THE CONFIGURATION FOR SEMANTIC MEDIAWIKI #
00010 #################################################################
00011 # Do not change this file directly, but copy custom settings #
00012 # into your LocalSettings.php. Most settings should be make #
00013 # between including this file and the call to enableSemantics().#
00014 # Exceptions that need to be set before are documented below. #
00015 #################################################################
00016
00017 if ( !defined( 'MEDIAWIKI' ) ) {
00018 die( "This file is part of the Semantic MediaWiki extension. It is not a valid entry point.\n" );
00019 }
00020
00021 ###
00022 # This is the path to your installation of Semantic MediaWiki as seen from the
00023 # web. Change it if required ($wgScriptPath is the path to the base directory
00024 # of your wiki). No final slash.
00025 ##
00026 $smwgScriptPath = ( $wgExtensionAssetsPath === false ? $wgScriptPath . '/extensions' : $wgExtensionAssetsPath ) . '/SemanticMediaWiki';
00027 ##
00028
00029 ###
00030 # This is the path to your installation of Semantic MediaWiki as seen on your
00031 # local filesystem. Used against some PHP file path issues.
00032 # If needed, you can also change this path in LocalSettings.php after including
00033 # this file.
00034 ##
00035 $smwgIP = dirname( __FILE__ ) . '/';
00036 ##
00037
00038 ###
00039 # Use another storage backend for Semantic MediaWiki. The default is suitable
00040 # for most uses of SMW.
00041 ##
00042 $smwgDefaultStore = "SMWSQLStore2";
00043 ##
00044
00045 ###
00046 # Configure SPARQL database connection for Semantic MediaWiki. This is used
00047 # when SPARQL-based features are enabled, e.g. when using SMWSparqlStore as
00048 # the $smwgDefaultStore.
00049 #
00050 # The default class SMWSparqlDatabase works with many databases that support
00051 # SPARQL and SPARQL Update. Three different endpoints (service URLs) are given
00052 # for query (reading queries like SELECT), update (SPARQL Update queries), and
00053 # data (SPARQL HTTP Protocol for Graph Management). The query endpoint is
00054 # necessary, but the update and data endpoints can be omitted if not supported.
00055 # This will lead to reduced functionality (e.g. the SMWSparqlStore will not
00056 # work if Update is not available). The data endpoint is always optional, but
00057 # in some SPARQL databases this method is more efficient than update.
00058 #
00059 # The default graph is similar to a database name in relational databases. It
00060 # can be set to any URI (e.g. the main page uri of your wiki with
00061 # "#graph" appended). Leaving the default graph URI empty only works if the
00062 # store is configure to use some default default graph or if it generally
00063 # supports this. Different wikis should normally use different default graphs
00064 # unless there is a good reason to share one graph.
00065 ##
00066 $smwgSparqlDatabase = 'SMWSparqlDatabase';
00067 $smwgSparqlQueryEndpoint = 'http://localhost:8080/sparql/';
00068 $smwgSparqlUpdateEndpoint = 'http://localhost:8080/update/';
00069 $smwgSparqlDataEndpoint = 'http://localhost:8080/data/';
00070 $smwgSparqlDefaultGraph = '';
00071 ##
00072
00073
00074 require_once( 'includes/SMW_Setup.php' );
00075
00076 ###
00077 # Setting this option to true before including this file to enable the old
00078 # Type: namespace that SMW used up to version 1.5.*. This should only be
00079 # done to make the pages of this namespace temporarily accessible in order to
00080 # move their content to other pages. If the namespace is not registered, then
00081 # existing pages in this namespace cannot be found in the wiki.
00082 ##
00083 if ( !isset( $smwgHistoricTypeNamespace ) ) {
00084 $smwgHistoricTypeNamespace = false;
00085 }
00086 ##
00087
00088 ###
00089 # If you already have custom namespaces on your site, insert
00090 # $smwgNamespaceIndex = ???;
00091 # into your LocalSettings.php *before* including this file. The number ??? must
00092 # be the smallest even namespace number that is not in use yet. However, it
00093 # must not be smaller than 100.
00094 ##
00095 smwfInitNamespaces();
00096
00097 ###
00098 # This setting allows you to select in which cases you want to have a factbox
00099 # appear below an article. Note that the Magic Words __SHOWFACTBOX__ and
00100 # __HIDEFACTBOX__ can be used to control Factbox display for individual pages.
00101 # Other options for this setting include:
00102 ##
00103
00104
00105 $smwgShowFactbox = SMW_FACTBOX_HIDDEN; # hide always
00106
00107 ##
00108
00109 ###
00110 # Same as $smwgShowFactbox but for edit mode and same possible values.
00111 ##
00112 $smwgShowFactboxEdit = SMW_FACTBOX_NONEMPTY;
00113 ##
00114
00115 ###
00116 # Should the toolbox of each content page show a link to browse the properties
00117 # of that page using Special:Browse? This is a useful way to access properties
00118 # and it is somewhat more subtle than showing a Factbox on every page.
00119 ##
00120 $smwgToolboxBrowseLink = true;
00121 ##
00122
00123 ###
00124 # Should warnings be displayed in wikitexts right after the problematic input?
00125 # This affects only semantic annotations, not warnings that are displayed by
00126 # inline queries or other features.
00127 ##
00128 $smwgInlineErrors = true;
00129 ##
00130
00131 ###
00132 # Should SMW consider MediaWiki's subcategory hierarchy in querying? If set to
00133 # true, subcategories will always be interpreted like subclasses. For example,
00134 # if A is a subcategory of B then a query for all elements of B will also yield
00135 # all elements of A. If this setting is disabled, then subclass relationships
00136 # can still be given explicitly by using the property "subcategory of" on some
00137 # category page. Only if the setting is false will such annotations be shown in
00138 # the factbox (if enabled).
00139 ##
00140 $smwgUseCategoryHierarchy = true;
00141 ##
00142
00143 ###
00144 # Should category pages that use some [[Category:Foo]] statement be treated as
00145 # elements of the category Foo? If disabled, then it is not possible to make
00146 # category pages elements of other categories. See also the above setting
00147 # $smwgUseCategoryHierarchy.
00148 ##
00149 $smwgCategoriesAsInstances = true;
00150 ##
00151
00152 ###
00153 # Should SMW accept inputs like [[property::Some [[link]] in value]]? If
00154 # enabled, this may lead to PHP crashes (!) when very long texts are used as
00155 # values. This is due to limitations in the library PCRE that PHP uses for
00156 # pattern matching. The provoked PHP crashes will prevent requests from being
00157 # completed -- usually clients will receive server errors ("invalid response")
00158 # or be offered to download "index.php". It might be okay to enable this if
00159 # such problems are not observed in your wiki.
00160 ##
00161 $smwgLinksInValues = false;
00162 ##
00163
00164 ###
00165 # Settings for recurring events, created with the #set_recurring_event parser
00166 # function: the default number of instances defined, if no end date is set;
00167 # and the maximum number that can be defined, regardless of end date.
00168 ##
00169 $smwgDefaultNumRecurringEvents = 100;
00170 $smwgMaxNumRecurringEvents = 500;
00171 ##
00172
00173 ###
00174 # Should the browse view for incoming links show the incoming links via its
00175 # inverses, or shall they be displayed on the other side?
00176 ##
00177 $smwgBrowseShowInverse = false;
00178 ##
00179
00180 ###
00181 # Should the browse view always show the incoming links as well, and more of
00182 # the incoming values?
00183 ##
00184 $smwgBrowseShowAll = true;
00185 ##
00186
00187 ###
00188 # Should the search by property special page display nearby results when there
00189 # are only a few results with the exact value? Switch this off if this page has
00190 # performance problems.
00191 ##
00192 $smwgSearchByPropertyFuzzy = true;
00193 ##
00194
00195 ###
00196 # Number results shown in the listings on pages in the namespaces Property,
00197 # Type, and Concept. If a value of 0 is given, the respective listings are
00198 # hidden completely.
00199 ##
00200 $smwgTypePagingLimit = 200;
00201 $smwgConceptPagingLimit = 200;
00202 $smwgPropertyPagingLimit = 25;
00203 ##
00204
00205 ###
00206 # How many values should at most be displayed for a page on the Property page?
00207 ##
00208 $smwgMaxPropertyValues = 3;
00209 ##
00210
00211 ###
00212 # Settings for inline queries ({{#ask:...}}) and for semantic queries in
00213 # general. This can especially be used to prevent overly high server-load due
00214 # to complex queries. The following settings affect all queries, wherever they
00215 # occur.
00216 ##
00217 $smwgQEnabled = true;
00218 $smwgQMaxLimit = 10000;
00219 $smwgIgnoreQueryErrors = true;
00220
00221
00222 $smwgQSubcategoryDepth = 10;
00223 $smwgQSubpropertyDepth = 10;
00224
00225 $smwgQEqualitySupport = SMW_EQ_SOME;
00226
00227
00228
00229 $smwgQSortingSupport = true;
00230 $smwgQRandSortingSupport = true;
00231 $smwgQDefaultNamespaces = null;
00232
00233
00234
00251 $smwgQComparators = '<|>|!~|!|~|≤|≥|<<|>>';
00252
00253 ###
00254 # Sets whether the > and < comparators should be strict or not. If they are strict,
00255 # values that are equal will not be accepted.
00256 ##
00257 $smwStrictComparators = false;
00258 ##
00259
00260 ###
00261 # Further settings for queries. The following settings affect inline queries
00262 # and querying special pages. Essentially they should mirror the kind of
00263 # queries that should immediately be answered by the wiki, using whatever
00264 # computations are needed.
00265 ##
00266 $smwgQMaxSize = 12;
00267 $smwgQMaxDepth = 4;
00268
00269
00270
00271
00272
00273
00274
00275 $smwgQFeatures = SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_CONCEPT_QUERY |
00276 SMW_NAMESPACE_QUERY | SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY;
00277
00278 ### Settings about printout of (especially inline) queries:
00279 $smwgQDefaultLimit = 50;
00280 $smwgQMaxInlineLimit = 500;
00281 $smwgQPrintoutLimit = 100;
00282 $smwgQDefaultLinking = 'all';
00283
00284
00285 ###
00286 # Further settings for queries. The following settings affect queries that are
00287 # part of concept pages. These are usually chosen to be les restricted than
00288 # inline queries, since there are two other means for controling their use:
00289 # (1) Concept queries that would not be allowed as normal queries will not be
00290 # executed directly, but can use pre-computed results instead. This is the
00291 # default.
00292 # (2) The whole Concept: namespace can be restricted (using some suitable
00293 # MediaWiki extension) to an experienced user group that may create more
00294 # complex queries responably. Other users can employ thus defined concepts in
00295 # their queries.
00296 ##
00297 $smwgQConceptCaching = CONCEPT_CACHE_HARD;
00298
00299
00300
00301
00302 $smwgQConceptMaxSize = 20;
00303 $smwgQConceptMaxDepth = 8;
00304
00305
00306 $smwgQConceptFeatures = SMW_PROPERTY_QUERY | SMW_CATEGORY_QUERY | SMW_NAMESPACE_QUERY |
00307 SMW_CONJUNCTION_QUERY | SMW_DISJUNCTION_QUERY;
00308
00309
00310
00311
00312 $smwgQConceptCacheLifetime = 24 * 60;
00313
00314
00315 ### Predefined result formats for queries
00316 # Array of available formats for formatting queries. Can be redefined in
00317 # the settings to disallow certain formats or to register extension formats.
00318 # To disable a format, do "unset($smwgResultFormats['template']);" Disabled
00319 # formats will be treated like if the format parameter had been omitted. The
00320 # formats 'table' and 'list' are defaults that cannot be disabled. The format
00321 # 'broadtable' should not be disabled either in order not to break Special:ask.
00322 ##
00323 $smwgResultFormats = array(
00324 'table' => 'SMWTableResultPrinter',
00325 'list' => 'SMWListResultPrinter',
00326 'ol' => 'SMWListResultPrinter',
00327 'ul' => 'SMWListResultPrinter',
00328 'broadtable' => 'SMWTableResultPrinter',
00329 'category' => 'SMWCategoryResultPrinter',
00330 'embedded' => 'SMWEmbeddedResultPrinter',
00331 'template' => 'SMWListResultPrinter',
00332 'count' => 'SMWListResultPrinter',
00333 'debug' => 'SMWListResultPrinter',
00334 'rss' => 'SMWRSSResultPrinter',
00335 'csv' => 'SMWCsvResultPrinter',
00336 'dsv' => 'SMWDSVResultPrinter',
00337 'json' => 'SMWJSONResultPrinter',
00338 'rdf' => 'SMWRDFResultPrinter'
00339 );
00340 ##
00341
00342 ### Predefined aliases for result formats
00343 # Array of available aliases for result formats. Can be redefined in
00344 # the settings to disallow certain aliases or to register extension aliases.
00345 # To disable an alias, do "unset($smwgResultAliases['alias']);" Disabled
00346 # aliases will be treated like if the alias parameter had been omitted.
00347 ##
00348 $smwgResultAliases = array();
00349 ##
00350
00351 ### Predefined sources for queries
00352 # Array of available sources for answering queries. Can be redefined in
00353 # the settings to register new sources (usually an extension will do so
00354 # on installation). Unknown source will be rerouted to the local wiki.
00355 # Note that the basic installation comes with no additional source besides
00356 # the local source (which in turn cannot be disabled or set explicitly).
00357 # Set a new store like this: $smwgQuerySources['freebase'] = "SMWFreebaseStore";
00358 ##
00359 $smwgQuerySources = array(
00360
00361 );
00362 ##
00363
00364 ### Default property type
00365 # Undefined properties (those without pages or whose pages have no "has type"
00366 # statement) will be assumed to be of this type. This is an internal type id.
00367 # See the file languages/SMW_LanguageXX.php to find what IDs to use for
00368 # datatpyes in your language. The default corresponds to "Type:Page".
00369 ##
00370 $smwgPDefaultType = '_wpg';
00371 ##
00372
00373 ###
00374 # Settings for RSS export
00375 ##
00376 $smwgRSSEnabled = true;
00377 $smwgRSSWithPages = true;
00378 ##
00379
00380 ###
00381 # Settings for OWL/RDF export
00382 ##
00383 $smwgAllowRecursiveExport = false;
00384 $smwgExportBacklinks = true;
00385
00386
00387
00388
00389
00390
00391 ##
00392
00393 ###
00394 # The maximal number that SMW will normally display without using scientific exp
00395 # notation. The deafult is rather large since some users have problems understanding
00396 # exponents. Scineitfic applications may prefer a smaller value for concise display.
00397 ##
00398 $smwgMaxNonExpNumber = 1000000000000000;
00399 ##
00400
00401 ###
00402 # SMW defers some tasks until after a page was edited by using the MediaWiki
00403 # job queueing system (see http://www.mediawiki.org/wiki/Manual:Job_queue).
00404 # For example, when the type of a property is changed, all affected pages will
00405 # be scheduled for (later) update. If a wiki generates too many jobs in this
00406 # way (Special:Statistics and "showJobs.php" can be used to check that), the
00407 # following setting can be used to disable jobs. Note that this will cause some
00408 # parts of the semantic data to get out of date, so that manual modifications
00409 # or the use of SMW_refreshData.php might be needed.
00410 ##
00411 $smwgEnableUpdateJobs = true;
00412 ##
00413
00414 ###
00415 # Overwriting the following array, you can define for which namespaces
00416 # the semantic links and annotations are to be evaluated. On other
00417 # pages, annotations can be given but are silently ignored. This is
00418 # useful since, e.g., talk pages usually do not have attributes and
00419 # the like. In fact, is is not obvious what a meaningful attribute of
00420 # a talk page could be. Pages without annotations will also be ignored
00421 # during full RDF export, unless they are referred to from another
00422 # article.
00423 ##
00424 $smwgNamespacesWithSemanticLinks = array(
00425 NS_MAIN => true,
00426 NS_TALK => false,
00427 NS_USER => true,
00428 NS_USER_TALK => false,
00429 NS_PROJECT => true,
00430 NS_PROJECT_TALK => false,
00431 NS_IMAGE => true,
00432 NS_IMAGE_TALK => false,
00433 NS_MEDIAWIKI => false,
00434 NS_MEDIAWIKI_TALK => false,
00435 NS_TEMPLATE => false,
00436 NS_TEMPLATE_TALK => false,
00437 NS_HELP => true,
00438 NS_HELP_TALK => false,
00439 NS_CATEGORY => true,
00440 NS_CATEGORY_TALK => false,
00441 SMW_NS_PROPERTY => true,
00442 SMW_NS_PROPERTY_TALK => false,
00443 SMW_NS_TYPE => true,
00444 SMW_NS_TYPE_TALK => false,
00445 SMW_NS_CONCEPT => true,
00446 SMW_NS_CONCEPT_TALK => false,
00447 );
00448 ##
00449
00450 ### List of enabled special page properties.
00451 # Modification date (_MDAT) is enabled by default for backward compatibility.
00452 # Extend array to enable other properties:
00453 # $smwgPageSpecialProperties[] = '_CDAT';
00454 # Or:
00455 # array_merge( $smwgPageSpecialProperties, array( '_CDAT' ) );
00456 # Or rewrite entire array:
00457 # $smwgPageSpecialProperties = array( '_MDAT', '_CDAT' );
00458 # However, DO NOT use `+=' operator! This DOES NOT work:
00459 # $smwgPageSpecialProperties += array( '_MDAT' );
00460 ##
00461 $smwgPageSpecialProperties = array( '_MDAT' );
00462
00463 ###
00464 # Properties (usually given as internal ids or DB key versions of property
00465 # titles) that are relevant for declaring the behaviour of a property P on a
00466 # property page in the sense that changing their values requires that all
00467 # pages that use P must be processed again. For example, if _PVAL (allowed
00468 # values) for a property change, then pages must be processed again. This
00469 # setting is not normally changed by users but by extensions that add new
00470 # types that have their own additional declaration properties.
00471 ##
00472 $smwgDeclarationProperties = array( '_PVAL', '_LIST' );
00473 ##
00474
00475
00476
00477 ###
00478 # -- FEATURE IS DISABLED --
00479 # Setting this to true allows to translate all the labels within
00480 # the browser GIVEN that they have interwiki links.
00481 ##
00482 $smwgTranslate = false;
00483
00484 ###
00485 # -- FEATURE IS DISABLED --
00486 # If you want to import ontologies, you need to install RAP,
00487 # a free RDF API for PHP, see
00488 # http://www.wiwiss.fu-berlin.de/suhl/bizer/rdfapi/
00489 # The following is the path to your installation of RAP
00490 # (the directory where you extracted the files to) as seen
00491 # from your local filesystem. Note that ontology import is
00492 # highly experimental at the moment, and may not do what you
00493 # extect.
00494 ##
00495
00496
00497 ##
00498
00499 ###
00500 # If the following is set to true, it is possible to initiate the repairing
00501 # or updating of all wiki data using the interface on Special:SMWAdmin.
00502 ##
00503 $smwgAdminRefreshStore = true;
00504 ##
00505
00506 ###
00507 # Sets whether or not the 'printouts' textarea should have autocompletion
00508 # on property names.
00509 ##
00510 $smwgAutocompleteInSpecialAsk = true;
00511 ##
00512
00513 ###
00514 # Sets whether or not to refresh the pages of which semantic data is stored.
00515 # Introduced in SMW 1.5.6
00516 ##
00517 $smwgAutoRefreshSubject = true;
00518 ##