Twitter
Fri
30
Apr
'10
PDF
Print
Send
 
Hits (1173) | Comments (0) | Favorited (2) | Votes (0)

Touch have karma system to separate users of the sate to different groups. Groups are set in Touch global configuration. Activity of the users may (or should) affect their karma and karma of other users. You may increase or decrease user karma through Touch API.

Here is the example

$API = JPATH_ROOT.DS.'components'.DS.'com_community'.DS.'api.php';
if(file_exists($API))
{
    require_once $API;
    JSCommunityApi::increaseKarma($user_id, $amount);
}

Amount may be negative if you want to decrease user Karma.

As an idea it is good to use parameters how many increase of decrease on what action. Allow your customers chose. Also it is nice idea to increase/decrease karma not only to user who acts, but to user affected. For example if someone rate article, one who rate get 2 points and one whose article rated 1-5 depending on rating given.


Comments

There are no comments for this item

Be the first to leave a comment

Add New Comment
Name:
Email:
Comment:
Attachment
Hide Comment
Security code:
Enter text as you see on image
 
 
What is best way for Download/Installation MightyExtensions?
 


Member Area



Member Activity

We have 1898 guests and 9 members online


MightyTemplate - Professional Joomla Templates