Différences entre les versions de « SMW Sandbox:Setup information »
De Semantic MediaWiki - Sandbox
(→Exception and event logging : upd) |
(→Selected other extensions : upd) |
||
Ligne 247 : | Ligne 247 : | ||
$egGitHubDefaultRepo = 'SemanticMediaWiki/SemanticMediaWiki'; | $egGitHubDefaultRepo = 'SemanticMediaWiki/SemanticMediaWiki'; | ||
$egGitHubRepositoryWhitelist = [ | $egGitHubRepositoryWhitelist = [ | ||
− | + | 'JeroenDeDauw/GitHub', | |
− | + | 'JeroenDeDauw/Maps', | |
− | + | 'JeroenDeDauw/ParserHooks', | |
− | + | 'JeroenDeDauw/Validator', | |
− | + | 'oetterer/BootstrapComponents', | |
− | + | 'SemanticMediaWiki/SemanticBreadcrumbLinks', | |
− | + | 'SemanticMediaWiki/SemanticCite', | |
− | + | 'SemanticMediaWiki/SemanticCompoundQueries', | |
− | + | 'SemanticMediaWiki/SemanticExternalQueryLookup', | |
− | + | 'SemanticMediaWiki/SemanticExtraSpecialProperties', | |
− | + | 'SemanticMediaWiki/SemanticFormsSelect', | |
− | + | 'SemanticMediaWiki/SemanticGlossary', | |
− | + | 'SemanticMediaWiki/SemanticInterlanguageLinks', | |
− | + | 'SemanticMediaWiki/SemanticMediaWiki', | |
− | + | 'SemanticMediaWiki/SemanticMetaTags', | |
− | + | 'SemanticMediaWiki/SemanticNotifications', | |
− | + | 'SemanticMediaWiki/SemanticResultFormats', | |
− | + | 'SemanticMediaWiki/SemanticScribunto', | |
− | + | 'SemanticMediaWiki/SemanticSignup', | |
− | + | 'SemanticMediaWiki/SemanticWatchlist', | |
− | + | 'SemanticMediaWiki/SummaryCards', | |
− | + | 'SemanticMediaWiki/WhatsNearby' | |
− | + | ]; | |
$egGitHubCache = 'full'; | $egGitHubCache = 'full'; | ||
$egGitHubCacheTime = 1200; | $egGitHubCacheTime = 1200; | ||
## Maps | ## Maps | ||
− | // | + | wfLoadExtension( 'Maps' ); |
+ | require_once __DIR__ . '/extensions/Maps/DefaultSettings.php'; | ||
+ | $egMapsAvailableServices = [ | ||
+ | 'leaflet' | ||
+ | ]; | ||
+ | $egMapsDefaultService = 'leaflet'; | ||
+ | $egMapsDefaultGeoService = 'nominatim'; | ||
+ | $egMapsGMaps3ApiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // Google Maps 3 API key obfuscated | ||
$egMapsEnableCategory = true; | $egMapsEnableCategory = true; | ||
− | |||
## Page Forms | ## Page Forms | ||
wfLoadExtension( 'PageForms' ); | wfLoadExtension( 'PageForms' ); | ||
$wgPageForms24HourTime = true; | $wgPageForms24HourTime = true; | ||
− | |||
$wgPageFormsRedLinksCheckOnlyLocalProps = true; | $wgPageFormsRedLinksCheckOnlyLocalProps = true; | ||
$wgPageFormsAutocompleteOnAllChars = true; | $wgPageFormsAutocompleteOnAllChars = true; | ||
Ligne 288 : | Ligne 293 : | ||
## Summary Card | ## Summary Card | ||
// Composer | // Composer | ||
− | $sucgBackendParserCacheType = | + | $sucgBackendParserCacheType = CACHE_NONE; // FIXME |
$sucgEnabledNamespaceWithTemplate = [ | $sucgEnabledNamespaceWithTemplate = [ | ||
NS_MAIN => 'SimpleSummaryCard', | NS_MAIN => 'SimpleSummaryCard', | ||
Ligne 295 : | Ligne 300 : | ||
SMW_NS_PROPERTY => 'SimpleSummaryCard', | SMW_NS_PROPERTY => 'SimpleSummaryCard', | ||
]; | ]; | ||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Version du 22 avril 2019 à 21:32
Welcome to the sandbox of the SMW project. It primarily allows to test features provided by Semantic MediaWiki as well as related semantic extensions. However a vast set of additional useful extensions is installed to provide a great testing experience in conjunction with Semantic MediaWiki.
This wiki is designed to always run on the latest release candidate or stable version of MediaWiki core as well as the installed extensions, except for most of the semantic extensions which run on master. This page shows some of the setup information. See also the update log for MediaWiki core on this wiki.
composer.local.json
{
"require": {
"elasticsearch/elasticsearch": "~6.0",
"jeroen/mediawiki-github": "@dev",
"mediawiki/bootstrap": "@dev",
"mediawiki/bootstrap-components": "@dev",
"mediawiki/chameleon-skin": "@dev",
"mediawiki/graph-viz": "@dev",
"mediawiki/lingo": "@dev",
"mediawiki/mermaid": "@dev",
"mediawiki/maps": "@dev",
"mediawiki/page-forms": "@dev",
"mediawiki/parser-hooks": "@dev",
"mediawiki/simple-batch-upload": "@dev",
"mediawiki/summary-cards": "@dev",
"mediawiki/validator": "@dev",
"mediawiki/whats-nearby": "@dev",
"mediawiki/semantic-breadcrumb-links": "@dev",
"mediawiki/semantic-cite": "@dev",
"mediawiki/semantic-compound-queries": "@dev",
"mediawiki/semantic-external-query-lookup": "@dev",
"mediawiki/semantic-extra-special-properties": "@dev",
"mediawiki/semantic-forms-select": "@dev",
"mediawiki/semantic-glossary": "@dev",
"mediawiki/semantic-interlanguage-links": "@dev",
"mediawiki/semantic-media-wiki": "@dev",
"mediawiki/semantic-meta-tags": "@dev",
"mediawiki/semantic-notifications": "@dev",
"mediawiki/semantic-result-formats": "@dev",
"mediawiki/semantic-scribunto": "@dev",
"mediawiki/semantic-watchlist": "@dev"
},
"extra": {
"merge-plugin": {
"include": [
"extensions/Elastica/composer.json",
"extensions/Mpdf/composer.json",
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
},
"config": {
"preferred-install": "source",
"optimize-autoloader": true
}
}
LocalSettings.php
Semantic extensions
$wgSearchType = 'SMWSearch';
## Semantic MediaWiki
enableSemantics( $smwSemanticName );
$smwgDefaultStore = 'SMWElasticStore';
$smwgElasticsearchEndpoints = [
[
'host' => '217.197.83.171',
'port' => 9200,
'scheme' => 'http'
],
'localhost:9200'
];
$smwgElasticsearchProfile = __DIR__ . '/elasticsearch.profile.json';
$smwgEnabledFulltextSearch = true;
$smwgEnabledQueryDependencyLinksStore = true;
$smwgPropertyZeroCountDisplay = false;
$smwgPropertyLowUsageThreshold = 3;
$smwgAdminFeatures = ( $smwgAdminFeatures & ~SMW_ADM_REFRESH );
$smwgNamespacesWithSemanticLinks[NS_TALK] = true;
$smwgNamespacesWithSemanticLinks[NS_USER_TALK] = true;
$smwgNamespacesWithSemanticLinks[NS_EXTRA] = true;
$smwgPageSpecialProperties = array_merge(
$smwgPageSpecialProperties, [
'_ATTCH_LINK',
'_CDAT',
'_NEWP',
'_LEDT',
'_MEDIA',
'_MIME',
'_TRANS'
]
);
$smwgFixedProperties = [
'Has_text_fixed',
'Has_page_fixed'
];
$smwgQDefaultLimit = 250;
$smwgQMaxLimit = 4000;
$smwgQMaxInlineLimit = 2000;
$smwgQueryProfiler = SMW_QPRFL_DUR | SMW_QPRFL_PARAMS;
$smwgQueryResultCacheType = CACHE_ANYTHING;
$smwgQFilterDuplicates = true;
$smwgQSortFeatures = $smwgQSortFeatures | SMW_QSORT_UNCONDITIONAL;
$smwgDVFeatures = $smwgDVFeatures | SMW_DV_PVUC;
$smwgFieldTypeFeatures = SMW_FIELDT_CHAR_NOCASE | SMW_FIELDT_CHAR_LONG;
$smwgParserFeatures = $smwgParserFeatures | SMW_PARSER_UNSTRIP | SMW_PARSER_LINV;
$smwgPropertyReservedNameList = array_merge(
$smwgPropertyReservedNameList, [
'Code',
'smw-property-reserved-code'
]
);
$smwgJobQueueWatchlist = [
'smw.update',
'smw.parserCachePurge',
'smw.fulltextSearchTableUpdate',
'smw.changePropagationUpdate',
'smw.elasticIndexerRecovery',
'smw.elasticFileIngest'
];
$smwgDefaultLoggerRole = 'developer';
$smwgEditProtectionRight = 'smw-pageedit';
$smwgSupportSectionTag = false;
$smwgQuerySources = [
'semanticmediawikiorg' => [
'\SMW\Query\RemoteRequest',
'url' => 'https://www.semantic-mediawiki.org/w/index.php',
'cache' => 3600
],
'semantic-mw' => [
'SMWExternalAskQueryLookup'
]
];
## Semantic Breadcrumb Links
wfLoadExtension( 'SemanticBreadcrumbLinks' );
## Semantic Cite
wfLoadExtension( 'SemanticCite' );
## Semantic Compound Queries
wfLoadExtension( 'SemanticCompoundQueries' );
## Semantic Drilldown
// https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/2944
// $sdgNamespaceIndex = 112;
// require 'extensions/SemanticDrilldown/SemanticDrilldown.php';
// $sdgShowCategoriesAsTabs = true;
## Semantic External Query Lookup
// Composer
$seqlgExternalRepositoryEndpoints = [
'smworg' => [
'https://www.semantic-mediawiki.org/w/index.php/$1',
'https://www.semantic-mediawiki.org/w/api.php',
true
]
];
## Semantic Extra Special Properties
wfLoadExtension( 'SemanticExtraSpecialProperties' );
$sespgEnabledPropertyList = [
'_APPROVED',
'_APPROVEDBY',
'_APPROVEDDATE',
'_APPROVEDSTATUS',
'_CUSER',
'_EUSER',
'_EXIFDATA',
'_NREV',
'_NTREV',
'_PAGEID',
'_PAGELGTH',
'_REVID',
'_SUBP',
'_USERBLOCK',
'_USEREDITCNT',
'_USERGROUP',
'_USERREG',
'_USERRIGHT',
'_VIEWS'
];
$sespgUseFixedTables = true;
$sespgExcludeBotEdits = true;
## Semantic Forms Select
wfLoadExtension( 'SemanticFormsSelect' );
## Semantic Glossary
wfLoadExtension( 'SemanticGlossary' );
$wgexLingoPage = 'Glossaire';
$wgexLingoUseNamespaces[NS_SPECIAL] = false;
## Semantic Image Annotator
wfLoadExtension( 'SemanticImageAnnotator' );
## Semantic Interlanguage Links
// Composer
## Semantic Meta Tags
wfLoadExtension( 'SemanticMetaTags' );
$smtgTagsProperties = [
'keywords' => 'Meta element keywords',
'description' => 'Meta element description'
];
$smtgTagsStrings = [
'og:site_name' => 'Semantic MediaWiki - Sandbox',
'og:image' => 'https://sandbox.semantic-mediawiki.org/w/SMWSandBoxLogo.png',
'og:image:type' => 'image/png',
'og:image:width' => '142',
'og:image:height' => '142'
];
## Semantic Notifications
// Composer
## Semantic Rating
wfLoadExtension( 'SemanticRating' );
## Semantic Result Formats
wfLoadExtension( 'SemanticResultFormats' );
$srfgFirstDayOfWeek = 'lundi';
$srfgFormats = array_merge(
$srfgFormats, [
'process',
'graph',
'incoming'
]
);
## Semantic Scribunto
wfLoadExtension( 'SemanticScribunto' );
## Semantic Text Annotator
// wfLoadExtension( 'SemanticTextAnnotator' );
## Semantic Watchlist
// Composer
Selected other extensions
## GitHub
// Composer
$egGitHubDefaultRepo = 'SemanticMediaWiki/SemanticMediaWiki';
$egGitHubRepositoryWhitelist = [
'JeroenDeDauw/GitHub',
'JeroenDeDauw/Maps',
'JeroenDeDauw/ParserHooks',
'JeroenDeDauw/Validator',
'oetterer/BootstrapComponents',
'SemanticMediaWiki/SemanticBreadcrumbLinks',
'SemanticMediaWiki/SemanticCite',
'SemanticMediaWiki/SemanticCompoundQueries',
'SemanticMediaWiki/SemanticExternalQueryLookup',
'SemanticMediaWiki/SemanticExtraSpecialProperties',
'SemanticMediaWiki/SemanticFormsSelect',
'SemanticMediaWiki/SemanticGlossary',
'SemanticMediaWiki/SemanticInterlanguageLinks',
'SemanticMediaWiki/SemanticMediaWiki',
'SemanticMediaWiki/SemanticMetaTags',
'SemanticMediaWiki/SemanticNotifications',
'SemanticMediaWiki/SemanticResultFormats',
'SemanticMediaWiki/SemanticScribunto',
'SemanticMediaWiki/SemanticSignup',
'SemanticMediaWiki/SemanticWatchlist',
'SemanticMediaWiki/SummaryCards',
'SemanticMediaWiki/WhatsNearby'
];
$egGitHubCache = 'full';
$egGitHubCacheTime = 1200;
## Maps
wfLoadExtension( 'Maps' );
require_once __DIR__ . '/extensions/Maps/DefaultSettings.php';
$egMapsAvailableServices = [
'leaflet'
];
$egMapsDefaultService = 'leaflet';
$egMapsDefaultGeoService = 'nominatim';
$egMapsGMaps3ApiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // Google Maps 3 API key obfuscated
$egMapsEnableCategory = true;
## Page Forms
wfLoadExtension( 'PageForms' );
$wgPageForms24HourTime = true;
$wgPageFormsRedLinksCheckOnlyLocalProps = true;
$wgPageFormsAutocompleteOnAllChars = true;
$wgPageFormsAutoCreateUser = 'AutoCreateBot';
## Summary Card
// Composer
$sucgBackendParserCacheType = CACHE_NONE; // FIXME
$sucgEnabledNamespaceWithTemplate = [
NS_MAIN => 'SimpleSummaryCard',
NS_HELP => 'SimpleSummaryCard',
NS_FILE => 'SimpleSummaryCard',
SMW_NS_PROPERTY => 'SimpleSummaryCard',
];
Exception and event logging
### Debug settings
error_reporting( -1 );
ini_set( 'display_errors', 1 );
### Exception settings
## Showing
$wgShowExceptionDetails = true;
// $wgDebugToolbar = true;
## Logging
// $wgDebugLogFile = "/var/log/mediawiki/{$wgDBname}-debug-all.log";
// $wgDebugDumpSql = true;
$wgDebugLogGroups = [
// 'authentication' => "/var/log/mediawiki/{$wgDBname}-debug-authentication.log",
'error' => "/var/log/mediawiki/{$wgDBname}-debug-error.log",
'exception' => "/var/log/mediawiki/{$wgDBname}-debug-exception.log",
// 'resourceloader' => "/var/log/mediawiki/{$wgDBname}-debug-resourceloader.log",
// 'smw' => "/var/log/mediawiki/{$wgDBname}-debug-smw.log",
'smw-elastic' => "var/log/mediawiki/{$wgDBname}-debug-smw-elastic.log"
];
elasticsearch.profile.json
{
"settings": {
"data": {
"index.mapping.total_fields.limit": 12000
}
},
"indexer": {
"raw.text": true,
"experimental.file.ingest": true,
"throw.exception.on.illegal.argument.error": false
},
"query": {
"debug.explain": true,
"sort.property.must.exists": false,
"special_search.highlight.fragment.type": "unified",
"uri.field.case.insensitive": true
}
}
__NOGLOSSARY__