6 * This is a standard Squirrelmail-1.2 API for plugins.
10 * This function checks whether the user's USER_AGENT is known to
11 * be broken. If so, returns true and the plugin is invisible to the
15 global $HTTP_USER_AGENT;
16 require ('../plugins/squirrelspell/sqspell_config.php');
19 $soup_menu = explode(',', $SQSPELL_SOUP_NAZI);
20 for ($i = 0; $i < sizeof($soup_menu); $i++
) {
21 if (stristr($HTTP_USER_AGENT, trim($soup_menu[$i]))) {
28 function squirrelmail_plugin_init_squirrelspell() {
29 /* Standard initialization API. */
30 global $squirrelmail_plugin_hooks;
32 $squirrelmail_plugin_hooks["compose_button_row"]["squirrelspell"] = "squirrelspell_setup";
33 $squirrelmail_plugin_hooks["options_register"]["squirrelspell"] = "squirrelspell_options";
34 $squirrelmail_plugin_hooks["options_link_and_description"]["squirrelspell"] = "squirrelspell_options";
37 function squirrelspell_options() {
38 // Gets added to the user's OPTIONS page.
45 /* Register Squirrelspell with the $optionpages array. */
46 $optionpages[] = array(
47 'name' => 'SpellChecker Options',
48 'url' => '../plugins/squirrelspell/sqspell_options.php',
49 'desc' => 'Here you may set up how your personal dictionary is stored,
50 edit it, or choose which languages should be available to
51 you when spell-checking.',
56 function squirrelspell_setup() {
57 /* Gets added to the COMPOSE buttons row. */
63 <script type
="text/javascript">
65 // using document.write to hide this functionality from people
66 // with JavaScript turned off.
67 document
.write("<input type=\"button\" value=\"Check Spelling\" onclick=\"window.open('../plugins/squirrelspell/sqspell_interface.php', 'sqspell', 'status=yes,width=550,height=370,resizable=yes')\">");