discuz用户名长度限制修改方法

0 条评论

discuz或者说ucenter默认用户名是3-15位以内,gbk编码一个中文等于2位,即对中文用户名就是2--7个汉字,utf-8编码就是1-5个汉字,UTF-8一个汉字等于三位

要修改三个文件:
uc_server\model\user.php
uc_client\model\user.php
forumdata\templates\1_register.tpl.php

其中uc_server\model\user.php
uc_client\model\user.php这里的搜索


XML/HTML代码

  1. if($len > 15 || $len < 3 || preg_match("/\s+|^c:\\con\\con|[%,\*\"\s\<\>\&]|$guestexp/is", $username))  

将其中的15和3改为你的需要.

forumdata\templates\1_register.tpl.php 


XML/HTML代码

  1. if(unlen <3 || unlen > 15) {   
  2.   
  3. messagehandle_register(1, unlen < 3 ? profile_username_tooshort : profile_username_toolong);   
  4.   
  5. return;   
  6.   
  7. }  

将其中的3和15改为你需要的就可以了

discuz模板下的register.htm也可以修改,不过貌似不修改也能行了

论坛升级到discuz7.1

0 条评论

discuz7.1已经于2009.10.16正是发布

这两天闲来没事,也应该升级一下了

今天按照步骤一步一步,顺利升级.

让discuz论坛支持中文验证码的方法

0 条评论

windows主机只要开启了gd库默认是支持freetype的,然而很多朋友还是无法用,那是因为你论坛目录下没中文字体

只要将中文字体复制到论坛的images/font/ch文件夹下就可以,例如复制黑体到这个文件下,然后后台再开启中文验证码即可.