'gamuform', 'principale' => 'oui', 'field'=> array( 'id_gamuform' => 'bigint(21) NOT NULL', 'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL', 'titre' => 'varchar(255) NOT NULL DEFAULT ""', 'label' => 'varchar(255) NOT NULL DEFAULT ""', 'type' => 'varchar(255) NOT NULL DEFAULT ""', 'class_container' => 'varchar(255) NOT NULL DEFAULT ""', 'class' => 'varchar(255) NOT NULL DEFAULT ""', 'choix' => "text NOT NULL", 'defaut' => 'varchar(255) NOT NULL DEFAULT ""', 'statut' => 'varchar(20) DEFAULT "0" NOT NULL', 'date' => 'datetime NOT NULL DEFAULT "0000-00-00 00:00:00"', 'rang' => 'tinyint(4) NOT NULL', 'maj' => 'TIMESTAMP' ), 'key' => array( 'PRIMARY KEY' => 'id_gamuform', 'KEY objet' => 'objet', 'KEY statut' => 'statut', ), 'titre' => 'titre AS titre, "" AS lang', 'date' => 'date', //'champs_editables' => array('titre'), //'champs_versionnes' => array('titre'), //'rechercher_champs' => array(), 'tables_jointures' => array('spip_gamuforms_valeurs'), 'statut_textes_instituer' => array( 'prepa' => 'texte_statut_en_cours_redaction', 'publie' => 'texte_statut_publie', 'poubelle' => 'texte_statut_poubelle', ), 'statut'=> array( array( 'champ' => 'statut', 'publie' => 'publie', 'exception' => array('statut','tout') ) ), 'texte_changer_statut' => 'gamuform:texte_changer_statut_gamuform', ); return $tables; } /** * Déclaration des tables secondaires (liaisons) * * @pipeline declarer_tables_auxiliaires * @param array $tables * Description des tables * @return array * Description complétée des tables */ function gamuform_declarer_tables_auxiliaires($tables) { $tables['spip_gamuforms_valeurs'] = array( 'field' => array( 'id_gamuform' => 'bigint(21) DEFAULT "0" NOT NULL', 'id_objet' => 'bigint(21) DEFAULT "0" NOT NULL', 'objet' => 'VARCHAR(25) DEFAULT "" NOT NULL', 'valeur' => "text NOT NULL", ), 'key' => array( 'PRIMARY KEY' => 'id_gamuform,id_objet,objet', 'KEY id_gamuform' => 'id_gamuform', ) ); return $tables; }