The SharePoint Activity Feed rendering is controlled by templates. These templates are used within the ActivityTemplate class http://msdn.microsoft.com/en-us/library/microsoft.office.server.activityfeed.activitytemplate.aspx which is responsible for controlling the rendering.
The OOB templates are held within a resources file located:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Resources\osrvcore.resx
This contains the following templates:
Keyname: “ActivityFeed_ProfilePropertyChange_SV_Template”
Template: {Publisher} updated profile.<br/>{Name}: {Value}
Keyname: “ActivityFeed_ProfilePropertyChange_MV_Template”
Template: {Publisher} updated profile.<br/>{List}
Keyname: “ActivityFeed_Birthday_Reminder_SV_Template”
Template: {Publisher} is celebrating a birthday on {Name}.
Keyname: “ActivityFeed_Birthday_Today_SV_Template”
Template: {Publisher} is celebrating a birthday today.<br/>Wish {Publisher} a happy birthday!
Keyname: “ActivityFeed_WorkplaceAnniversary_Reminder_SV_Template”
Template: {Publisher} is celebrating a {Value} year workplace anniversary on {Name}.
Keyname: “ActivityFeed_WorkplaceAnniversary_Today_SV_Template”
Template: {Publisher} is celebrating a {Value} year workplace anniversary today.<br/>Wish {Publisher} a happy anniversary!
Keyname: “ActivityFeed_ColleagueAddition_SV_Template”
Template: {Publisher} added a new colleague.<br/>{Link}
Keyname: “ActivityFeed_ColleagueAddition_MV_Template”
Template: {Publisher} added {Size} new colleagues.<br/>{List}
Keyname: “ActivityFeed_TitleChange_SV_Template”
Template: {Publisher} has a new job title.<br/>{Value}
Keyname: “ActivityFeed_ManagerChange_SV_Template”
Template: {Publisher} has a new manager. <br/> {Link}
Keyname: “ActivityFeed_BlogUpdate_SV_Template”
Template: {Publisher} published a new blog post.<br/>{Link}
Keyname: “ActivityFeed_DLMembershipChange_SV_Template”
Template: {Publisher} has a new membership. <br/> {Link}
Keyname: “ActivityFeed_DLMembershipChange_MV_Template”
Template: {Publisher} has {Size} new memberships. <br/> {List}
Keyname: “ActivityFeed_SocialTaggingByColleague_SV_Template”
Template: {Publisher} tagged {Link} with {Link2}.
Keyname: “ActivityFeed_SocialTaggingByColleague_MV_Template”
Template: {Publisher} tagged {Link}.<br/>{List}
Keyname: “ActivityFeed_NoteboardPosts_SV_Template”
Template: {Publisher} posted a note on {Link}.<br/>{Value}
Keyname: “ActivityFeed_SocialTaggingByAnyone_SV_Template”
Template: {Publisher} tagged {Link} with your interest.<br/>{Link2}
Keyname: “ActivityFeed_SocialRatings_SV_Template”
Template: {Publisher} rated {Link} as {Value} of {Name}.
Keyname: “ActivityFeed_SharingInterest_SV_Template”
Template: {Publisher} shares an interest with you. <br/> {Value}
Keyname: “ActivityFeed_SharingInterest_MV_Template”
Template: {Publisher} shares {Size} interests with you. <br/> {List}
This contains the following template names:
Keyname: “ActivityFeed_ChangeMarker_SV_Template”
Template: Previous Gatherer Run
Keyname: “ActivityFeed_Status_Message_SV_Template”
Template: {Publisher} says “{Value}”.
Keyname: “ActivityFeed_ProfilePropertyChange_Type_Display”
Template: Profile update
Keyname: “ActivityFeed_Birthday_Reminder_Type_Display”
Template: Upcoming birthday
Keyname: “ActivityFeed_Birthday_Today_Type_Display”
Template: Birthday
Keyname: “ActivityFeed_WorkplaceAnniversary_Reminder_Type_Display”
Template: Upcoming workplace anniversary
Keyname: “ActivityFeed_WorkplaceAnniversary_Today_Type_Display”
Template: Workplace anniversary
Keyname: “ActivityFeed_ColleagueAddition_Type_Display”
Template: New colleague
Keyname: “ActivityFeed_TitleChange_Type_Display”
Template: Job title change
Keyname: “ActivityFeed_ManagerChange_Type_Display”
Template: Manager change
Keyname: “ActivityFeed_BlogUpdate_Type_Display”
Template: New blog post
Keyname: “ActivityFeed_DLMembershipChange_Type_Display”
Template: New membership
Keyname: “ActivityFeed_SocialTaggingByColleague_Type_Display”
Template: Tagging by my colleague
Keyname: “ActivityFeed_NoteboardPosts_Type_Display”
Template: Note Board post
Keyname: “ActivityFeed_SocialTaggingByAnyone_Type_Display”
Template: Tagging with my interests
Keyname: “ActivityFeed_SharingInterest_Type_Display”
Template: Sharing Interests
Keyname: “ActivityFeed_ChangeMarker_Type_Display”
Template: Gatherer Change Marker
Keyname: “ActivityFeed_SocialRatings_Type_Display”
Template: Rating
Keyname: “ActivityFeed_Status_Message_Type_Display”
Template: Status Message
The curly brackets are then replaced by the UI web part rendering code.
Hopefully this sheds a little bit more light on the internals of the activity feed internals.
Hi, thank for your help.
I have a question about the Activity Feeds…
Why on yout screen shot shows the user picture? On my “MySite” doesn´t show any picture on Activity Feeds.
I can´t see any feeds from my colleagues than have no interaction with my profile.
Do you know if it´s normal?
Thanks
The pictures are the profile pictures for the user who generated the activity (in this case me). The user has to have a picture set at the time the event was created or it will always show the grey portrait.
Hi.
Thanks a lot for the post. It was of great help.
i had a doubt. I have created my own custom activity type which has the following template :
{Publisher} has joined {Link} group.
But i wanted a picture placeholder next to the {Link} placeholder. i.e {Publisher} has joined {Image}{link} group. Is there a place holder called {image} or {picture} else how do i do it?
You need to create custom token replacement logic within the UI web part you build. There is no logic in the activity feed subsystem which handles the rendering. It is all contained within the web part code behind logic.
If you need to store ‘other information’ that doesn’t fit within the normal ActivityItem properties then i suggest using the ‘Value’ of the Link object to store the extra info. If you read through the code sample for the ECm item then you will see it stores extra info. This then gets pulled out by the web part code to produce thumbnails etc. You should avoid direct lookups during rendering as it will be far slower than pre-processing within the timerjob.