|
以限制用户名长度为2-8字符之间为例:
论坛根目录下的 register.php中查找
引用:
if(strlen($username) < 3) { showmessage(\'profile_username_tooshort\'); } if(strlen($username) > 15) { showmessage(\'profile_username_toolong\'); } 改为:
引用:
if(strlen($username) < 2) { showmessage(\'profile_username_tooshort\'); } if(strlen($username) > 8) { showmessage(\'profile_username_toolong\'); } 修改模版文件 register.htm查找
引用:
if(unlen < 3 || unlen > 15) { warning(cu, unlen < 2 ? profile_username_tooshort : profile_username_toolong); 改为:
引用:
if(unlen < 2 || unlen > 8) { warning(cu, unlen < 2 ? profile_username_tooshort : profile_username_toolong); 查找:
改为:
修改模版文件 templates.lang.php 查找
引用:
\'register_profile_username_toolong\' => \'对不起,您的用户名超过 15 个字符,请输入一个较短的用户名。\', \'register_profile_profile_username_tooshort\' => \'对不起,您输入的用户名小于3个字符, 请输入一个较长的用户名。\', 改为:
引用:
\'register_profile_username_toolong\' => \'对不起,您的用户名超过 8 个字符,请输入一个较短的用户名。\', \'register_profile_profile_username_tooshort\' => \'对不起,您输入的用户名小于2个字符, 请输入一个较长的用户名。\', |
|