Last modified: 2011-03-03 17:53:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T29831, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27831 - Allow Custom Parameters for Subject and Message
Allow Custom Parameters for Subject and Message
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
NewUserNotif (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Jack D. Pond
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-03 00:35 UTC by Jack D. Pond
Modified: 2011-03-03 17:53 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Patch for extension with example hooks (5.31 KB, patch)
2011-03-03 00:35 UTC, Jack D. Pond
Details

Description Jack D. Pond 2011-03-03 00:35:43 UTC
Created attachment 8234 [details]
Patch for extension with example hooks

In order to customize the parameters which could be passed to the email notification message, developers would have to hack the original code.

This solution would allow developers to add or modify parameters using a hook extension.  It comes complete with an example.

An example of this is the case where the notification is used by the administrator to facilitate the approval and addition of rights to a user.

Example of a customized, administrator facilitating message with extended parameters that has a link to go and approve the user as well as another link that generates a message to the requester automatically (note, to use this you would also have to modify MediaWiki:Newusernotifbody and MediaWiki:Newusernotifsubj)

---

From:	noreply@local.psitex.com
To:	jack.pond@psitex.com
Subject:	[JDPLocal] New user notification for User:Jpond

Hello jack.pond@psitex.com,

A new user account, Jpond, has been created on JDPLocal at 00:18, 3 March 2011 for Jpond<jack.pond@psitex.com> from IP address 127.0.0.1.

If this is a desired user, you should approve at: http://local.psitex.com/JDPLocal/index.php/Special:UserRights/Jpond.

Then notify mailto:Jpond<jack.pond@psitex.com>&subject=Account%20Approved%20for%20JDPLocal%20Access&body=A%20new%20user%20account,%20Jpond,%20has%20been%20approved%20on%20JDPLocal%20at%20your%20request.%0A%0AYou%20now%20have%20approved%20rights%20at%20http%3A%2F%2Flocal.psitex.com/JDPLocal%20for%20this%20wiki.%0A%0AYour%20Friendly%20Sysop

Your Friendly Sysop!
Comment 1 Jack D. Pond 2011-03-03 17:53:53 UTC
* Added two hooks that allow for the customization of both messages and parameters passed to generate the messages
* Added an example extension to the distribution, ExtendedParamsExample.php
* Updated Documentation - http://www.mediawiki.org/w/index.php?title=Extension:New_User_Email_Notification
* Added RELEASE-NOTES to distribution

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links