[PLUGINS] +les plugins de bases
[ptitvelo/web/www.git] / www / plugins / menus_1 / base / menus_tables.php
1 <?php
2
3 // Sécurité
4 if (!defined("_ECRIRE_INC_VERSION")) return;
5
6 function menus_declarer_tables_interfaces($interface){
7 // 'spip_' dans l'index de $tables_principales
8 $interface['table_des_tables']['menus']='menus';
9 $interface['table_des_tables']['menus_entrees']='menus_entrees';
10
11 // Titres
12 $interface['table_titre']['menus'] = 'titre, "" as lang';
13
14 return $interface;
15 }
16
17 function menus_declarer_tables_principales($tables_principales){
18 //-- Table menus -----------------------------------------------------------
19 $menus = array(
20 "id_menu" => "bigint(21) NOT NULL",
21 "id_menus_entree" => "bigint(21) DEFAULT '0' NOT NULL",
22 "titre" => "text DEFAULT '' NOT NULL",
23 "identifiant" => "varchar(255) default '' not null",
24 "css" => "tinytext DEFAULT '' NOT NULL"
25 );
26
27 $menus_cles = array(
28 "PRIMARY KEY" => "id_menu",
29 "KEY id_menus_entree" => "id_menus_entree"
30 );
31
32 $tables_principales['spip_menus'] = array(
33 'field' => &$menus,
34 'key' => &$menus_cles
35 );
36
37 // Table menus_elements ----------------------------------------------------
38 $menus_entrees = array(
39 "id_menus_entree" => "bigint(21) NOT NULL",
40 "id_menu" => "bigint(21) DEFAULT '0' NOT NULL",
41 "rang" => "smallint DEFAULT '1' NOT NULL",
42 "type_entree" => "tinytext DEFAULT '' NOT NULL",
43 "parametres" => "text DEFAULT '' NOT NULL"
44 );
45
46 $menus_entrees_cles = array(
47 "PRIMARY KEY" => "id_menus_entree",
48 "KEY id_menu" => "id_menu"
49 );
50
51 $tables_principales['spip_menus_entrees'] = array(
52 'field' => &$menus_entrees,
53 'key' => &$menus_entrees_cles
54 );
55
56 return $tables_principales;
57 }
58
59 ?>