帝国cms留言板功能如何使用
留言板功能如何使用,爱折腾的摄影大叔在建自己的博客站时, 用到了 帝国cms自带的留言功能。留言板使用
这里记录一下,具体步骤如下:
第一步:在需要页面需要的调用区域输入表单,css样式根据自己的网站风格设定;
表单如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
<form action= "[!--news.url--]e/enews/index.php" method= "post" name= "form1" id= "form1" class = "contact-form" > <fieldset class = "col-md-4 col-sm-6 col-xs-12" > <input type= "text" id= "name" name= "name" placeholder= "昵称" > </fieldset> <fieldset class = "col-md-4 col-sm-6 col-xs-12" > <input type= "email" id= "email" name= "email" placeholder= "邮箱" > </fieldset> <fieldset class = "col-md-4 col-sm-12 col-xs-12" style= " position: relative;" > <input type= "text" id= "subject" name= "key" placeholder= "验证码" > <img src= "[!--news.url--]e/ShowKey/?v=gbook" onclick= "this.src= this.src +'&xx='+Math.random()" alt= "看不清楚,点击刷新" style= "position: absolute;top: 2px;right: 16px;" > //验证码区域 </fieldset> <fieldset class = "col-md-12 col-sm-12 col-xs-12" > <textarea name= "lytext" id= "message" cols= "30" rows= "6" placeholder= "想说的话……" ></textarea> </fieldset> <fieldset class = "col-md-12 col-sm-12 col-xs-12" > <input type= "submit" class = "button default" value= "发送给" > </fieldset> <input name= "enews" type= "hidden" id= "enews" value= "AddGbook" > <input type= "hidden" name= "bid" value= "1" > <input type= "hidden" name= "ecmsfrom" value= "[!--news.url--]about/" > </form> |
帝国cms后台—系统—系统参数设置—留言板(开启)
第三步:验证码管理
1:帝国cms后台—系统—系统参数设置—信息设置—留言验证码勾选(开启 )
2:帝国cms后台—系统—系统参数设置—验证码配色
3:验证码图片大小设置
找到:/e/ShowKey/index.php
约第78行或搜索:
//显示验证码 function ShowKey($v)找到:
$img=imagecreate(47,20); 中的数字(47,20)这两个数字 和后面三个地方的(47,20)
说明:(47,20)这里的数字和自己设置有关,不是一样的。
第四步:找到公共模板—留言模板(修改留言板模板)
第五步:设置留言权限
1、登录后台,单击“插件”菜单,选择“管理留言”子菜单,进入管理留言界面:
至此;留言板功能开启设置完成!