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 offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline
EDITED VERSION

If you are wondering if you can assign points from an external PHP script, the answer is yes. Here is how I did it without creating an app.

First I went in Administrator->Components->EasySocial->User Points -> Install and added the following rule file (apps2.points). Code shown below.

[
{
"title" : "Add Quiz Points",
"alias" : "add-points",
"description" : "Test if I can award points from an external PHP script.",
"command" : "apps.addpoints",
"extension" : "com_easysocial",
"state" : true,
"points" : 5
},
{
"title" : "Remove Quiz Points",
"alias" : "remove-points",
"description" : "Test if I can remove points from an external PHP script.",
"command" : "apps.removepoints",
"extension" : "com_easysocial",
"state" : true,
"points" : -5
}
]


I checked to make sure that the rule was published in EasySocial then I created an external script called easysocialpoints.php (code shown below).

<?php

/**
* Include EasySocial
*/
require_once( JPATH_ROOT . '/administrator/components/com_easysocial/includes/foundry.php' );
Foundry::points()->assign( 'apps.addpoints' , 'com_easysocial' , $userID );
//You will need to include Joomla at the top of this script and you will need to get the value of the logged in user-otherwise this script will not work
?>


Once I ran the code by visiting mywebsite/easysocialpoints.php I checked the profile for the current user and saw that the points had been successfully awarded.

Unfortunately, I'm still not sure how to assign variable points without creating a rule for each different amount that I want to award- not cool.


REFERENCES
http://stackideas.com/docs/easysocial/developers/applications/getting-started
http://stackideas.com/docs/easysocial/developers/points/rule-file
http://stackideas.com/docs/easysocial/developers/points/logging
The replies under this section are restricted to logged in users or users with an active subscription with us