function agenda_declarer_tables_principales($tables_principales){ //-- Table EVENEMENTS ------------------- $evenements = array( "id_evenement" => "bigint(21) NOT NULL", "id_article" => "bigint(21) DEFAULT '0' NOT NULL", "date_debut" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL", "titre" => "text NOT NULL", "descriptif" => "text NOT NULL", "lieu" => "text NOT NULL", "adresse" => "text NOT NULL", "inscription" => "tinyint(1) DEFAULT 0 NOT NULL", "places" => "int(11) DEFAULT 0 NOT NULL", "horaire" => "varchar(3) DEFAULT 'oui' NOT NULL", "id_evenement_source" => "bigint(21) NOT NULL", "maj" => "TIMESTAMP" ); $evenements_key = array( "PRIMARY KEY" => "id_evenement", "KEY date_debut" => "date_debut", "KEY date_fin" => "date_fin", "KEY id_article" => "id_article" ); $tables_principales['spip_evenements'] = array( 'field' => &$evenements, 'key' => &$evenements_key, 'join'=>array( 'id_evenement'=>'id_evenement', 'id_article'=>'id_article' )); $tables_principales['spip_rubriques']['field']['agenda'] = 'tinyint(1) DEFAULT 0 NOT NULL'; return $tables_principales; }