# HTMLArea Integration
# ====================
cd htmlarea_cvs
update
# just hit enter for pwd
cd ..
rm -rf htmlarea
mv htmlarea_cvs/htmlarea htmlarea
rm -rf htmlarea/examples
rm -rf htmlarea/tests
cp index.php htmlarea
rm -f htmlarea/index.html



# Xinha:  http://xinha.gogo.co.nz
#
# - is the continuation of htmlarea
# - should be a drop-in replacement
# - is under heavy development
# - we'll wait for a stable release






# FCKeditor Integration
# =====================
cd fckeditor_orig
wget <current release>
# wget http://unc.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.0fc.tar.gz
tar xzvf <current release>
# tar xzvf FCKeditor_2.0fc.tar.gz
cd ..
rm -rf fckeditor
mkdir fckeditor
cp -rP fckeditor_orig/fckeditor.js fckeditor
cp -rP fckeditor_orig/fckconfig.js fckeditor
cp -rP fckeditor_orig/fckstyles.xml fckeditor
cp -rP fckeditor_orig/fcktemplates.xml fckeditor
cp -rP fckeditor_orig/license.txt fckeditor
cp -rP fckeditor_orig/editor/ fckeditor
chmod -R u+w fckeditor/*



# apply this patch
#
--- fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php.orig  2005-03-16 16:51:52.000000000 -0800
+++ fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php       2005-03-16 17:15:10.000000000 -0800
@@ -6,9 +6,18 @@
 //$word_win_src = '/speller/wordWindow.js';            // by FredCK
 $word_win_src = '../wordWindow.js';                            // by FredCK
 $textinputs = $_POST['textinputs']; # array
-//$aspell_prog = 'aspell';// by FredCK (for Linux)
-$aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"';     // by FredCK (for Windows)
-$lang = 'en_US';
+
+// where to find ASpell
+//
+define('SM_PATH', '../../../../../../../../');
+include_once(SM_PATH . 'include/validate.php');
+include_once(SM_PATH . 'plugins/html_mail/config.php');
+global $html_mail_aspell_path, $squirrelmail_language;
+$aspell_prog = $html_mail_aspell_path;
+
+$lang = $squirrelmail_language;
+
+
 //$aspell_opts = "-a --lang=$lang --encoding=utf-8";   // by FredCK
 $aspell_opts = "-a --lang=$lang --encoding=utf-8 -H";  // by FredCK
 $tempfiledir = "./";




# apply this patch
#
--- fckeditor_orig/fckconfig.js 2005-05-09 07:57:58.000000000 -0700
+++ fckeditor/fckconfig.js      2005-05-12 20:48:48.000000000 -0700
@@ -61,8 +61,23 @@
 FCKConfig.ToolbarStartExpanded = true ;
 FCKConfig.ToolbarCanCollapse   = true ;
 
+//FCKConfig.ToolbarSets["Default"] = [
+//       ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
+//       ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
+//       ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
+//       ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
+//       ['OrderedList','UnorderedList','-','Outdent','Indent'],
+//       ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
+//       ['Link','Unlink','Anchor'],
+//       ['Image','Table','Rule','Smiley','SpecialChar','UniversalKey'],
+//       ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
+//       '/',
+//       ['Style','FontFormat','FontName','FontSize'],
+//       ['TextColor','BGColor'],
+//       ['About']
+//] ;
+
 FCKConfig.ToolbarSets["Default"] = [
-       ['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
        ['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
        ['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
@@ -70,11 +85,8 @@
        ['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
        ['Link','Unlink','Anchor'],
        ['Image','Table','Rule','Smiley','SpecialChar','UniversalKey'],
-       ['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
-       '/',
-       ['Style','FontFormat','FontName','FontSize'],
-       ['TextColor','BGColor'],
-       ['About']
+       ['TextColor','BGColor','-','Source','-','About'],
+       ['Style','FontFormat','FontName','FontSize']
 ] ;
 
 FCKConfig.ToolbarSets["Basic"] = [
@@ -103,23 +115,22 @@
 FCKConfig.ImageDlgHideLink             = false ;
 FCKConfig.ImageDlgHideAdvanced = false ;
 
-FCKConfig.LinkBrowser = true ;
-FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp' ;
-//FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/asp/connector.asp&ServerPath=/CustomFiles/' ;
+FCKConfig.LinkBrowser = false ;
 // ASP.Net             // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/aspx/connector.aspx' ;
 // ColdFusion  // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/cfm/connector.cfm' ;
 // Perl                        // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/perl/connector.cgi' ;
 // PHP                 // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ;
+FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Connector=connectors/php/connector.php' ;
 // PHP - mcpuk // FCKConfig.LinkBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Connector=connectors/php/connector.php' ;
 FCKConfig.LinkBrowserWindowWidth       = screen.width * 0.7 ;  // 70%
 FCKConfig.LinkBrowserWindowHeight      = screen.height * 0.7 ; // 70%
 
-FCKConfig.ImageBrowser = true ;
-FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/asp/connector.asp' ;
+FCKConfig.ImageBrowser = false ;
 // ASP.Net             // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/aspx/connector.aspx' ;
 // ColdFusion  // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/cfm/connector.cfm' ;
 // Perl                        // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/perl/connector.cgi' ;
 // PHP                 // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
+FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
 // PHP - mcpuk // FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/mcpuk/browser.html?Type=Image&Connector=connectors/php/connector.php' ;
 FCKConfig.ImageBrowserWindowWidth  = screen.width * 0.7 ;      // 70% ;
 FCKConfig.ImageBrowserWindowHeight = screen.height * 0.7 ;     // 70% ;

