ASPX templates
Version 5.x > ASPX templates > Badges View modes: 
User avatar
Member
Member
al.usman-accenture - 6/11/2012 7:29:56 AM
   
Badges
Is there any way to have the Badge change its reference activity points to a custom table? I cannot seem to find where Kentico is setting the badge ID of a user based on the activity points when isAutomatic is set to true. Help please :D

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 6/14/2012 10:03:59 AM
   
RE:Badges
Hi,

Could you please be more specific about your aim?
Do you want to load/store the Badge points in other (custom) table?

As for updating the Badge (ID) - this is done in code of UpdateActivityPointsToUser method, as can be seen in the DevGuide article with Badges examples or in the API examples project:

\CMSAPIExamples\Code\Administration\Badges\Default.aspx.cs
method BadgeInfoProvider.UpdateActivityPointsToUser

There are finally two methods called:
// Update user counts
UserInfoProvider.UpdateUserCounts(pointsType, userID, points);

// Update badge
UpdateUserBadge(ui.UserID);

The first of the methods has its part in the stored procedure
Proc_CMS_User_UpdateUserCounts, so you may find the necessary information there...

Hope it will help.

Regards,
Zdenek


User avatar
Member
Member
aL - 6/14/2012 10:59:23 PM
   
RE:Badges
Hi Zdenek,

Yes I want to load Badge points from a custom table. I just cannot find where to do it. But I will check on the store procedure that you said. Thank you very much. :D



Regards,
AL