如何把注册时的选填内容设为必填
有部分插件需要填制会员的性别或生日或住址,可以把注册时的选填内容改为必填内容.修改register.php文件
找到:
必須填上性別:
在
[code]
if(!isemail($email)) {
showmessage('profile_email_illegal');
}
[/code]
下加上:
[code]
if($gender = '0') {
showmessage('请你必须填上性别');
}
[/code]
必須填上地址:
在
[code]
if(!isemail($email)) {
showmessage('profile_email_illegal');
}
[/code]
下加上:
[code]
if($location = '') {
showmessage('请你必须填上地址');
}
[/code]
必须填上生日
在
[code]
if(!isemail($email)) {
showmessage('profile_email_illegal');
}
[/code]
下加上:
[code]
if( $year == '' || $month == '' || $day == '' ){
showmessage("请填写完整的生日信息!");
}
[/code]
然后再修改templates/default/register.htm模板文件的位置就OK了
页:
[1]