Extension talk:WhoIsWatching/Archive

Problem with installation.
I've installed WhoIsWatching on MediaWiki 1.9.1 and the extension shows up in the version page. However, on the Special Pages, I show the list leading with, which when clicked gives this error:

Fatal error: Call to undefined function wfLoadExtensionMessages in ... (ip address) ... /wiki/extensions/SpecialWhoIsWatching_body.php on line 25

Any ideas? --C4duser 23:00, 24 November 2007 (UTC)
 * After doing some searching, it looks like this is a bug in MediaWiki itself. Apparently there are some version that did not have the wfLoadExtensionMessages function. Anyways, I changed the way the internationalization messages get loaded to not rely on this function. The new code is available in v0.3 (already in SVN). Please let me know if this code works any better for you. --Gri6507 14:43, 25 November 2007 (UTC)
 * Thanks. The error message has gone away and the Special page shows up properly. However, I don't seem to be using the extension properly. When clicking on the special page, I get: "This special page cannot be used on its own. Please use the page MediaWiki:Number_of_watching_users_pageview to define an entry point to this special page." I've placed the code you stipulate on the MediaWiki message page. What I am trying to do is to be able to set up a link on the sidebar (say "Current Watchers") that when clicked will produce a list of users that are watching that particular page. Is this possible?  --C4duser 02:49, 26 November 2007 (UTC)
 * OK. I've figured out that what is supposed to happen is for a message to appear at the bottom of the page showing the number of watchers. I do get a message at the bottom of the page, but something is wrong with the code. Here is the message: "[http:// ...IP address .../wiki/index.php?title=Special:SpecialWhoIsWatching&ns=...correct namespace ...&page=...correct pagename ...1] watching users" The number of "watching users" was indeed 1, so that appears to be correct, but I don't think there should be two "specials" in the special page name or that the IP address should appear.  Might this be a problem in the MediaWiki message page?  It seems that what is supposed to happen is that the message "1 watching user" should appear with a link to the Special page, where (hopefully) there would be a list of who those watcher are.  Any way, thanks for the time. --C4duser 03:42, 26 November 2007 (UTC)


 * I found another error message on the system messages page. Perhaps this is the problem? --C4duser 04:06, 26 November 2007 (UTC)

Warning: call_user_func_array [function.call-user-func-array]: First argument is expected to be a valid callback, 'WhoIsWatching::loadMessages' was given in ...IP address... /wiki/includes/Hooks.php on line 114


 * This has been addressed in v0.9 --Gri6507 13:47, 6 October 2008 (UTC)

Installed the latest version; Still doesn't work.
I've installed the latest version and the problem noted above persists. --C4duser 01:02, 31 December 2007 (UTC)
 * Are you talking about the Warning or the Fatal Error? --Gri6507 03:01, 31 December 2007 (UTC)
 * Reinstalled the extension and now it works as described. Thanks. --C4duser 22:02, 24 May 2008 (UTC)

Installation Instructions - Correction?
I had to insert the following code in order for the extension to work properly:

$1 watching NaN userss

Does this look correct?


 * Where did you insert this code? Are you talking about the Extension:WhoIsWatching installation instruction? --Gri6507 22:14, 8 February 2008 (UTC)


 * Yes, this went into MediaWiki:Number_of_watching_users_pageview. I couldn't get the prescribed way to work.


 * Sorry for the long delay. You are correct in your syntax. I have updated the instructions. --Gri6507 20:09, 20 May 2008 (UTC)

Some errors
I get a non existing page error clicking the linked number of watching users (Special:WhoIsWatching). But Special:Who_Is_Watching_a_wiki_page appears in the list of special pages (Mistake by you imo). So when fixing the special page name after clicking the linked watching users I have the list of watching users but some are bad titles and appear as unlinked text: User:Milky User:Paulezzz User:Pokasissu Thos who are linked are fucked up as well. user linked is notthe same as user displayed.

Also I will disable "Add users to watch the page" as this seems pretty useless. I'll wait and see what Extension:WhoIsWatchingTabbed is going to look like. --Subfader 11:23, 11 May 2008 (UTC)
 * What version of the extension are you using? What version of MediaWiki are you using? What localization is your account set for? I just double checked on my installation and Special:WhoIsWatching is correctly created by the extension. The part of the code which creates the special page is near the top of SpecialWhoIsWatching_body.php and there it clearly states that the special page should be called Special:WhoIsWatching.


 * I can confirm the problem with having some users show up are "dead links". This is because those users do not have a configured "real name". Since having a real name is not required, I have changed the extension to default to either a username or a realname (if one is available) depending on the setting of a new configuration variable (see $whoiswatching_nametype in v0.5). --Gri6507 11:38, 12 May 2008 (UTC)

I was using Version 0.4 on MW 1.12.0rc. I don't have any localization thingy installed. I downloaded the new files and I still have it.

My Environment

 * MediaWiki: 1.12.0
 * Win XP
 * The AppServ Open Project - 2.5.7 for Windows
 * Apache Web Server Version 2.2.3
 * PHP Script Language Version 5.1.6
 * MySQL Database Version 5.0.24a

Could you give me a hand?

