<?php
/*
 * @component UserPoints
 * @copyright Copyright (C) 2015-2022 Bernard Gilly - Adrien Roussel - Martin Brampton
 * @license : GNU/GPL
 * @Website : https://remository.com
 */

// Check to ensure this file is included in Joomla!
defined( '_JEXEC' ) or die( 'Restricted access' );

use Joomla\CMS\Plugin\CMSPlugin;

/**
 * UserPoints Plugin
 *
 * @package		Joomla
 * @subpackage	UserPoints
 * @since 		1.6
 */
class plgUserpointsExample_plugin_up extends CMSPlugin
{
	
	public function onUpdateUserPoints( &$result, $rule_name, $assignpoints, $referrerid, $userID )
	{	
		// on insert activity and save points
			
		return true;
			
	}
	
	public function onAfterUpdateUserPoints( &$result, $rule_name, $assignpoints, $referrerid, $userID )
	{	
		// after inserted activity and saved points and send notification
			
		return true;
			
	}	
	
	public function onSendNotificationUserPoints( &$result, $rule_name, $assignpoints, $newtotal, $referrerid, $userID )
	{
	
		// on send email notification points
			
		return true;	
	
	}
	
	public function onUnlockMedalUserPoints( &$userinfo, &$medal )
	{	
		
		return true;				
	
	}
	
	
	public function onGetNewRankUserPoints( &$userinfo, &$rankdetail )
	{	
	
		return true;
			
	}
	
	
	public function onBeforeInsertUserActivityUserPoints( &$result, $points, $referrerid, $keyreference, $datareference )
	{
	
		return true;
		
	}
	
	public function onResetGeneralPointsUserPoints( $date )
	{
	
		return true;
		
	}
	
	
	public function onBeforeDeleteUserActivityUserPoints ( $cid, $referrerid )
	{	
		// $cid is an array : each id in cid is an activity of the user with this $referrerid
		
		return true;
	
	}
	
	
	public function onAfterDeleteUserActivityUserPoints ( $referrerid )
	{	
				
		return true;
	
	}
	
	
	public function onBeforeDeleteAllUserActivitiesUserPoints ( $referrerid )
	{	
				
		return true;
	
	}
	
	
	public function onAfterDeleteAllUserActivitiesUserPoints ( $referrerid )
	{	
				
		return true;
	
	}
	

	public function onBeforeMakeRaffleUserPoints ( &$rowRaffle, $now )
	{	
				
		return true;
	
	}
	

	public function onAfterMakeRaffleUserPoints ( &$rowRaffle, $now )
	{	
				
		return true;
	
	}

}
