手册:$wgDisableCounters
此功能已在版本1.35.0中完全移除。 |
统计和内容分析: $wgDisableCounters | |
---|---|
禁用页面预览次数计数器。 |
|
引进版本: | 1.1.0前 |
弃用版本: | 1.25.0 (Gerrit change 150699; git #90d90dad) |
移除版本: | 1.35.0 (Gerrit change 579769; git #81a31e16) |
允许的值: | (布尔值) |
默认值: | false |
其他设置: 按首字母排序 | 按功能排序 |
细节
$wgDisableCounters
确定是否更新浏览量的次数。
If $wgDisableCounters
is set to false, each page will have a counter in its footer saying: "此页面已被访问过256次。"
This setting also determines whether Special:PopularPages
is available.
The initial value is false
.
To override the default value, add the line $wgDisableCounters = true;
to the file LocalSettings.php
.
The value of the counter is updated in includes/WikiPage.php
in the function doViewUpdates()
.
(In a previous version, this was includes/Article.php
in the function incViewCount()
.)
The variable $wgDisableCounters
is also referred to in other script files.
替代
If performance problems due to high hit counts updating the page
table is a concern, a less dramatic alternative to disabling them may be to tweak $wgHitcounterUpdateFreq
.
You can also retrieve such statistics through your apache (or squid if using squid caching) request logs.
Disabled in 1.25.0. See Removing hit counters from MediaWiki core and other alternatives.
参见
- Extension:HitCounters - 扩展作为MediaWiki 1.25+的替代。