在表document_message中添加一个字段 tel
找到文件interface->messmain.php文件里的in_save方法,将这个字段表达上去,代码如下
$tel = trim($this->fun->accept('tel', 'P', true, true)); 97行
$tel = $this->fun->substr($tel, 20); 98行
$db_field = 'did,userid,adminid,ipadd,lng,name,tel,email,content,recontent,isreply,isclass,addtime,retime,support,oppose'; 144行
$db_values = "$did,$userid,0,'$ipadd','$lng','$name','$tel','$email','$content','',0,$isclass,$addtime,0,0,0"; 145行
在后台显示添加的字段,找到article->article_message_edit.html模版,添加以下几行
<tr class="trstyle2">
<td class="trtitle01">留言电话</td>
<td class="trtitle02">[%$read.tel%]</td>
</tr>
<tr class="trstyle2">
<td class="trtitle01">留言邮箱</td>
<td class="trtitle02">[%$read.email%]</td>
</tr>
在后台添加邮件模板,找到include->inc_replace_mailtemplates.php,添加以下几行
$replacemail['maildocbbs'][] = array(name => '电话', title => '[%d_tel%]', content => $read['tel']);