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

前端之家收集整理的这篇文章主要介绍了帝国cms前台会员发送消息使用编辑器的方法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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

1、修改文件 etemplatememberAddMsg.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、修改文件 etemplatememberViewMSg.PHP

找到 nl2br(stripSlashes($r[msgtext])) 换成如下代码

nl2br(stripSlashes(htmlspecialchars_decode($r[msgtext])))

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

猜你在找的帝国CMS相关文章