去除Discuz!F1.0强制手机号填写功能,和几个DZF不喜欢的功能的关闭方法集合-Discuz教程下载

去除Discuz!F1.0强制手机号填写功能,和几个DZF不喜欢的功能的关闭方法集合

来自版块: Discuz教程发表于: 2017-1-16 06:37:43
38573
0
如本资源下载地址失效,请点击此处进行反馈
基于版本:20160930
先总结3个:
1、去掉注册、找回密码时的手机号
2、去掉帖子阅读页的快速回复
3、去掉论坛底部的内部版本号
-----------------------------------------
1、去掉注册、找回密码时的手机号
① 打开 template\default\member\register.htm
删除第161~169行代码。161~169:
  1. <div class="rfm">
  2.         <table>
  3.                 <tr>
  4.                         <th><!--{if !$_G['setting']['forgesms']}--><span class="rq">*</span><!--{/if}--><label for="{$this->setting['reginput']['sms']}">{lang sms}:</label></th>
  5.                         <td><input type="text" id="{$this->setting['reginput']['sms']}" name="" autocomplete="off" size="25" tabindex="1" class="px" {if !$_G['setting']['forgesms']}required{/if} /><em id="smsmore"> </em></td>
  6.                         <td class="tipcol"><i id="tip_{$this->setting['reginput']['sms']}" class="p_tip">{lang register_sms_tips}</i><kbd id="chk_{$this->setting['reginput']['sms']}" class="p_chk"></kbd></td>
  7.                 </tr>
  8.         </table>
  9. </div>
复制代码
② 打开 template\default\member\login.htm删除第183、187~195、201、211行代码。
(建议删除代码后保留空行,以免行号改变影响后面的修改。)
如果第211行删除以后模板不好看,可以把183行的代码复制211行的位置。
183:
  1. <td>{lang getpassword_email}</td>
复制代码
187~195:
  1. <div class="rfm">
  2.         <table>
  3.                 <tr>
  4.                         <th><span class="rq">*</span><label for="lostpw_sms">{lang sms}:</label></th>
  5.                         <td><input type="text" name="sms" id="lostpw_sms" size="30" value=""  tabindex="1" class="px p_fre" /></td>
  6.                         <td>{lang getpassword_sms}</td>
  7.                 </tr>
  8.         </table>
  9. </div>
复制代码
201:
  1. <td>{lang getpassword_username}</td>
复制代码
211:
  1. <td>{lang getpassword_notice}</td>
复制代码
基于版本:20160930
先总结3个:
1、去掉注册、找回密码时的手机号
2、去掉帖子阅读页的快速回复
3、去掉论坛底部的内部版本号
-----------------------------------------
1、去掉注册、找回密码时的手机号
① 打开 template\default\member\register.htm
删除第161~169行代码。161~169:

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

    [color=rgb(51, 102, 153) !important]复制代码
    ② 打开 template\default\member\login.htm删除第183、187~195、201、211行代码。
    (建议删除代码后保留空行,以免行号改变影响后面的修改。)
    如果第211行删除以后模板不好看,可以把183行的代码复制211行的位置。
    183:

      <td>{lang getpassword_email}</td>

      [color=rgb(51, 102, 153) !important]复制代码
      187~195:

        <div class="rfm">
                <table>
                        <tr>
                                <th><span class="rq">*</span><label for="lostpw_sms">{lang sms}:</label></th>
                                <td><input type="text" name="sms" id="lostpw_sms" size="30" value=""  tabindex="1" class="px p_fre" /></td>
                                <td>{lang getpassword_sms}</td>
                        </tr>
                </table>
        </div>

        [color=rgb(51, 102, 153) !important]复制代码
        201:

          <td>{lang getpassword_username}</td>

          [color=rgb(51, 102, 153) !important]复制代码
          211:

            <td>{lang getpassword_notice}</td>

            [color=rgb(51, 102, 153) !important]复制代码
            ③ 打开 uc_client\control\user.php

            删除第84~86行代码。在第86行代码的位置加上:
            1. $sms = '';
            复制代码
            也就是说,新注册的用户的手机号码为空字符串。
            84~86:
            1. if(($status = $this->_check_sms($sms)) < 0) {
            2.         return $status;
            3. }
            复制代码
            -----------------------------------------
            2、去掉帖子阅读页的快速回复
            打开 template\default\forum\viewthread_node_body.htm
            删除159~177行代码。
            159~177:
            1. <!--{if $_G['setting']['allowfastreply'] && $post['first'] && $fastpost && $allowpostreply && !$_G['forum_thread']['archiveid'] && $_GET['from'] != 'preview' && !($secqaacheck || $seccodecheck)}-->
            2.         <form method="post" autocomplete="off" id="vfastpostform" action="forum.php?mod=post&action=reply&fid=$_G[fid]&tid=$_G[tid]&fromvf=1&extra=$_G[gp_extra]&replysubmit=yes{if $_G['gp_ordertype'] != 1}&infloat=yes&handlekey=vfastpost{/if}{if $_G[gp_from]}&from=$_G[gp_from]{/if}" onsubmit="this.message.value = parseurl(this.message.value);ajaxpost('vfastpostform', 'return_reply', 'return_reply', 'onerror');return false;">
            3.         <div id="vfastpost" class="fullvfastpost">                                
            4.                 <input type="hidden" name="formhash" value="{FORMHASH}" />
            5.                 <table cellspacing="0" cellpadding="0" id="vfastposttb">
            6.                         <tr>
            7.                                 <td id="vf_l"></td>
            8.                                 <td id="vf_m"><input type="text" name="message" id="vmessage" onKeyDown="seditor_ctlent(event, '$(\'vfastpostform\').submit()');"/></td>
            9.                                 <td id="vf_r"></td>                                                
            10.                                 <td id="vf_b">
            11.                                         <button type="submit" class="pn pnc" name="replysubmit" id="vreplysubmit" value="true" style="">post_newreply</button>                                                               
            12.                                 </td>                                                
            13.                         </tr>
            14.                 </table>                                
            15.         </div>
            16.         <div id="vfastpostseccheck"></div>                                
            17.         </form>
            18.         <script type="text/javascript">vmessage();</script>
            19. <!--{/if}-->
            复制代码
            -----------------------------------------
            3、去掉论坛底部的内部版本号
            打开 template\default\common\footer.htm
            在第79行,找到如下代码删除:
            1. <!--{if !empty($_G['setting']['build'])}--> <a href="http://www.Discuzf.com/thread-196-1-1.html" target="_blank">Build $_G['setting']['build']</a><!--{/if}-->
            复制代码

全部评论 0

您需要登录后才可以回帖 立即登录
登录
返回顶部