Extension:MassMessageEmail: Difference between revisions
→Hook installation: update line number |
→Hook installation: update |
||
Line 50: | Line 50: | ||
<syntaxhighlight lang="php"> |
<syntaxhighlight lang="php"> |
||
// If the page is using a different discussion system, handle it specially |
// If the page is using a different discussion system, handle it specially |
||
if ( !\Hooks::run( 'MassMessageJobBeforeMessageSent', |
if ( !\Hooks::run( 'MassMessageJobBeforeMessageSent', [ $this, $targetPage, $subject, $message, $pageSubject, $pageMessage, $comment ] ) ) { |
||
return true; |
return true; |
||
} elseif ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage( $title ) ) { |
} elseif ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage( $title ) ) { |
Revision as of 22:49, 8 January 2023
Release status: stable |
|
---|---|
Implementation | Special page |
Description | Allows users to send email messages to a list of users |
Author(s) | Ike Hecht (tosfostalk) |
Maintainer(s) | WikiTeq team |
Latest version | 0.2.2 (2021-04-26) |
Compatibility policy | For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension. |
MediaWiki | 1.35+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | |
Quarterly downloads | 3 (Ranked 135th) |
Translate the MassMessageEmail extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
The MassMessageEmail extension allows sending email messages to a list of users. It can also email wiki pages to users by transcluding them within the message. It requires the MassMessage extension. For usage instructions, follow the instructions on that extension's page. If there is a User page in the MassMessage delivery list, instead of posting to the user's talk page, if the wiki can email that user then it will.
This extension was created for WikiWorks.
Installation
- Download and move the extracted
MassMessageEmail
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MassMessageEmail - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'MassMessageEmail' );
- Install the hook, as below.
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Hook installation
In order for this extension to work, you must modify the source code of your MassMessage extension as follows.
In the file extensions/MassMessage/includes/Job/MassMessageJob.php
, find these lines (around line number 349):
// If the page is using a different discussion system, handle it specially
if ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage( $title ) ) {
... and change to:
// If the page is using a different discussion system, handle it specially
if ( !\Hooks::run( 'MassMessageJobBeforeMessageSent', [ $this, $targetPage, $subject, $message, $pageSubject, $pageMessage, $comment ] ) ) {
return true;
} elseif ( class_exists( 'LqtDispatch' ) && LqtDispatch::isLqtPage( $title ) ) {
Enabling parsed HTML email
To have the wiki parse the message being sent as HTML, you'll need to:
- Set $wgAllowHTMLEmail to
true
. - Install Mail_Mime.
See also
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |