Différences entre les versions de « SMW Sandbox:Setup information »

De Semantic MediaWiki - Sandbox

(fix config)
(form, assuming this does not change anything)
Ligne 99 : Ligne 99 :
 
$smwgQueryResultCacheType = CACHE_ANYTHING;
 
$smwgQueryResultCacheType = CACHE_ANYTHING;
 
$smwgQFilterDuplicates = true;
 
$smwgQFilterDuplicates = true;
$smwgQSortFeatures = ( $smwgQSortFeatures | SMW_QSORT_UNCONDITIONAL );
+
$smwgQSortFeatures = $smwgQSortFeatures | SMW_QSORT_UNCONDITIONAL;
 
$smwgQueryDependencyAffiliatePropertyDetectionList = [
 
$smwgQueryDependencyAffiliatePropertyDetectionList = [
 
'_DTITLE'
 
'_DTITLE'
Ligne 105 : Ligne 105 :
 
$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;
$smwgParserFeatures = ( $smwgParserFeatures | SMW_PARSER_UNSTRIP | SMW_PARSER_LINV );
+
$smwgParserFeatures = $smwgParserFeatures | SMW_PARSER_UNSTRIP | SMW_PARSER_LINV;
 
$smwgPropertyReservedNameList = array_merge(
 
$smwgPropertyReservedNameList = array_merge(
 
$smwgPropertyReservedNameList, [
 
$smwgPropertyReservedNameList, [

Version du 5 janvier 2019 à 23: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",
        "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_EXTRA] = true;
$smwgPageSpecialProperties = array_merge(
	$smwgPageSpecialProperties, [
		'_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;
$smwgQueryDependencyAffiliatePropertyDetectionList = [
	'_DTITLE'
	];
$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
// Composer

## 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
// 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
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
// Composer
$egMapsEnableCategory = true;
$egMapsGMaps3ApiKey = 'xxx'; // Google Maps 3 API key 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;

## 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",
	'smw-elastic' => "var/log/mediawiki/{$wgDBname}-debug-smw-elastic.log"
	];

elasticsearch.profile.json

{
        "settings": {
                "data": {
                        "index.mapping.total_fields.limit": 9000
                }
        },
        "indexer": {
                "raw.text": true,
                "experimental.file.ingest": true
        },
        "query": {
                "debug.explain": true,
                "sort.property.must.exists": false,
                "special_search.highlight.fragment.type": "unified",
                "uri.field.case.insensitive": true
        }
}

__NOGLOSSARY__

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.