setup.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * setup.php
  4. *
  5. * Easy plugin that sends the body of the message to a new browser
  6. * window using the specified translator.
  7. *
  8. * Translation of composed messages is not supported.
  9. *
  10. * @copyright &copy; 1999-2007 The SquirrelMail Project Team
  11. * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  12. * @version $Id$
  13. * @package plugins
  14. * @subpackage translate
  15. */
  16. /**
  17. * Initialize the translation plugin
  18. * @return void
  19. * @access private
  20. */
  21. function squirrelmail_plugin_init_translate() {
  22. global $squirrelmail_plugin_hooks;
  23. $squirrelmail_plugin_hooks['read_body_bottom']['translate'] = 'translate_read_form';
  24. $squirrelmail_plugin_hooks['optpage_register_block']['translate'] = 'translate_optpage_register_block';
  25. $squirrelmail_plugin_hooks['loading_prefs']['translate'] = 'translate_pref';
  26. $squirrelmail_plugin_hooks['options_save']['translate'] = 'translate_save';
  27. $squirrelmail_plugin_hooks['optpage_set_loadinfo']['translate'] = 'translate_set_loadinfo';
  28. // $squirrelmail_plugin_hooks['compose_button_row']['translate'] = 'translate_button';
  29. }
  30. /**
  31. * Shows translation box in message display window
  32. * @access private
  33. */
  34. function translate_read_form() {
  35. include_once(SM_PATH . 'plugins/translate/functions.php');
  36. translate_read_form_function();
  37. }
  38. /**
  39. * Should add translation options in compose window
  40. *
  41. * Unimplemented
  42. * @access private
  43. */
  44. function translate_button() {
  45. include_once(SM_PATH . 'plugins/translate/functions.php');
  46. translate_button_function();
  47. }
  48. /**
  49. * Calls translation option block function
  50. * @access private
  51. */
  52. function translate_optpage_register_block() {
  53. include_once(SM_PATH . 'plugins/translate/functions.php');
  54. translate_optpage_function();
  55. }
  56. /**
  57. * Calls user's translation preferences function
  58. * @access private
  59. */
  60. function translate_pref() {
  61. include_once(SM_PATH . 'plugins/translate/functions.php');
  62. translate_pref_function();
  63. }
  64. /**
  65. * Calls user's translation preferences saving function
  66. * @access private
  67. */
  68. function translate_save() {
  69. include_once(SM_PATH . 'plugins/translate/functions.php');
  70. translate_save_function();
  71. }
  72. /**
  73. * Calls user's translation preferences set_loadinfo function
  74. * @access private
  75. */
  76. function translate_set_loadinfo() {
  77. include_once(SM_PATH . 'plugins/translate/functions.php');
  78. translate_set_loadinfo_function();
  79. }