Source for file setup.php

Documentation is available at setup.php

  1. <?php
  2. /**
  3. * setup.php
  4. * -----------
  5. * Squirrelspell setup file, as defined by the SquirrelMail-1.2 API.
  6. *
  7. * Copyright (c) 1999-2020 The SquirrelMail Project Team
  8. * Licensed under the GNU GPL. For full terms see the file COPYING.
  9. *
  10. * @author Konstantin Riabitsev <[email protected]>
  11. * @version $Id: setup.php 14840 2020年01月07日 07:42:38Z pdontthink $
  12. * @package plugins
  13. * @subpackage squirrelspell
  14. */
  15. /** @ignore */
  16. if (! defined ('SM_PATH')) define ('SM_PATH','../../');
  17. /**
  18. * Standard SquirrelMail plugin initialization API.
  19. *
  20. * @return void
  21. */
  22. global $squirrelmail_plugin_hooks;
  23. $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
  24. 'squirrelspell_setup';
  25. $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
  26. 'squirrelspell_optpage_register_block';
  27. }
  28. /**
  29. * This function formats and adds the plugin and its description to the
  30. * Options screen.
  31. *
  32. * @return void
  33. */
  34. global $optpage_blocks, $javascript_on, $squirrelmail_language;
  35. if ($javascript_on) {
  36. // this is a hack to avoid having to change the strings
  37. // in all our translations for this misspelled word
  38. if (strpos ($squirrelmail_language, 'en_') === 0)
  39. $name = 'Spell Checker Options';
  40. else
  41. $name = _ ("SpellChecker Options");
  42. $optpage_blocks[] =
  43. array(
  44. 'name' => $name,
  45. 'url' => '../plugins/squirrelspell/sqspell_options.php',
  46. 'desc' => _ ("Here you may set up how your personal dictionary is stored, edit it, or choose which languages should be available to you when spell-checking."),
  47. 'js' => TRUE);
  48. }
  49. }
  50. /**
  51. * This function adds a "Check Spelling" link to the "Compose" row
  52. * during message composition.
  53. *
  54. * @return void
  55. */
  56. function squirrelspell_setup () {
  57. global $data_dir, $username, $javascript_on;
  58. $sqspell_show_button = getPref ($data_dir, $username, 'sqspell_show_button', 1);
  59. if ($javascript_on && $sqspell_show_button) {
  60. echo '<input type="button" value="'
  61. . _ ("Check Spelling")
  62. . '" name="check_spelling" onclick="window.open(\'../plugins/squirrelspell/sqspell_interface.php\', \'sqspell\', \'status=yes,width=550,height=370,resizable=yes\')" />';
  63. }
  64. }

Documentation generated on 2020年1月13日 04:25:17 +0100 by phpDocumentor 1.4.3

AltStyle によって変換されたページ (->オリジナル) /