<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>michael greene</title>
	<atom:link href="http://mike-greene.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://mike-greene.com</link>
	<description>inner ramblings of a helpless mind</description>
	<lastBuildDate>Wed, 01 Feb 2012 16:56:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>People Picker Woes</title>
		<link>http://mike-greene.com/2012/02/people-picker-woes/</link>
		<comments>http://mike-greene.com/2012/02/people-picker-woes/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 16:56:10 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Active Directory]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1494</guid>
		<description><![CDATA[On my last project I ran into the chasm of the SharePoint 2010 people picker resolving to users across multiple domains. There&#8217;s loads of blog posts out there (first, second, third), plus the Microsoft documentation, but there&#8217;s one important piece missing to all of these posts. In my scenario, corp.domainA.com contains all of the users [...]]]></description>
			<content:encoded><![CDATA[<p>On my last project I ran into the chasm of the SharePoint 2010 people picker resolving to users across multiple domains. There&#8217;s loads of blog posts out there (<a href="http://martijnschouten.wordpress.com/2010/06/02/sharepoint-2010-domain-trusts-people-picker/" target="_blank">first</a>, <a href="http://www.portalsolutions.net/Blog/Lists/Posts/Post.aspx?List=1fef67f0-70ca-4263-b683-f10c1958687a&amp;ID=43&amp;Web=2a4e9897-6530-44a1-80b5-4fac295c2c26" target="_blank">second</a>, <a href="http://martinbruce.blogspot.com/2011/05/sharepoint-2010-multiple-domains-people.html" target="_blank">third</a>), plus the <a href="http://technet.microsoft.com/en-us/library/cc263460(office.12).aspx" target="_blank">Microsoft documentation</a>, but there&#8217;s one important piece missing to all of these posts.</p>
<p>In my scenario, corp.domainA.com contains all of the users (~1,600 in this case), and domainB.com contains all of our SharePoint servers, service accounts, etc. Now, the documentation states that if you have a two-way trust in place, then you don&#8217;t have to do anything special to make SharePoint resolve those accounts within the trusted domain. In this scenario, a two-way trust is in place, but the trust is between the root (domainA.com), and domainB.com. I&#8217;ll preface this with the fact that I&#8217;m not an Active Directory guy, but my &#8220;expectation&#8221; would be that if the root domain is trusted, the child domain is also trusted. That seems to be the case, but SharePoint will not resolve down to &#8220;corp\user&#8221; accounts when searching for a user in the people picker. My assumption is that despite the trust, SharePoint doesn&#8217;t dive into a child domain of a trusted domain during the query, unless you tell it you want it to.</p>
<p>The solution is to use the peoplepicker-searchadforests STSADM operation (yes, this is one things that you still have to use STSADM for&#8211;no PowerShell equivalent yet). The other thing to note, which I didn&#8217;t see mentioned in any of the blogs or documentation I found, is that you must run the STSADM operation against every URL for your web app. So if you have one or more Alternate Access Mapping setup on your web application, you must run the STSADM operation against those AAMs.</p>
<p>So in our case:</p>
<pre class="brush: bat; title: ; notranslate">
stsadm -o setproperty -pn peoplepicker-searchadforests -pv domain:corp.domainA.com;domain:domainB.com -url http://intranet
stsadm -o setproperty -pn peoplepicker-searchadforests -pv domain:corp.domainA.com;domain:domainB.com -url http://intranet.domainB.com
</pre>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2012/02/people-picker-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhancing SharePoint 2010 for the iPad (SPSAusTX 2012)</title>
		<link>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsaustx-2012/</link>
		<comments>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsaustx-2012/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 21:55:41 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Presentations & Whitepapers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSAuxTX12]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1489</guid>
		<description><![CDATA[Despite being marketed as an entertainment device rather than a mobile platform for business, the iPad continues to gain traction as a mobile device for the next generation business user. For some organizations, the rich user interaction and usability afforded by the iPad is a compelling reason to work towards cross-platform capability or iPad specific [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Despite being marketed as an entertainment device rather than a mobile platform for business, the iPad continues to gain traction as a mobile device for the next generation business user. For some organizations, the rich user interaction and usability afforded by the iPad is a compelling reason to work towards cross-platform capability or iPad specific versions of line-of-business systems. In this session we’ll review custom iPad specific enhancements for SharePoint 2010, including changes to the user interface based on the orientation of the device.</p>
<p>Presented at SharePoint Saturday Austin, TX (January 21, 2012).</p></blockquote>
<p><strong>Demonstration Video:</strong><br />
<iframe width="539" height="303" src="http://www.youtube.com/embed/K8NrTPEu_pY" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsaustx-2012/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Create SharePoint Groups with PowerShell</title>
		<link>http://mike-greene.com/2012/01/create-sharepoint-groups-with-powershell/</link>
		<comments>http://mike-greene.com/2012/01/create-sharepoint-groups-with-powershell/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 15:25:01 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1483</guid>
		<description><![CDATA[It wasn&#8217;t until I looked into this tweet that I realized there was no &#8220;New-SPGroup&#8221; type cmdlet that ships with SharePoint out of the box. Instead, we have to call the SiteGroups.Add operation on the web where we want to make the group. While this isn&#8217;t terribly intuitive for people new to PowerShell, this post [...]]]></description>
			<content:encoded><![CDATA[<!-- tweet id : 156911637658480641 --><style type='text/css'>#bbpBox_156911637658480641 a { text-decoration:none; color:#FF0000; }#bbpBox_156911637658480641 a:hover { text-decoration:underline; }</style><div id='bbpBox_156911637658480641' class='bbpBox' style='padding:20px; margin:5px 0; background-color:#642D8B; background-image:url(http://a1.twimg.com/images/themes/theme10/bg.gif);'><div style='background:#fff; padding:10px; margin:0; min-height:48px; color:#3D1957; -moz-border-radius:5px; -webkit-border-radius:5px;'><span style='width:100%; font-size:18px; line-height:22px;'>@<a href="http://twitter.com/intent/user?screen_name=webdes03" class="twitter-action">webdes03</a> <a href="http://twitter.com/search?q=%23SPSVB" title="#SPSVB">#SPSVB</a> Could use help coming up w/a script to make 110 SP Groups for 1 Site collection.  Have time to help?</span><div class='bbp-actions' style='font-size:12px; width:100%; padding:5px 0; margin:0 0 10px 0; border-bottom:1px solid #e6e6e6;'><img align='middle' src='http://mike-greene.com/wp-content/plugins/twitter-blackbird-pie//images/bird.png' /><a title='tweeted on January 10, 2012 21:33' href='http://twitter.com/#!/java_woman/status/156911637658480641' target='_blank'>January 10, 2012 21:33</a> via web<a href='https://twitter.com/intent/tweet?in_reply_to=156911637658480641' class='bbp-action bbp-reply-action' title='Reply'><span><em style='margin-left: 1em;'></em><strong>Reply</strong></span></a><a href='https://twitter.com/intent/retweet?tweet_id=156911637658480641' class='bbp-action bbp-retweet-action' title='Retweet'><span><em style='margin-left: 1em;'></em><strong>Retweet</strong></span></a><a href='https://twitter.com/intent/favorite?tweet_id=156911637658480641' class='bbp-action bbp-favorite-action' title='Favorite'><span><em style='margin-left: 1em;'></em><strong>Favorite</strong></span></a></div><div style='float:left; padding:0; margin:0'><a href='http://twitter.com/intent/user?screen_name=java_woman'><img style='width:48px; height:48px; padding-right:7px; border:none; background:none; margin:0' src='http://a2.twimg.com/profile_images/1392052729/246698_10150207586877144_501217143_7416577_6750257_n_normal.jpg' /></a></div><div style='float:left; padding:0; margin:0'><a style='font-weight:bold' href='http://twitter.com/intent/user?screen_name=java_woman'>@java_woman</a><div style='margin:0; padding-top:2px'>Rebecca Ward</div></div><div style='clear:both'></div></div></div><!-- end of tweet -->
<p>It wasn&#8217;t until I looked into this tweet that I realized there was no &#8220;New-SPGroup&#8221; type cmdlet that ships with SharePoint out of the box. Instead, we have to call the SiteGroups.Add operation on the web where we want to make the group. While this isn&#8217;t terribly intuitive for people new to PowerShell, this post should help to walk you through it.</p>
<p>Firstly, we&#8217;re adding groups to webs, not sites, so we need to identify the web where the group is going to exist. While groups are available site-wide, they&#8217;re actually stored at the web level, which explains why when you create a subsite (a web), you get the three default groups created. Yes, I realize it&#8217;s confusing that a web has a property of &#8220;SiteGroups&#8221;, and a site doesn&#8217;t&#8211;but that&#8217;s just the way it is. Before we can do anything, we need to create a variable and save our web object into it.</p>
<pre class="brush: powershell; title: ; notranslate">$web = Get-SPWeb http://intranet</pre>
<p>In addition to a title and description, we also need to specify the owner and any members of our group when we call the SiteGroups.Add operation; those users must be valid SPUser objects, not a &#8220;domain\username&#8221; string. To keep things simple for this example, let&#8217;s assume they&#8217;re the same person, since the owner is typically also a member of the group. We&#8217;re going to create a user variable, and pipe our web object to the Get-SPUser cmdlet (with a user string). This will tell PowerShell to iterate through every user in our web until it finds the one we&#8217;ve specified, and save that SPUser object to our user variable.</p>
<pre class="brush: powershell; title: ; notranslate">$user = $web | Get-SPUser &quot;domain\username&quot;</pre>
<p>Now that we have our user captured, we can go ahead and call the SiteGroups.Add operation, passing to it the title of the group, the owner of the group, the members of the group, and the description of the group (in that order).</p>
<pre class="brush: powershell; title: ; notranslate">$web.SiteGroups.Add(&quot;Group Name&quot;, $user, $user, &quot;Group Description&quot;)</pre>
<p>Now it&#8217;s a simple matter of heading on over to your groups list and validating that it&#8217;s there.</p>
<p>If, like Rebecca, you had a lot of these to do, you could store the details in a CSV file and handle your inputs from there. Let&#8217;s assume you had a CSV with columns of &#8220;Web&#8221;, &#8220;GroupName&#8221;, &#8220;User&#8221;, and &#8220;GroupDescription&#8221; that was stored in C:\Groups.csv, we can make a simple script to loop through all of the lines in the Groups.csv file and create each group.</p>
<pre class="brush: powershell; title: ; notranslate">$groups = Import-CSV c:\Groups.csv
foreach ($group in $groups) {
	$web = Get-SPWeb $group.Web
	$user = $web | Get-SPUser $group.User
	$web.SiteGroups.Add($group.GroupName, $user, $user, $group.GroupDescription)
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2012/01/create-sharepoint-groups-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making Life Easier with PowerShell (SPSVB 2012)</title>
		<link>http://mike-greene.com/2012/01/making-life-easier-with-powershell-spsvb-2012/</link>
		<comments>http://mike-greene.com/2012/01/making-life-easier-with-powershell-spsvb-2012/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:49:01 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Presentations & Whitepapers]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSVB12]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1474</guid>
		<description><![CDATA[Have you ever spent an afternoon setting site collection properties manually on every site collection in your farm? How about going through and activating features following an upgrade? These are just two simple examples of where PowerShell can turn an entire afternoon worth of work into just a few minutes. In this session we’ll start [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Have you ever spent an afternoon setting site collection properties manually on every site collection in your farm? How about going through and activating features following an upgrade? These are just two simple examples of where PowerShell can turn an entire afternoon worth of work into just a few minutes. In this session we’ll start off with a familiarization of PowerShell and progress into capabilities and usage scenarios of the out of the box SharePoint 2010 cmdlets.</p>
<p>Presented at SharePoint Saturday, Virginia Beach (January 7, 2012)</p></blockquote>
<p><strong>Resources:</strong></p>
<ul>
<li>STSADM -&gt; PowerShell Mapping<br />
<a href="http://technet.microsoft.com/en-us/library/ff621081.aspx">http://</a><a href="http://technet.microsoft.com/en-us/library/ff621081.aspx">technet.microsoft.com/en-us/library/ff621081.aspx</a></li>
<li>Scripting with Windows PowerShell (5part webcast series)
<div><a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419">http://</a><a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419">technet.microsoft.com/en-us/scriptcenter/dd742419</a></div>
</li>
<li>PowerShell Power Hour (monthly lunchtime webcasts)
<div><a href="http://idera.com/Education/PowerShell-Webcasts/">http://idera.com/Education/PowerShell-Webcasts</a><a href="http://idera.com/Education/PowerShell-Webcasts/">/</a></div>
</li>
<li>Automating Microsoft SharePoint 2010 Administration with Windows PowerShell 2.0. Gary Lapointe, Shannon Bray<br />
<a href="http://www.amazon.com/Automating-SharePoint-2010-Windows-PowerShell/dp/0470939206/ref=sr_1_1?ie=UTF8&amp;qid=1320673675&amp;sr=8-1">http://www.amazon.com/Automating-SharePoint-2010-Windows-PowerShell/dp/0470939206/ref=sr_1_1?ie=UTF8&amp;qid=1320673675&amp;sr=8-1<br />
</a></li>
<li>Automating Microsoft Windows Server 2008 R2 Administration with Windows PowerShell 2.0.  Matthew Hester, Sarah Dutkiewicz<br />
<a href="http://www.amazon.com/Automating-Microsoft-Windows-Server-PowerShell/dp/1118013867/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1320673692&amp;sr=1-1">http://www.amazon.com/Automating-Microsoft-Windows-Server-PowerShell/dp/1118013867/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1320673692&amp;sr=1-1<br />
</a></li>
<li>Windows PowerShell Command Builder<br />
<a href="http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html">http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2012/01/making-life-easier-with-powershell-spsvb-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enhancing SharePoint 2010 for the iPad (SPSVB 2012)</title>
		<link>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsvb-2012/</link>
		<comments>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsvb-2012/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 14:44:11 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Presentations & Whitepapers]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSVB12]]></category>
		<category><![CDATA[User Experience]]></category>
		<category><![CDATA[User Interface]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1466</guid>
		<description><![CDATA[Despite being marketed as an entertainment device rather than a mobile platform for business, the iPad continues to gain traction as a mobile device for the next generation business user. For some organizations, the rich user interaction and usability afforded by the iPad is a compelling reason to work towards cross-platform capability or iPad specific [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Despite being marketed as an entertainment device rather than a mobile platform for business, the iPad continues to gain traction as a mobile device for the next generation business user. For some organizations, the rich user interaction and usability afforded by the iPad is a compelling reason to work towards cross-platform capability or iPad specific versions of line-of-business systems. In this session we’ll review custom iPad specific enhancements for SharePoint 2010, including changes to the user interface based on the orientation of the device.</p>
<p>Presented at SharePoint Saturday Virginia Beach (January 7, 2012).</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2012/01/enhancing-sharepoint-2010-for-the-ipad-spsvb-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Life Easier with PowerShell (SPSRIC 2011)</title>
		<link>http://mike-greene.com/2011/11/making-life-easier-with-powershell-spsric/</link>
		<comments>http://mike-greene.com/2011/11/making-life-easier-with-powershell-spsric/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 13:52:08 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Presentations & Whitepapers]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Saturday]]></category>
		<category><![CDATA[SPSRIC11]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1448</guid>
		<description><![CDATA[Have you ever spent an afternoon setting site collection properties manually on every site collection in your farm? How about going through and activating features following an upgrade? These are just two simple examples of where PowerShell can turn an entire afternoon worth of work into just a few minutes. In this session we’ll start [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Have you ever spent an afternoon setting site collection properties manually on every site collection in your farm? How about going through and activating features following an upgrade? These are just two simple examples of where PowerShell can turn an entire afternoon worth of work into just a few minutes. In this session we’ll start off with a familiarization of PowerShell and progress into capabilities and usage scenarios of the out of the box SharePoint 2010 cmdlets. <em>As presented at SharePoint Saturday, Richmond (November 5, 2011)</em></p></blockquote>
<p><strong><span style="text-decoration: underline;">Resources:</span></strong></p>
<ul>
<li>STSADM -&gt; PowerShell Mapping<br />
<a href="http://technet.microsoft.com/en-us/library/ff621081.aspx">http://</a><a href="http://technet.microsoft.com/en-us/library/ff621081.aspx">technet.microsoft.com/en-us/library/ff621081.aspx</a></li>
<li>Scripting with Windows PowerShell (5part webcast series)
<div><a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419">http://</a><a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419">technet.microsoft.com/en-us/scriptcenter/dd742419</a></div>
</li>
<li>PowerShell Power Hour (monthly lunchtime webcasts)
<div><a href="http://idera.com/Education/PowerShell-Webcasts/">http://idera.com/Education/PowerShell-Webcasts</a><a href="http://idera.com/Education/PowerShell-Webcasts/">/</a></div>
</li>
<li><span style="text-decoration: underline;">Automating Microsoft SharePoint 2010 Administration with Windows PowerShell 2.0</span>. Gary Lapointe, Shannon Bray<br />
<a href="http://www.amazon.com/Automating-SharePoint-2010-Windows-PowerShell/dp/0470939206/ref=sr_1_1?ie=UTF8&amp;qid=1320673675&amp;sr=8-1">http://www.amazon.com/Automating-SharePoint-2010-Windows-PowerShell/dp/0470939206/ref=sr_1_1?ie=UTF8&amp;qid=1320673675&amp;sr=8-1<br />
</a></li>
<li><span style="text-decoration: underline;">Automating Microsoft Windows Server 2008 R2 Administration with Windows PowerShell 2.0</span>.  Matthew Hester, Sarah Dutkiewicz<br />
<a href="http://www.amazon.com/Automating-Microsoft-Windows-Server-PowerShell/dp/1118013867/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1320673692&amp;sr=1-1">http://www.amazon.com/Automating-Microsoft-Windows-Server-PowerShell/dp/1118013867/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1320673692&amp;sr=1-1<br />
</a></li>
<li>Windows PowerShell Command Builder<br />
<a href="http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html">http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2011/11/making-life-easier-with-powershell-spsric/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamic Master Page Logic</title>
		<link>http://mike-greene.com/2011/10/dynamic-master-page-logic/</link>
		<comments>http://mike-greene.com/2011/10/dynamic-master-page-logic/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:55:17 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Branding]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1443</guid>
		<description><![CDATA[I recently had a need to set a specific master page based on a query string. In this particular example, a SharePoint page needed to be loaded within a frame which presented the need to load a custom master page without navigation, header, ribbon, etc. Initially, I took the approach of simply turning off the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had a need to set a specific master page based on a query string. In this particular example, a SharePoint page needed to be loaded within a frame which presented the need to load a custom master page without navigation, header, ribbon, etc. Initially, I took the approach of simply turning off the unwanted elements with CSS but this approach means those DOM elements are still loaded behind the scenes, even if they&#8217;re hidden. This produced a higher than desirable load time and I went off looking for a way to set the master page within my page layout, but doing so in such a way that the master used when the page was &#8220;framed&#8221; would only be used in that scenario, as opposed to all the time. The solution turned out to be quite simple&#8230;</p>
<p>On initialization, the page will grab the MasterPageFile property as set by the web&#8217;s configuration. Within my custom page layout, I added the following simple script block to override the default OnPreInit of the page and set my custom master.</p>
<pre class="brush: jscript; title: ; notranslate">
&lt;script runat=&quot;server&quot;&gt;
    protected override void OnPreInit(EventArgs e) {
        base.OnPreInit(e);
        if (this.Request.Url.AbsoluteUri.Contains(&quot;frame=true&quot;)) {
            this.MasterPageFile = &quot;framed.master&quot;;
        }
    }
&lt;/script&gt;
</pre>
<p>I&#8217;m using the AbsoluteUri property to check the URL for my &#8220;frame=true&#8221; reference, which is what ultimately triggers the change in master page. If you go to <em>http://lab/Pages/Test.aspx</em> the Test.aspx page will be rendered using the master page the site is configured for. If you go to <em>http://lab/Pages/Test.aspx?frame=true</em> it will be rendered using the &#8220;framed.master&#8221; master page.</p>
<p>For some additional background, you can take a look at <a href="http://blog.pixelmill.com/821/sharepoint-2010-assign-a-unique-masterpage-to-a-page-layout-in-a-publishing-portal/" target="_blank">this post</a> by Eric Overfield, and <a href="http://geekswithblogs.net/juanlarios/archive/2011/08/04/sharepoint-2010-assign-a-unique-masterpage-to-a-page-layout.aspx" target="_blank">this post</a> by Juan Larios.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2011/10/dynamic-master-page-logic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Custom CSS and SharePoint Branding (The Right Way)</title>
		<link>http://mike-greene.com/2011/10/custom-css-and-sharepoint-branding-the-right-way/</link>
		<comments>http://mike-greene.com/2011/10/custom-css-and-sharepoint-branding-the-right-way/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 18:07:27 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Branding]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1427</guid>
		<description><![CDATA[There was a post on Stack Exchange this morning that struck a bit of a nerve with me. I don&#8217;t aggravate easily, but I&#8217;m a firm believer that the purpose of public discussions is to promote best practice methods and share that knowledge with people that have asked for answers to their problems. When best practice approaches [...]]]></description>
			<content:encoded><![CDATA[<p>There was a <a href="http://sharepoint.stackexchange.com/questions/20747/sharepoint-branding-styling-the-quick-launch" target="_blank">post on Stack Exchange</a> this morning that struck a bit of a nerve with me. I don&#8217;t aggravate easily, but I&#8217;m a firm believer that the purpose of public discussions is to promote best practice methods and share that knowledge with people that have asked for answers to their problems. When best practice approaches were suggested by James Love (<a href="http://twitter.com/#!/jimmywim" target="_blank">@jimmywim</a>) and myself, we were practically attacked by people insisting that their practices were the way things should be done. I&#8217;m not naive&#8211;there&#8217;s a lot of people that make a lot of bad decisions&#8211;but the purpose of the community should be (and largely is) to help share the right way things should be done. The size of the deployment or scope of the customizations shouldn&#8217;t be an excuse for making bad decisions and following bad practices. At the risk of beating a dead horse, this is the best practices approach for deploying custom CSS styling in SharePoint (and why you shouldn&#8217;t be using these other methods).</p>
<p><strong>Suggested Method 1: Write your own custom CSS selectors, and put !important on every selector.</strong></p>
<p>The first suggestion on Stack Exchange was that you had to put !Important on all of your selectors to override any SharePoint styles. If you find that you need to use !important to make your CSS take priority over the out of the box CSS, either your selectors are wrong, or your custom CSS is being loaded before the core CSS. When CSS is rendered, the highest priority selectors will be those that are the last to be loaded (unless an !important declaration exists). Not as big of a deal here but in terms of the actual order of operations, your browser will also treat any inline style attribute as a higher priority than your stylesheet (be it embedded or linked).  SharePoint&#8217;s core CSS uses nested selectors, so the selectors for your custom CSS must follow suit. If SharePoint us using &#8220;body .s4-ca&#8221; and you make a custom selector called &#8220;.s4-ca&#8221;, the browser will render the more specific selector since it has a higher priority. Using !important is a bad practice (for all CSS/web development, not just SharePoint), because it drastically changes the approach you need to use to override that selector/class later. Finally, you need to think about cross-browser compatibility. In SharePoint 2010, this absolutely applies. In a lot of cases, you must write a style one way, then write a modifier to make that style render correctly in older browsers. Flagging !important on all of your styles makes this a real mess.</p>
<p>The use of the !important flag is simply a lack of understanding for how the browser will prioritize CSS markup. There&#8217;s a lot of resources out on the web that cover this, but in a nutshell: more specific selectors have priority over less specific ones, and in a scenario where two rules have the same weight, the last one specified will have a higher priority. Use debugging tools such as those in Internet Explorer or the ones within Google Chrome or the Firebug extension for Firefox to identify the selectors that SharePoint uses. Personally, I prefer Chrome because the developer tools are included without the need of an add-on, and you can make real-time changes to the CSS which are rendered in the browser as you edit (making it an excellent development companion when authoring new CSS). Once you know what selector SharePoint is using, use that same selector. Lastly, make sure that your custom style sheet is being loaded into the master AFTER SharePoint&#8217;s core files because remember, when rules have the same weight, the last one loaded takes priority. This ensures that your styles take over, without filling your markup with !important flags.</p>
<p><strong>Suggested Method 2: Just modify the core files in SharePoint Designer.</strong></p>
<p>Obviously it&#8217;s a bad practice to edit any core files, be it Master Pages, CSS or JavaScript. A particular user was adamant that it was an acceptable method because when you customize a file in SharePoint Designer a local copy is created just for that site, so you&#8217;re not affecting any other sites on the farm. While this is true, updates to core files can still be made during service packs or patches, leaving your customized file behind. Granted your custom master pages are never going to be updated, but keeping the core files uncustomized ensures you have a supported rollback plan&#8211;something you obviously loose when you start customizing the core files. There&#8217;s a lot of talk about SharePoint upgrades these days, and this is one of the things that will potentially make your upgrade an utter nightmare. Sure, you can go in and reset all of the customized files to their definition, but should you have to? Making a copy of a file takes all of a couple seconds and it will make your life 10 times easier if you need to reset to vanilla SharePoint. Can you just edit files, yes. Does it work, yes. Should you do it, no.</p>
<p><strong>Best Practice Method 1: Branding Deployed via Solution</strong></p>
<p>Hands down, the best practice for branding deployment is a Visual Studio solution packaged into a WSP and deployed to the farm. This method makes maintenance and updates to your branding solution easier, gives you more robust change control, and integration with source control (such as Team Foundation Server). Deployment via solution also makes your branding reusable between multiple site collections. Unlike modification of files in SharePoint Designer, you no longer have to touch 10 master page files to brand 10 sites; simply activate the solution. If you need to deploy an update to your solution, the update will automatically be pushed to each site where the solution is active (assuming you haven&#8217;t customized the files in SharePoint Designer). A correctly built branding package will also give you the capability to rollback to vanilla SharePoint with just a few clicks. It may not seem like an important thing now, but when you go to upgrade to the next version of SharePoint you&#8217;ll be glad you can do that.</p>
<p><strong>Best Practice Alternative: SharePoint Designer</strong></p>
<p>SharePoint Designer is a tool that has a lot of functionality. Yes, you have the ability to modify master pages and things of that nature, but it doesn&#8217;t mean that you should. Simply because you can do something doesn&#8217;t make it a best practice. That said, in certain environments you may not have the ability to deploy a solution; either due to a lack of staff with the know-how, a policy restriction, or lack of the necessary access to the server. In those scenarios (and only in those scenarios) should SharePoint Designer be used for branding. If you must use SharePoint Designer, you should follow some common-sense guidelines, one of the fundamental ones being to not modify out of the box files. If you need a custom master page, make a copy of the v4.master and work from that.</p>
<p><strong>Where Should the CSS Live?</strong></p>
<p>The purpose of a stylesheet is to promote reuse. It doesn&#8217;t make much sense to include your styles in every page, and in SharePoint 2010 where we have standard and minimal masters, it doesn&#8217;t make sense to duplicate your common styles by including them in each master page. Your stylesheet should be an external file, stored where it can be used by all instances of the masterpage(s) using them. If you&#8217;re deploying your branding using a solution, then most likely these files should live in a folder within the 14 hive. I&#8217;m personally not a fan of putting them in the style library, since (despite being able to manage it from the 14 hive), your browser will treat them as separate files for each site collection. This means that my browser will re-cache my stylesheet for each site I go to, even though they&#8217;re exactly the same file. If it&#8217;s 10 lines of CSS then this is negligible, but if I&#8217;ve got a few hundred it makes a difference.</p>
<p><strong>Continuing Education</strong></p>
<p>I&#8217;m not one of those people that usually promotes books, but if this topic is something that you wish to brush up on I suggest you get your hands on a copy of <a href="http://blog.drisgill.com/" target="_blank">Randy Drisgill&#8217;s</a> (<a href="http://twitter.com/#!/drisgill" target="_blank">@drisgill</a>) book. He covers (in detail) processes for branding as well as the issue of CSS priority.</p>
<p><strong>Demo</strong><br />
James created a great screencast that shows the process for correctly referencing external CSS files using the SharePoint:CSSRegistration tag. Check that out below, and visit his blog at <a href="http://e-junkie-chronicles.blogspot.com/" target="_blank">http://e-junkie-chronicles.blogspot.com/</a>.</p>
<p><iframe src="http://player.vimeo.com/video/30105108?title=0" width="540" height="304" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2011/10/custom-css-and-sharepoint-branding-the-right-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Night Timelapse</title>
		<link>http://mike-greene.com/2011/09/night-timelapse/</link>
		<comments>http://mike-greene.com/2011/09/night-timelapse/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 19:39:42 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[timelapse]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1418</guid>
		<description><![CDATA[Shot on Wednesday, September 28, 2011. What started as a clear night was later met by clouds and lighting. Also visible is NC Route 55 (one of the main arteries in and out of Research Triangle Park), and a fair amount of air traffic. This timelapse is made up of just over 1,500 images taken [...]]]></description>
			<content:encoded><![CDATA[<p>Shot on Wednesday, September 28, 2011. What started as a clear night was later met by clouds and lighting. Also visible is NC Route 55 (one of the main arteries in and out of Research Triangle Park), and a fair amount of air traffic. This timelapse is made up of just over 1,500 images taken over a 5 hour period.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2011/09/night-timelapse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mostly365</title>
		<link>http://mike-greene.com/2011/09/mostly365/</link>
		<comments>http://mike-greene.com/2011/09/mostly365/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 14:10:14 +0000</pubDate>
		<dc:creator>michael greene</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Flickr]]></category>

		<guid isPermaLink="false">http://mike-greene.com/?p=1412</guid>
		<description><![CDATA[I&#8217;ve finally decided to try to do #mostly365; I figure it&#8217;s one way to make sure I get better with my photography and make sure I&#8217;m using that creative part of my brain every day. Use the #mostly365 link on the left or head over to http://365.mike-greene.com and check out my progress.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally decided to try to do #mostly365; I figure it&#8217;s one way to make sure I get better with my photography and make sure I&#8217;m using that creative part of my brain every day. Use the #mostly365 link on the left or head over to <a href="http://365.mike-greene.com" target="_blank">http://365.mike-greene.com</a> and check out my progress.</p>
]]></content:encoded>
			<wfw:commentRss>http://mike-greene.com/2011/09/mostly365/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

