作者:未知
修改方法:
一、、打开根目录下的register.php文件
1、查找:在后面加入代码:- if($newqq == '' || !preg_match('/^\d{5,11}$/', $newqq)) {
- showmessage('profile_qq_illegal');
- }
- if(!($newgender == '1' || $newgender == '2')) {
- showmessage('profile_gendernew_invalid');
- }
- if($bday == '') {
- showmessage('profile_bday_illegal');
- }
复制代码 2、继续查找代码:- $db->query("INSERT INTO {$tablepre}members (uid, username, password, secques, adminid, groupid, regip, regdate, lastvisit, lastactivity, posts, credits, extcredits1, extcredits2, extcredits3, extcredits4, extcredits5, extcredits6, extcredits7, extcredits8, email, showemail, timeoffset, pmsound, invisible, newsletter)
- VALUES ('$uid', '$username', '$password', '$secques', '0', '$groupinfo[groupid]', '$onlineip', '$timestamp', '$timestamp', '$timestamp', '0', $initcredits, '$email', '0', '9999', '1', '0', '1')");
- $db->query("REPLACE INTO {$tablepre}memberfields (uid, authstr $fieldadd1) VALUES ('$uid', '$authstr' $fieldadd2)");
复制代码 替换为:- $db->query("INSERT INTO {$tablepre}members (uid, username, password, secques, adminid, groupid, regip, regdate, lastvisit, lastactivity, posts, credits, extcredits1, extcredits2, extcredits3, extcredits4, extcredits5, extcredits6, extcredits7, extcredits8, email, showemail, timeoffset, pmsound, invisible, newsletter, gender, bday)
- VALUES ('$uid', '$username', '$password', '$secques', '0', '$groupinfo[groupid]', '$onlineip', '$timestamp', '$timestamp', '$timestamp', '0', $initcredits, '$email', '0', '9999', '1', '0', '1', '$newgender', '$bday')");
- $db->query("REPLACE INTO {$tablepre}memberfields (uid, qq, authstr $fieldadd1) VALUES ('$uid', '$newqq', '$authstr' $fieldadd2)");
复制代码 二、打开templates/default/message.lang.php文件
查找:- 'profile_passwd_illegal' => '密码空或包含非法字符',
复制代码 在后面加入代码:- //以下为修改QQ生日性别(弹出未填写提示)
- 'profile_qq_illegal' => 'QQ号码未填写或填写有误,请返回重新填写。',
- 'profile_bday_illegal' => '生日未填写,请返回重新填写。',
- 'profile_gendernew_invalid' => '您没有选择性别,请返回选择。',
- //以上为修改QQ生日性别(弹出未填写提示)
复制代码 三、打开templates/default/register.htm文件
查找:- <input type="text" name="field_$field[fieldid]new" size="25" value="$member['field_'.$field[fieldid]]" tabindex="1" class="txt" />
- <!--{/if}--> *
- </label>
- <!--{/loop}-->
复制代码 在后面加入代码:- <label><em>QQ:</em><input type="text" id="newqq" name="newqq" autocomplete="off" size="25" maxlength="15" value="" tabindex="1" class="txt" /> *</label>
- <label><em>性别:</em><input type="radio" name="newgender" value="1" tabindex="17" /> {lang male} <input type="radio" name="newgender" value="2" tabindex="1" /> {lang female} <font color="#006699"> 请选择性别</font> *</label>
- <script type="text/javascript" src="include/js/calendar.js?{VERHASH}"></script>
- <label><em>生日:</em><input type="text" id="bday" name="bday" size="25" value="" onclick="InFloat='floatlayout_register';showcalendar(event, this, true)"" tabindex="1" class="txt" /> *</label>
复制代码 四、后台更新缓存,OK! |