“站点日志”的版本间差异

来自Wikioe
跳到导航 跳到搜索
第11行: 第11行:


=== 2021/05/16 ===
=== 2021/05/16 ===
添加编辑框自定义标签功能。<br>
添加编辑框自定义标签功能。
# 安装扩展“Gadgets”、“CharInsert”。
: Edittools 定义的标签显示在页面底部(编辑时不方便),而 Gadget-charinsert-core.js 中定义的标签在编辑框底部(自定义标签时不方便);
: 但是还不知道如何将两个配合使用。(所以先注释了 Edittools 中的内容)
: Gadget-charinsert-core.js 中说<nowiki>“// Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | ”</nowiki>
# 安装扩展“Gadgets”、“CharInsert”。所以可以配合使用???
# 修改以下内容:【均是新建】
# 修改以下内容:【均是新建】
## http://wiki.eijux.com/MediaWiki:Common.css |-Common.css
## http://wiki.eijux.com/MediaWiki:Common.css |-Common.css
第22行: 第25行:
## http://wiki.eijux.com/MediaWiki:Gadget-charinsert.js |-Gadget-charinsert.js
## http://wiki.eijux.com/MediaWiki:Gadget-charinsert.js |-Gadget-charinsert.js
## http://wiki.eijux.com/MediaWiki:Gadget-charinsert |-Gadget-charinsert
## http://wiki.eijux.com/MediaWiki:Gadget-charinsert |-Gadget-charinsert
=== 2021/05/17 ===
想要修改文章目录为浮动目录,没搞好。
: 【2021/05/17 02:38:48】但还没弄好,好像是“JsonConfig”的配置有问题,相关模板页错误:“Lua错误 在模块:TNT的第159行:Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab”。
: 网上类似问题链接:
: https://www.mediawiki.org/wiki/Topic:Vbvr1uv3rw3qi8a4
: https://www.mediawiki.org/wiki/Topic:V8zt7msvlfps3c8d
# 从 mediawiki.org 导入了:Template:TOC、Template:TOC-nopadding、Template:TOCright。
# 安装扩展“Scribunto”、“TemplateStyles”、“JsonConfig”。
# 修改配置文件:
#: <syntaxhighlight lang="php" highlight="">
# by Eijux, 2021/05/16 22:07:01
# To import Template:TOC etc from mediawiki.org.
wfLoadExtension( 'Scribunto' );
wfLoadExtension( 'TemplateStyles' );
wfLoadExtension( 'JsonConfig' );
#
#$wgJsonConfigEnableLuaSupport = true;
# JsonConfig uses a very flexible (and a bit complicated) settings system. Both Commons wiki and all other wikis will need this code block to set up a cross-wiki shareable storage:
#$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
#$wgJsonConfigs['Tabular.JsonConfig'] = array(
# 'namespace' => 486, // === NS_DATA, but the constant is not defined yet
# 'nsName' => 'Data',
# 'isLocal' => false,
# 'pattern' => '/.\.tab$/'
#);
# Commons wiki will need to specify that data should be stored locally:
#$wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
# Other wikis will need to set how to access remote data:
#$wgJsonConfigs['Tabular.JsonConfig']['remote'] = 'https://commons.wikimedia.org/w/api.php';
if ( $wmgEnableJsonConfigDataMode ) {
// Safety: before extension.json, these values were initialized by JsonConfig.php
if ( !isset( $wgJsonConfigModels ) ) {
$wgJsonConfigModels = [];
}
if ( !isset( $wgJsonConfigs ) ) {
$wgJsonConfigs = [];
}
$wgJsonConfigEnableLuaSupport = true;
// https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
$wgJsonConfigs['Tabular.JsonConfig'] = [
'namespace' => 486,
'nsName' => 'Data',
// page name must end in ".tab", and contain at least one symbol
'pattern' => '/.\.tab$/',
'license' => 'CC0-1.0',
'isLocal' => false,
];
$wgJsonConfigModels['Map.JsonConfig'] = 'JsonConfig\JCMapDataContent';
$wgJsonConfigs['Map.JsonConfig'] = [
'namespace' => 486,
'nsName' => 'Data',
// page name must end in ".map", and contain at least one symbol
'pattern' => '/.\.map$/',
'license' => 'CC0-1.0',
'isLocal' => false,
];
// Enable Tabular data namespace on Commons - T148745
// Enable Map (GeoJSON) data namespace on Commons - T149548
// TODO: Consider whether this hard-coding to Commons is appropriate
if ( $wgDBname === 'commonswiki' ) {
// Ensure we have a stable cross-wiki title resolution
// See JCSingleton::parseTitle()
$wgJsonConfigInterwikiPrefix = "meta";
$wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
$wgJsonConfigs['Map.JsonConfig']['store'] = true;
} else {
$wgJsonConfigInterwikiPrefix = "commons";
$wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
'url' => 'https://commons.wikimedia.org/w/api.php'
];
$wgJsonConfigs['Map.JsonConfig']['remote'] = [
'url' => 'https://commons.wikimedia.org/w/api.php'
];
}
}
</syntaxhighlight>

2021年5月17日 (一) 02:45的版本


站点日志

关于站点的安装、更新,扩展安装等操作,列出记录相关操作。

2020/09/06

站点更新(安装):Mediawiki-1.35.0-rc.3版本。

2020/09/02

安装扩展“VisualEditor”。

2021/05/16

添加编辑框自定义标签功能。

