organiseur.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <?php
  2. /***************************************************************************\
  3. * SPIP, Systeme de publication pour l'internet *
  4. * *
  5. * Copyright (c) 2001-2014 *
  6. * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
  7. * *
  8. * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
  9. * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
  10. \***************************************************************************/
  11. if (!defined('_ECRIRE_INC_VERSION')) return;
  12. /**
  13. * Declaration des champs complementaires sur la table auteurs, pour les clients
  14. *
  15. * @param array $tables
  16. * @return array
  17. */
  18. function organiseur_declarer_tables_objets_sql($tables){
  19. $tables['spip_auteurs']['field']["imessage"] = "VARCHAR(3)";
  20. $tables['spip_auteurs']['field']["messagerie"] = "VARCHAR(3)";
  21. $tables['spip_messages'] = array(
  22. 'page'=> false,
  23. 'texte_modifier' => 'icone_modifier_message',
  24. 'texte_creer' => 'icone_ecrire_nouveau_message',
  25. 'texte_objets' => 'organiseur:messages',
  26. 'texte_objet' => 'organiseur:message',
  27. 'info_aucun_objet'=> 'info_aucun_message',
  28. 'info_1_objet' => 'info_1_message',
  29. 'info_nb_objets' => 'info_nb_messages',
  30. 'principale' => 'oui',
  31. 'champs_editables' => array('titre', 'texte', 'type','date_heure', 'date_fin', 'rv', 'id_auteur', 'destinataires'),
  32. 'field' => array(
  33. "id_message" => "bigint(21) NOT NULL",
  34. "titre" => "text DEFAULT '' NOT NULL",
  35. "texte" => "longtext DEFAULT '' NOT NULL",
  36. // normal,
  37. // pb (pense bete)
  38. // affich (annonce publique)
  39. "type" => "varchar(6) DEFAULT '' NOT NULL",
  40. "date_heure" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
  41. "date_fin" => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
  42. "rv" => "varchar(3) DEFAULT '' NOT NULL",
  43. "statut" => "varchar(6) DEFAULT '0' NOT NULL",
  44. "id_auteur" => "bigint(21) DEFAULT 0 NOT NULL",
  45. "destinataires" => "text DEFAULT '' NOT NULL",
  46. "maj" => "TIMESTAMP"
  47. ),
  48. 'key' => array(
  49. "PRIMARY KEY" => "id_message",
  50. "KEY id_auteur" => "id_auteur"
  51. ),
  52. 'titre' => "titre, '' AS lang",
  53. 'date' => 'date_heure',
  54. 'statut' => array(
  55. array(
  56. 'champ' => 'statut',
  57. 'publie' => 'publie',
  58. 'previsu' => '!',
  59. 'exception' => array('statut','tout')
  60. ),
  61. ),
  62. 'rechercher_champs' => array(
  63. 'titre' => 8, 'texte' => 1
  64. ),
  65. );
  66. return $tables;
  67. }
  68. /**
  69. * Interfaces des tables agenda et messagerie
  70. *
  71. * @param array $interfaces
  72. * @return array
  73. */
  74. function organiseur_declarer_tables_interfaces($interfaces){
  75. $interfaces['table_des_tables']['messages']='messages';
  76. return $interfaces;
  77. }
  78. ?>