Thursday, 20 February 2014

Making the Newsfeed web part available outside of My Sites in SharePoint 2013

This is actually a web part titled Newsfeed, and can be found under the Social Collaboration category. Now, you may want to have the Newsfeed on the homepage of your main portal rather than My Site. To make this web part available in your site collection, you will need to activate the feature with title “My Site Layouts Feature“. This is a hidden site collection feature so you will need to use SharePoint Manager or PowerShell. The feature ID is 6928B0E5-5707-46a1-AE16-D6E52522D52B. Its physical location under {SharePointRoot} is TEMPLATE\FEATURES\MySiteLayouts.
This feature brings a number of other web parts and also the MySite.master master page. Check its manifest for further details.
Enable-SPFeature -Identity 6928B0E5-5707-46a1-AE16-D6E52522D52B -Url http://yourSiteCollection

The SiteFeedWebPart is in the Microsoft.SharePoint.Portal.WebControls namespace.

Making My Tasks web part available outside of MySites

The My Tasks web part exists in MySites by default, and can be found under the Content Rollup category. To make this web part available outside of MySites, activate the “My Tasks Dashboard” feature.

This is a hidden Web-scoped feature. The feature ID is 89D1184C-8191-4303-A430-7A24291531C9, and the feature folder under SharePointRoot is MyTasksDashboard.

http://bernado-nguyen-hoan.com/2013/03/03/making-my-tasks-web-part-available-outside-of-mysites/

source: http://bernado-nguyen-hoan.com/2013/02/12/making-the-newsfeed-web-part-available-outside-of-my-sites-in-sharepoint-2013/

How to Get Login Name and Display Name using SharePoint 2013 REST API

jQuery.ajax({
    url: "/SiteName/_api/web/lists/getbytitle('ListName')/items",
    type: "GET",
    headers: { "Accept": "application/json;odata=verbose" },
    success: function(data, textStatus, xhr) {
        var dataResults = data.d.results;
        var resultId = dataResults[0].AuthorId.results[0];        
        getUser(resultId)
    },
    error: function(xhr, textStatus, errorThrown) {
        alert("error:"+JSON.stringify(xhr));
    }
});

function getUser(id){
var returnValue;
  jQuery.ajax({
   url: "http://YourSite/_api/Web/GetUserById(" + id + ")",
   type: "GET",
   headers: { "Accept": "application/json;odata=verbose" },
   success: function(data) {
           var dataResults = data.d;
      //get login name  
      var loginName  = dataResults.LoginName.split('|')[1];
      alert(loginName);     
      //get display name
      alert(dataResults.Title);
   }
 });
}
How to Get Login Name and Display Name using SharePoint 2013 REST API
http://www.codeproject.com/Articles/692289/How-to-Get-Login-Name-and-Display-Name-using-Share

AngularJS

SharePoint 2013 Apps and AngularJS - The basics
http://blog.meligo.be/2013/08/sharepoint-2013-apps-and-angularjs-the-basics/
SharePoint Hosted App with CSOM & AngularJS for MVC Javascript
http://www.jeremythake.com/2013/10/sharepoint-hosted-app-with-angularjs-for-mvc-javascript/
Marc D Anderson
http://sympmarc.com/
Mark Rackley
http://www.sharepointhillbilly.com/default.aspx​
Andrew Connell
http://www.andrewconnell.com/
SharePoint Hosted App with CSOM & AngularJS for MVC Javascript
http://www.jeremythake.com/2013/10/sharepoint-hosted-app-with-angularjs-for-mvc-javascript/

"Sign in as Different User" menu option is missing in SharePoint Server 2013

http://siteurl/_layouts/closeConnection.aspx?loginasanotheruser=true 

Bookmarklet to Sign in as a Different User


"Sign in as Different User" menu option is missing in SharePoint Server 2013
http://support.microsoft.com/kb/2752600

User Profile (issues when NetBIOS name is different from FQDN)

Problem:
After installing user profile and sync with active directory, all the users prefix is changed to "corp/".
user Profile 1.PNG

For any profile which you click on "Edit My Profile", even without making any changes, the prefix will change to "NTDOMAIN\".
user Profile 2.PNG

Reason:
HBF adctive directory domain name and DNS name is different:​
Set.PNG
Solution:
  • First, delete the AD connections from the user profile manage page.
  • then, run this powershell command
Get-SPServiceApplication
Get-SPServiceApplication.PNG
$upsa = Get-SPServiceApplication -Id <GUID of User Profile Service Application>
$upsa.NetBIOSDomainNamesEnabled = 1
$upsa.Update() 
Replace <GUID of User Profile Service Application> with the service guid above.
NetBIOSDomainNamesEnabled.PNG

  • Restart IIS and OWSTimer
  • Recreate the AD connection
  • Run full import twice
  • Run incremental sync

Use case: Automatically importing user profile pictures to SharePoint 2013 (and 2010)


SP2010 User Profile Service Application Setup and NetBIOSDomainNamesEnabled Issues
http://www.freakingsharepoint.com/2012/12/sp2010-user-profile-service-application.html 

err 5766 - Error provisioning the local timer service instance during deploying of administration application pool credentials

this error happens when the application pool account password has been changed.
log err jww virtual.PNG


"Error provisioning the local timer service instance during deploying of administration application pool credentials, please provision manually. The password for the account NTDOMAIN\spa, as currently stored in SharePoint, is not the same as the current password for the account within Active Directory. To fix this with PowerShell, run Set-SPManagedAccount -UseExistingPassword."
 
To resolve the issue, run this powershell command.
Set-SPManagedAccount -UseExistingPassword 
​

Set-SPManagedAccount.PNG


Hide SharePoint Navigation

<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
    .s4-ca{margin-left:0px !important; margin-right:0px !important;}
</style>

Hide ScrollBar


<style type="text/css">
body.v4master { overflow: visible; height: inherit; width: inherit;}
body #s4-workspace { overflow: visible !important; }
body #s4-ribbonrow { position: fixed; z-index: 1000; overflow-y:visible;}
#s4-ribbonrow .ms-MenuUIPopupBody, #s4-ribbonrow .ms-popoutMenu, .ms-cui-menu[id ^= "Ribbon."] { position: fixed !important; }
.ms-dlgOverlay { width: 100% !important; }
</style>


my notes:

Corporate Library

Remove webpart:
http://thepulse/corporatelibrary/Site%20Pages/Forms.aspx?Contents=1 

Add css below:
<style type="text/css">
    #s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
    .s4-ca{margin-left:0px !important; margin-right:0px !important;}

body.v4master { overflow: visible; height: inherit; width: inherit;}
body #s4-workspace { overflow: visible !important; }
body #s4-ribbonrow { position: fixed; z-index: 1000; overflow-y:visible;}
#s4-ribbonrow .ms-MenuUIPopupBody, #s4-ribbonrow .ms-popoutMenu, .ms-cui-menu[id ^= "Ribbon."] { position: fixed !important; }
.ms-dlgOverlay { width: 100% !important; }
</style>