道勤数据 发表于 2014-12-23 16:43:36

DISCUZX3.2修改注册用户名长度等限制

相信有不少站长朋友发现discuz注册用户名是有长度限制的,但是有些站长对注册用户名也有一定的特殊需求,想要能长度长点。在道勤主机php虚拟主机中,对discuz做这样的修改还是可以实现想要的功能的。下面道勤小编(www.daoqin.net)说说怎么修改discuzX3.2怎么修改注册用户名长度限制。
1、在网站/source/class/目录下的class_member.php文件中, 找到如下代码:

<p class="blockcode"><font size="4"></font><blockquote><font size="4">if($usernamelen < 3) {
showmessage('profile_username_tooshort');
} elseif($usernamelen > 15) {
showmessage('profile_username_toolong');</font>把上面的15 改成你需要的长度记得是代表的字节2.、在网站/source/language/目录下的lang_message.php文件中, 找到如下代码:<p><font size=”4″> ‘profile_username_toolong’ => ‘抱歉,您的用户名超过 15 个字符,请输入一个较短的用户名’,</font></p>
这个提示中的15也要修改成对应的长度哈。3、在网站/source/language/mobile/目录下的lang_template.php文件中, 找到如下代码:
<font size=”4″> ‘reg_username’ => ‘用户名必须为大于3位小于15位’,</font>
同理
第136行:
<font size=”4″>’registerinputtip’ => ‘用户名:3-15位’,</font>4、在网站/source/module/forum/Forum_ajax.php 文件中, 找到如下代码:<font size="4">if($usernamelen < 3) {
showmessage('profile_username_tooshort', '', array(), array('handle' => false));
} elseif($usernamelen > 15) {
showmessage('profile_username_toolong', '', array(), array('handle' => false));
}</font>同样是修改15的大小哈这样之后设置的会员用户名长度就变成您修改的那个长度限制了。
页: [1]
查看完整版本: DISCUZX3.2修改注册用户名长度等限制