enterprisemediawiki / Wiretap

User pageview tracking for MediaWiki
4 stars 6 forks source link

Support features from MW legacy page_counter #8

Closed jamesmontalvo3 closed 8 years ago

jamesmontalvo3 commented 8 years ago

Add support for MW's legacy page_counter. Added wiretapRecordLegacyHitCount.php script, which when run on a pre-MW-1.25 wiki will calculate the number of hits to each page prior to the existence of Extension:Wiretap on that wiki. Thus, that data is not lost when the page_counter goes away in MW 1.25.

Additionally, added the "this page has been viewed X times" message to the bottom of each page, which uses the legacy number plus the Wiretap number. The wiretap number has the benefit of being able to distinguish between direct page views and redirected page views, and the message states this difference. Note that legacy page views are all assumed to be to the target (non-redirect) page.

jamesmontalvo3 commented 8 years ago

@darenwelsh can you take a look at this change? Test it on some 1.25 wikis, and if you have easy access to them, some pre 1.25 wikis. See the README for install and upgrade steps.

jamesmontalvo3 commented 8 years ago

I've tested this on MW 1.23 and 1.25. Merging.