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.  
  16. /** @ignore */
  17. if (defined('SM_PATH')) define('SM_PATH','../../');
  18.  
  19. /**
  20.  * Standard SquirrelMail plugin initialization API.
  21.  *
  22.  * @return void 
  23.  */
  24.   global $squirrelmail_plugin_hooks;
  25.   $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'=
  26.       'squirrelspell_setup';
  27.   $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'=
  28.       'squirrelspell_optpage_register_block';
  29. }
  30.  
  31. /**
  32.  * This function formats and adds the plugin and its description to the
  33.  * Options screen.
  34.  *
  35.  * @return void 
  36.  */
  37.   global $optpage_blocks$javascript_on$squirrelmail_language;
  38.   if ($javascript_on{
  39.     // this is a hack to avoid having to change the strings
  40.     // in all our translations for this misspelled word
  41.     if (strpos($squirrelmail_language'en_'=== 0)
  42.         $name 'Spell Checker Options';
  43.     else
  44.         $name _("SpellChecker Options");
  45.     $optpage_blocks[=
  46.       array(
  47.         'name' => $name,
  48.         'url'  => '../plugins/squirrelspell/sqspell_options.php',
  49.         '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."),
  50.         'js'   => TRUE);
  51.   }
  52. }
  53.  
  54. /**
  55.  * This function adds a "Check Spelling" link to the "Compose" row
  56.  * during message composition.
  57.  *
  58.  * @return void 
  59.  */
  60. function squirrelspell_setup({
  61.     global $data_dir$username$javascript_on;
  62.     $sqspell_show_button getPref($data_dir$username'sqspell_show_button'1);
  63.     if ($javascript_on && $sqspell_show_button{
  64.         echo '<input type="button" value="'
  65.            . _("Check Spelling")
  66.            . '" name="check_spelling" onclick="window.open(\'../plugins/squirrelspell/sqspell_interface.php\', \'sqspell\', \'status=yes,width=550,height=370,resizable=yes\')" />';
  67.     }
  68. }

Documentation generated on Mon, 13 Jan 2020 04:25:17 +0100 by phpDocumentor 1.4.3