Using Activity Feed Web Part outside My Sites

One of the project i have done had a requirement that Activity Feed web part should be displayed on intranet home page. This is the one that is displayed by default on "My Newsfeed" page of SharePoint 2010 my sites. Well bad luck. The web part is not available by default to any other sites except my sites.

One of my colleagues had an idea of exporting this web part from my sites and importing it into intranet site. So far, so good. Web part successfully displayed and showing Newsfeed.

Since, this web part was being displayed on the intranet home page in a much shorter area than a "my site" home page, something had to be done to remove the extra information. I override some css to make the web part fit a small area on home page. Following are the overridden css classes just in case somebody needs them:

Used to hide the top links ("My Colleagues", "My Interests" and "Newsfeed Settings") in Activity Feed web part:
.ms-newsfeedlinksection
{
display:none !important;
}


Used to hide the borders on profile picture thumbnail image on Activity Feed web part:
.ms-profilepicture IMG
{
border: #c5c7c9 1px solid !important;
}


Used to minimize the image padding for Activity Feed web part:
.ms-newsfeedeventimage
{
padding-left:0px;
}


Below is how the short version of Activity Feed web part looks on intranet home page:

Comments

Popular posts from this blog

PowerApps Form for SharePoint and Access Denied Errors

Prevent site owners from creating subsites in SharePoint 2010

Getting Page Field Value in custom publishing page layout