Updated 2010 Starter Master Pages up on CodePlex

Just a quick note to tell everyone that I have updated my starter master pages on CodePlex. I have made several minor tweaks that should help them be more “minimal” for easier use in your branding projects.

Here are some of the bigger updates in this release:

  • Additions to the SharePoint Server starter master page to include some My Site support
  • A third starter master page that works with the Meeting Workspace (yes they still require a unique master page in 2010 but unlike in 2007, they are very similar to the standard master page)

You can grab my latest starter master pages from: http://startermasterpages.codeplex.com

If you still need the previous version here is the link: http://startermasterpages.codeplex.com/releases/view/36075

Microsoft’s SharePoint 2010 Starter Master Page

Last week, Microsoft’s Dallas Tester (http://twitter.com/dgtester) posted a new starter master page for SharePoint 2010:

http://code.msdn.microsoft.com/odcSP14StarterMaster

For those that don’t already know, “Starter” is the new term for minimal master pages that were available for SharePoint 2007. Here are some screenshots of the starter master page in action, you will see that it is quite minimal:

image

image

This is a great resource for learning about SharePoint 2010 master pages. If you are interested in another type of starter master page experience, you can always check out my own starter master pages at http://startermasterpages.codeplex.com. They are less minimal, but still are a good starting point for SharePoint 2010 branding projects.

Removing the Name ActiveX Control Warning in SharePoint 2010

When I initially looked at SharePoint 2010 I was disheartened to see that my old nemesis the Name.dll ActiveX control warning was still popping up on my sites. If you haven’t seen it yet, here is a screenshot:

image

The warning has to do with SharePoint wanting to show presence info (the little green icon next to people in your organization that are currently online). It often ends up showing on public SharePoint sites because it is elusive in development environment, it will only show in these circumstances:

  • IE7 or IE8
  • Site must not be in the Intranet zone, which typically automatically includes any site that you are local to or share a domain with
  • Must have Office, or Messenger or any other similar program installed
  • Must have NOT already said yes to IE installing the ActiveX control

If any one of those criteria isn’t met, the warning doesn’t show for you, but it most likely WILL show for anonymous internet users. In the past we had to use some JavaScript in the master page to hide this warning, but thanks to Kirk Evans’ blog post (http://blogs.msdn.com/kaevans/archive/2010/01/28/presence-in-sharepoint-2010.aspx), I have just learned that the message can also be turned off via Central Administration in SharePoint 2010, here’s how:

Open Central Administration and click Manage Web Applications. From there select your web application from the list and then from the ribbon click General Settings > General Settings:

image

After that, simply change the “Enable Person Name smart tag and Online Status for members” to No, and click OK:

image

That’s all you have to do to get rid of the warning, so no one has any excuse now if you are working on a public SharePoint site it should be turned off. Also, its worth noting that you can still get rid of the message via JavaScript in the master page if you prefer:

<script type="text/javascript">
    function ProcessImn(){}
    function ProcessImnMarkers(){}   
</script>

If you have access to Central Administration that is probably the preferred method, but if you don’t or you want to ensure that it never is turned on by mistake, the master page method is a sure fire way to hide it always.

Error in Current Docs for Upgrading Fixed Width Master Pages to SharePoint 2010

This probably affects anyone that has tried to make a fixed width master page in SharePoint 2010 (unless you have already noticed the error) it affects the MSDN article “Upgrading an Existing Master Page to the SharePoint Foundation Master Page” and my Starter Master Pages (expect an update to my starter master pages very soon).

In the article it states:

If your page is fixed width, add the class s4-nosetwidth to the bodyContainer div element. The updated div element would look like the following. <div ID="s4-bodyContainer" class="s4-nosetwidth">

In actuality you need to place the s4-nosetwidth on the previous div tag like this:

<div ID="s4-workspace" class="s4-nosetwidth">

Without that line SharePoint injects CSS inline to your <div> and sets the width the current size of the browser (which completely wrecks most fixed width design).

SP2010 Branding Tip #11 – Un-Floating the Ribbon in custom Master Pages

In the 2010 out of the box master pages, Microsoft has included code that causes the ribbon to float above the rest of the page content (you might say it sticks to the top of the page). You can see the effect here:

image

See how the right scroll bar stops at the ribbon? That’s the new functionality at work. It makes editing the page a nicer because you don’t have to scroll to the top of the page constantly.

But what if you are doing a VERY stylized branded SharePoint site? Sometimes this functionality can get confused, especially if you are using CSS to position the body “fixed”. I saw this happen recently when Paul Keijzers (@KbWorks on Twitter) was having problems using my Starter Master Pages (http://startermasterpages.codeplex.com). His problem would have been the same if he used Microsoft’s v4.master.

So, how do we make the page scroll in a more traditional fashion? Pretty easy, just follow these steps in your custom master page (or css):

  1. Remove or override the CSS that hides the body overflow - body { overflow:hidden; }. You can override with body { overflow:auto; }
  2. Remove scroll="no" from the <body> tag
  3. Remove ID="s4-workspace” from the <div> tag that surrounds the page content (below the ribbon). You can remove the entire <div> tag and its corresponding </div> if you would prefer.

Save and check-in / approve and you should have a page that scrolls normally. The ribbon will stay at the top and scroll off the page if you have a lot of page content. Note, there may be an easier way to do this by using something like the class="s4-nosetwidth" code that takes away the width setting, but I haven’t been able to find anything that would change the scrolling behavior.

New SDTimes Article: The New Theming Engine

My latest article for SD Times has been published to their website, titled Spotlight on 2010: The New Theming Engine. Obviously, it's an overview of how themes work in SharePoint 2010. Check it out:

Spotlight on 2010: The New Theming Engine

SharePoint 2007 Branding Article - Conditional Logic in XSL Using the XML Web Part

I just realized that my SD Times “SharePointer” article from September was published (probably has been for a while). This article is a simple example of how you can use conditional logic in XSL to color code XML data in a SharePoint XML Web Part based on certain numeric values in the data.

SD Times - Share Pointers: Conditional Logic in XSL Using the XML Web Part