Hacks: Use Tinyeditor for creating your blocks in 2.3*

Posted by: DylianOn 2008/4/4 14:41:26 7558 reads
To use Tinyeditor for creating custom blocks in 2.3 :

Go to root/module/system/admin/blocksadmin/

Make an backup of the blockform.php
and open it.

Then

Search for:
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], 1570);


And replace it with:
if ( is_readable(XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php")) {
    include_once(
XOOPS_ROOT_PATH "/class/xoopseditor/tinyeditor/formtinyeditortextarea.php");
    
$textarea = new XoopsFormTinyeditorTextArea(array('caption'=>_AM_CONTENT'name'=>'bcontent''value'=>$block['content'], 'width'=>'100%''height'=>'400px',  'xEditor'=>'1'));
    }else{
    
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT'bcontent'$block['content'], 1570);
    }


And if you go to blocks in your administration then youl see tinyeditor in stead of the normal editor.
(This hack only works if you have installed tinyeditor!)