Jump to content

Manual:$wgDisableCounters

From mediawiki.org
This page is a translated version of the page Manual:$wgDisableCounters and the translation is 45% complete.
Statistics and content analysis: $wgDisableCounters
Desactivar los recuentos de páginas vistas.
Introducido en la versión:antes de 1.1.0
Desaconsejado en versión:1.25.0 (Gerrit change 150699; git #90d90dad)
Eliminado en la versión:1.35.0 (Gerrit change 579769; git #81a31e16)
Valores permitidos:(booleano)
Valor predeterminado:false
Esta función se utiliza en la extensión HitCounters desde REL1_25+.

Detalles

$wgDisableCounters determina si se actualiza o no el número de veces que se ha visto una página. If $wgDisableCounters is set to false, each page will have a counter in its footer saying: "Esta página ha recibido 256 visitas."

This setting also determines whether Special:PopularPages is available.

El valor inicial es 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.

Advertencia Advertencia: Once disabled you will lose the correct view counts forever!
If you are using squid caching, you will want to disable these counters, as squid caching prevents mediawiki from seeing all requests, which makes these counters inaccurate.

Alternativas

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.

Advertencia Advertencia: The update to MediaWiki version 1.25 will cause the loss of view counts forever, if extension HitCounters is not installed!

Véase también