1
ianez
[hack] - How to use Extended Xoops Dhtml Editor as default editor for all Xoops
  • 2008/9/10 16:30

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


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 step
Download 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 step
Open 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 step
Open /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 step
Open /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

2
maxxy
Re: [hack] - How to use Extended Xoops Dhtml Editor as default editor for all Xoops
  • 2008/9/10 23:04

  • maxxy

  • Quite a regular

  • Posts: 286

  • Since: 2007/6/11


thanks......will try this later

3
Mamba
Re: [hack] - How to use Extended Xoops Dhtml Editor as default editor for all Xoops
  • 2008/9/10 23:17

  • Mamba

  • Moderator

  • Posts: 11366

  • Since: 2004/4/23


Thanks for the hack - I'm sure it will be useful for people who have to use 2.0.18.x

But don't forget - in XOOPS 2.3 the Extended DHTML is the default editor.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

4
ianez
Re: [hack] - How to use Extended Xoops Dhtml Editor as default editor for all Xoops
  • 2008/9/10 23:41

  • ianez

  • Not too shy to talk

  • Posts: 188

  • Since: 2006/1/26


yes mamba,the 2.3 editor it's very good!
I'm actually deeply testing 2.3... the extended editor is great and in a few I'll release a little tutorial about how use the 2.3 powerful editor in 2.0.x installations.

Ian

Login

Who's Online

200 user(s) are online (136 user(s) are browsing Support Forums)


Members: 0


Guests: 200


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits