Welcome, Guest
Username Password: Remember me

Anyone figure out the rules for K2 v2.5.6?
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: Anyone figure out the rules for K2 v2.5.6?

Anyone figure out the rules for K2 v2.5.6? 2 years, 4 months ago #18761

  • yakangler
  • OFFLINE
  • Expert Boarder
  • Posts: 111
  • Points: 804
  • Karma: 4
I'm trying to add some rules to K2 but they have totally changed their code, anyone figure out where to add some of the common rules like points for rating an article, points for reading an article etc in the newest K2 v2.5.6?

Re: Anyone figure out the rules for K2 v2.5.6? 1 year, 9 months ago #20179

  • navid
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Points: 94
  • Karma: 0
insert similar this:
for reed aticle:
on line 678 in the(components/com_k2/models/item.php) :

if ($view == 'item')
{
@list($item->introtext, $item->fulltext) = explode('{K2Splitter}', $item->text);
// 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_k2_topic_read' );

}
// aup end

------------------------------------------
for rating:
in line 795 item.php :

echo JText::_('K2_THANKS_FOR_RATING');
// 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_k2_topic_rating' );
}
// aup end
----------------------------------
Last Edit: 1 year, 9 months ago by navid.

Re: Anyone figure out the rules for K2 v2.5.6? 1 year, 9 months ago #20300

  • 121261
  • OFFLINE
  • Fresh Boarder
  • Posts: 9
  • Points: 55
  • Karma: 0
Hi navid - I get that, with putting in the code for read and for rating in the K2 files, but where do I get the plugins ?
plgaup_k2_topic_read
plgaup_k2_topic_rating

Please advise

regards
Bison

Re: Anyone figure out the rules for K2 v2.5.6? 1 year, 9 months ago #20302

  • navid
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Points: 94
  • Karma: 0
intsall alphauserpoint > go to rules > add new rule >insert unique functione ex(plgaup_k2_topic_read) > full other field and save it

Re: Anyone figure out the rules for K2 v2.5.6? 1 year, 7 months ago #20646

  • adrianobokao
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Points: 37
  • Karma: 0
And which line should I put this on K2 2.62 and for giving points to who creates the article?

Re: Anyone figure out the rules for K2 v2.5.6? 1 year, 7 months ago #20649

  • navid
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Points: 94
  • Karma: 0
  • Page:
  • 1
  • 2
Moderators: adroussel, dalekurt, migus, some1new
Time to create page: 0.39 seconds
Goto Top