Extension:ContactPage

From MediaWiki.org

Jump to: navigation, search

             

Manual on MediaWiki Extensions
List of MediaWiki Extensions
Crystal Clear action run.png
ContactPage

Release status: beta

Implementation  Special page
Description Contact form for visitors
Author(s)  Duesentrieb
Last Version  1.0
MediaWiki  1.12 for current, 1.9 for older
License GNU General Public License 2.0 or later
Download Download snapshot

Subversion [Help]
Browse source code

README
log

Example  [1]

check usage (experimental)

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.

Contents

[edit] 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):

require_once( "$IP/extensions/ContactPage/ContactPage.php" );
 
$wgContactUser = 'WikiAdmin';
$wgContactSender = 'apache@' . $wgServerName;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;

[edit] Configuration

$wgUserEmailUseReplyTo
determines if visitor's email address will be used as the Reply-To address (failsafe) or the From address (nicer, and default). This is a global option that also controls how MediaWiki behaves for mails between registered users. See Manual:$wgUserEmailUseReplyTo for more information. Used since rev:37135 (July 2008). Requires MediaWiki 1.12.
$wgContactUser
must be the name 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 Manual:$wgEmailAuthentication).
$wgContactSender
the email address used as the sender of the contact email, if the visitor does not supply an email address, or if $wgUserEmailUseReplyTo is true. Depending on the setup of your web host, this may have to be an existing mail account. Defaults to $wgEmergencyContact.
$wgContactSenderName
the name to be used with $wgContactSender. This will be shown in the recipient's email program.
$wgContactRequireAll
requires name and email address to be entered on the contact form. This is optional per default. Since rev:37136 (July 2008).

As of rev:26698 (2007-10-13) you can require a captcha test for the contact page, if you have the ConfirmEdit extension installed. Captchas are enabled by setting $wgCaptchaTriggers['contactpage'] = true. Since rev:36793 (July 2008), this actually works.

[edit] Hooks

See Extension hook registry for information about hooks added by ContactPage.

[edit] History

  • rev:21348: fixed edit token check for anonymous users. Previously, sending the message failed silently for anons without a session cookie.
  • rev:21702: fixed "send me a copy" feature. Was sending duplicates to the contact address instead of copied to the sender.
  • rev:26696: all messages now listed on Special:Allmessages
  • rev:26698: support for captchas using Extension:ConfirmEdit
  • rev:36793: fixed captcha support. Previously, the captcha failed indiscriminately for visitors with no open PHP session.
  • rev:37135: added support for $wgUserEmailUseReplyTo
  • rev:37136: added support for $wgContactRequireAll
  • rev:37174: suppress captcha if user has skipcaptcha permission
  • rev:47529: MediaWiki 1.9 compatibility removed
  • rev:60638: added ContactFormBeforeMessage hook