JomSocial & K2 integration (Joomla! 1.7) - Part 1

Here is a step-by-step tutorial on how-to:

1. Make entry in the JomSocial feed on new/edited article.2. Make entry in the JomSocial feed on new comment.3. Add user points for new article.4. Add user points for edited article.5. Add user points for new comment.

The tutorial:

1. Make a backup. Whenever you change files, please make a backup first.2. Open the file "administrator/components/com_k2/models/item.php"In that file find:

5. Add the following lines at the bottom of "language/en-GB/en-GB.com_k2.ini" (or in your respective language):

;JomSocial
K2_JOMSOCIAL_COMMENT="{actor} commented on the article"
K2_JOMSOCIAL_ARTICLE="{actor} added the new article"
K2_JOMSOCIAL_EDIT="{actor} edited the article"

6. Go to JomSocial in the backend, there go to User Points, click on "Rule Scan" and it should find the three new rules (add article, edit article, add comment). Click on refresh. By default it gives 10 points for new article, 1 for edited article and 1 for comment. You can edit the points after refresh and clicking on the name of the rule.

That's it. Now when your users add or edit content or add comments, they will get points and this will appear in their stream in JomSocial.We will try to write a tutorial on how to display JomSocial data in K2 items.

P.S. If You have any troubles or questions please feel free to ask a question at our forum post