2007-02-12 14:50:29 -07:00
|
|
|
--------------------------------------------------------------------------
|
2007-02-14 06:34:20 -07:00
|
|
|
README for the ContactPage extension
|
2014-02-27 13:41:08 -07:00
|
|
|
Copyright © 2006-2014 Daniel Kinzler, Sam Reed
|
2007-02-12 14:50:29 -07:00
|
|
|
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
|
|
|
|
anonymously.
|
|
|
|
|
2014-01-28 20:38:50 -07:00
|
|
|
<https://www.mediawiki.org/wiki/Extension:ContactPage>
|
2007-02-12 14:50:29 -07:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
2007-02-15 08:35:27 -07:00
|
|
|
== Installing ==
|
2007-02-12 14:50:29 -07:00
|
|
|
|
|
|
|
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):
|
|
|
|
|
|
|
|
require_once( "$IP/extensions/ContactPage/ContactPage.php" );
|
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
== Configuration ==
|
2007-02-12 14:50:29 -07:00
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
As of version 2, all configuration is done by one global variable,
|
|
|
|
$wgContactConfig.
|
2007-02-15 08:35:27 -07:00
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
$wgContactConfig['formname'] = array(
|
|
|
|
'RecipientUser' => 'WikiUser',
|
|
|
|
'SenderEmail' => 'user@email.com',
|
|
|
|
'SenderName' => 'User Email',
|
|
|
|
'RequireDetails' => true,
|
|
|
|
'IncludeIP' => true,
|
2014-02-19 15:14:19 -07:00
|
|
|
'AdditionalFields' => array(),
|
2015-07-10 10:25:18 -06:00
|
|
|
'DisplayFormat' => 'table',
|
|
|
|
'RLModules' => array(),
|
|
|
|
'RLStyleModules' => array(),
|
2014-02-27 13:41:08 -07:00
|
|
|
);
|
|
|
|
|
|
|
|
All contact form keys (in this case 'formname') should be in
|
|
|
|
lowercase.
|
2007-02-12 14:50:29 -07:00
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
RecipentUser must be the username of a registered wiki user, who has
|
2007-02-12 14:50:29 -07:00
|
|
|
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).
|
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
SenderEmail is used when to send the email when an address isn't
|
|
|
|
entered on the contact form. It defaults to $wgPasswordSender.
|
2007-02-12 14:50:29 -07:00
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
SenderName is the display name used with SenderEmail.
|
2007-02-12 14:50:29 -07:00
|
|
|
|
2014-02-27 14:34:43 -07:00
|
|
|
RequireDetails Whether users will be required to supply a name and an
|
|
|
|
email address on Special:Contact.
|
|
|
|
|
|
|
|
IncludeIP Whether the form will include a checkbox offering to put the IP
|
|
|
|
address of the submitter in the subject line.
|
2007-10-13 05:41:44 -06:00
|
|
|
|
2014-02-19 15:14:19 -07:00
|
|
|
AdditionalFields is used to add any additional fields to the contact form.
|
|
|
|
These are done using https://www.mediawiki.org/wiki/HTMLForm 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' => array(
|
|
|
|
'Text' => array(
|
|
|
|
'label-message' => 'emailmessage',
|
|
|
|
'type' => 'textarea',
|
|
|
|
'rows' => 20,
|
|
|
|
'cols' => 80,
|
|
|
|
'required' => true,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
2015-07-10 10:25:18 -06:00
|
|
|
DisplayFormat is used to configure the HTMLForm. See HTMLForm documentation
|
|
|
|
for possible values.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2010-11-14 13:09:33 -07:00
|
|
|
== Customization ==
|
2010-11-14 10:08:48 -07:00
|
|
|
|
2014-02-27 13:41:08 -07:00
|
|
|
[[Special:Contact]] calls the 'default' form.
|
2010-11-14 10:08:48 -07:00
|
|
|
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]]
|
2014-02-27 13:41:08 -07:00
|
|
|
Subject: prefilled with text from [[MediaWiki:contactpage-subject-typename]]
|
|
|
|
E-mail body: prefilled with text from [[MediaWiki:contactpage-text-typename]]
|
2010-11-14 10:08:48 -07:00
|
|
|
|
|
|
|
If a customized message does not exist the default message is shown.
|