ecshop后台生成多个FCK编辑框
修改 文件路径: admin/includes/lib_main.php
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$editor = new FCKeditor($input_name);
$editor->BasePath = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width = '100%';
$editor->Height = '320';
$editor->Value = $input_value;
$FCKeditor = $editor->CreateHtml();
$smarty->assign('FCKeditor', $FCKeditor);
}
//修改 成
function create_html_editor($input_name, $input_value = '', $add=false)
{
global $smarty;
$editor = new FCKeditor($input_name);
$editor->BasePath = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width = '100%';
$editor->Height = '320';
$editor->Value = $input_value;
$FCKeditor = $editor->CreateHtml();
if ($add) {
$smarty->assign('FCKeditor_'.$input_name, $FCKeditor);
}
else{
$smarty->assign('FCKeditor', $FCKeditor);
}
}
主要是 :create_html_editor 把值定死了
使用范例:
create_html_editor(‘editor’, $goods['editor'], true); //生成编辑框
{$FCKeditor_editor} //模板替换
下一篇: kilu.de的帐号被删除了