69 lines
1.5 KiB
PHP
69 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* Options au chargement du plugin GamuContact
|
|
*
|
|
* @plugin GamuContact
|
|
* @copyright 2021
|
|
* @author tofulm
|
|
* @licence GNU/GPL
|
|
* @package SPIP\Gamucontact\Options
|
|
*/
|
|
|
|
if (!defined('_ECRIRE_INC_VERSION')) {
|
|
return;
|
|
}
|
|
|
|
$GLOBALS['formulaires_no_spam'][] = 'gamucontact';
|
|
|
|
|
|
$GLOBALS['gamucontact'] = [
|
|
[
|
|
'saisie' => 'input',
|
|
'options' => array(
|
|
'nom' => 'nom',
|
|
'label' => '<:gamucontact:votre_nom:>',
|
|
'obligatoire' => 'oui',
|
|
//'fonction' => 'ma_super_fonction'
|
|
)
|
|
],
|
|
[
|
|
'saisie' => 'input',
|
|
'options' => array(
|
|
'nom' => 'email_contact',
|
|
'label' => '<:gamucontact:votre_email:>',
|
|
'obligatoire' => 'oui',
|
|
)
|
|
],
|
|
[
|
|
'saisie' => 'input',
|
|
'options' => array(
|
|
'nom' => 'objet',
|
|
'label' => '<:gamucontact:objet:>',
|
|
'obligatoire' => 'oui',
|
|
'class' => 'w100'
|
|
//'fonction' => 'ma_super_fonction'
|
|
)
|
|
],
|
|
[
|
|
'saisie' => 'textarea',
|
|
'options' => array(
|
|
'nom' => 'texte',
|
|
'label' => '<:gamucontact:message:>',
|
|
'obligatoire' => 'oui',
|
|
'class' => 'w100',
|
|
'rows' => 4
|
|
//'fonction' => 'ma_super_fonction'
|
|
)
|
|
],
|
|
];
|
|
|
|
|
|
function gamucontact_declarer_tables_objets_sql($tables) {
|
|
|
|
$tables['spip_messages']['field']['telephone'] = "varchar(55) NOT NULL";
|
|
$tables['spip_messages']['field']['nom'] = "varchar(255) NOT NULL";
|
|
$tables['spip_messages']['field']['objet'] = "varchar(255) NOT NULL";
|
|
$tables['spip_messages']['field']['email_contact'] = "varchar(255) NOT NULL";
|
|
|
|
return $tables;
|
|
}
|