Use Tinyeditor for creating your blocks in 2.3*

Date 2008/4/4 14:41:26 | Topic: Hacks

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!)


This article comes from XOOPS Web Application System
https://xoops.org

The URL for this story is:
https://xoops.org/modules/news/article.php?storyid=4196