Extension talk:AutoWatch
--TDeeming 10:32, 6 December 2007 (UTC)
- Your AutoWatch extension is just the extension I need. I am using Mediawiki 1.93 and when I try to use it, I get the following error.
Parse error: syntax error, unexpected T_VARIABLE in C:\Programme\xampp\htdocs\wiki\extensions\AutoWatch.php on line 26
- Have any ideas what the problem could be?
--Bricel 21:27, 7 December 2007 (UTC)
- what is the value of your $wgMultiWatchUserIDs ?
- --TDeeming 08:58, 10 December 2007 (UTC)
$wgMultiWatchUserIDs= array (4,5,6);
I believe that the problem has something to do with the mTitle not being recognized.
-
- --TDeeming 09:25, 10 December 2007 (UTC) ... I think I found the problem.... at least I'm not getting an error anymore.
- I copied your recent changes.. and it started working. Closer investigation showed that the "old" line 25
old line 25: user=User::newFromId($value) new line 25: user=User::newFromId($value);
-
- was missing a semi-colon at the end of the line. In your latest upload a semi-colon was present and it worked. You can trace the change in the history.
Contents |
[edit] Error Missing argument 8 for finAddToWatch()
I get some error messages after saving an article or change something.
Warning: Missing argument 8 for finAddToWatch() in C:\Inetpub\wwwroot\sintranet\components\com_mambowiki\extensions\AutoWatch.php on line 20 Warning: Missing argument 9 for finAddToWatch() in C:\Inetpub\wwwroot\sintranet\components\com_mambowiki\extensions\AutoWatch.php on line 20 Fatal Error: Call to undefined method User: newfromid() in C:\Inetpub\wwwroot\sintranet\components\com_mambowiki\extensions\AutoWatch.php on line 24
Can someone help me?
[edit] How to watch all IDs except of wikisysop?
I would like to have ability to watch all ID except of mine (wikisysop). How I can do it? When new user have registered on wiki I must change LocalSettings.php to add new id. I don't want to do it for every new user.
So, Can I add all users with ID > 2 (for example) --Dnikitin 15:39, 4 December 2008 (UTC)
[edit] dont watch file-uploads
Hi,
its possible to disable the AutoWatch for uploaded files ?
Thx & Bye, BitH...
[edit] Large sending time - wiki stops for a while
After creating a new page my wiki hangs for a couple of seconds until the notification e-mails are send. Everything works fine, but how can we change the code that notification e-mails are send in parallel as a job and do not longer disturb? --Jostar 08:41, 12 November 2009 (UTC)
[edit] new version
Hi, this work for me on mv 1.17.0
<?php ######################################################################### # Installation notes, add array $wgMultiWatchUserIDs to LocalSettings.php with all uses ID's to include # Example # $wgMultiWatchUserIDs = array(5, 3, 2, 6); # then add the line: require_once("extensions/AutoWatch.php"); # ######################################################################## $wgExtensionCredits['other'][] = array( 'name' => 'AutoWatch', 'version' => '1.0', 'author' => 'Brice Lenfant', 'description' => 'Add any new edited/created page to the watch list of defined users', 'url' => 'http://www.mediawiki.org/wiki/Extension:AutoWatch', ); $wgHooks['ArticleSaveComplete'][] = 'fnAddToWatch'; function fnAddToWatch( &$article, &$user, $text, $summary, $minoredit, $watchthis, $sectionanchor, &$flags, $revision, &$status, $baseRevId, &$redirect ) { global $wgMultiWatchUserIDs; foreach ($wgMultiWatchUserIDs as $value){ #If not watched - add to watch and email $user = User::newFromId($value); if( $user->isWatched($article->mTitle) == false ){ $user->addWatch( $article->mTitle ); $eTitle = "Page changed or created in Wiki - ".$article->mTitle->getNsText().':'.$article->mTitle->getDBkey(); $eBody = $article->mTitle->GetFullURL(); $user->sendMail($eTitle, $eBody ); } } return true; }
--Pastakhov 04:42, 2 November 2011 (UTC)