軟體版本
Joomla:2.5.6
AlphaUserPoints:1.7.4
打開
joomla安裝目錄/components/com_alphauserpoints/helper.php這個檔案
搜尋function newpoints
在這function下面,看到以下這段code
if ( $plugin_function!='' )
{
AlphaUserPointsHelper::userpoints ( $plugin_function, $referrerid, 0, $keyreference, $datareference, $randompoints, $feedback, $force, $frontmessage );
}
說明:當plunin的function不是空白的時候也就是有指定時,執行裡面那段開始加扣點的動作。
不過他根本沒有回傳任何東西,因此當然在串接的地方不會收到任何的feedback
修正方法
在AlphaUserPointsHelper::前面加上return即可,把執行的結果reruen。
if ( $plugin_function!='' )
{
return AlphaUserPointsHelper::userpoints ( $plugin_function, $referrerid, 0, $keyreference, $datareference, $randompoints, $feedback, $force, $frontmessage );
}
期待下次AlphaUserPoints下次改版的時候會修正這個問題