« SMW Sandbox:Setup information » : différence entre les versions
De Semantic MediaWiki - Sandbox
(→Semantic extensions : upd) Balise : Éditeur de wikicode 2017 |
(→Semantic extensions : 2018-03-31) Balise : Éditeur de wikicode 2017 |
||
Ligne 62 : | Ligne 62 : | ||
// Composer | // Composer | ||
enableSemantics( sandbox.semantic-mediawiki.org ); | enableSemantics( sandbox.semantic-mediawiki.org ); | ||
$smwgDefaultStore = 'SMWElasticStore'; | |||
$smwgElasticsearchEndpoints = [ | |||
[ | |||
'host' => '217.197.83.171', | |||
'port' => 9200, | |||
'scheme' => 'http' | |||
], | |||
'localhost:9200' | |||
]; | |||
$smwgElasticsearchConfig['settings']['data'] = [ | |||
'index.mapping.total_fields.limit' => 9000 | |||
]; | |||
$smwgElasticsearchConfig['query']['uri.field.case.insensitive'] = true; | |||
$smwgElasticsearchConfig['query']['debug.explain'] = true; | |||
$smwgAdminRefreshStore = false; | |||
$smwgNamespacesWithSemanticLinks[NS_EXTRA] = true; | $smwgNamespacesWithSemanticLinks[NS_EXTRA] = true; | ||
$smwgPageSpecialProperties = array_merge( | $smwgPageSpecialProperties = array_merge( | ||
$smwgPageSpecialProperties, [ | |||
'_CDAT', | |||
'_NEWP', | |||
'_LEDT', | |||
'_MEDIA', | |||
'_MIME' | |||
] | |||
); | |||
$smwgFixedProperties = [ | $smwgFixedProperties = [ | ||
'Has_text_fixed', | |||
'Has_page_fixed' | |||
]; | |||
$smwgQDefaultLimit = 200; | $smwgQDefaultLimit = 200; | ||
$smwgQMaxLimit = 1000; | $smwgQMaxLimit = 1000; | ||
Ligne 82 : | Ligne 97 : | ||
$smwgPropertyLowUsageThreshold = 3; | $smwgPropertyLowUsageThreshold = 3; | ||
$smwgQueryProfiler = [ | $smwgQueryProfiler = [ | ||
'smwgQueryDurationEnabled' => true, | |||
'smwgQueryParametersEnabled' => true | |||
]; | |||
$smwgQueryResultCacheType = CACHE_ANYTHING; | $smwgQueryResultCacheType = CACHE_ANYTHING; | ||
$smwgQFilterDuplicates = true; | $smwgQFilterDuplicates = true; | ||
$smwgEnabledQueryDependencyLinksStore = true; | $smwgEnabledQueryDependencyLinksStore = true; | ||
$smwgQueryDependencyAffiliatePropertyDetectionlist = [ | $smwgQueryDependencyAffiliatePropertyDetectionlist = [ | ||
'_DTITLE' | |||
]; | |||
$smwgEnabledHttpDeferredJobRequest = SMW_HTTP_DEFERRED_SYNC_JOB; | $smwgEnabledHttpDeferredJobRequest = SMW_HTTP_DEFERRED_SYNC_JOB; | ||
$smwgOnDeleteAction = [ | $smwgOnDeleteAction = [ | ||
'smwgDeleteSubjectAsDeferredJob' => true, | |||
'smwgDeleteSubjectWithAssociatesRefresh' => true | |||
]; | |||
$smwgDVFeatures = $smwgDVFeatures | SMW_DV_PVUC; | $smwgDVFeatures = $smwgDVFeatures | SMW_DV_PVUC; | ||
$smwgFieldTypeFeatures = SMW_FIELDT_CHAR_NOCASE | SMW_FIELDT_CHAR_LONG; | $smwgFieldTypeFeatures = SMW_FIELDT_CHAR_NOCASE | SMW_FIELDT_CHAR_LONG; | ||
Ligne 102 : | Ligne 117 : | ||
$smwgLinksInValues = SMW_LINV_OBFU; | $smwgLinksInValues = SMW_LINV_OBFU; | ||
$smwgPropertyReservedNameList = array_merge( | $smwgPropertyReservedNameList = array_merge( | ||
$smwgPropertyReservedNameList, [ | |||
'Code', | |||
'smw-property-reserved-code' | |||
] | |||
); | |||
$smwgJobQueueWatchlist = [ | $smwgJobQueueWatchlist = [ | ||
'SMW\UpdateJob', | 'SMW\UpdateJob', | ||
Ligne 144 : | Ligne 159 : | ||
## Semantic Extra Special Properties | ## Semantic Extra Special Properties | ||
wfLoadExtension( 'SemanticExtraSpecialProperties' ); | |||
$sespSpecialProperties = [ | $sespSpecialProperties = [ | ||
'_CUSER', | |||
'_EUSER', | |||
'_EXIFDATA', | |||
'_NREV', | |||
'_NTREV', | |||
'_PAGEID', | |||
'_PAGELGTH', | |||
'_REVID', | |||
'_SUBP', | |||
'_USERBLOCK', | |||
'_USEREDITCNT', | |||
'_USERGROUP', | |||
'_USERREG', | |||
'_USERRIGHT', | |||
'_VIEWS' | |||
]; | |||
$sespUseAsFixedTables = true; | $sespUseAsFixedTables = true; | ||
$wgSESPExcludeBots = true; | $wgSESPExcludeBots = true; |
Version du 31 mars 2018 à 20:36
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",
"mediawiki/bootstrap": "@dev",
"mediawiki/bootstrap-components": "@dev",
"mediawiki/chameleon-skin": "@dev",
"mediawiki/lingo": "@dev",
"mediawiki/mermaid": "@dev",
"mediawiki/maps": "@dev",
"mediawiki/page-forms": "@dev",
"mediawiki/parser-hooks": "@dev",
"mediawiki/scribunto": "@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-sifter": "@dev",
"mediawiki/semantic-watchlist": "@dev",
"phpoffice/phpspreadsheet": "~1"
},
"extra": {
"merge-plugin": {
"include": [
"extensions/SyntaxHighlight_GeSHi/composer.json"
]
}
},
"config": {
"preferred-install": "source",
"optimize-autoloader": true
}
}
LocalSettings.php
Semantic extensions
$wgSearchType = 'SMWSearch';
## Semantic MediaWiki
// Composer
enableSemantics( sandbox.semantic-mediawiki.org );
$smwgDefaultStore = 'SMWElasticStore';
$smwgElasticsearchEndpoints = [
[
'host' => '217.197.83.171',
'port' => 9200,
'scheme' => 'http'
],
'localhost:9200'
];
$smwgElasticsearchConfig['settings']['data'] = [
'index.mapping.total_fields.limit' => 9000
];
$smwgElasticsearchConfig['query']['uri.field.case.insensitive'] = true;
$smwgElasticsearchConfig['query']['debug.explain'] = true;
$smwgAdminRefreshStore = false;
$smwgNamespacesWithSemanticLinks[NS_EXTRA] = true;
$smwgPageSpecialProperties = array_merge(
$smwgPageSpecialProperties, [
'_CDAT',
'_NEWP',
'_LEDT',
'_MEDIA',
'_MIME'
]
);
$smwgFixedProperties = [
'Has_text_fixed',
'Has_page_fixed'
];
$smwgQDefaultLimit = 200;
$smwgQMaxLimit = 1000;
$smwgQMaxInlineLimit = 1000;
$smwgPropertyZeroCountDisplay = false;
$smwgPropertyLowUsageThreshold = 3;
$smwgQueryProfiler = [
'smwgQueryDurationEnabled' => true,
'smwgQueryParametersEnabled' => true
];
$smwgQueryResultCacheType = CACHE_ANYTHING;
$smwgQFilterDuplicates = true;
$smwgEnabledQueryDependencyLinksStore = true;
$smwgQueryDependencyAffiliatePropertyDetectionlist = [
'_DTITLE'
];
$smwgEnabledHttpDeferredJobRequest = SMW_HTTP_DEFERRED_SYNC_JOB;
$smwgOnDeleteAction = [
'smwgDeleteSubjectAsDeferredJob' => true,
'smwgDeleteSubjectWithAssociatesRefresh' => true
];
$smwgDVFeatures = $smwgDVFeatures | SMW_DV_PVUC;
$smwgFieldTypeFeatures = SMW_FIELDT_CHAR_NOCASE | SMW_FIELDT_CHAR_LONG;
$smwgEnabledFulltextSearch = true;
$smwgEditProtectionRight = 'smw-pageedit';
$smwgLinksInValues = SMW_LINV_OBFU;
$smwgPropertyReservedNameList = array_merge(
$smwgPropertyReservedNameList, [
'Code',
'smw-property-reserved-code'
]
);
$smwgJobQueueWatchlist = [
'SMW\UpdateJob',
'SMW\ParserCachePurgeJob',
'SMW\FulltextSearchTableUpdateJob',
'SMW\ChangePropagationUpdateJob'
];
$smwgDefaultLoggerRole = 'developer';
## Semantic Breadcrumb Links
// Composer
## Semantic Cite
// Composer
## Semantic Compound Queries
// Composer
## Semantic Drilldown
// https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/2944
// $sdgNamespaceIndex = 112;
// require 'extensions/SemanticDrilldown/SemanticDrilldown.php';
// $sdgShowCategoriesAsTabs = true;
## Semantic External Query Lookup
// Composer
$smwgQuerySources = [
'smworg' => 'SMWExternalQueryLookup',
];
$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' );
$sespSpecialProperties = [
'_CUSER',
'_EUSER',
'_EXIFDATA',
'_NREV',
'_NTREV',
'_PAGEID',
'_PAGELGTH',
'_REVID',
'_SUBP',
'_USERBLOCK',
'_USEREDITCNT',
'_USERGROUP',
'_USERREG',
'_USERRIGHT',
'_VIEWS'
];
$sespUseAsFixedTables = true;
$wgSESPExcludeBots = 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
// Composer
$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
// Composer
$srfgFirstDayOfWeek = 'Monday';
$srfgFormats = array_merge(
$srfgFormats, [
'filtered',
'process',
'graph',
'incoming'
]
);
## Semantic Scribunto
// Composer
## Semantic Sifter
// Composer
## Semantic Text Annotator
wfLoadExtension( 'SemanticTextAnnotator' );
## Semantic Watchlist
// Composer
Selected other extensions
## GitHub
// Composer
$egGitHubDefaultRepo = 'SemanticMediaWiki/SemanticMediaWiki';
## Maps
// Composer
$egMapsEnableCategory = true;
$egMapsGMaps3ApiKey = '??????????????????_????????????????????'; // obfuscated
## Page Forms
wfLoadExtension( 'PageForms' );
$wgPageForms24HourTime = true;
$wgPageFormsRenameEditTabs = true;
$wgPageFormsRedLinksCheckOnlyLocalProps = true;
$wgPageFormsAutocompleteOnAllChars = true;
$wgPageFormsAutoCreateUser = 'AutoCreateBot';
## Summary Card
// Composer
$sucgBackendParserCacheType = CACHE_MEMCACHED;
$sucgEnabledNamespaceWithTemplate = [
NS_MAIN => 'SimpleSummaryCard',
NS_HELP => 'SimpleSummaryCard',
NS_FILE => 'SimpleSummaryCard',
SMW_NS_PROPERTY => 'SimpleSummaryCard',
];
## WhatsNearby
// Composer
Exception and event logging
### Exception settings
## Show exceptions
$wgShowExceptionDetails = true;
$wgShowSQLErrors = true;
$wgShowDBErrorBacktrace = true;
## Exception and event logging
$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"
];