《DISCUZ架構(gòu):積分系統(tǒng)代碼分析三》文章已經(jīng)歸檔,站長之家不再展示相關(guān)內(nèi)容,下文是站長之家的自動化寫作機(jī)器人,通過算法提取的文章重點(diǎn)內(nèi)容。這只AI還很年輕,歡迎聯(lián)系我們幫它成長:
3.下載附件積分增減這一部分主要用到的就是attachment.php這個(gè)文件了,下面就來分析這個(gè)文件中與積分中有關(guān)系的代碼: 以下為引用的內(nèi)容:if(!$isimage) { $forum['getattachcredits'] = $forum['getattachcredits'] ? unserialize($forum['getattachcredits']) : array(); $getattachcredits = $forum['getattachcredits'] ? $forum['getattachcredits'] : $creditspolicy['getattach']; updatecredits($discuz_uid, $getattachcredits, -1);} 這一段的意思是:當(dāng)一個(gè)附件不是圖像的時(shí)候,取出該論壇對于下載附件的積分設(shè)置,比方說是-5分,那么就調(diào)用updatecredits(global.func中定義)這個(gè)函數(shù)更新一下積分。P.S.:相關(guān)函數(shù)分析:updatepostcredits函數(shù),定義于./include/post.func.php 以下為引用的內(nèi)容:function updatepostcredits($operator, $uida...
......
本文由站長之家用戶“php118.com”投稿,本平臺僅提供信息索引服務(wù)。由于內(nèi)容發(fā)布時(shí)間超過平臺更新維護(hù)時(shí)間,為了保證文章信息的及時(shí)性,內(nèi)容觀點(diǎn)的準(zhǔn)確性,平臺將不提供完整的內(nèi)容展現(xiàn),本頁面內(nèi)容僅為平臺搜索索引使用。需閱讀完整內(nèi)容的用戶,請聯(lián)系作者獲取原文。
(舉報(bào))