Skip to content

About

Github mirror of MediaWiki extension HitCounters - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing).

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

 
 

Repository files navigation

HitCounters

Die Pflege dieses Forks der MediaWiki-Erweiterung HitCounters wird von WikiMANNia verwaltet.

The maintenance of this fork of the MediaWiki extension HitCounters is managed by WikiMANNia.

El mantenimiento de esta bifurcación de la extensión de MediaWiki HitCounters está gestionado por WikiMANNia.

Configuration

Verfügbare Parameter für LocalSettings.php. / Available parameters for LocalSettings.php. / Parámetros disponibles para LocalSettings.php.

  • $wgDisableCounters = false;

When set to true, it disables the notice in the pages footer saying "This page has been accessed 256 times." as well as the special page PopularPages.

  • $wgEnableCountersAtTheFooter = false;

When set to true, it enables the notice in the pages footer saying "This page has been accessed 256 times.", which is displayed assuming that $wgDisableCounters is set to false.

  • $wgHitcounterUpdateFreq = 1;

Sets how often page counters should be updated. Default value is 1.

Benutzerdefinierte Einstellungen. / Custom settings. / Configuración personalizada.

  • Exempt – Exclude your own page views from statistics (Default is false)
  • TextLength – Adds the PageId to the special page PopularPages (Default is false)
  • PageId – Adds the TextLength to the special page PopularPages (Default is false)
  • NumberOfMostViewedPages – Set the Number of Most Viewed Pages in Statistics (Default is 50)

Version history

v0.3.0

As found here (24 Nov 2015)

v0.3.0.1-0.3.0.8

  • Fix: Several translation issues
  • Fix - 23 Nov 2017: {{NUMBEROFVIEWS}} in MediaWiki 1.29 - Bug: T142127
  • Update - 14 Aug 2018: Updating mediawiki/mediawiki-codesniffer to 18.0.0 - diff
  • Add - 30 Jul 2018: Call AbuseFilter hooks for its page-views variable - Bug: T159069
  • Fix - 22 Aug 2018: Type hint against IContextSource instead of RequestContext diff
  • Fix - 25 Aug 2018: Use new syntax for AbuseFilter variables and deprecate the old ones - Bug: T173889
  • Fix - 1 Sep 2018: Escaping order with Language::convert. diff
  • Fix - 31 May 2019: Fix cache key - Bug: T163957
  • Fix - 8 Jul 2019: Remove SiteStatsUpdate update that does nothing diff
  • Fix - 18 Nov 2019: Use main cache to avoid issues with UTF-8 keys - diff
  • Improve - 9 Jan 2021: Use IDatabase::selectField to get single value - diff

v0.3.1

  • Add - 8 Feb 2020: Support for PostgreSQL to the HitCounters extension - Bug: T110655

v0.3.1.2

  • Link to the special page in the documental message
  • Localisation updates from https://translatewiki.net.
  • Fix - 27 Mar 2020: Use the magic word value cache for magic word handlers - Bug: T236813
  • 29 Mar 2021: Stop using $wgContLang global - diff

v0.3.2

Version 0.3.2 is compatible with 1.25+ until 1.35+.

  • Fixed a problem with backward compatibility to version 1.25

v0.3.2.1

Version 0.3.2.1 is compatible with 1.27+ until 1.35+.

  • Fix - 7 Dec 2020: Replaced removed wfMemcKey (deprecated since 1.30) with makeKey (since 1.27) - Bug: T266502
  • Fix - 16 Mar 2021: Fix replacement for wfGetMainCache - Bug: T277494

v0.3.2.2

Version 0.3.2.2 is compatible with 1.32+ until 1.35+.

  • Fix - 10 Dec 2020: Avoid calls to deprecated Database::onTransactionIdle() method (since 1.32) - diff
  • Fix - 29 Mar 2021: Stop using $wgContLang global, "getLanguage()" -> "getContentLanguage()" (since 1.32) - diff
  • Fix - 12 Jul 2022: Replace most usages of Linker with LinkRenderer - Bug: T279351

v0.3.2.3

Version 0.3.2.3 is compatible with 1.35+.

v0.3.3

  • Add: Output of the text length in the special page Popular Pages
  • Add: Variables for configuration in LocalSettings.php

v0.3.4

v0.3.5

Add global variable $wgNumberOfMostViewedPages

v0.4.0

Refactoring: Add file HitCountersDBConnect.php and class DBConnect

v0.4.1

Code Review.

v0.5.0

Benutzerdefinierte Einstellungen. / Custom settings. / Configuración personalizada.

v0.5.1

Code Review.

  • Changed "configuration schema", replaced manifest version 1 with version 2.
  • Replaced static functions with implementing interfaces in class “Hooks”.

v0.5.2

  • Custom setting: "Exclude your own page views from statistics"

v0.5.3

Version 0.5.3 is compatible with 1.38+.

  • Hard setting: "Exclude admins page views from statistics"
  • Fix - 6 Jun 2022: Fix compatability with AbuseFilter on 1.38 - diff

v0.5.4

  • Refactoring: Change namespace from HitCounters to MediaWiki\Extension\HitCounters
  • Refactoring: Move sql files from sql to sql\mysql

v0.5.5

  • Initial cleanup, renaming files, 28 Nov 2023, Mark A. Hershberger

v0.5.6

  • Default values for custom settings.

v0.5.7

  • Fix - 22 Oct 2024: Add missing method from base class - Bug: T377807
  • Default values for custom settings with "DefaultUserOptions".

v0.6.0

  • Add database type sqlite
  • Add hit_counter_extension.json and hit_counter.json
  • Refactoring: Rename file name page_counter.sql into hit_counter.sql
  • Refactoring: Renaming in i18n

v0.6.1

  • The extension crashed if namespaces were not defined correctly in ´LocalSettings.php´. This has been fixed.

v0.6.2

  • Fix crash regarding the footer bar.

v0.7.0

  • Compatibility issues

v0.7.1

  • Fix an issue with ´LoadExtensionSchemaUpdates´

v0.7.2

  • Compatibility issues: add ´Compat.php´

Compatibility

This extension works from REL1_38 and has been tested up to MediaWiki versions 1.38, 1.39.17, 1.41.2, 1.42.3, 1.43.9, 1.44.2, 1.45.9, and 1.47.0-alpha.

Background

In MediaWiki 1.25, hit counters have been removed. The reason is given in the commit message:

: The hitcounter implementation in MediaWiki is flawed and needs removal. For proper metrics, it is suggested to use something like Piwik or Google Analytics.

More discussion can be found at mediawiki.org.

If you wish to continue using the HitCounter's despite the flawed implementation, this extension should help.

Note that some steps will be needed to maintain you current hit count. When those steps are understood, they'll be documented.

About

Github mirror of MediaWiki extension HitCounters - our actual code is hosted with Gerrit (please see https://www.mediawiki.org/wiki/Developer_access for contributing).

Resources

Code of conduct

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages