librealire/base/librealire.php

145 lines
3.9 KiB
PHP

<?php
if (!defined("_ECRIRE_INC_VERSION")) return;
// des champs extras
function librealire_declarer_champs_extras($champs = array()) {
$champs['spip_articles']['transcriptions'] = array(
'saisie' => 'fieldset',
'options' => array(
'nom' => _T('librealire:transcriptions'),
'label' => _T('librealire:transcriptions_label'),
'explication' => 'Utilisez les raccourcis typo courant de SPIP (lien = [texte du lien->url])...'
),
'saisies' => array(
'titre_t' => array(
'saisie' => 'input',
'options' => array(
'nom'=>'titre_t',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => true,
'label' => _T('librealire:titre_t'),
'explication' => _T('librealire:titre_t_explications'),
'obligatoire' => false
)
),
'source' => array(
'saisie' => 'textarea',
'options' => array(
'nom'=>'source',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => true,
'label' => _T('librealire:source'),
'explication' => _T('librealire:source_explications'),
'obligatoire' => false,
'inserer_barre' => 'forum'
)
),
'lieu' => array(
'saisie' => 'textarea',
'options' => array(
'nom'=>'lieu',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => true,
'label' => _T('librealire:lieu'),
'obligatoire' => false,
'inserer_barre' => 'forum'
)
),
'date_t' => array(
'saisie' => 'date',
'options' => array(
'nom'=>'date_t',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => true,
'label' => _T('librealire:date_t'),
'obligatoire' => false
)
),
'duree' => array(
'saisie' => 'input',
'options' => array(
'nom'=>'duree',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:duree'),
'obligatoire' => false
)
),
'liens' => array(
'saisie' => 'textarea',
'options' => array(
'nom'=>'liens',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:liens'),
'explication' => _T('librealire:liens_explications'),
'obligatoire' => false,
'inserer_barre' => 'forum'
)
),
'evenement' => array(
'saisie' => 'input',
'options' => array(
'nom'=>'evenement',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:evenement'),
'obligatoire' => false
)
),
'licence' => array(
'saisie' => 'checkbox',
'options' => array(
'nom'=>'licence',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:licence'),
'explication' => _T('librealire:licence_explications'),
'obligatoire' => false,
'data' => array(
'verbatim' => '<a href="http://www.gnu.org/licenses/licenses.html#VerbatimCopying" class="spip_out">Verbatim</a>',
'autrelicence' => 'Autre Licence... ?'
),
'defaut' => 'verbatim'
)
),
'creditsvisuels' => array(
'saisie' => 'textarea',
'options' => array(
'nom'=>'creditsvisuels',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:creditsvisuels'),
'obligatoire' => false,
'inserer_barre' => 'forum'
)
),
'sanssommaire' => array(
'saisie' => 'case',
'options' => array(
'nom'=>'sanssommaire',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => false,
'label' => _T('librealire:sanssommaire'),
'explication' => _T('librealire:sanssommaire_explications'),
'obligatoire' => false
)
)
)
);
$champs['spip_mots']['soustitre'] = array(
'saisie' => 'input',
'options' => array(
'nom'=>'soustitre',
'sql' => "text NOT NULL DEFAULT ''",
'rechercher' => true,
'label' => _T('librealire:soustitre'),
'explication' => _T('librealire:soustitre_explications'),
'obligatoire' => false
)
);
return $champs;
}