Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Mahendra Mahakle
Adding Social Activity Counter on Custom Assets in liferay6.1.X
13. Februar 2012 06:02
Antwort

Mahendra Mahakle

Rang: Junior Member

Nachrichten: 81

Eintrittsdatum: 14. März 2011

Neue 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
Zsolt Berentey
RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X
14. Februar 2012 01:47
Antwort

Zsolt Berentey

LIFERAY STAFF

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 24. November 2009

Neue 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).
Mahendra Mahakle
RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X
14. Februar 2012 02:08
Antwort

Mahendra Mahakle

Rang: Junior Member

Nachrichten: 81

Eintrittsdatum: 14. März 2011

Neue 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
Zsolt Berentey
RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X
14. Februar 2012 02:40
Antwort

Zsolt Berentey

LIFERAY STAFF

Rang: New Member

Nachrichten: 4

Eintrittsdatum: 24. November 2009

Neue 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.
Mahendra Mahakle
RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X
20. März 2012 02:28
Antwort

Mahendra Mahakle

Rang: Junior Member

Nachrichten: 81

Eintrittsdatum: 14. März 2011

Neue 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
Nilesh Gundecha
RE: Adding Social Activity Counter on Custom Assets in liferay6.1.X
20. März 2012 02:52
Antwort

Nilesh Gundecha

Rang: Regular Member

Nachrichten: 189

Eintrittsdatum: 30. November 2009

Neue 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