Jomsocial 3, AlphaUserPoints(AUP), Kunena fix



  • Hi Visitor,

    i had a big problem with my Joomla-website. JomSocial (and Kunena) with AlphaUserPoints is not working properly at the moment; howerver, I found a fix with a little code-implementation into one of the core libraries of JomSocial.

    Here my Bug-fix:

    • Find the PHP-File in "userpoints" /[HOMEPAGEROOT]/components/com_community/libraries/
    • Backup the file
    • Open the file with your favorite editor
    • Find "$user->save();" nearby line 77
    • Post this bugfix right under "$user->save();":

    [code]
    //Alpha User Points Fix by MyTechZone.de
    //-------------------------------------------------------------------------------------------
    jimport('joomla.plugin.plugin');
    $muserId = $user->id;
    require_once(JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php');
    $referrerid = AlphaUserPointsHelper::getAnyUserReferreID( $muserId );
    if ( $referrerid=='' ) return;
    $keyreference = AlphaUserPointsHelper::buildKeyreference( $action, $referrerid );
    AlphaUserPointsHelper::newpoints ( $action, $referrerid, $keyreference );
    //-------------------------------------------------------------------------------------------
    [/code]

    • Save the File an upload it to your website.

    This code will trigger every time when you earn points by Jomsocial.
    Then Jomsocial looks after the compatible rule in AlphaUserPoints.

    To be sure that Jomsocial and AlphaUserPoints will use the same Rules, i importet the rules from the jomsocial_userpoints mysql-table to the alphauserpoints_rules table.

    Well this fix worked for me. I hope it will work for your website.
    i'll grant no guarantees for the code.

    Good luck! Vinlow



  • Hi Visitor,

    i had a big problem with my Joomla-website. JomSocial (and Kunena) with AlphaUserPoints is not working properly at the moment; howerver, I found a fix with a little code-implementation into one of the core libraries of JomSocial.

    Here my Bug-fix:

    • Find the PHP-File in "userpoints" /[HOMEPAGEROOT]/components/com_community/libraries/
    • Backup the file
    • Open the file with your favorite editor
    • Find "$user->save();" nearby line 77
    • Post this bugfix right under "$user->save();":

    [code]
    //Alpha User Points Fix by MyTechZone.de
    //-------------------------------------------------------------------------------------------
    jimport('joomla.plugin.plugin');
    $muserId = $user->id;
    require_once(JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php');
    $referrerid = AlphaUserPointsHelper::getAnyUserReferreID( $muserId );
    if ( $referrerid=='' ) return;
    $keyreference = AlphaUserPointsHelper::buildKeyreference( $action, $referrerid );
    AlphaUserPointsHelper::newpoints ( $action, $referrerid, $keyreference );
    //-------------------------------------------------------------------------------------------
    [/code]

    • Save the File an upload it to your website.

    This code will trigger every time when you earn points by Jomsocial.
    Then Jomsocial looks after the compatible rule in AlphaUserPoints.

    To be sure that Jomsocial and AlphaUserPoints will use the same Rules, i importet the rules from the jomsocial_userpoints mysql-table to the alphauserpoints_rules table.

    Well this fix worked for me. I hope it will work for your website.
    i'll grant no guarantees for the code.

    Good luck! Vinlow


Log in to reply
 

Looks like your connection to MyTechZone 2 was lost, please wait while we try to reconnect.