This small hack is for using the useful extended dhtml editor as the defautl editor, instead of the normal one which is not very usable and for example don't let you select and then change the code on the fly.
It was not so easy to find the way but in the end, thanx to the big help of
Lucio Rota (Thanx man!) I finally made it.
- First stepDownload and install last official XoopsEditor class (version 1.21)
Download and install last official Frameworks pack (version 1.22)
Backup the original copies of following files:
/class/xoopseditor/dhtmlext/dxhtmlext.php
/class/xoopsform/formdhtmltextarea.php
- Second stepOpen the file /class/xoopsform/formdhtmltextarea.php
Around line 74 change:
var $htmlEditor = array();
with:
var $htmlEditor = array('FormDhtmlExt','/class/xoopseditor/dhtmlext/dhtmlext.php');
This is for telling XOOPS to use that class for the textarea editing
- Third stepOpen /class/xoopseditor/dhtmlext/dxhtmlext.php
Around line 37 you have to change this line:
$this->XoopsFormDhtmlTextArea($caption, $name, $value, $rows, $cols, $hiddentext);
with this one:
$this->XoopsFormTextArea($caption, $name, $value, $rows, $cols, $hiddentext);
This is for avoiding a server error probabyl caused by a php5 bug... thanx Lucio..
- Fourth stepOpen /class/xoopseditor/dhtmlext/dxhtmlext.php
Immediatly after this line:
require_once XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php";
+
add the following code:
include_once XOOPS_ROOT_PATH."/class/xoopseditor/dhtmlext/editor_registry.php";
and uncomment this line:
//include_once XOOPS_ROOT_PATH."/Frameworks/textsanitizer/module.textsanitizer.php";
final result should be:
require_once XOOPS_ROOT_PATH."/class/xoopsform/formdhtmltextarea.php";
include_once XOOPS_ROOT_PATH."/class/xoopseditor/dhtmlext/editor_registry.php";
include_once XOOPS_ROOT_PATH."/Frameworks/textsanitizer/module.textsanitizer.php";
This hack is for having language properly displayed and special buttons as flash or youtube
(don't forget that you need to put your language file in class/xoopseditor/dhtmlext/languages/ if you want the buttons translated)
This should do the trick.
I've tested this on local and remote server whit XOOPS 2.0.18.1 installation with no errors.
Hope this will work for you
Ian