events.conf.dist.php 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Events' configuration
  5. * @deprecated to be removed in 2.x
  6. * Used to configure each event and to link them to functions the event'll fire.
  7. * The flow is like the following :
  8. * 1. somewhere in the application an event is fired
  9. * 2. that event is intercepted by the switch EventsDispatcher
  10. * 3. that switch will go all over the "actions" in the event_config initialized beneath us according to the event
  11. * 4. that switch will see if the function actually exists (if not, we get dont do anything)
  12. * 5. then it will see if a filter for that function exists (if it does, the filter is executed)
  13. * 6. if the filter says it's ok, the function linked to the event is executed
  14. * 7. and that function will actually call the truly interesting function with the good require_once
  15. */
  16. global $event_config;
  17. $event_config = array(
  18. 'portal_homepage_edited' => array( // key for "user registration" event
  19. 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired
  20. 'event_send_mail' // don't forget to actually write this function in the events.lib.php file
  21. ),
  22. 'self_sent' => false, // this key states that we can't add user to this event through the admin panel
  23. 'name_lang_var' => get_lang('PortalHomepageEdited'),
  24. 'desc_lang_var' => get_lang('PortalHomepageEdited'),
  25. 'available_keyvars' => array (// keys used for the mail template
  26. 'url' => 'portal',
  27. 'sitename' => 'sitename',
  28. 'firstname' => 'firstname',
  29. 'lastname' => 'lastname',
  30. 'username' => 'username',
  31. 'usermail' => 'usermail',
  32. 'password' => 'password',
  33. 'user_lang' => 'language',
  34. 'admin_name' => 'administrator_name',
  35. 'admin_surname' => 'administrator_surname',
  36. 'admin_phone' => 'administrator_phone',
  37. 'admin_email' => 'administrator_email',
  38. )
  39. ),
  40. 'user_registration' => array( // key for "user registration" event
  41. 'actions' => array( // we link this event to a bunch of functions that will be triggered when the event is fired
  42. 'event_send_mail' // don't forget to actually write this function in the events.lib.php file
  43. ),
  44. 'self_sent' => true, // this key states that we can't add user to this event through the admin panel
  45. 'name_lang_var' => get_lang('UserRegistrationTitle'),
  46. 'desc_lang_var' => get_lang('UserRegistrationComment'),
  47. 'available_keyvars' => array (// keys used for the mail template
  48. 'url' => 'portal',
  49. 'sitename' => 'sitename',
  50. 'firstname' => 'firstname',
  51. 'lastname' => 'lastname',
  52. 'username' => 'username',
  53. 'usermail' => 'usermail',
  54. 'password' => 'password',
  55. 'user_lang' => 'language',
  56. 'admin_name' => 'administrator_name',
  57. 'admin_surname' => 'administrator_surname',
  58. 'admin_phone' => 'administrator_phone',
  59. 'admin_email' => 'administrator_email',
  60. )
  61. ),
  62. );
  63. @include 'events.conf.local.php';