加入收藏 | 设为首页 | 会员中心 | 我要投稿 湖南网 (https://www.hunanwang.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 教程 > 正文

Discuz!X2.0限定中文、英文和数字注册的要领

发布时间:2021-03-31 03:42:32 所属栏目:教程 来源:网络整理
导读:Discuz!论坛措施是我们很是喜好的论坛社区措施,而最近推出的Discuz! X2.0正式版更是成果富厚的不得了,可是在一些小的细节上来说,处理赏罚的还不是太好,事实一个产物的美满水平是有限的,本日学院小编就来跟各人接头一下怎样实现Discuz!X2.0限定中文、英文和

Discuz!论坛措施是我们很是喜好的论坛社区措施,而最近推出的Discuz! X2.0正式版更是成果富厚的不得了,可是在一些小的细节上来说,处理赏罚的还不是太好,事实一个产物的美满水平是有限的,本日学院小编就来跟各人接头一下怎样实现Discuz!X2.0限定中文、英文和数字注册的题目。

一。只应承输入行使中文注册的要领

打开:template----default----member----register.htm 如行使的不是默认气魄威风凛凛 就找你行使的气魄威风凛凛包里

查找:

<div class="rfm">
<table>
<tr>
<th><span class="rq">*</span><label for="{$this->setting['reginput']['username']}">{lang username}:</label></th>
<td><input type="text" id="{$this->setting['reginput']['username']}" name="" class="px" tabindex="1" autocomplete="off" size="25" maxlength="15" required /></td>
<td class="tipcol"><i id="tip_{$this->setting['reginput']['username']}" class="p_tip">{lang register_username_tips}</i><kbd id="chk_{$this->setting['reginput']['username']}" class="p_chk"></kbd></td>
</tr>
</table>
</div>

修改为:

<div class="rfm">
<table width="50%">
<tr>
<th>交情提醒:本论坛 『 <font color=red>只接管中文注册</font> 』用户名*</th>
</tr>
</table>
</div>

<div class="rfm">
<table>
<tr>
<th><span class="rq">*</span><label for="{$this->setting['reginput']['username']}">{lang username}:</label></th>
<td><input type="text" id="{$this->setting['reginput']['username']}" name="" class="px" tabindex="1" autocomplete="off" size="25" maxlength="15" onpropertychange="with(this)if(/[^u3447-uFA29]/ig.test(value))value=value.replace(/[^u3447-uFA29]/ig,'')" required /></td>
<td class="tipcol"><i id="tip_{$this->setting['reginput']['username']}" class="p_tip">{lang register_username_tips}</i><kbd id="chk_{$this->setting['reginput']['username']}" class="p_chk"></kbd></td>
</tr>
</table>
</div>

二。只应承输入英文注册的要领

上面代码中的赤色部门,替代为:

onkeyup="this.value=this.value.replace(/[^a-z|A-Z]/g,'')" onblur="this.value=this.value.replace(/[^a-z|A-Z]/g,'')"

三。只应承输入数字注册的要领

上面代码中的赤色部门,替代为:

onkeyup="value=value.replace(/[^d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^d]/g,''))"

(编辑:湖南网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读