I'm trying to setup AUP with k2 the first rule I have is when a user reads an article they should get points, but only get points the first time they have read it. Currently they are getting points every time they read the article which is no good. This is what I have done and maybe someone can point me in the right direction on why this is happening.
I've added the blow code to components\com_k2\model\item.php
around line 496 just after
if ($view=='item'){
@list($item->introtext, $item->fulltext) = explode('{K2Splitter}', $item->text);
I've added
// AUP start
$api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';
if ( file_exists($api_AUP))
{
require_once ($api_AUP);
AlphaUserPointsHelper::newpoints( 'plgaup_k2read', '', $k2read, 'Article Read');
}
// AUP end
no I thought the by adding $k2read that it would see it as my reference key and not give out duplicate points
but it is.... any ideas?
Thanks!