Github mirror of MediaWiki extension ContactPage - our actual code is hosted with Gerrit (please see for contributing)
Go to file
libraryupgrader 84afc8b012 build: Updating grunt-banana-checker to 0.13.0
Change-Id: Idb97dc294b0c257e735c522e7641f9d6e3e5c048
2024-05-18 05:03:09 +00:00
.phan build: Upgrade mediawiki/mediawiki-phan-config from 0.5.0 to 0.6.0 2019-05-19 11:45:28 +00:00
i18n Localisation updates from 2024-05-17 09:48:23 +02:00
includes Replace use of deprecated User::isBlockedFromEmailuser() 2024-04-23 19:23:19 +03:00
tests build: Updating eslint-config-wikimedia to 0.26.0 2024-02-09 01:11:32 +00:00
.eslintrc.json build: Update linters 2023-10-20 11:14:48 +01:00
.gitignore build: Updating mediawiki/minus-x to 0.3.2 2019-12-16 21:14:04 +00:00
.gitreview Whoops, track not trace 2016-10-24 17:02:20 -07:00
.phpcs.xml Fix and enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment 2022-02-07 00:43:07 +00:00 build: Updating mediawiki/phan-taint-check-plugin to 1.3.0 2018-08-19 11:24:46 +00:00
COPYING Update README 2014-01-29 03:45:20 +00:00
ContactPage.alias.php ContactPage.alias.php: Add alias for Serbian (Latin script) 2023-10-28 14:17:21 +02:00
Gruntfile.js build: Update linters 2023-10-20 11:14:48 +01:00
README Follow-up: Add config options to disable name, email, subject modification 2024-02-02 00:22:00 +00:00
composer.json build: Updating dependencies 2024-05-10 03:07:24 +00:00
extension.json Add optional parameter to show message if user is blocked. 2024-03-19 11:14:01 -04:00
package-lock.json build: Updating grunt-banana-checker to 0.13.0 2024-05-18 05:03:09 +00:00
package.json build: Updating grunt-banana-checker to 0.13.0 2024-05-18 05:03:09 +00:00


README for the ContactPage extension
Copyright © 2006-2014 Daniel Kinzler, Sam Reed
Licenses: GNU General Public Licence (GPL)
          GNU Free Documentation License (GFDL)

The ContactPage extension implements a contact form for visitors. It
creates a special page Special:Contact, which is similar to
Special:Emailuser, but it has a fixed recipient, and can be used


The ContactPage extension was originally written by Daniel Kinzler in 2007
and is released under the GNU General Public Licence (GPL). It is based on
the code in SpecialEmailuser.php in the MediaWiki core.
The internationalization files contain contributions by several people;
they are mentioned in each file individually.

== Installing ==

Copy the ContactPage directory into the extensions folder of your
MediaWiki installation. Then add the following lines to your
LocalSettings.php file (near the end):

  wfLoadExtension( 'ContactPage' );

== Configuration ==

As of version 2, all configuration is done by one global variable,

  $wgContactConfig['formname'] = [
       'RecipientUser' => 'WikiUser',
       'SenderEmail' => '',
       'SenderName' => 'User Email',
       'RequireDetails' => true,
       'IncludeIP' => true,
       'MustBeLoggedIn' => true,
       'NameReadonly' => true,
       'EmailReadonly' => true,
       'SubjectReadonly' => true,
       'MustHaveEmail' => true,
       'AdditionalFields' => [],
       'RLModules' => [],
       'RLStyleModules' => [],

All contact form keys (in this case 'formname') should be in

The following situations will cause the contact form to be inaccessible:
* Setting EmailReadonly to true if MustBeLoggedIn is false and RequireDetails
  is false.
* Setting MustHaveEmail to true if MustBeLoggedIn is false.
* RecipentUser being undefined.

RecipentUser must be the username of a registered wiki user, who has
supplied an email address, has user-to-user email enabled, and has
confirmed his/her email address if that is required on this wiki
(see $wgEmailAuthentication).

SenderEmail is used when to send the email when an address isn't
entered on the contact form. It defaults to $wgPasswordSender.

SenderName is the display name used with SenderEmail.

RequireDetails is whether the users will be required to supply a name
and an email address on Special:Contact.

IncludeIP is used to decide whether the form will include a checkbox
offering to put the IP address of the submitter in the subject line.

MustBeLoggedIn is whether the contact form is only accessible when
users are logged in.

NameReadonly is used to make the name field readonly.

EmailReadonly is used to make the email field readonly.

SubjectReadonly is used to make the subject field readonly.

MustHaveEmail is used to require that the user loading the form has
a confirmed email address attached to their account. If the user does
not have a confirmed email address, an error will be displayed and the
form will not be shown.

AdditionalFields is used to add any additional fields to the contact form.
These are done using notation.
The default message text box is not included by default, and if required,
should be added manually to the AdditionalFields array like below.

It should be noted that type 'selectandother' is not currently supported.

  'AdditionalFields' => [
       'Text' => [
            'label-message' => 'emailmessage',
            'type' => 'textarea',
            'rows' => 20,
            'cols' => 80,
            'required' => true,

RLModules can be used to add ResourceLoader modules (custom CSS and
JavaScript) to the page.

RLStyleModules can be used to add ResourceLoader CSS modules to the page.

== Customization ==

[[Special:Contact]] calls the 'default' form.
Pagetext: [[MediaWiki:contactpage-pagetext]]
Subject: prefilled with text from [[MediaWiki:Contactpage-defsubject]]
E-mail body: empty.

[[Special:Contact/typename]] calls the contact page with a customized pagetext and
prefilled form fields:
Pagetext: [[MediaWiki:contactpage-pagetext-typename]]
Subject: prefilled with text from [[MediaWiki:contactpage-subject-typename]]
E-mail body: prefilled with text from [[MediaWiki:contactpage-text-typename]]

If a customized message does not exist the default message is shown.