Foren

Adding Social Activity Counter on Custom Assets in liferay6.1.X

thumbnail
Mahendra Mahakle, geändert vor 12 Jahren.

Adding Social Activity Counter on Custom Assets in liferay6.1.X

Junior Member Beiträge: 80 Beitrittsdatum: 14.03.11 Neueste Beiträge
Dear All
I have created one custom assets called "IdeaRating" and I have configure liferay-social.xml as follows
<activity>
<model-name>com.aikon.workflow.assets.model.IdeaRating</model-name>
<activity-type>${com.aikon.model.social.IdeaActivityKeys.IDEA_RATING}</activity-type>
<language-key>IDEA_RATING</language-key>
<log-activity>true</log-activity>
<contribution-value>5</contribution-value>
<participation-value>2</participation-value>
<participation-limit period="lifetime">1</participation-limit>
</activity>


Here activity is going to add. but participation and Contribution is not adding for this activity.
Is anything wrong in above code?
can any one give me some inputs?
Thanks
Mahendra
thumbnail
Zsolt Berentey, geändert vor 12 Jahren.

RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X

New Member Beiträge: 4 Beitrittsdatum: 24.11.09 Neueste Beiträge
A couple of questions.

1. Did you turn on the activities for this model in control panel for your group?

2. Do you have an asset created for your model before you're trying to add the activity? Note that you need an asset for this to work.

3. I'm not sure if this is deliberate but based on your config, you should only get participation points only once for this activity on the same asset (for the same user of course).
thumbnail
Mahendra Mahakle, geändert vor 12 Jahren.

RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X

Junior Member Beiträge: 80 Beitrittsdatum: 14.03.11 Neueste Beiträge
Zsolt Berentey:
A couple of questions.

1. Did you turn on the activities for this model in control panel for your group?

2. Do you have an asset created for your model before you're trying to add the activity? Note that you need an asset for this to work.

3. I'm not sure if this is deliberate but based on your config, you should only get participation points only once for this activity on the same asset (for the same user of course).


Hi Zsolt,
Thanks very much for reply
Actually i had missed out passing some parameter when adding an activity.
Now i am getting only participation for that but Not getting Contribution even I have changed the contribution value from control panel for that assets.
Thanks
Mahendra
thumbnail
Zsolt Berentey, geändert vor 12 Jahren.

RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X

New Member Beiträge: 4 Beitrittsdatum: 24.11.09 Neueste Beiträge
I'm not sure what you're trying to do, but you should know that contribution points always go to the owner of the asset.

Also contribution is a derivative of popularity, and is designed to be increased through the actions of other users so there is a built-in check that prohibits owners receiving contribution points from their own actions. Therefore it currently doesn't really make sense to set a contribution value for creation actions. However if the action can be performed by other users as well, you should see contribution points awarded to the creator when other users do this action.

If I can find an easy way to check if the asset was just created I might add an exception to the check in the future so that you can award contribution points for asset creation, but I can't promise anything.
thumbnail
Mahendra Mahakle, geändert vor 12 Jahren.

RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X

Junior Member Beiträge: 80 Beitrittsdatum: 14.03.11 Neueste Beiträge
Hi Zsolt,
I just want to confirm that can i configure default value for contribution and participation apart from 1,2,3,4,5,10,20,50,100 this values.
Actually I had tried to assign 6,8,etc for default participation to my custom assets but its taking only 0.
Is any thing wrong with me? OR Is there any reason for assigning only 1,2,3,4,5,10,20,50,100 as default values..
Thanks
Mahendra
thumbnail
Nilesh Gundecha, geändert vor 12 Jahren.

RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X

Regular Member Beiträge: 205 Beitrittsdatum: 01.12.09 Neueste Beiträge
Hi Mahendra,

There are some properties you can override in portal-ext.properties as shown below -

social.activity.contribution.increments=0,1,2,3,4,5,10,20,50,100
social.activity.contribution.limit.values=0,1,2,3,4,5,10,20
social.activity.participation.increments=0,1,2,3,4,5,10,20,50,100
social.activity.participation.limit.values=0,1,2,3,4,5,10,20

But these are the values to show in drop down lists in the Social Activity portlet.

@Zsolt: Can not we define any other values in liferay-social.xml apart from the above mentioned values?

Regards,

Nilesh