Manual talk:$wgUsersNotifiedOnAllChanges
Add topicSpelling
[edit]Notifed or Notified?
- Should probably be the latter: Reported as bug 13562. —Emufarmers(T|C) 17:10, 30 March 2008 (UTC)
example please
[edit]Could anyone give an example of who the syntax is working:
$wgUsersNotifiedOnAllChanges = admin,livingtale;
is not enough I think
and I'm desperately looking for a manual. The only one I can find says it's not up-to-date.
Livingtale 16:55, 1 June 2008 (UTC)
- It needs to be an array, like Notice the word "array", the parentheses, and the single quotes for string delimiters. Remember that you probably need to use $wgUsersNotifedOnAllChanges, missing an I, unless you're using 1.13alpha. So this might be better:
$wgUsersNotifiedOnAllChanges = array('admin','livingtale');
—Simetrical (talk • contribs) 17:20, 1 June 2008 (UTC)$wgUsersNotifiedOnAllChanges = $wgUsersNotifedOnAllChanges = array('admin','livingtale');
Instant or batched?
[edit]Is this email supposed to be sent instantly, or are they batched? If it's instant, then I am stumped as to why it's not working for me... I've got both spellings in my config, I've got my username in all lower case and correct case, and I've checked my watch list notification options in my prefernces... Still no go. Oh well. --Tin 61.88.131.154 05:37, 5 June 2008 (UTC)
does not react if articles are deleted
[edit]this setting does not work for deleted articles. is this a wished behaviour? or a bug?
Does not work for me ??
[edit]Had configured Localsettings.php as mentioned. As am using V1.12 was trying out with $wgUsersNotifedOnAllChanges, but i do not see any mails getting triggered !!
$wgUsersNotifedOnAllChanges = array('root','testuser');
Pls. help ! is there anything else i need to set/configure ?
Only notifies on creation, not on edit
[edit]On 1.13.4, this is emailing me if a page is created or deleted, but not if an existing page is edited. Angela 05:48, 22 March 2009 (UTC)
Notifies users either on creation and edit
[edit]On 1.15.1, this is emailing me whenever a page is created or deleted. I would like it to notify users only on page creation, is it possible ? Thank you very much, Jean-Thierry 18:31, 19 February 2010 (UTC)
On 1.17.0, notification on edit and create not on delete or move. Using this configuration:
//Declare this twice so it works for all versions $wgUsersNotifiedOnAllChanges = $wgUsersNotifedOnAllChanges = array( 'Founder', 'user' );
Mlpearc powwow 02:45, 29 August 2011 (UTC)
per namespace
[edit]Has anyone tried making (or did) a variant of this that allowed limiting what namespaces trigger for a person? What I'm thinking of is maybe you want to get notified on all edits to NS_MEDIAWIKI+NS_TEMPLATE, but not the whole wiki. --Uberfuzzy 11:26, 26 March 2010 (UTC)
- I second this. It would be VERY handy functionality. - Lucas Billett 19:44, 19 January 2011 (UTC)
- Aye, would be handy. Mlpearc powwow 20:07, 28 August 2011 (UTC)
For user namespace, you could use the following code (no MW 1.19+):
$wgExtensionFunctions[] = 'efNotifyPerNamespace';
function efNotifyPerNamespace() {
global $wgTitle, $wgUsersNotifiedOnAllChanges;
if ( $wgTitle->getNamespace() == NS_USER ) {
$wgUsersNotifiedOnAllChanges[] = 'Username';
$wgUsersNotifiedOnAllChanges[] = 'Username 2';
}
}
SVG 10:41, 19 December 2011 (UTC)
1.19: Only changes from other users
[edit]I just updated my MediaWiki from 1.16 to 1.19.
It seems that now one gets only notifications from edits made by others.
In 1.16 I also got notifications on my own edits - which didn't make much sense.
So I like the new mechanism :)
Just wanted to let others know about this...
--Stefahn (talk) 11:21, 19 June 2012 (UTC)
- I just updated my MediaWiki from 1.15 to 1.19.
I confirm the above beahviour but I also see that notifications will be sent only for watched pages
not for all. Is it right ?
- On my site I get notifications for all changes (not depending on my watchlist). Which code do you use? I just use
$wgUsersNotifiedOnAllChanges = array('Stefahn');
--Stefahn (talk) 11:21, 7 February 2013 (UTC)
- On my site I get notifications for all changes (not depending on my watchlist). Which code do you use? I just use
Exclude minor changes
[edit]Any one know how to limit the notifications to not be send on changes which are marked as "minor" ?
From the source code I see it possible with the global variable $wgEnotifMinorEdits, but it still not working for me after setting it to false in the Local Settings .php file
public function notifyOnPageChange( $editor, $title, $timestamp, $summary,
$minorEdit, $oldid = false, $pageStatus = 'changed'
): bool {
global $wgEnotifMinorEdits, $wgUsersNotifiedOnAllChanges, $wgEnotifUserTalk;
if ( $title->getNamespace() < 0 ) {
return false;
}
// update wl_notificationtimestamp for watchers
$config = RequestContext::getMain()->getConfig();
$watchers = [];
if ( $config->get( 'EnotifWatchlist' ) || $config->get( 'ShowUpdatedMarker' ) ) {
$watchers = MediaWikiServices::getInstance()->getWatchedItemStore()->updateNotificationTimestamp(
$editor,
$title,
$timestamp
);
}
$sendEmail = true;
// $watchers deals with $wgEnotifWatchlist.
// If nobody is watching the page, and there are no users notified on all changes
// don't bother creating a job/trying to send emails, unless it's a
// talk page with an applicable notification.
if ( $watchers === [] && !count( $wgUsersNotifiedOnAllChanges ) ) {
$sendEmail = false;
// Only send notification for non minor edits, unless $wgEnotifMinorEdits
if ( !$minorEdit || ( $wgEnotifMinorEdits && !MediaWikiServices::getInstance()
->getPermissionManager()
->userHasRight( $editor, 'nominornewtalk' ) )
) {
$isUserTalkPage = ( $title->getNamespace() == NS_USER_TALK );
if ( $wgEnotifUserTalk
&& $isUserTalkPage
&& $this->canSendUserTalkEmail( $editor, $title, $minorEdit )
) {
$sendEmail = true;
}
}
}