Hi,
i have a little problem with the Download trigger:
i would like to make an Plugin that does following:
The Download is only for Members with xxx Points in AUP.
this is a part of my plugin code:
function onK2BeforeDownload(&$attachment, &$params) {
global $mainframe;
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
$user = & JFactory::getUser();
$userID = $user->id ;
$profil=AlphaUserPointsHelper:: getUserInfo ( '', $userID ) ;
//print_r($profil);
$dlpoints = $profil->points;
if ($dlpoints <= "400") {
$mainframe->enqueueMessage(JText::_("You don't have not enough points to download."), 'notice');
}
}
}
but i have no idea to break/stop the download function when the user has not enough points...
I hope someone can help me...
best regards
Markus