Ah what do you know? It turns out xinha is a drop in replacement for htmlarea

. After downloading and unzipping the xinha files into [s9ydir]/xinha I just opened up [s9ydir]/include/functions_entries_admin.inc.php and replaced these lines:
Code: Select all
<script type="text/javascript">
_editor_url = "<?php echo $serendipity['serendipityHTTPPath'] . 'htmlarea/'; ?>";
_editor_lang = "<?php echo WYSIWYG_LANG; ?>";
var editorref = '';
</script>
<script type="text/javascript" src="htmlarea/htmlarea.js"></script>
<script type="text/javascript" src="htmlarea/lang/<?php echo WYSIWYG_LANG; ?>.js"></script>
<script type="text/javascript" src="htmlarea/dialog.js"></script>
<style type="text/css">@import url(htmlarea/htmlarea.css);</style>
With these:
Code: Select all
<script type="text/javascript">
_editor_url = "<?php echo $serendipity['serendipityHTTPPath'] . 'xinha/'; ?>";
_editor_lang = "<?php echo WYSIWYG_LANG; ?>";
_editor_skin = "silva";
var editorref = '';
</script>
<script type="text/javascript" src="xinha/XinhaCore.js"></script>
I also had to change the rewrite rule in .htaccess (if using url rewriting):
Code: Select all
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
Replaced with:
Code: Select all
RewriteRule ^xinha/(.*) xinha/$1 [L,QSA]
There is just one problem. Unlike htmlarea where the languages include the charset in xinha all the language files are utf and the charset is not specified. So for example if I change to german then WYSIWYG_LANG=de-utf8 it won't display german text. It should be just "de" for xinha. You can see for yourself if you compare the files in xinha/lang with the files in htmlarea/lang.
So somebody will have to go through all the files in [s9y_dir]/lang and change the defines for WYSIWYG_LANG to *not* include the charset.
OR
You could do a substring (atleast until the language file maintainers get into gear):
Code: Select all
<script type="text/javascript">
_editor_url = "<?php echo $serendipity['serendipityHTTPPath'] . 'xinha/'; ?>";
_editor_lang = "<?php echo substr(WYSIWYG_LANG,0,2); ?>";
_editor_skin = "silva";
var editorref = '';
</script>
<script type="text/javascript" src="xinha/XinhaCore.js"></script>