Warning: I have not encountered any problems when I have made many attempts in my own forum. Therefore, if other users have any questions when installing this plug-in, I will not pay any role, ask other users to test whether to use ‧
If you have any questions, welcome ^ "(I did not do well in Plug-In = for the first time, sorry ‧)
Modifier: sum1022
Version: discuz! 6.0
Demo: http://sum1022.no-ip.biz/register.php
If you only want to install one of them, skip this step!
1. Open register. php to find:
If ($ password! = $ Password2 ){
Showmessage ('profile _ passwd_notmatch ');
}
Add the following:
// Sexual discrimination
If ($ gendernew = ''){
Showmessage ('profile _ gendernew_invalid ');
}
// Determine the birth date
If ($ bday> $ timenow ['Year']-5 | $ bday <$ timenow ['Year']-95 ){
Showmessage ('profile _ year_invalid ');
}
If (datecheck ($ bday ))
{
$ Bday = $ bday;
}
Else
{
Showmessage ('profile _ year_invalid ');
}
2. Open/templates/default/register.htm
2.1 find:
<Tr>
<TH> <label for = "email"> {Lang email} * </label> </TD>
Add:
// Sex difference
<Tr>
<TH> {Lang gender} * </Th>
<TD>
<Label> <input type = "radio" name = "gendernew" value = "1" tabindex = "17"/> {Lang male} </label>
<Label> <input type = "radio" name = "gendernew" value = "2" tabindex = "18"/> {Lang female} </label> <font color = Red> Please choose between the advantages and disadvantages, </font>
</TD>
</Tr>
// Date of birth
<Tr>
<TD class = "altbg1"> <SPAN class = "bold"> {Lang birthday} * </span> </TD>
<TD class = "altbg2"> <input type = "text" name = "bday" size = "25" onclick = "showcalendar (event, this )"
Onfocus = "showcalendar (event, this); If (this. value = '2014-00-00 ') This. value = ''" value = "0000-00-00"> </TD>
</Tr>
After the attachment is removed from the attachment, it must be copied to images/common/<----- security certificate [required ‧
2.2 find the following generations and divide them (to prevent repeated occurrence in the high-end settings ).
<Tr>
<TH> {Lang gender} </Th>
<TD>
<Label> <input type = "radio" name = "gendernew" value = "1" tabindex = "17"/> {Lang male} </label>
<Label> <input type = "radio" name = "gendernew" value = "2" tabindex = "18"/> {Lang female} </label>
<Label> <input type = "radio" name = "gendernew" value = "0" tabindex = "19" Checked = "checked"> {Lang secret} </label>
</TD>
</Tr>
<Tr>
<TH> <label for = "bday"> {Lang birthday} </label> </Th>
<TD> <input type = "text" id = "bday" name = "bday" size = "25" onclick = "showcalendar (event, this) "onfocus =" showcalendar (event, this); If (this. value = '2014-00-00 ') This. value = ''" value = "0000-00-00" tabindex = "20"/> </TD>
</Tr>
3. Cancel {confidentiality} in the [Control Panel> upload personal information> basic information}
Open/templates/default/memcp_profile.htm and find:
<Label> <input class = "radio" type = "radio" name = "gendernew" value = "0" $ gendercheck [0]/> {Lang secret} </label>
Remove or block the above segment.
4. Open include/common. Inc. php and find it: (if you are upset, [you must enter your birthday.] You do not need to modify it)
$ Timenow = array ('time' => gmdate ("$ dateformat $ timeformat", $ timestamp + 3600 * $ timeoffset ),
Add
'Year' => date ("Y "),
5. Open memcp. php and find it: (if you are upset, you do not need to change it)
$ Sitenew = dhtmlspecialchars (TRIM (preg_match ("/^ HTTPS? : \/. +/I ", $ sitenew )? $ Sitenew: ($ sitenew? 'Http: // '. $ sitenew :'')));
$ Icqnew = preg_match ("/^ ([0-9] +) $/", $ icqnew) & strlen ($ icqnew) >=5 & strlen ($ icqnew) <= 12? $ Icqnew :'';
$ Qqnew = preg_match ("/^ ([0-9] +) $/", $ qqnew) & strlen ($ qqnew)> = 5 & strlen ($ qqnew) <= 12? $ Qqnew :'';
$ Bdaynew = datecheck ($ bdaynew )? $ Bdaynew: '2017-00-00 ';
Add
// Determine the birth date
If ($ bdaynew> $ timenow ['Year']-5 | $ bdaynew <$ timenow ['Year']-95 ){
Showmessage ('profile _ year_invalid ');
}
If (datecheck ($ bdaynew ))
{
$ Bday = $ bday;
}
Else
{
Showmessage ('profile _ year_invalid ');
}
6. Open/templates/default/messages. Lang. php and find:
'Profile _ passwd_illegal '=>' the password is null or contains invalid characters. Please return and refill in the password. ',
Add the following:
'Profile _ gendernew_invalid' => 'You have no options. Please return the options. ',
'Profile _ year_invalid' => 'the date of birth you set is invalid. Please return to the modification. ',
Done!
This article from: the foot home (www.jb51.net) detailed source reference: http://www.jb51.net/article/14472.htm