Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

[solved] onAfterAssignPoint doesn't seem to be working anymore since 4.3 ?

6 years 9 months ago
Licenses:
JomSocial Active

Hello

in librairies/userpoints.php line 91
there is a plugin trigger called onAfterAssignPoint that was working before and not anymore in 4.3
Any update on this appreciated :)
Thank you

6 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi Adrien,

What is your old version which that event was working? we have bug on it before, but already fixed on latest version.

I also need your website information like backend,phpmyadmin and FTP access

thank you!

6 years 9 months ago
Licenses:
JomSocial Active

Thank you for your prompt reply. I'm not sure of the last version having the script working, because I did not notice the issue straight away.

It seems the plugin is currectly loaded, but it's function onAfterAssignPoint is not triggered when users get points
Here is its basic structure. Let me know if anyting doesn't look correct

defined( '_JEXEC' ) or die( 'Restricted access' );
require_once JPATH_ROOT . '/components/com_community/libraries/core.php';
if(!class_exists('plgCommunityActionsafterpoints'))
{
	class plgCommunityActionsafterpoints extends CApplications {
		function __construct(& $subject, $config)
		{
			parent::__construct($subject, $config);
		}
		public function onAfterAssignPoint($action,$points,$userID)
		{			
			// actions to process
			
			return true;		
		}
	}
}
Let me know if you find anything wrong in this

6 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Would you mind provide me the zip pacakge if your plugin, please?

thank you!

6 years 9 months ago
Licenses:
JomSocial Active

Sure,

Thank you for your help.

This message has an attachment file.
Please log in or register to see it.

6 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Thank you, we will check it and get you back..

thank you!

6 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

Hi,

Your code is wrong, change this code

public function onAfterAssignPoint($action,$points,$userID)
{

to be like this
public function onAfterAssignPoint($params)
{			
	$param = json_decode($params);			
	$action = $param->action;
	$points = $param->points;
	$userID = $param->userId;

6 years 9 months ago
Licenses:
JomSocial Active

Thanks a lot . Quick and efficient support !

6 years 9 months ago
  • Dimas's Avatar
  • Dimas
  • Visitor
  • Thank you received: 0
Licenses:

you're welcome :)

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW