第一步:修改这个文件module\member\member.class.php
找到以下代码
if($groupid > 5) {
if(strlen($member['company']) < 2) return $this->_($L['member_company_null']);
if(preg_match("/[0-9]+/", $member['company']) || !$this->is_clean($member['company'])) return $this->_($L['member_company_bad']);
if($this->company_exists($member['company'])) return $this->_($L['member_company_reg']);
}
if($this->userid) {
$areaid = intval($member['areaid']);
if(!$areaid || !$this->db->get_one("SELECt areaid FROM {$this->db->pre}area WHERe areaid=$areaid")) return $this->_($L['member_areaid_null']);
if($member['password'] && !$this->is_password($member['password'], $member['cpassword'])) return false;
if($member['payword'] && !$this->is_payword($member['payword'], $member['cpayword'])) return false;
if($member['groupid'] > 5) {
if(strlen($member['type']) < 2) return $this->_($L['member_type_null']);
if(!preg_match("/^[0-9\-]{6,}$/", $member['telephone'])) return $this->_($L['member_telephone_null']);
if(strlen($member['regyear']) != 4 || !is_numeric($member['regyear'])) return $this->_($L['member_regyear_null']);
if(empty($member['address'])) return $this->_($L['member_address_null']);
if(word_count($member['content']) < 5) return $this->_($L['member_introduce_null']);
if(!$member['business']) return $this->_($L['member_business_null']);
if(strlen($member['catid']) < 2) return $this->_($L['member_catid_null']);
}
可以注销掉相应的添加代码,例如:if(strlen($member['type']) < 2) return $this->_($L['member_type_null']);这个注销掉公司类型
第二步:修改这个文件\template\default\member\register.htm
去掉模版中的,添加项。
去掉JS代码中:
if(Dd('g_5').checked == false) {
f = 'company';
if(Dd(f).value == '') {
err_msg('请填写公司名称', f);
Df(f);
return false;
}
if(Dd('d'+f).innerHTML.indexOf('error') != -1) {
Df(f);
return false;
}
if(Dd('type').value == '') {
Dmsg('请选择公司类型', 'type');
return false;
}
f = 'telephone';
if(Dd(f).value.length < 7) {
err_msg('请填写公司电话', f);
Df(f);
return false;
}
}
相应的添加项取消就行,例如去掉公司类型:
if(Dd('type').value == '') {
Dmsg('请选择公司类型', 'type');
return false;
}