summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/ContactPage/README
blob: bd960efb740f3c7f57935b32d84266fdb01ce7a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
--------------------------------------------------------------------------
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
anonymously.

<https://www.mediawiki.org/wiki/Extension:ContactPage>

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.

  $wgContactConfig['formname'] = [
       'RecipientUser' => 'WikiUser',
       'SenderEmail' => 'user@email.com',
       'SenderName' => 'User Email',
       'RequireDetails' => true,
       'IncludeIP' => true,
       'AdditionalFields' => [],
       'RLModules' => [],
       'RLStyleModules' => [],
  ];

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

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 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.

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' => [
       '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.