CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Tag Archives: social

Showing Birthdays and Job Anniversaries in the Newsfeed

anniversary-001

In our project we have a requirement to show birthdays and job anniversaries in the Newsfeed. The solution is simple (when you know it) but there has not been any information about it online, until today. I want to share a few lines of PowerShell code to enable Anniversary notifications in the Newsfeed. This desired piece of code was written by my colleague Emma Degerman. Enjoy:

$job = Get-SPTimerJob | ? { $_.TypeName -like "*.UserProfileChangeJob" }
$job.GenerateAnniversaries = $true
$job.Schedule = [Microsoft.SharePoint.SPSchedule]::FromString("hourly between 55 and 55")
$job.Update()

The code retrieves the Timer Job that changes User Profiles, sets “GenerateAnniversaries” to true, then it updates the schedule to run it before the Activity Feed Timer Job and updates it. By the way, it is only applicable for SharePoint On Premises.

This is it, a quick tip for a great Intranet.

Get all comments

If you try to get comments quantity for a url, you may wonder, why there is only quantity of the comments which the current user has posted:

public int GetNumberOfNewsPageComments
        (SPSite currentSite, string pageUrl, int max)
{
    var serviceContext = 
            SPServiceContext.GetContext(currentSite);
    var socialCommentManager = 
            new SocialCommentManager(serviceContext);
    var comments = socialCommentManager
            .GetComments(new Uri(pageUrl), max);            

    if (comments != null)
    {
        return comments.Length;
    }

    return -1;
}

The solution is to impersonate the SPSite object with an account who has the rights to manage social data. Give this permission to the account in CA – Application Management – Service Applications – User Profile Service.

SocialCommentWebPart

Lägg till en kommentarruta i din sida. Gör det lite till webb2.0. Här finns lite info. På denna sida står det hur man kan lägga till webparten mha xml.

You can even provision a social comment webpart like it is done in my site:

<File Url="person.aspx" Type="Ghostable">
    <AllUsersWebPart WebPartZoneID="MiddleLeftZone" WebPartOrder="3">
      <![CDATA[
        <WebPart xmlns="http://schemas.microsoft.com/WebPart/v2">
            <Assembly>Microsoft.SharePoint.Portal, Version=14.0.0.0, 
                    Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
            <TypeName>Microsoft.SharePoint.Portal.WebControls.SocialCommentWebPart</TypeName>
            <Title>$Resources:spscore,SocialComment_WebPart_Title</Title>
            <Description>$Resources:spscore,SocialComment_WebPart_Description</Description>
            <PartOrder>3</PartOrder>
            <FrameType>TitleBarOnly</FrameType>
            <AllowMinimize>true</AllowMinimize>
            <AllowRemove>true</AllowRemove>
            <IsVisible>true</IsVisible>
        </WebPart>
        ]]>
    </AllUsersWebPart>
</File>
Discovering SharePoint

And going crazy doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis