compose_button_row hook updated to new plugin/templating scheme. Please learn from...
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 9 Oct 2006 02:45:11 +0000 (02:45 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 9 Oct 2006 02:45:11 +0000 (02:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11869 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/squirrelspell/setup.php
plugins/squirrelspell/sqspell_functions.php

index e987446aae4c965dfb824c0475242051ac7ff69d..79189d31f98c946a915b100527f1e0a9debba45a 100644 (file)
@@ -22,7 +22,7 @@
  */
 function squirrelmail_plugin_init_squirrelspell() {
   global $squirrelmail_plugin_hooks;
-  $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
+  $squirrelmail_plugin_hooks['template_construct_compose_buttons.tpl']['squirrelspell'] = 
       'squirrelspell_setup';
   $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
       'squirrelspell_optpage_register_block';
@@ -54,7 +54,7 @@ function squirrelspell_optpage_register_block() {
  */
 function squirrelspell_setup() {
   include_once(SM_PATH . 'plugins/squirrelspell/sqspell_functions.php');
-  squirrelspell_setup_function();
+  return squirrelspell_setup_function();
 }
 
 /**
index 9653cff06ca9076c5dd0fcfc43d001d569647f6a..08e55e8fd94e1183dfcb130a2560010cdba4fd4d 100644 (file)
@@ -62,7 +62,7 @@ function squirrelspell_setup_function() {
      * use document.write() so the "Check Spelling" button is not
      * displayed if js is off in the browser.
      */
-    echo "<script type=\"text/javascript\">\n".
+    $output = "<script type=\"text/javascript\">\n".
       "<!--\n".
       'document.write("<input type=\"button\" value=\"'.
       _("Check Spelling").
@@ -71,6 +71,7 @@ function squirrelspell_setup_function() {
       'resizable=yes\')\" />");' . "\n".
       "//-->\n".
       "</script>\n";
+    return array('compose_button_row' => $output);
   }
 }