# 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.0rc3.tar.gz
tar xzvf <current release>
# tar xzvf FCKeditor_2.0rc3.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/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,21 @@
 //$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_windows_or_nix, $squirrelmail_language;
+if ($html_mail_windows_or_nix == 1)
+   $aspell_prog = 'aspell';                            // by FredCK (for Linux)
+else if ($html_mail_windows_or_nix == 2)
+   $aspell_prog = '"C:\Program Files\Aspell\bin\aspell.exe"';  // by FredCK (for Windows)
+
+$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 = "./";



