易仿帝国yfdiguo.com

您当前的位置:首页 > 问题库

帝国CMS前台发送消息使用编辑器的方法

zcmcss发表于2017-12-11问题库
1、修改 e/template/member/AddMsg.php 文件
找到
require(ECMS_PATH.'e/template/incfile/header.php');
在其下添加如下代码:
include('../../../data/ecmseditor/infoeditor/fckeditor.php');
找到默认的文本框代码
<textarea name="msgtext" cols="60" rows="12" id="textarea"> <?=ehtmlspecialchars(stripSlashes($msgtext))?></textarea>
将其删除,换成以下代码:
<?=ECMS_ShowEditorVar("msgtext",stripSlashes($r[newstext]),"Default","../../../data/ecmseditor/infoeditor/","300","100%")?>

2、修改 e/template/member/ViewMSg.php 文件
找到
nl2br(stripSlashes($r[msgtext]))
换成如下代码:
nl2br(stripSlashes(htmlspecialchars_decode($r[msgtext])))

提示:这种方法可以调用编辑器,但编辑器的更多高级功能是无法使用的,比如图片、附件。另外,在其它地方使用编辑器,也可以参考此修改方法。

热门问题

©2017 易仿帝国yfdiguo.com


友情链接: 阿里云优惠网| 阿里云推荐码| 阿里云教程| 莫愁博客|
♥ www.yfdiguo.com
联系作者QQ: