禁止會員自行修改生日 For DZ 6.1
原帖來源:
http://forest.oxyhost.com/viewthread.php?tid=155
演示:
http://forest.oxyhost.com
作者:Chienlin
歡迎轉貼 但請一字不漏
templates\default\memcp_profile.php
搜尋
複製內容到剪貼板
代碼:
<tr>
<th><label for="bdaynew">{lang birthday}</label></th>
<td><input type="text" name="bdaynew" id="bdaynew" size="25" onclick="showcalendar(event, this)" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" value="$member[bday]" /></td>
</tr>更改為
複製內容到剪貼板
代碼:
<tr>
<th><label for="bdaynew">{lang birthday}</label></th>
<!--{if $member[bday]== 0000-00-00}-->
<td><input type="text" name="bdaynew" id="bdaynew" size="25" onclick="showcalendar(event, this)" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" value="$member[bday]" /></td>
<!--{else}-->
<td><input type="text" name="bdaynew" id="bdaynew" size="25" value="$member[bday]" READONLY /></td>
<!--{/if}-->
</tr>templates\default\templates.lang
搜尋
複製內容到剪貼板
代碼:
'birthday' => '生日',更改為
複製內容到剪貼板
代碼:
'birthday' => '生日(無法修改)',此方法並不強迫會員在註冊時輸入生日,但需要用到生日的時候,僅能修改一次,爾後僅能看,不能自行修改
轉載請註明出自黑森林傳說
http://forest.oxyhost.com/
本帖地址:
http://forest.oxyhost.com/viewthread.php?tid=155