UPDATES EasyBlog 6.0.11 Released! Update to the latest version now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is online
Our support specialists is available now. We will attend to you as soon as we can.
  Support is online

Execute badge achievement rule

Emil Appelkvist · ·
8:58 PM Saturday, 21 January 2017
None
Hey.
First of all. I understand this might be out of scope for support.
Perhaps some fellow users can help, it will benefit the whole community.

Regular labs have a free extension called sourcer it allows to place php code in content.
Im now trying to make the badge achievement for a certain article.

Anyone knows how to continue? I guess the "action" thing might be missing.


{source}
<?php
require_once( JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php' );

// @badge: read.terms
Foundry::badges()->log( 'com_easysocial' , read.terms' , $userId , JText::_( 'Read an special article.' ) );
?>
{/source}


I have installed the rule file:

[
{
"title" : "terms",
"description" : "Read terms",
"howto" : "To unlock this badge, read the terms.",
"alias" : "terms",
"extension" : "com_easysocial",
"command" : "read.terms",
"avatar" : "media/com_easysocial/badges/poweredby.png",
"frequency" : 1
}
]


This can of course be very smart if you want to reward user for reading the terms, help pages, FAQ or other things etc.
Hopefully we can together make some great stuff here :)
The replies under this section are restricted to logged in users or users with an active subscription with us