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 e987446..79189d3 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 9653cff..08e55e8 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);
   }
 }