ProtectedContactPage/ContactPage.php

54 lines
1.4 KiB
PHP
Raw Normal View History

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.
*
* @package MediaWiki
* @subpackage Extensions
* @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 );
}
2007-02-12 14:50:29 -07:00
$wgExtensionCredits['specialpage'][] = array(
'name' => 'Contact',
'author' => 'Daniel Kinzler',
2007-02-15 08:35:27 -07:00
'url' => 'http://mediawiki.org/wiki/Extension:ContactPage',
2007-02-12 14:50:29 -07:00
'description' => 'contact form for visitors',
);
$wgAutoloadClasses['SpecialContact'] = dirname( __FILE__ ) . '/SpecialContact.php';
$wgSpecialPages['Contact'] = 'SpecialContact';
$wgContactUser = NULL;
$wgContactSender = 'apache@' . $wgServerName;
$wgContactSenderName = 'Contact Form on ' . $wgSitename;
/**
* load the ContactPage internationalization file
2007-02-12 14:50:29 -07:00
*/
function loadContactPageI18n() {
global $wgLang, $wgMessageCache;
static $initialized = false;
if ( $initialized ) return;
2007-02-12 14:50:29 -07:00
$messages= array();
$f= dirname( __FILE__ ) . '/ContactPage.i18n.php';
include( $f );
$f= dirname( __FILE__ ) . '/ContactPage.i18n.' . $wgLang->getCode() . '.php';
if ( file_exists( $f ) ) include( $f );
$initialized = true;
$wgMessageCache->addMessages( $messages );
2007-02-12 14:50:29 -07:00
}
?>