新闻中心

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

作者 / 无忧主机 时间 2014-10-23 16:00:54

相信有不少站长朋友发现discuz注册用户名是有长度限制的,但是有些站长对注册用户名也有一定的特殊需求,想要能长度长点。在无忧主机php虚拟主机中,对discuz做这样的修改还是可以实现想要的功能的。下面无忧小编(www.51php.com)说说怎么修改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的大小哈 这样之后设置的会员用户名长度就变成您修改的那个长度限制了。 无忧主机相关文章推荐阅读: DISCUZ进阶教程-如何自定义等级图标 DISCUZ 回帖提示:内部错误,无法显示此内容 DISCUZ如何给论坛底部添加友情链接图文教程 DISCUZ X3 论坛管理员之外的账号不允许进入后台登陆界面的方法

本文地址:https://www.51php.com/discuz/17191.html

1
1
1
1
1
1
1

客户服务热线

0791-8623-3537

在线客服