Jump to content

Extension:MassMessageEmail: Difference between revisions

From mediawiki.org
Content deleted Content added
No edit summary
Tags: Reverted Mobile edit Mobile web edit
Tag: 2017 source edit
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<languages/>

{{WikiTeq_LTS_notice}}
{{Extension|templatemode =
{{Extension|templatemode =
|status = stable
|status = stable
|type1 = special
|type1 = special
|username = tosfos
|username = tosfos
|author = Ike
|author = Ike Hecht
|maintainer to send email
|maintainer = WikiTeq team
|description = Allows users to send email messages to a list of users
|image =
|image =
|imagesize =
|imagesize =
|version = 26
|version = 0.4.0
|update = 2023-01-08

|mediawiki = 1.35, 1.39
|php =
|php =
|needs-updatephp = No
|needs-updatephp = No
|composer =
}}
|table1 =
|table2 =
|download = {{WikimediaDownload|MassMessageEmail}}
|changelog =
|changelog =
|example =
|example =
| = <!--
|namespace =
|parameters = <!-- configuration parameters, for use in LocalSettings.php -->
|tags =
|rights = <!-- user rights, for use with $wgGroupPermissions -->
|compatibility =
|compatibility policy = ltsrel
|phabricator = MediaWiki-extensions-MassMessageEmail
}}


The '''MassMessageEmail''to a list of users. It can also email wiki pages to users by transcluding them within the message. It requires the [[Extension:MassMessage|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.
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 [[Extension:MassMessage|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 [https://wikiworks.com WikiWorks].
This extension was created for [https://wikiworks.com WikiWorks].
Line 26: Line 39:
|registration=required
|registration=required
|custom-steps=* '''Install the hook, as below.'''}}
|custom-steps=* '''Install the hook, as below.'''}}

{{Note|1=
Please note that this extension requires {{ll|Composer}}.

So, after installation from Git change to the directory containing the extension e.g. "../extensions/MassMessageEmail/" and run <code>composer install --no-dev</code>, or when updating: <code>composer update --no-dev</code>.

Alternatively as well as preferably add the line <code>"extensions/MassMessageEmail/composer.json"</code>to the "composer.local.json" file in the root directory of your wiki like e.g.

<syntaxhighlight lang="json">
{
"extra": {
"merge-plugin": {
"include": [
"extensions/MassMessageEmail/composer.json"
]
}
}
}
</syntaxhighlight>
}}


==Hook installation==
==Hook installation==
In order for this extension to work, you must modify the source code of your MassMessage extension as follows.
If you are using version 0.3.0 of MassMessageEmail (or earlier) and version 0.4.0 (or earlier) of MassMessage, you must modify the source code of your MassMessage extension as follows.


In the file <code>extensions/MassMessage/includes/job/MassMessageJob.php</code>, find these lines (around line number 180):
In the file <code>extensions/MassMessage/includes/Job/MassMessageJob.php</code>, find these lines (around line number 349):
<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
Line 38: Line 71:
<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', array( $this ) ) ) {
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 ) ) {
</syntaxhighlight>
</syntaxhighlight>

Starting with version 0.4.0 of MassMessageEmail and 0.5.0 of MassMessage, this is no longer necessary.


== Enabling parsed HTML email ==
== Enabling parsed HTML email ==
Line 52: Line 87:
* [[Extension:EmailPage]]
* [[Extension:EmailPage]]


{{WikiTeq extension}}
{{Used by}}
{{Used by|canasta=1}}


[[Category:Email extensions{{#translation:}}|MassMessageEmail]]
[[Category:Email extensions{{#translation:}}|MassMessageEmail]]

Latest revision as of 19:43, 1 November 2023

This extension is professionally maintained by the WikiTeq team.
WikiTeq provides official support for MediaWiki LTS releases only. It may work with other MediaWiki releases.
MediaWiki extensions manual
MassMessageEmail
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.4.0 (2023-01-08)
Compatibility policy For every MediaWiki release that is a Long Term Support release there is a corresponding branch in the extension.
MediaWiki 1.35, 1.39
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

[edit]
  • Download and move the extracted MassMessageEmail folder to your extensions/ 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.
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Please note that this extension requires Composer .

So, after installation from Git change to the directory containing the extension e.g. "../extensions/MassMessageEmail/" and run composer install --no-dev, or when updating: composer update --no-dev.

Alternatively as well as preferably add the line "extensions/MassMessageEmail/composer.json"to the "composer.local.json" file in the root directory of your wiki like e.g.

{
	"extra": {
		"merge-plugin": {
			"include": [
				"extensions/MassMessageEmail/composer.json"
			]
		}
	}
}

Hook installation

[edit]

If you are using version 0.3.0 of MassMessageEmail (or earlier) and version 0.4.0 (or earlier) of MassMessage, 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 ) ) {

Starting with version 0.4.0 of MassMessageEmail and 0.5.0 of MassMessage, this is no longer necessary.

Enabling parsed HTML email

[edit]

To have the wiki parse the message being sent as HTML, you'll need to:

  1. Set $wgAllowHTMLEmail to true.
  2. Install Mail_Mime.

See also

[edit]