Podręcznik:$wgDisableCounters
![]() | Ta funkcja została całkowicie usunięta w wersji 1.35.0. |
Statistics and content analysis: $wgDisableCounters | |
---|---|
Disable page view counters. |
|
Wprowadzono w wersji: | pre 1.1.0 |
Przestarzałe w wersji: | 1.25.0 (Gerrit change 150699; git #90d90dad) |
Usunięto w wersji: | 1.35.0 (Gerrit change 579769; git #81a31e16) |
Dozwolone wartości: | (wartość logiczna) |
Domyślna wartość: | false |
Inne ustawienia: Alfabetycznie | Według funkcji |
Szczegóły
$wgDisableCounters
determines whether or not to update the number of times a page has been viewed.
If $wgDisableCounters
is set to false, each page will have a counter in its footer saying: "Tę stronę obejrzano 256 razy."
This setting also determines whether Special:PopularPages
is available.
This variable is initialized in includes/DefaultSettings.php
.
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.
Alternatives
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 Requests for comment/Removing hit counters from MediaWiki core and other alternatives.
Zobacz też
- Extension:HitCounters - extension as an alternative for MediaWiki 1.25+.
- MediaWiki configuration settings/pl
- MediaWiki configuration settings pre 1.1.0/pl
- MediaWiki configuration settings introduced in version pre 1.1.0/pl
- MediaWiki configuration settings deprecated in version 1.25.0/pl
- MediaWiki configuration settings removed in version 1.35.0/pl
- MediaWiki deprecated or obsolete features/pl
- Site Statistics variables/pl