$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
if ( is_readable(XOOPS_ROOT_PATH . "/class/xoopseditor/tinymce/formtinymce.php")) {
include_once(XOOPS_ROOT_PATH . "/class/xoopseditor/tinymce/formtinymce.php");
include_once(XOOPS_ROOT_PATH . "/class/xoopseditor/tinymce/language/english.php");
$textarea = new XoopsFormTinymce(array('caption'=>_AM_CONTENT, 'name'=>'bcontent', 'value'=>$block['content'], 'cols'=>'15','rows'=>'20', 'xEditor'=>'1'));
}else{
$textarea = new XoopsFormDhtmlTextArea(_AM_CONTENT, 'bcontent', $block['content'], 15, 70);
}
function getContent($format = 'S', $c_type = 'T')
{
switch ($format) {
case 'S':
if ($c_type == 'H') {
return str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'N'));
} else if ($c_type == 'P') {
ob_start();
echo eval($this->getVar('content', 'N'));
$content = ob_get_contents();
ob_end_clean();
return str_replace('{X_SITEURL}', XOOPS_URL . '/', $content);
} else if ($c_type == 'S') {
$myts =& MyTextSanitizer::getInstance();
$content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'N'));
return $myts->displayTarea($content, 0, 1);
} else {
$myts =& MyTextSanitizer::getInstance();
$content = str_replace('{X_SITEURL}', XOOPS_URL . '/', $this->getVar('content', 'N'));
return $myts->displayTarea($content, 0, 0);
}
break;
case 'E':
return $this->getVar('content', 'E');
break;
default:
return $this->getVar('content', 'N');
break;
}
}