2007-02-12 14:50:29 -07:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Setup for ContactPage extension, a special page that implements a contact form
|
|
|
|
* for use by anonymous visitors.
|
|
|
|
*
|
2009-01-11 05:16:13 -07:00
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2007-02-12 14:50:29 -07:00
|
|
|
* @author Daniel Kinzler, brightbyte.de
|
|
|
|
* @copyright © 2007 Daniel Kinzler
|
|
|
|
* @licence GNU General Public Licence 2.0 or later
|
|
|
|
*/
|
|
|
|
|
2007-02-13 15:33:42 -07:00
|
|
|
if( !defined( 'MEDIAWIKI' ) ) {
|
|
|
|
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
|
|
|
|
die( 1 );
|
|
|
|
}
|
|
|
|
|
2010-01-04 17:43:27 -07:00
|
|
|
// Extension credits that will show up on Special:Version
|
2008-02-03 07:37:27 -07:00
|
|
|
$wgExtensionCredits['specialpage'][] = array(
|
2009-04-26 21:15:19 -06:00
|
|
|
'path' => __FILE__,
|
2008-02-03 07:37:27 -07:00
|
|
|
'name' => 'ContactPage',
|
|
|
|
'author' => 'Daniel Kinzler',
|
2011-12-13 16:49:33 -07:00
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:ContactPage',
|
2008-02-03 07:37:27 -07:00
|
|
|
'descriptionmsg' => 'contactpage-desc',
|
2007-02-12 14:50:29 -07:00
|
|
|
);
|
|
|
|
|
2010-01-04 17:43:27 -07:00
|
|
|
// Set up the new special page
|
|
|
|
$dir = dirname( __FILE__ ) . '/';
|
2008-02-03 07:37:27 -07:00
|
|
|
$wgExtensionMessagesFiles['ContactPage'] = $dir . 'ContactPage.i18n.php';
|
2011-12-18 03:27:44 -07:00
|
|
|
$wgExtensionMessagesFiles['ContactPageAliases'] = $dir . 'ContactPage.alias.php';
|
2008-07-09 11:40:14 -06:00
|
|
|
|
2012-01-19 17:35:25 -07:00
|
|
|
$wgAutoloadClasses['SpecialContact'] = $dir . 'ContactPage_body.php';
|
2007-02-12 14:50:29 -07:00
|
|
|
$wgSpecialPages['Contact'] = 'SpecialContact';
|
|
|
|
|
2010-01-04 17:43:27 -07:00
|
|
|
# Configuration
|
|
|
|
// Name of a registered wiki user who will receive the mails
|
|
|
|
$wgContactUser = null;
|
|
|
|
// E-mail address used as the sender of the contact email, if the visitor does
|
|
|
|
// not supply an email address. Defaults to $wgEmergencyContact.
|
|
|
|
$wgContactSender = null;
|
|
|
|
|
|
|
|
// The name to be used with $wgContactSender.
|
|
|
|
// This will be shown in the recipient's e-mail program
|
2007-02-12 14:50:29 -07:00
|
|
|
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
|
2008-07-05 15:20:32 -06:00
|
|
|
|
2010-01-04 17:43:27 -07:00
|
|
|
// If true, users will be required to supply a name and an e-mail address
|
|
|
|
// on Special:Contact.
|
2008-07-05 15:20:32 -06:00
|
|
|
$wgContactRequireAll = false;
|
2010-03-10 10:01:38 -07:00
|
|
|
|
2010-03-28 07:23:42 -06:00
|
|
|
// If true, the form will include a checkbox offering to put the IP address of the submitter in the subject line
|
2010-03-10 10:01:38 -07:00
|
|
|
$wgContactIncludeIP = false;
|