SharePoint Saturday Boston 2015

Thanks to everyone for attending my session on “SharePoint 2016 On-Prem: What you need to know”.

My slides have been posted here: SharePoint Saturday Boston Slides.

As a follow up to my presentation there was a question from the audience regarding changing your AD Password in the cloud with O365 ADFS Identity Federation. It is possible if you are utilizing Azure AD Premium, which offers 2-way password synchronization. You can find out more details on Mark’s blog post at Changing Your Password with Office 365 FAQ.

SharePoint Saturday Boston 2014 – Slides

Thanks to everyone that joined me this past Saturday for my session on Tools to Expedite SharePoint Development. We started by covering some of my favorite tools and then lead into a community discussion of other tools that are helpful.

My updated slides including the community discussed tools are posted here: SharePoint Saturday Boston Slides.

Would you like to help expand this list? Post your favorite tools in the comments below.

Change CSS of a Specific Content Query Web Part

A TechNet member recently posted a question about increasing the font size of a specific Content Query Web Part (CQWP) on a SharePoint 2013 Page. The intent was to target one of many CQWP on the page and specifically not apply this change site-wide.

Using jQuery we can easily target the Web Part and modify the appropriate CSS:
1. Add a Content Editor Web Part to your page and select “Edit Source” in the ribbon
2. Paste the following code into your window:

<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript" />
<script type="text/javascript">
$(document).ready(function () {
	$(".ms-webpart-chrome-title span:contains('My Content Query Web Part Title')").parent().parent().parent().parent().parent().children(".ms-WPBody").css("font-size", "25px");
});
</script>

3. Replace ‘My Content Query Web Part Title’ with the title of your Web Part
4. Save & Close

It’s also recommended to save & upload the JavaScript file http://code.jquery.com/jquery-1.10.2.min.js into your SharePoint Environment, and reference your copy of it.

How to hide the “Make Homepage” button in the SharePoint ribbon

A TechNet Forum member was looking for help on hiding the “Make Homepage” button in the SharePoint ribbon. I provided the following XML to hide the button:

<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
    Id="RemoveMakeHomePageButton"
    Location="CommandUI.Ribbon">
    <CommandUIExtension>
      <CommandUIDefinitions>
        <CommandUIDefinition Location="Ribbon.WikiPageTab.PubPageActions.SetHomePage" />
      </CommandUIDefinitions>
    </CommandUIExtension>
  </CustomAction>
</Elements>

The following MSDN article provides additional guidance on getting started with customizing the Ribbon, Customizing and Extending the SharePoint 2010 Server Ribbon.

SharePoint 2010 Bug – Hiding Empty Web Part Zones

I recently experienced a problem running SharePoint Server 2010 Oct 2013 CU and Internet Explorer 8. SharePoint has contained a function called MSO_MakeInvisibleIfEmpty() since the WSS 3.0 days, which hides a Web Part Zone if it is empty. The function works by looking for all elements in the DOM that have the name attribute set to “_invisibleIfEmpty”, and if there are no child nodes, it adds a style of display=”none”.

The function has the following definition:

function MSOLayout_MakeInvisibleIfEmpty()
{ULSKRf:;
	var allElements=document.getElementsByName("_invisibleIfEmpty");
	var agt=navigator.userAgent.toLowerCase();
	var isNav=((agt.indexOf('mozilla')!=-1)&&((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible')==-1)));
	var isIE=(agt.indexOf("msie")!=-1);
	for (var curElement=0; curElement < allElements.length; curElement++)
	{
		if ((isIE && allElements[curElement].childNodes.length==0)
			|| (isNav && allElements[curElement].childNodes.length <=1))
		{
			allElements[curElement].style.display="none";
		}
	}
}

This function lives in the files IE50UP.js, IE55UP.js, and NON_IE.js, with SharePoint loading the appropriate file depending on your browser.

I am seeing the bug when running IE8 in native mode, in which case none of the 3 available JavaScript files are being loaded. If I turn on IE Compatibility Mode, or use Firefox or Chrome, the appropriate JavaScript files load.

As a work-around to this bug, I have pasted the contents of this function into a minified JavaScript file that I am using on my intranet’s home page.