Discuz功能改進-實名認證如何個別提示?

因為工作上出現一個需求,實名認證因為開啟多種說明,但是上方實名認證說明都是固定的一句話【以下信息通過審核後將不能再次修改,提交後請耐心等待核查】,不管你是開哪一種都是固定一種模式的說明,對於使用者操作者其實並不OK,在這邊HF自己研究了一下如何修改成針對各種實名認證出現各種說明。

首先我們要先整理思緒
1.他是怎麼判定他是哪一個類型實名認證?
2.DZ的訊息是如何顯示的?

這邊先講講HF是如何理解(猜測),我這邊大膽假設他是用ID判定類型,後臺實名認證總共有7個,所以ID是1~7。
至於第7個完全不理他,為什麼?因為第7個需要支援雲平台(目前雲平台已經失效了,所以根本不能使用,那實際上我們真正需要去了解的是前面1~6(ID)。

那依照DZ文件路徑來講位於template\default\home\spacecp_profile.htm <--這是控制他顯現的文字(就是提示訊息),然後從lang(語系包)提取訊息過來再spacecp_profile顯示。

所以我們可以就來實際修改看看。

打開路徑\source\language\home\lang_template.php,有人可能會問為什麼要先打開lang(語系),因為這是要讓我們直接查找提示訊息,找到提示訊息之後直接針對提示去查找會比較快。
直接查找
以下信息通過審核後將不能再次修改,提交後請耐心等待核查
故可以得知實名認證的提示訊息是spacecp_profile_message1,通過審核的是spacecp_profile_message2
接下來打開路徑template\default\home\spacecp_profile.htm,然後查找spacecp_profile_message1或spacecp_profile_message2
大約在117行
<p class="tbms mtm {if !$showbtn}tbms_r{/if}"><!--{if $showbtn}-->{lang spacecp_profile_message1}<!--{else}-->{lang spacecp_profile_message2}<!--{/if}--></p>
這邊簡單解釋一下就是判定若有通過實名認證就顯示spacecp_profile_message2,若沒有就顯示spacecp_profile_message1,就這樣子而已。
接下來直接進行修改將
<p class="tbms mtm {if !$showbtn}tbms_r{/if}"><!--{if $showbtn}-->{lang spacecp_profile_message1}<!--{else}-->{lang spacecp_profile_message2}<!--{/if}--></p>
修改成以下
<p class="tbms mtm {if !$showbtn}tbms_r{/if}">
                        <!--{if $showbtn}-->
                            <!--{if $_GET[vid] == 1}-->
                                {lang spacecp_profile_message1}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 2}-->
                                {lang spacecp_profile_message2}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 3}-->
                                {lang spacecp_profile_message3}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 4}-->
                                {lang spacecp_profile_message4}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 5}-->
                                {lang spacecp_profile_message5}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 6}-->
                                {lang spacecp_profile_message6}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 7}-->
                                {lang spacecp_profile_message7}
                            <!--{/if}-->
                        <!--{else}-->
                            <!--{if $_GET[vid] == 1}-->
                            {lang spacecp_profile_messages1}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 2}-->
                            {lang spacecp_profile_messages2}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 3}-->
                            {lang spacecp_profile_messages3}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 4}-->
                            {lang spacecp_profile_messages4}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 5}-->
                            {lang spacecp_profile_messages5}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 6}-->
                            {lang spacecp_profile_messages6}
                            <!--{/if}-->
                            <!--{if $_GET[vid] == 7}-->
                            {lang spacecp_profile_messages7}
                            <!--{/if}-->
                        <!--{/if}-->
                    </p>
小小解釋一下<!--{if $vid}-->簡單說就是判定有無打開實名認證而已。
<!--{if $_GET[vid] == 1}-->呢?就是判定抓的ID,經HF測試後是可以的唷~
至於為什麼修改成spacecp_profile_message1~7,這邊HF就不再多做解釋了,相信如果看文章的人應該會理解還剩下哪邊沒有修改到。


如果您覺得HF寫得還不錯,可以透過以下來贊助HF唷~
幣別
Bitcoin(BTC)
錢包地址
3PqFZKa5if4566u7xctKhd8jh6ypBccEAL
幣別
Litecoin(LTE)
錢包地址
LfRQQDDfpnTAedUotv1LBPR7XnUsEqaCAe
幣別
Ethereum(ETH)
錢包地址
0x5955a215e1066875b0cbb4a284d60aa0c8abddf2
幣別
Zcash(ZEC)
錢包地址
t1VbdgDNZJooYYw3mTqJHQLA1PRELWX4cUq

當然如果你想幫HF挖礦的也是可以(疑?

留言

這個網誌中的熱門文章