Edittools 定义的标签显示在页面底部(编辑时不方便),而 Gadget-charinsert-core.js 中定义的标签在编辑框底部(自定义标签时不方便);
但是还不知道如何将两个配合使用。(所以先注释了 Edittools 中的内容)
Gadget-charinsert-core.js 中说“// Please make any changes to [[MediaWiki:Edittools]] as well, however, instead of using the ␥ symbol, use {{#ifeq:{{NAMESPACE}}|{{ns:0}}| | ”。
  1. 安装扩展“Gadgets”、“CharInsert”。所以可以配合使用???
  2. 修改以下内容:【均是新建】
    1. http://wiki.eijux.com/MediaWiki:Common.css |-Common.css
    2. http://wiki.eijux.com/MediaWiki:Edittools |自定义标签
    3. http://wiki.eijux.com/MediaWiki:Gadgets-definition |-Gadgets-definition
    4. http://wiki.eijux.com/MediaWiki:Gadget-Edittools.js |-Gadget-Edittools.js
    5. http://wiki.eijux.com/MediaWiki:Gadget-charinsert-core.js |-Gadget-charinsert-core.js
    6. http://wiki.eijux.com/MediaWiki:Gadget-charinsert-styles.css |-Gadget-charinsert-styles.css
    7. http://wiki.eijux.com/MediaWiki:Gadget-charinsert.js |-Gadget-charinsert.js
    8. http://wiki.eijux.com/MediaWiki:Gadget-charinsert |-Gadget-charinsert

2021/05/17

想要修改文章目录为浮动目录,没搞好。

【2021/05/17 02:38:48】但还没弄好,好像是“JsonConfig”的配置有问题,相关模板页错误:“Lua错误 在模块:TNT的第159行:Missing JsonConfig extension; Cannot load https://commons.wikimedia.org/wiki/Data:I18n/Documentation.tab”。
网上类似问题链接:
https://www.mediawiki.org/wiki/Topic:Vbvr1uv3rw3qi8a4
https://www.mediawiki.org/wiki/Topic:V8zt7msvlfps3c8d
  1. 从 mediawiki.org 导入了:Template:TOC、Template:TOC-nopadding、Template:TOCright。
  2. 安装扩展“Scribunto”、“TemplateStyles”、“JsonConfig”。
  3. 修改配置文件:
    # by Eijux, 2021/05/16 22:07:01
    # To import Template:TOC etc from mediawiki.org.
    wfLoadExtension( 'Scribunto' );
    wfLoadExtension( 'TemplateStyles' );
    wfLoadExtension( 'JsonConfig' );
    #
    #$wgJsonConfigEnableLuaSupport = true;
    # JsonConfig uses a very flexible (and a bit complicated) settings system. Both Commons wiki and all other wikis will need this code block to set up a cross-wiki shareable storage:
    #$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
    #$wgJsonConfigs['Tabular.JsonConfig'] = array(
    #	'namespace' => 486, // === NS_DATA, but the constant is not defined yet
    #	'nsName' => 'Data',
    #	'isLocal' => false,
    #	'pattern' => '/.\.tab$/'
    #);
    # Commons wiki will need to specify that data should be stored locally:
    #$wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
    # Other wikis will need to set how to access remote data:
    #$wgJsonConfigs['Tabular.JsonConfig']['remote'] = 'https://commons.wikimedia.org/w/api.php';
    if ( $wmgEnableJsonConfigDataMode ) {
    	// Safety: before extension.json, these values were initialized by JsonConfig.php
    	if ( !isset( $wgJsonConfigModels ) ) {
    		$wgJsonConfigModels = [];
    	}
    	if ( !isset( $wgJsonConfigs ) ) {
    		$wgJsonConfigs = [];
    	}
    
    	$wgJsonConfigEnableLuaSupport = true;
    
    	// https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration
    
    	$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
    	$wgJsonConfigs['Tabular.JsonConfig'] = [
    		'namespace' => 486,
    		'nsName' => 'Data',
    		// page name must end in ".tab", and contain at least one symbol
    		'pattern' => '/.\.tab$/',
    		'license' => 'CC0-1.0',
    		'isLocal' => false,
    	];
    
    	$wgJsonConfigModels['Map.JsonConfig'] = 'JsonConfig\JCMapDataContent';
    	$wgJsonConfigs['Map.JsonConfig'] = [
    		'namespace' => 486,
    		'nsName' => 'Data',
    		// page name must end in ".map", and contain at least one symbol
    		'pattern' => '/.\.map$/',
    		'license' => 'CC0-1.0',
    		'isLocal' => false,
    	];
    
    	// Enable Tabular data namespace on Commons - T148745
    	// Enable Map (GeoJSON) data namespace on Commons - T149548
    	// TODO: Consider whether this hard-coding to Commons is appropriate
    	if ( $wgDBname === 'commonswiki' ) {
    		// Ensure we have a stable cross-wiki title resolution
    		// See JCSingleton::parseTitle()
    		$wgJsonConfigInterwikiPrefix = "meta";
    
    		$wgJsonConfigs['Tabular.JsonConfig']['store'] = true;
    		$wgJsonConfigs['Map.JsonConfig']['store'] = true;
    	} else {
    		$wgJsonConfigInterwikiPrefix = "commons";
    
    		$wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
    			'url' => 'https://commons.wikimedia.org/w/api.php'
    		];
    		$wgJsonConfigs['Map.JsonConfig']['remote'] = [
    			'url' => 'https://commons.wikimedia.org/w/api.php'
    		];
    	}
    }