Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MediaWiki footer viewcount

I'm using MediaWiki, wanna to show view count on foot.

My env:

MediaWiki 1.25.1

PHP 5.4.41

MySQL 5.5.43

Readed offical manual https://www.mediawiki.org/wiki/Manual:Footer but i dont know how to do.

It's say:

$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'lfTOSLink';
function lfTOSLink( $sk, &$tpl ) {
    $tpl->set( 'termsofservice', $sk->footerLink( 'termsofservice', 'termsofservicepage' ) );
    $tpl->data['footerlinks']['places'][] = 'termsofservice';
    return true;
}

how to change code of lfTOSLink to turn on viewcount?

like image 753
IlPADlI Avatar asked Nov 29 '25 11:11

IlPADlI


2 Answers

While the hit counter was removed in MediaWiki 1.25, Extension:HitCounters is now available to replace the core functionality, thanks to Mark A. Hershberger.

like image 64
Dror S. Avatar answered Dec 01 '25 03:12

Dror S.


Viewcount was removed in MediaWiki 1.25. See the documentation of $wgDisableCounters for details and alternatives.

like image 35
Tgr Avatar answered Dec 01 '25 02:12

Tgr