--Roc michael 00:02, 7 June 2008 (UTC)


 * It looks like as part of your MW upgrade, you accidentally overwrote the LocalSettings.php file. If you look on the main page for this extension, you will notice that you have to set  in order for the information to appear at the footer of every page. Can you please give that a try and let me know if it works? --Gri6507 13:58, 7 June 2008 (UTC)


 * Hi Gri6507,
 * Thanks for your quick respond. During I captured the images at the above, the following code was in my Localsetting.php:


 * So I don't know how to do something for this.
 * BTW, I upgraded my wiki by following steps:
 * I used  www\mediawiki-1.12.0\config\index.php  to generate a new Localsetting.php.
 * After I finished upgrading, I moved the Localsetting.php to the folder of  www\mediawiki-1.12.0
 * Then, I copy extension-settings form my old Localsetting.php in the folder of  www\mediawiki-1.11.0.
 * Finally, I checked all the extensions I used whether them work fine or not.

--Roc michael 21:59, 7 June 2008 (UTC)

Description Suggestion
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 in the bottom of every page. Additionally, this extension allows any user to add any page to any other user's watch list.

Any idea?--Roc michael 22:48, 23 May 2008 (UTC)


 * I agree - I made the change on the mail page. --Gri6507 14:55, 25 May 2008 (UTC)

How to turn off "Add Users to Watch the Page"?
Is there any way to turn of the "add users to watch the page" feature? I would like to be able just to show what users are watching, without giving users to ability to add other users to watch a page.

Thanks.--C4duser 22:05, 24 May 2008 (UTC)

Not official reply
There are some easy ways you can use: $wgWhitelist['sysop']['read'] = $wgBlacklist['*']['read'] = array("^Special:(Export|WhoIsWatching|Listusers|Ipblocklist|Log|Allmessages)$");
 * 1) Use Extension:WhoIsWatchingTabbed not this extension.
 * 2) Use Extension:Blacklist with following code:
 * 1) Use Extension:RightFunctions in the page "MediaWiki:Number_of_watching_users_pageview"
 * Hope my answers is useful. --Roc michael 23:12, 24 May 2008 (UTC)

(Slightly more) Official response
Next week, I will modify the extension so that this feature is made optional. Please stay tuned. --Gri6507 14:58, 25 May 2008 (UTC)
 * I just released v0.6 of the extension which has the ability to optionally turn on this capability. --Gri6507 17:00, 6 June 2008 (UTC)

Force number of watchers to be shown even when Zero
It is very useful to be able to add users to the watch list, but if no-one is watching a page, the link at the bottom isn't show. It is tricky to get a link to the WhoIsWatching page to add people to an empty watchlist. This bit of code forces the link to be shown at the bottom (as long as $wgPageShowWatchingUsers is set to true in LocalSettings.php.

Add the following to the end of SpecialWhoIsWatching.php:

This is a copy of the code from includes/SkinTemplate.php with the if ($numberofwatchingusers > 0)</tt> condition removed.

--Djomp 13:06, 4 August 2008 (UTC)


 * This is a great idea! I will add it to the main line code when I get a chance. Thanks! --Gri6507 13:31, 4 August 2008 (UTC)
 * This is now released in version 0.8. Sorry it took so long to incorporate it. --Gri6507 12:50, 29 September 2008 (UTC)

MediaWiki:Number of watching users pageview
I had trouble getting this to work until I changed the page to the following: --Mark Weiser 01:55, 14 August 2008 (UTC) [/index.php/Special:Who_is_watching_a_wiki_page?ns=&page= $1 watching NaN userss]

Product       Version MediaWiki 	1.12.0 PHP 	       5.2.5 (apache2handler) MySQL 	       5.0.45-community-nt

Special page not exist and footer not html
I am having 2 issues...

1. The extension puts the number of users watching at the bottom of page with a link to WhoIsWatching special page to add other users... BUT this is not being parsed as HTML! It comes out on the screen as; the same as Roc michael's screenshot below

My Environment

 * MediaWiki: 1.12.0
 * PHP 5
 * IIS 6
 * MySQL Server 5

Questions

 * Is the WhoIsWatching extension compatible with MediaWiki 1.12??
 * Are these issues linked (one fix for both) or separate (2 different issues)?

Thanks, any help appreciated!! --[mailto:pagemedias@gmail.com Luke] 11:51, 14 August 2008 (WST)


 * : The a href syntax worked in 1.9.x, but we saw the same problem when we tried to upgrade to 1.13. I fixed the issue in 1.13 by changing the "MediaWiki:Number of watching users pageview" page from:
 * <a href="">$1</a> watching NaN userss to
 * [ $1] watching NaN userss
 * Paul, the installation instructions on the extension page should probably be updated, but I'm not sure in which version the new syntax is required. Hope this helps... --Msul01 20:43, 26 August 2008 (UTC)


 * Thanks for the info. I have updated the instructions on the extension main page. --Gri6507 11:58, 27 August 2008 (UTC)

Step 3 for Chinese wiki
See Extension:WhoIsWatching The Taiwanese Chinese Language wiki (zh-tw) should use following code: [ $1] watching NaN userss --Roc michael 11:28, 28 August 2008 (UTC)