Jump to content


From mediawiki.org
This page is a translated version of the page Extension:WhoIsWatching and the translation is 43% complete.
MediaWiki extensions manual
Who Is Watching
Release status: stable
Implementation Special page , Database , Parser function
Description Find out who is watching a particular page, and add others to watchlist for that page.
Latest version 0.13.0 (2019-08-04)
Compatibility policy Master maintains backward compatibility.
MediaWiki 1.32+
PHP 5.4+
Composer mediawiki/who-is-watching
License GNU General Public License 2.0 only
Example http://ec.europa.eu/eurostat/
  • $whoiswatching_nametype
  • $whoiswatching_allowaddingpeople
  • $whoiswatching_showifzero
  • $whoiswatching_showwatchingusers
  • $whoiswatching_maxPicklistUsers
  • addpagetoanywatchlist
  • seepagewatchers
Quarterly downloads 6 (Ranked 125th)
Translate the WhoIsWatching extension if it is available at translatewiki.net
Issues Open tasks · Report a bug

The WhoIsWatching extension allows to find out who is watching a particular page, and add others to watchlist for that page.


Even though this notion goes against Wikipedia and Wikimedia privacy policy, some wikis may actually like to see which of its users are watching particular pages. This extension provides just such an interface at the bottom of every page. Additionally, this extension has an option to allow any user to add any page to any other user's watch list.


Make sure that Extension:Echo ist installed as it is a prerequisite for this extension to work.

  • Download and move the extracted WhoIsWatching folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WhoIsWatching
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'WhoIsWatching' );
    # $whoiswatching_nametype = "RealName";
    # $whoiswatching_allowaddingpeople = false;
    # $whoiswatching_showifzero = true;
    # $whoiswatching_showwatchingusers = false;
    # $whoiswatching_maxPicklistUsers = 10;
    # $wgGroupPermissions['sysop']['addpagetoanywatchlist'] = true;
    # $wgGroupPermissions['sysop']['seepagewatchers'] = true;
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.


You can simply start using the extension without changing anything else. The only additional configuration that is currently possible for the extension defines how to display the names of the users watching the pages. A cikin SpecialWhoIsWatching.php, akwai

# Set the following to either 'UserName' or 'RealName' to change how watching users are displayed.
$whoiswatching_nametype = 'RealName';

As the comment implies, depending on the value of this variable, you can display either the real names of the watching users or their wiki usernames. Dalilin da yasa wasu wiki za su so su canza zuwa yanayin 'UserName' shine idan ba sa buƙatar membobinsu su sami ingantaccen suna.

Another configurable option in the extension is the ability to switch on/off the option to allow any user to add any page to any other user's watch list. This is done in SpecialWhoIsWatching.php, where there is

# Set true if you don't want to use permissions and users are allowed to add to other user's watchlists.
$whoiswatching_allowaddingpeople = true;

Hakanan yana yiwuwa a nuna ƙidayar kallon mutane kawai idan adadin ya fi sifili. Ana yin wannan a cikin SpecialWhoIsWatching.php, inda akwai

# Set to true if you want people with permission to see 0 if no one is watching the page.
$whoiswatching_showifzero = true;

A ƙarshe, sabbin nau'ikan wannan haɓakawa, yayin da muke ƙoƙarin kasancewa masu dacewa da baya, suna ba ku damar amfani da izini maimakon masu canjin duniya.

# Set to true if you don't want to use permissions.
$whoiswatching_showwatchingusers = true;

Ta hanyar tsoho, masu amfani a cikin rukunin sysop suna da izinin ganin masu kallon shafi da ƙara shafuka zuwa jerin saƙon kowa. Kuna iya ba da waɗannan izini don shiga masu amfani, suma, ko kowace ƙungiya da kuke tunanin tana buƙatar ta.

# Give all logged in users full access.
$wgGroupPermissions['user']['addpagetoanywatchlist'] = true;
$wgGroupPermissions['user']['seepagewatchers'] = true;


Wannan kari kuma yana ba da aikin tantancewa {{#whoiswatching:Wasu Shafuka}} yana nuna adadin masu amfani da Wasu Shafuka da samar da hanyar haɗi zuwa Special:WhoIsWatching/Wasu Shafuka. Ana iya amfani da wannan tare da fatun baya tallafawa hanyoyin haɗin ƙafa ko don ƙirƙirar hanyar haɗin WhoIsWatching a wani wuri a cikin shafin wiki.

Known issues

A karo na farko bayan ƙaddamar da buƙatar cire shafi daga jerin masu amfani, har yanzu ana nuna mai amfani akan fom. Don kewaya wannan an kashe shi kuma an nuna shi tare da ja-in-ja.