phpcms留言板功能的实现



phpcms如何实现留言板功能?


1. 留言板插件下载 及 使用说明:

更多功能,大家看下源代码进行修改。


2. 解压并安装

注意:后台的路径导航。

这里写图片描述


3. 代码调用教程

教程地址:查看教程


4. 参考代码1:(附图)

这里写图片描述

//直接拷贝代码到指定页面调用即可!
<form action="http://localhost/index.php?m=guestbook&amp;c=index&amp;a=register&amp;siteid=1" method="post" name="myform" id="myform">
	<table cellspacing="1" cellpadding="0" class="table_form" width="960px">
		<tbody>
			<tr> 
				<th>姓  名:</th>
				<td><input type="text" value="" id="name" name="name" class="input-text" onkeyup="value=" oblog="" value.replace(="" [^\u4e00-\u9fa5]="" g,'')=""><div id="nameTip" class="onShow">请输入姓名</div></td>
			</tr>
			<tr> 
				<th>性  别:</th>
				<td><input type="radio" value="" name="sex" checked="checked"><input type="radio" value="" name="sex"></td>
			</tr>
			<tr> 
				<th>联 系QQ:</th>
				<td><input type="text" size="40" value="" name="lxqq" id="lxqq" class="input-text"><div id="lxqqTip" class="onShow">请输入QQ号码</div></td>
			</tr>
			<tr>
				<th>电子邮箱:</th>
				<td><input type="text" size="40" value="" name="email" id="email" class="input-text"><div id="emailTip" class="onShow">请输入电子邮箱</div></td>
			</tr>
			<tr>
				<th>手  机:</th>
				<td><input type="text" size="40" value="" name="shouji" id="shouji" class="input-text"><div id="shoujiTip" class="onShow">请输入手机</div></td>
			</tr>
			<tr> 
				<th>所属分类:</th>
				<td width="300">
					<select style="width: 36%;" id="typeid" name="typeid">
						<option value="0">默认分类</option>
					</select>
				</td>
			</tr>
	
			<tr>
				<th>填写留言:</th>
				<td><textarea name="introduce" cols="40" rows="5" class="input-text" id="introduce" style="width:500px;height:70px;"></textarea><div id="introduceTip" class="onShow">请输入留言内容</div></td>
			</tr>
			<tr> 
				<th></th>
				<td><input type="submit" value=" 提 交 " name="dosubmit" class="button">  <input type="reset" value=" 取 消 " name="reset" class="button"> </td>
			</tr> 
		</tbody>
	</table>
</form>


5. 参考代码2:(附图)

这里写图片描述

//直接拷贝代码到指定页面调用即可!
<!--留言板编辑-->
			<div id="messageboard">
				<form  action="{APP_PATH}index.php?m=guestbook&c=index&a=register&siteid={$siteid}" method="post" name="myform" id="myform">
					<div class="messagebox">
						<textarea id="text" name="introduce" placeholder="写下您的问题"></textarea>
					</div>
					<ul class="messageInput">
						<li><input type="text" class="inptxt" name="shouji" placeholder="联系方式"/><span class="bg1"></span></li>
						<li><input type="text" class="inptxt" name="name" placeholder="您的称呼"/><span class="bg2"></span></li>
						<li style="display: none;"><input type="text" class="inptxt" name="email" placeholder="e-mail" value=" " size="40"></li>
						<li style="display: none;"><input type="text" class="inptxt" name="lxqq" placeholder="QQ" value=" " size="40"></li>
						<li><button type="submit" id="submit" name="dosubmit">提交留言</button></li>
					</ul>

				</form> 
			</div>
			

6. 后台接收留言界面,效果图对比

参考代码1和参考代码2对比


7. 接收成功之后,跳转到页面截图

这里写图片描述

如果自定义跳转页,可找出文件www/phpcms/modules/gustbook/index.php,修改内部的源码。

修改方法请参考教程:“ phpcms留言添加成功之后,跳转到上一页面 ”


8. 留言提交之后,如何返回到当前页面?

9. 留言板模块 - 开发者信息

截图查看如下:
在这里插入图片描述

文件位置:www/phpcms/modules/gusebook/install/config.inc.php
如上图所示的对应URL位置。


附件

以上就是关于“ phpcms留言板功能的实现 ” 的全部内容。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值