Extensão:ContactPage
Estado da versão: estável |
|
|---|---|
| Implementação | Página especial, Hook |
| Descrição | Fornece um formulário de contato para visitantes |
| Autor(es) | Daniel Kinzler, Sam Reed |
| Última versão | Continuous updates |
| Política de compatibilidade |
Lançamentos de snapshot junto com o MediaWiki. A master não é retrocompatível. |
| PHP | 5.4+ |
| Modifica o banco de dados |
Não |
| Licença | GNU GPL (Licença Pública Geral) 2.0 ou superior |
| Download | README |
| Exemplo | nl.wikipedia.org |
|
|
| Para traduzir a extensão ContactPage, verifique sua disponibilidade no translatewiki.net | |
| Função no Vagrant | contactpage |
| Problemas | Tarefas em aberto · Relatar um bug |
A extensão ContactPage implementa um formulário de contato para visitantes. Cria uma página especial "Special:Contact", que é semelhante a "Special:EmailUser", mas tem um destinatário fixo, podendo ser utilizada sem registro.
Instalação e configuração
- Baixe e mova a pasta extraída
ContactPageao seu diretórioextensions/.
Desenvolvedores e colaboradores de código, por outro lado, deverão instalar a extensão a partir do Git, usando:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/ContactPage
- Adicione o seguinte código ao final do seu arquivo 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.
Concluído – Navegue à página Special:Version em sua wiki para verificar se a instalação da extensão foi bem sucedida.
$wgCaptchaTriggers['contactpage'] = true;
Mais personalização
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.
See also
- 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
| Esta extensão está sendo usada(o) por um ou mais projetos da Wikimedia. Isto significa que, provavelmente, a extensão é estável e funciona bem o suficiente para ser utilizada(o) em sites da web de alto tráfego. Procure pelo nome dessa extensão nos arquivos de configuração CommonSettings.php e InitialiseSettings.php da Wikimedia para verificar onde ela foi instalada. Uma lista completa das extensões instaladas numa wiki em particular podem ser visualizadas na página Special:Version da wiki. |
| Esta extensão está incluída nas seguintes fazendas/hospedagens (farms/hosts) e/ou pacotes wiki: |
- Stable extensions/pt-br
- Special page extensions/pt-br
- Hook extensions/pt-br
- GPL licensed extensions/pt-br
- Extensions in Wikimedia version control/pt-br
- All extensions/pt-br
- Extensions used on Wikimedia/pt-br
- Extensions included in Canasta/pt-br
- Extensions included in Miraheze/pt-br
- Extensions included in ProWiki/pt-br
- Contact form extensions/pt-br
