帝国cms更换eshoweditor编辑器方法

图片[1]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流

eshoweditor编辑器可以直接使用文档的图片,从本地电脑复制内容到帝国cms后台后图片就自动加载了,特别适合政府学校类编辑人员,他们有大量的文档图,换成eshoweditor编辑器可以减少工作量。购买eshoweditor编辑器后,还需要在帝国cms文件里修改一下代码,下面是青青模板网整理的解决方法,供大家学习参考:

图片[2]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流

只需要修改公用调用的地方,也就是e/admin/ecmseditor/eshoweditor.php 这个文件里的代码

图片[3]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流

图片[4]-帝国cms更换eshoweditor编辑器方法-HostJL-VPS主机交流

注释的是原来的,下面是改后的。

完整代码:

<?php
 
//变量名,变量值,工具条模式,编辑器目录,高度,宽度,全页
function ECMS_ShowEditorVar($varname,$varvalue,$toolbar='full',$basepath='',$height='300',$width='100%',$fullpage=0){
    global $eshoweditorhtml;
    $toolbar=strtolower($toolbar);
    if($varvalue)
    {
        $varvalue=ehtmlspecialchars($varvalue);
    }
    if(empty($basepath))
    {
        $basepath='ecmseditor/infoeditor/';
    }
    if(empty($height))
    {
        $height='300';
    }
    if(empty($width))
    {
        $width='100%';
    }
    $editorvars='';
    if($fullpage==1)
    {
        $editorvars.="fullPage:true, ";
    }
    if($toolbar=='basic')
    {
        $editorvars.="toolbar:'basic', ";
    }
    if($eshoweditorhtml)
    {
        $editorvars.="startupMode:'source', ";
    }
    $editorvars.="width:'".$width."', height:'".$height."'";
 
//    $echoeditor="
//CKEDITOR.replace('".$varname."',
//{
//     ".$editorvars."
//});";
 
    $echoeditor="
EWEBEDITOR.Replace('".$varname."',{style:'coolblue', width:'".$width."', height:'".$height."'});
";
 
    return $echoeditor;
}
 
//返回加载JS文件
function ECMS_ShowEditorJS($basepath=''){
    if(empty($basepath))
    {
        $basepath='ecmseditor/infoeditor/';
    }
    $addcs=ECMS_ReturnEditorCx();
 
    //$loadjs=' ';
    $loadjs=' ';
 
    return $loadjs;
}
 
//附加参数
function ECMS_ReturnEditorCx(){
    global $classid,$filepass,$id,$r,$enews,$ecms_hashur;
    if($enews=='AddClass'||$enews=='EditClass')
    {
        $modtype=1;
    }
    elseif($enews=='AddZt'||$enews=='EditZt')
    {
        $modtype=2;
    }
    else
    {
        $modtype=0;
    }
    $classid=(int)$classid;
    $filepass=(int)$filepass;
    $id=(int)$id;
    $modtype=(int)$modtype;
    $str="&classid=$classid&filepass=$filepass&infoid=$id&modtype=$modtype&sinfo=1".$ecms_hashur['ehref'];
    return $str;
}
 
//上传提示
function ECMS_PTEditorShowError($type,$error,$showstr,$add,$ecms=0){
?>



以上就是关于帝国cms使用教程中"帝国cms更换eshoweditor编辑器方法"的全部内容,如果有遇到帝国cms使用教程其他问题的,可以在评论留言,或者加微信咨询。

© 版权声明
THE END
喜欢就支持一下吧
点赞12 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容