Nov
24

ecshop后台生成多个FCK编辑框     2009

 11:29    1218    0   noel Ecshop/Ecmall/Smarty 不指定 | |
修改 文件路径: 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} //模板替换

作者:noel@淘宝网女装新款秋装连衣裙裤子外套上衣_2012时尚女装新款 Ecmall二次开发-PHP技术
地址:http://www.laohucheng.com/post/402/
版权所有©转载时必须以链接形式注明作者和原始出处及本声明!

Tags: 引用(0)
发表评论
昵称 [注册]
密码 游客无需密码
网址
电邮
打开HTML 打开UBB 打开表情 隐藏 记住我