Extension:ContactPage/pl
Status wydania: stabilne |
|
|---|---|
| Realizacja | Strona specjalna, Hak |
| Opis | Provides a contact form for visitors |
| Autor(zy) | Daniel Kinzler, Sam Reed |
| Ostatnia wersja | Continuous updates |
| Polityka zgodności | Snapshots releases along with MediaWiki. Master nie jest kompatybilny wstecznie. |
| PHP | 5.4+ |
| Zmiany w bazie danych | Nie |
|
|
| Licence | Licencja GNU General Public License 2.0 lub nowsza |
| Pobieranie | README |
| Przykład | nl.wikipedia.org |
| Przetłumacz rozszerzenie ContactPage jeżeli jest dostępne na translatewiki.net | |
| Rola Vagrant | contactpage |
| Problemy | Otwarte zadania · Zgłoś błąd |
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 may be used without registering.
Instalacja i konfiguracja
- Pobierz i umieść plik(i) w katalogu o nazwie
ContactPagew folderzeextensions/.
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ContactPage
- Dodaj poniższy kod na dole twojego pliku LocalSettings.php:
wfLoadExtension( 'ContactPage' ); $wgContactConfig['default'] = [ 'RecipientUser' => null, // Must be the name of a valid account which also has a verified e-mail-address added to it. 'RecipientEmail' => 'Contact Form on ' . $wgSitename, // 'Contact Form on' needs to be translated 'RecipientName' => null, 'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required 'SenderName' => null, 'RequireDetails' => false, 'IncludeIP' => false, 'MustBeLoggedIn' => false, 'MustHaveEmail' => false, // True means the user submitting the form must have an associated email address 'NameReadonly' => false, 'EmailReadonly' => false, 'SubjectReadonly' => false, 'UseCustomBlockMessage' => false, 'Redirect' => null, 'RLModules' => [], // Resource loader modules to add to the form display page. 'RLStyleModules' => [], // Resource loader CSS modules to add to the form display page. 'AdditionalFields' => [ 'Text' => [ 'label-message' => 'emailmessage', 'type' => 'textarea', 'required' => true ] ], 'FieldsMergeStrategy' => null ];
- See the README file for further options to customise and adapt as it convenes.
Zrobione – Przejdź do Special:Version na twojej wiki, aby sprawdzić czy rozszerzenie zostało pomyślnie zainstalowane.
$wgCaptchaTriggers['contactpage'] = true;
Further customisation
Adding a link to special page "Contact" to the footer
- Add the following code (with the correct URL inserted) to your
LocalSettings.phpfile:$wgHooks['SkinAddFooterLinks'][] = function( Skin $skin, string $key, array &$footerlinks ) { if ( $key === 'places' ) { $footerlinks['contact'] = Html::element( 'a', [ 'href' => 'https://www.example.org/wiki/Special:Contact', // URL to "Special:Contact" 'rel' => 'noreferrer noopener' // not required, but recommended for security reasons ], $skin->msg( 'contactpage-label' )->text() ); }; };
- Add the label for "Special:Contact" to system message MediaWiki:Contactpage-label.
Creating complex forms
See HTMLForm and related pages for more information on the possibilities available to create more complex forms.
Manual:HTMLForm Tutorial 3 provides more details of the values that can be used for type value of fields under AdditionalFields.
For example, you can use 'type': 'usersmultiselect' to have a field that allows the selection of multiple usernames.
Issues
Users of some hosting providers such as SiteGround and Amazon SES may get a PHP mail error or one that says that the FROM email address is not configured in the server, despite $wgPasswordSender being configured correctly and other email functionality working as expected.
A fix for this issue is described here.
Zobacz też
- Extension:EmailPage - Allows sending fully rendered articles with embedded CSS to users, groups, or contact lists
- Extension:CIForms - Forms with auto-validation, multiple choice questions and cloze tests
| To rozszerzenie jest wykorzystywane przez jeden lub więcej projektów Wikimedia. Oznacza to prawdopodobnie, że to rozszerzenie jest stabilne i działa wystarczająco dobrze, aby wykorzystywać je na stronach o dużym natężeniu ruchu. Odnajdź nazwę tego rozszerzenia w plikach konfiguracyjnych Wikimedia CommonSettings.php oraz InitialiseSettings.php, aby zobaczyć gdzie są zainstalowane. Pełną listę rozszerzeń zainstalowanych na określonej wiki można znaleźć na stronie Special:Version na danej wiki. |
| To rozszerzenie jest dołączone do następujących farm/hostów wiki lub pakietów: |
- Stable extensions/pl
- Special page extensions/pl
- Hook extensions/pl
- GPL licensed extensions/pl
- Extensions in Wikimedia version control/pl
- All extensions/pl
- Extensions used on Wikimedia/pl
- Extensions included in Canasta/pl
- Extensions included in Miraheze/pl
- Extensions included in ProWiki/pl
- Extensions included in Weird Gloop/pl
- Contact form extensions/pl
