帝国CMS7.5整合百度Eeditor 1.4.3编辑器教程(修改版)

很多人不喜欢使用帝国CMS自带的后台文章发布编辑器,因为功能太少且很多地方有问题,最近大家升级帝国CMS7.5之后,又开始纷纷求助如何整合百度编辑器1.4.3版本,小编也有强迫症,将帝国CMS7.5整合了ueditor 1.4.3百度编辑器 UTF-8版本,下面将教程和自己修改优化过的百度编辑器ueditor 1.4.3分享给大家!

方法步骤:

帝国cms7.5整合Ueditor1.4.3编辑器优化版使用说明:

1、请直接解压e目录的覆盖网站根目录下的e目录文件
备注:如果修改过后台默认admin目录的自行替换对应的文件。

2、编辑器后台使用的图片上传路径…等默认为相对路径,如果有多端的用户,希望使用绝对路径,请修改\e\extend\ueditor\php\config.json 文件下的”imageUrlPrefix”: “你的网址”,
并且修改controller.php文件,将85行的://$CONFIG[‘imageUrlPrefix’]=$public_r[‘fileurl’]; 前面的两个注释符 // 去掉保存即可。

3、登录帝国CMS后台,单击“系统”-“数据表与系统模型”-“管理数据表”-在你使用的系统数据表点击“管理字段”(默认是新闻系统数据表,小编使用的是文章系统数据表,所以就修改文章系统数据表的“管理字段”)-“修改newstext字段”下面的“输入表单替换html代码(增加字段时请留空)”
复制粘贴以下代码提交即可:

<?php
$ziduan=’newstext’;//编辑器使用的字段名称
if($enews==’MAddInfo’ || $enews==’MEditInfo’){//前台投稿
$qiantai=1;
$ziduanzhi=$ecmsfirstpost==1?””:DoReqValue($mid,$ziduan,stripSlashes($r[$ziduan]));
}else{//后台
$qiantai=0;
$ziduanzhi=$ecmsfirstpost==1?””:stripSlashes($r[$ziduan]);
}
?>
<script>var classid='<?=$classid?>’,infoid='<?=$id?>’,filepass='<?=$filepass?>’,ehash='<?=$ecms_hashur[ehref]?>’,qiantai='<?=$qiantai?>’;//把参数传给编辑器,增加支持7.2版本的金刚模式</script>
<script type=”text/javascript” charset=”utf-8″ src=”<?=$public_r[‘newsurl’]?>e/extend/ueditor/ueditor.config.js”></script>
<script type=”text/javascript” charset=”utf-8″ src=”<?=$public_r[‘newsurl’]?>e/extend/ueditor/ueditor.all.min.js”></script>
<script type=”text/javascript” charset=”utf-8″ src=”<?=$public_r[‘newsurl’]?>e/extend/ueditor/ueditor.toolbarconfig.js”></script>
<textarea id=”<?=$ziduan?>” name=”<?=$ziduan?>”><?=$ziduanzhi?></textarea>
<script type=”text/javascript”>
<?=$ziduan?>=UE.getEditor(‘<?=$ziduan?>’,{
serverUrl: “<?=$public_r[‘newsurl’]?>e/extend/ueditor/php/controller.php”,//自己的请求接口
toolbars:Default,//工具栏配置文件,具体参考ueditor.toolbarconfig.js文件中说明
pageBreakTag:”,//帝国分页标签
initialFrameWidth:’100%’,//编辑器宽
initialFrameHeight:300//编辑器高
//等等其它配置自行添加,参考UE默认配置文件复制修改即可
});
//自定义请求参数
<?=$ziduan?>.ready(function(){
<?=$ziduan?>.execCommand(‘serverparam’,{
‘filepass’:'<?=$filepass?>’,//修改时候是信息ID
‘classid’ :'<?=$classid?>’,
‘qiantai’:<?=$qiantai?>
});
});
</script>
<table width=”100%” border=”0″ cellpadding=”3″ cellspacing=”1″ bgcolor=”#DBEAF5″>
<tr height=”25″>
<td bgcolor=”#FFFFFF”> <input name=”dokey” type=”checkbox” value=”1″<?=$r[dokey]==1?’ checked’:”?>>
关键字替换&nbsp;&nbsp; <input name=”copyimg” type=”checkbox” id=”copyimg” value=”1″>
远程保存图片(
<input name=”mark” type=”checkbox” id=”mark” value=”1″>
<a href=”SetEnews.php” target=”_blank”>加水印</a>)&nbsp;&nbsp;
<input name=”copyflash” type=”checkbox” id=”copyflash” value=”1″>
远程保存FLASH(地址前缀:
<input name=”qz_url” type=”text” id=”qz_url” size=””>
)</td>
</tr>
<tr height=”25″>
<td bgcolor=”#FFFFFF”><input name=”repimgnexturl” type=”checkbox” id=”repimgnexturl” value=”1″> 图片链接转为下一页&nbsp;&nbsp; <input name=”autopage” type=”checkbox” id=”autopage” value=”1″>自动分页
,每
<input name=”autosize” type=”text” id=”autosize” value=”5000″ size=”5″>
个字节为一页&nbsp;&nbsp; 取第
<input name=”getfirsttitlepic” type=”text” id=”getfirsttitlepic” value=”” size=”1″>
张上传图为标题图片(
<input name=”getfirsttitlespic” type=”checkbox” id=”getfirsttitlespic” value=”1″>
缩略图: 宽
<input name=”getfirsttitlespicw” type=”text” id=”getfirsttitlespicw” size=”3″ value=”<?=$public_r[spicwidth]?>”>
*高
<input name=”getfirsttitlespich” type=”text” id=”getfirsttitlespich” size=”3″ value=”<?=$public_r[spicheight]?>”>
)</td>
</tr>
</table>

为您推荐

发表评论

电子邮件地址不会被公开。 必填项已用*标注

12条评论

  1. You actually make it appear so easy along with your presentation but
    I find this topic to be really something that
    I feel I’d by no means understand. It sort of feels too
    complicated and very huge for me. I’m taking a look ahead in your subsequent publish, I will try to get the grasp of it!

  2. I do not know whether it’s just me or if everybody else encountering
    problems with your blog. It appears as though some of the written text within your posts
    are running off the screen. Can somebody else please comment and let me know if this is happening to them
    too? This might be a problem with my web browser because I’ve had this happen before.

    Many thanks

  3. obviously like your web site but you have to test
    the spelling on several of your posts. A number of them are
    rife with spelling issues and I in finding it very troublesome to inform the reality nevertheless I’ll definitely come back again.

  4. Ciao! lzf.me

    We propose

    Sending your message through the Contact us form which can be found on the sites in the Communication partition. Feedback forms are filled in by our application and the captcha is solved. The advantage of this method is that messages sent through feedback forms are whitelisted. This method improve the chances that your message will be open.

    Our database contains more than 25 million sites around the world to which we can send your message.

    The cost of one million messages 49 USD

    FREE TEST mailing of 50,000 messages to any country of your choice.

    This message is automatically generated to use our contacts for communication.

    Contact us.
    Telegram – @FeedbackFormEU
    Skype FeedbackForm2019
    Email – FeedbackForm@make-success.com

  5. I do not know whether it’s just me or if everyone else encountering problems
    with your blog. It seems like some of the text within your
    content are running off the screen. Can someone else please comment and let me know if this is happening to them too?

    This may be a issue with my web browser because I’ve had this happen previously.
    Thanks