当前位置:首页>软件工具>PbootCMS手册>留言板

留言板

适用范围:全站任意地方均可使用

标签作用:用于用户提交留言和调取留言记录

1、留言提交表单

<form action="{pboot:msgaction}"  method="post">

    联系人:<input type="text" name="contacts" >

    手机:<input type="text" name="mobile" >

    内容:<input type="text" name="content" >

    验证码:<input type="text" name="checkcode" ><img   title="点击刷新"  src="{pboot:checkcode}" onclick="this.src='{pboot:checkcode}?'+Math.round(Math.random()*10);" />

    <button type="submit">提交</button>

</form>

表单提交方式为post,表单中提交的字段名称需要与后台自定义表单中添加的字段一致,否则会导致提交失败。

需要更多字段时请在后台自定义表单中新增留言表单字段,然后再在前台新增form字段.

标签说明:
{pboot:msgaction} 为留言表单接收地址
{pboot:checkcode} 为验证码图片地址

2、留言记录列表

{pboot:message num=*}

    <p>[message:contacts]</p>

    <p>[message:content]</p>

{/pboot:message}

调取的留言记录默认执行分页,使用内容列表的分页代码即可.

内容隐私,使用截取功能: [message:mobile substr=1,3]****[message:mobile substr=8]  输出效果:187****6563

控制参数:
num=* 数量,非必填,为调取的留言分页大小
page=* 是否分页1或0,非必填,用于关闭分页
lg=* 调取指定语言留言,非必填,设置all则所有语言,不添加该参数则默认为当前语言(V1.3.7+)

3、留言记录列表可用标签

[message:n]序号从0开始
[message:i]序号从1开始
[message:contacts]联系人
[message:mobile]手机
[message:content]内容
[message:recontent]回复内容
[message:ip]用户IP
[message:os]用户操作系统
[message:bs]用户浏览器
[message:askdate]留言时间
[message:replydate]回复时间
[message:***]自定义的其它字段
[message:nickname]会员昵称(V3.0+)
[message:username]会员账号(V3.0+)
[message:headpic]会员头像(V3.0+)


交流学习

加入VIP即可下载全部模板;2天更新1套模板

年VIP:199元(金牌)

终身VIP:299元(钻石)

  • QQ号

    Q:125419069

  • QQ号

    Q群:125419069

  • 添加微信客服

    微信客服

热门标签
 
Q:2935517386