<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2123409279078878090</atom:id><lastBuildDate>Thu, 31 May 2012 18:27:56 +0000</lastBuildDate><category>debug</category><category>calendar</category><category>output cache</category><category>publishing page</category><category>colour</category><category>Twitter</category><category>MOSS search content source bug</category><category>SP2010</category><category>solution</category><category>colour calendar</category><category>color</category><category>SSD</category><category>Mac</category><category>SharePoint</category><category>Macbook pro</category><category>status</category><category>MOSS</category><category>My Site</category><category>color calendar</category><category>SharePoint 2010</category><category>web.config</category><category>Virtual machine</category><title>PlanetWilson SharePoint Blog</title><description>A blog about all things SharePoint</description><link>http://planetwilson.blogspot.com/</link><managingEditor>noreply@blogger.com (Mark Wilson)</managingEditor><generator>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/PlanetWilson" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="planetwilson" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-7061662833251474018</guid><pubDate>Tue, 01 May 2012 15:02:00 +0000</pubDate><atom:updated>2012-05-01T15:03:24.468Z</atom:updated><title>This blog has moved to http://www.planetwilson.co.uk/blog</title><description>This blog has now moved to:-&lt;br /&gt;&lt;br /&gt;http://www.planetwilson.co.uk/blog&lt;br /&gt;&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-7061662833251474018?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2012/05/this-blog-has-moved-to.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-2819604310112216584</guid><pubDate>Thu, 11 Aug 2011 20:53:00 +0000</pubDate><atom:updated>2011-08-11T21:00:58.173Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">My Site</category><category domain="http://www.blogger.com/atom/ns#">Twitter</category><category domain="http://www.blogger.com/atom/ns#">status</category><title>Making the SharePoint 2010 My Site status more like Twitter</title><description>The out of the box status update in the My Profile page of SharePoint 2010 servers its purpose of allowing end users to update their status and let everyone know what they are up to.
&lt;br /&gt;
&lt;br /&gt;However it is a little disconcerting in the way it works in that one the user starts typing, any clicking out of the box immediately posts the update.
&lt;br /&gt;This can often lead to mistakes in posting, half written messages and so on appearing in the activity feed. Something I see often.
&lt;br /&gt;
&lt;br /&gt;I was asked by a client to change this behaviour and make it more like Twitter, the same 140 character limit, a count of the number of characters left and a chance to cancel the post and choose exactly when to post.
&lt;br /&gt;The challenge here of course is in amending the functionality of the out of the box component.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;Luckily with JQuery to hand we can override the default behaviour and make it work more like Twitter. Simply copy and paste the following code into a content editor web part on the status update page. The CEWP isn't available by default you will need to go into the web part gallery and add it. Alternatively you can add this script to a document library or similar and add a reference to it in your My Site master page.
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div style="height:300px;overflow:scroll;"&gt;
&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;var statusbox = jQuery('span[class="ms-identitypiecenoteindent"] &amp;gt; input[maxlength]');
&lt;br /&gt;var originalstatus = statusbox.val();
&lt;br /&gt;var savestatus = statusbox.attr('onblur');
&lt;br /&gt;statusbox.removeAttr('onblur');
&lt;br /&gt;statusbox.removeAttr('onkeydown');
&lt;br /&gt;statusbox.attr('statusmaxlength', 140);
&lt;br /&gt;statusbox.css('width', '75%');
&lt;br /&gt;
&lt;br /&gt;var button = '&amp;lt;span style="font-family:arial;font-size:8pt;color: #0072BC;"&amp;gt;';
&lt;br /&gt;button += '&amp;lt;span id="charcount"&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;/span&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;';
&lt;br /&gt;button += '&amp;lt;a Title="Post" onclick="savestatus();return false;" href="#"&amp;gt;POST&amp;lt;/a&amp;gt;';
&lt;br /&gt;button += '&amp;amp;nbsp;&amp;amp;nbsp;|&amp;amp;nbsp;&amp;amp;nbsp;&amp;lt;a title="Cancel" onclick="CancelStatusUpdate();return false;" href="#"&amp;gt;CANCEL&amp;lt;/a&amp;gt;';
&lt;br /&gt;button += '&amp;lt;/span&amp;gt;';
&lt;br /&gt;$('span[class="ms-identitypiecenoteindent"]:has(input)').parent().append(button)
&lt;br /&gt;
&lt;br /&gt;jQuery(function ($) {
&lt;br /&gt;  // ignore these keys
&lt;br /&gt;  var ignore = [8, 9, 13, 33, 34, 35, 36, 37, 38, 39, 40, 46];
&lt;br /&gt;
&lt;br /&gt;  statusbox.reset = function () {
&lt;br /&gt;      var self = jQuery(this);
&lt;br /&gt;      self.val(originalstatus);
&lt;br /&gt;      jQuery('#charcount').val('');
&lt;br /&gt;  };
&lt;br /&gt;
&lt;br /&gt;  // handle textareas with maxlength attribute
&lt;br /&gt;  statusbox.live('keypress', function (event) {
&lt;br /&gt;      var self = jQuery(this),
&lt;br /&gt;          maxlength = self.attr('statusmaxlength'),
&lt;br /&gt;          code = jQuery.data(this, 'keycode');
&lt;br /&gt;
&lt;br /&gt;      // press return to update status
&lt;br /&gt;      if (code == 13) {
&lt;br /&gt;          jQuery.data(this, 'updating', true);
&lt;br /&gt;          savestatus();
&lt;br /&gt;          originalstatus = statusbox.val();
&lt;br /&gt;          return false;
&lt;br /&gt;      }
&lt;br /&gt;
&lt;br /&gt;      // press escape to cancel update
&lt;br /&gt;      if (code == 27) {
&lt;br /&gt;          jQuery.data(this, 'updating', true);
&lt;br /&gt;          CancelStatusUpdate();
&lt;br /&gt;          return false;
&lt;br /&gt;      }
&lt;br /&gt;
&lt;br /&gt;      // check if maxlength has a value. The value must be greater than 0
&lt;br /&gt;      if (maxlength &amp;amp;&amp;amp; maxlength &amp;gt; 0) {
&lt;br /&gt;          // continue with this key stroke if maxlength not reached or one of the ignored keys were pressed.
&lt;br /&gt;          return (self.val().length &amp;lt; maxlength || jQuery.inArray(code, ignore) !== -1);
&lt;br /&gt;      }
&lt;br /&gt;  })
&lt;br /&gt;
&lt;br /&gt;  // store keyCode from the keydown event for later use
&lt;br /&gt;  .live('keydown', function (event) {
&lt;br /&gt;      jQuery.data(this, 'keycode', event.keyCode || event.which);
&lt;br /&gt;  })
&lt;br /&gt;
&lt;br /&gt;  .live('keyup', function (event) {
&lt;br /&gt;      var self = $(this);
&lt;br /&gt;
&lt;br /&gt;      // trim if longer than 140 characters
&lt;br /&gt;      if (self.val().length &amp;gt; 140)
&lt;br /&gt;          self.val(self.val().substring(0, 140));
&lt;br /&gt;
&lt;br /&gt;      if (jQuery.data(this, 'updating')) {
&lt;br /&gt;          jQuery.data(this, 'updating', false);
&lt;br /&gt;          return false;
&lt;br /&gt;      }
&lt;br /&gt;
&lt;br /&gt;      maxlength = self.attr('statusmaxlength');
&lt;br /&gt;      jQuery('#charcount').text(maxlength - self.val().length);
&lt;br /&gt;  });
&lt;br /&gt;});
&lt;br /&gt;
&lt;br /&gt;function ResetUpdate(message) {
&lt;br /&gt;  statusbox.val(originalstatus);
&lt;br /&gt;
&lt;br /&gt;  if (message)
&lt;br /&gt;      jQuery('#charcount').text(message);
&lt;br /&gt;
&lt;br /&gt;  jQuery('#charcount').fadeOut('slow', function () {
&lt;br /&gt;      jQuery('#charcount').text('').show();
&lt;br /&gt;  });
&lt;br /&gt;}
&lt;br /&gt;
&lt;br /&gt;function CancelStatusUpdate() {
&lt;br /&gt;  var noteEdit = jQuery('[id^=IdentityStatusEdit_]')[0];
&lt;br /&gt;  var noteLabel = jQuery('[id^=IdentityStatus_]')[0];
&lt;br /&gt;  noteEdit.style.display = 'none';
&lt;br /&gt;  noteLabel.style.display = '';
&lt;br /&gt;  jQuery(statusbox).val(originalstatus);
&lt;br /&gt;}
&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;Or &lt;a href="http://docs.google.com/leaf?id=0B9I-SUza4bqYODc1ZmFlNTctM2Q1NC00NThiLWEyNmMtZTE4NzM4Yzg4NjUw&amp;amp;hl=en_US"&gt;download the code here&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;I have assumed here that you already have a reference to JQuery in your page somewhere. If you haven't then you can add one in the top of the script similar to this:-
&lt;br /&gt;
&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;script src=”http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js”&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;br/&amp;gt;
&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;Here is the final result:-
&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/-fSGRHQX_Cow/TkRBaQnPq3I/AAAAAAAAABI/05b0mDarwWE/s1600/Status_After.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 200px; height: 60px;" src="http://3.bp.blogspot.com/-fSGRHQX_Cow/TkRBaQnPq3I/AAAAAAAAABI/05b0mDarwWE/s200/Status_After.png" border="0" alt="" id="BLOGGER_PHOTO_ID_5639704552766679922" /&gt;&lt;/a&gt;
&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-2819604310112216584?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2011/08/making-sharepoint-2010-my-site-status.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-fSGRHQX_Cow/TkRBaQnPq3I/AAAAAAAAABI/05b0mDarwWE/s72-c/Status_After.png" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-4134087301350647353</guid><pubDate>Tue, 19 Jul 2011 18:12:00 +0000</pubDate><atom:updated>2011-08-06T12:01:18.256Z</atom:updated><title>Clearing pages from output cache in SharePoint 2010</title><description>&lt;p align="justify"&gt;In &lt;a href="http://planetwilson.blogspot.com/2009/08/clearing-individual-pages-from-output.html"&gt;this previous blog post&lt;/a&gt; I described how the anonymous page base class could be used to create a page that allowed you to push pages out of the site output cache on a publishing site. That was for MOSS but it can easily be made to work in SharePoint 2010.     &lt;br /&gt;    &lt;br /&gt;As before, copy and paste the following code into a file inside the layouts folder called something like&lt;/p&gt;  &lt;p align="justify"&gt;ClearPageFromOutputCache.aspx.    &lt;br /&gt;&lt;/p&gt;  &lt;pre style="border-bottom: #cccccc 1px dashed; text-align: left; border-left: #cccccc 1px dashed; padding-bottom: 0px; line-height: 20px; padding-left: 0px; width: 99%; padding-right: 0px; font-family: arial; background: url(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif) #f0f0f0; height: 300px; color: #000000; font-size: 12px; overflow: auto; border-top: #cccccc 1px dashed; border-right: #cccccc 1px dashed; padding-top: 0px"&gt;&lt;code style="word-wrap: normal; color: #000000"&gt; &amp;lt;%@ Assembly Name=&amp;quot;Microsoft.SharePoint.ApplicationPages, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot;%&amp;gt;  &lt;br /&gt; &amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; Inherits=&amp;quot;Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase&amp;quot; MasterPageFile=&amp;quot;~/_layouts/application.master&amp;quot; EnableViewState=&amp;quot;false&amp;quot; EnableViewStateMac=&amp;quot;false&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Import Namespace=&amp;quot;Microsoft.SharePoint.ApplicationPages&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Register TagPrefix=&amp;quot;SharePoint&amp;quot; Namespace=&amp;quot;Microsoft.SharePoint.WebControls&amp;quot; Assembly=&amp;quot;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Register TagPrefix=&amp;quot;Utilities&amp;quot; Namespace=&amp;quot;Microsoft.SharePoint.Utilities&amp;quot; Assembly=&amp;quot;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Import Namespace=&amp;quot;Microsoft.SharePoint&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Register TagPrefix=&amp;quot;wssawc&amp;quot; Namespace=&amp;quot;Microsoft.SharePoint.WebControls&amp;quot; Assembly=&amp;quot;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Register TagPrefix=&amp;quot;SharePoint&amp;quot; Namespace=&amp;quot;Microsoft.SharePoint.WebControls&amp;quot; Assembly=&amp;quot;Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;%@ Import Namespace=&amp;quot;System.Collections.Generic&amp;quot; %&amp;gt;  &lt;br /&gt; &amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; protected override void OnLoad(EventArgs e)  &lt;br /&gt; {   &lt;br /&gt; if (IsPostBack)  &lt;br /&gt; {  &lt;br /&gt; if (txtUrl.Text.Trim() == &amp;quot;&amp;quot;)  &lt;br /&gt; {  &lt;br /&gt; lblResults.Text = &amp;quot;Please enter a valid URL&amp;quot;;  &lt;br /&gt; return;  &lt;br /&gt; }  &lt;br /&gt; if(txtUrl.Text.Trim().ToLower().StartsWith(&amp;quot;http://&amp;quot;))  &lt;br /&gt; {  &lt;br /&gt; lblResults.Text = &amp;quot;Please enter a relative URL&amp;quot;;  &lt;br /&gt; return;  &lt;br /&gt; }  &lt;br /&gt; if(txtPasscode.Text != &amp;quot;supersecretpassword1&amp;quot;)  &lt;br /&gt; {  &lt;br /&gt; lblResults.Text = &amp;quot;ERROR&amp;quot;;  &lt;br /&gt; return;  &lt;br /&gt; }     &lt;br /&gt; try  &lt;br /&gt; {  &lt;br /&gt; HttpResponse.RemoveOutputCacheItem(txtUrl.Text.Trim());  &lt;br /&gt; lblResults.Text = &amp;quot;SUCCESS&amp;quot;;  &lt;br /&gt; }  &lt;br /&gt; catch (Exception ex)  &lt;br /&gt; {  &lt;br /&gt; lblResults.Text = ex.ToString();  &lt;br /&gt; }  &lt;br /&gt; }  &lt;br /&gt; }  &lt;br /&gt; &amp;lt;/script&amp;gt;  &lt;br /&gt; &amp;lt;asp:Content ContentPlaceHolderID=&amp;quot;PlaceHolderPageTitle&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;sharepoint:encodedliteral runat=&amp;quot;server&amp;quot; text=&amp;quot;Page Output Cache Clear Tool&amp;quot; encodemethod='HtmlEncode' /&amp;gt;  &lt;br /&gt; &amp;lt;/asp:Content&amp;gt;  &lt;br /&gt; &amp;lt;asp:Content ContentPlaceHolderID=&amp;quot;PlaceHolderPageTitleInTitleArea&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;sharepoint:formattedstring formattext=&amp;quot;Page Output Cache Clear Tool&amp;quot; encodemethod=&amp;quot;HtmlEncodeAllowSimpleTextFormatting&amp;quot;  &lt;br /&gt; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;asp:HyperLink id=&amp;quot;onetidListEditTitleLink&amp;quot; runat=&amp;quot;server&amp;quot; visible=&amp;quot;true&amp;quot;/&amp;gt;  &lt;br /&gt; &amp;lt;/sharepoint:formattedstring&amp;gt;  &lt;br /&gt; &amp;lt;/asp:Content&amp;gt;  &lt;br /&gt; &amp;lt;asp:Content ContentPlaceHolderID=&amp;quot;PlaceHolderPageImage&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;img src=&amp;quot;/_layouts/images/blank.gif&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;/asp:Content&amp;gt;  &lt;br /&gt; &amp;lt;asp:Content ContentPlaceHolderID=&amp;quot;PlaceHolderPageDescription&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;/asp:Content&amp;gt;  &lt;br /&gt; &amp;lt;asp:Content ContentPlaceHolderID=&amp;quot;PlaceHolderMain&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; style=&amp;quot;width: 100%; height: 100%&amp;quot; class=&amp;quot;propertysheet&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-descriptiontext&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-sectionheader&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;h3 class=&amp;quot;ms-standardheader&amp;quot;&amp;gt;URL&amp;lt;/h3&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-descriptiontext ms-inputformdescription&amp;quot;&amp;gt;  &lt;br /&gt; Enter URL of page to clear from output cache, ensure it is a relative URL and NOT an absolute URL&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-authoringcontrols ms-inputformcontrols&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td&amp;gt;  &lt;br /&gt; &amp;lt;asp:TextBox ID=&amp;quot;txtUrl&amp;quot; runat=&amp;quot;server&amp;quot; CssClass=&amp;quot;ms-input&amp;quot; Columns=&amp;quot;100&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-descriptiontext&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-sectionheader&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;h3 class=&amp;quot;ms-standardheader&amp;quot;&amp;gt;Passcode&amp;lt;/h3&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-descriptiontext ms-inputformdescription&amp;quot;&amp;gt;Enter Passcode&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-authoringcontrols ms-inputformcontrols&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td&amp;gt;  &lt;br /&gt; &amp;lt;asp:TextBox ID=&amp;quot;txtPasscode&amp;quot; TextMode=&amp;quot;Password&amp;quot; runat=&amp;quot;server&amp;quot; CssClass=&amp;quot;ms-input&amp;quot; Columns=&amp;quot;100&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td&amp;gt;  &lt;br /&gt; &amp;lt;asp:Label CssClass=&amp;quot;ms-formvalidation&amp;quot; Text=&amp;quot;&amp;quot; runat=&amp;quot;server&amp;quot; ID=&amp;quot;lblResults&amp;quot;&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-sectionline&amp;quot; height=&amp;quot;2&amp;quot; colspan=&amp;quot;5&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;img src=&amp;quot;/_layouts/images/blank.gif&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td class=&amp;quot;ms-spaceBetContentAndButton&amp;quot; colspan=&amp;quot;5&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;img src=&amp;quot;/_layouts/images/blank.gif&amp;quot; width=&amp;quot;1&amp;quot; height=&amp;quot;1&amp;quot; alt=&amp;quot;&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td colspan=&amp;quot;5&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;table cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; width=&amp;quot;100%&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;colgroup&amp;gt;  &lt;br /&gt; &amp;lt;col width=&amp;quot;99%&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;col width=&amp;quot;1%&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;/colgroup&amp;gt;  &lt;br /&gt; &amp;lt;tr&amp;gt;  &lt;br /&gt; &amp;lt;td&amp;gt;  &lt;br /&gt; &amp;amp;nbsp;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;td nowrap id=&amp;quot;align01&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;input id=&amp;quot;onetidCreateList&amp;quot; class=&amp;quot;ms-ButtonHeightWidth&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;&amp;lt;SharePoint:EncodedLiteral runat='server' text='&amp;lt;%$Resources:wss,multipages_okbutton_text%&amp;gt;' EncodeMethod='HtmlEncode'/&amp;gt;&amp;quot;  &lt;br /&gt; accesskey=&amp;quot;&amp;lt;SharePoint:EncodedLiteral runat='server' text='&amp;lt;%$Resources:wss,multipages_okbutton_accesskey%&amp;gt;' EncodeMethod='HtmlEncode'/&amp;gt;&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;tr height=&amp;quot;60&amp;quot;&amp;gt;  &lt;br /&gt; &amp;lt;td&amp;gt;  &lt;br /&gt; &amp;amp;nbsp;&amp;lt;/td&amp;gt;  &lt;br /&gt; &amp;lt;/tr&amp;gt;  &lt;br /&gt; &amp;lt;/table&amp;gt;  &lt;br /&gt; &amp;lt;sharepoint:formdigest runat=&amp;quot;server&amp;quot; /&amp;gt;  &lt;br /&gt; &amp;lt;/asp:Content&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="justify"&gt;&lt;br /&gt;  &lt;br /&gt;You can now access this file anonymously through a URL like:- &lt;br /&gt;  &lt;br /&gt;http://mypublishingsite.com/_layouts/ClearPageFromOutputCache.aspx &lt;br /&gt;  &lt;br /&gt;You enter the url of the page you wish to clear from output cache as a relative URL, e.g. /pages/homepage.aspx and enter the password (to stop casual clearing of the page should someone happen upon this application page), set the password to something of your own in the script. &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-4134087301350647353?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2011/07/clearing-pages-from-output-cache-in.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1904100058420469460</guid><pubDate>Sun, 17 Jul 2011 20:30:00 +0000</pubDate><atom:updated>2011-08-07T16:09:19.812Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">calendar</category><category domain="http://www.blogger.com/atom/ns#">color calendar</category><title>SharePoint 2010 Colour Calendar post SP1 update</title><description>&lt;p&gt;This is a slightly updated post for the colour calendar script which should work with the more items link and also with post-SP1 installations. I have slightly changed the process for doing this to try and minimise the issues people were having with URLs in the links.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;1) Create a new calculated field on the calendar called CateogryTitle with the formula    &lt;br /&gt;    &lt;br /&gt;= &amp;quot;|||&amp;quot; &amp;amp; [Category] &amp;amp; &amp;quot;|||&amp;quot; &amp;amp; [Title]     &lt;br /&gt;&lt;/p&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-RtgJSt7A_G8/TiNLpemTq1I/AAAAAAAAAAw/FID73wLDeJw/s1600/1.png"&gt;&lt;img style="text-align: center; margin: 0px auto 10px; width: 200px; display: block; height: 138px; cursor: hand" id="BLOGGER_PHOTO_ID_5630427135103707986" border="0" alt="" src="http://2.bp.blogspot.com/-RtgJSt7A_G8/TiNLpemTq1I/AAAAAAAAAAw/FID73wLDeJw/s200/1.png" /&gt;&lt;/a&gt;   &lt;p&gt;   &lt;br /&gt;2) Set the Month View, Week View and Day View under Calendar the calendar view settings to all be your new CategoryTitle field.     &lt;br /&gt;    &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-72KC-mpa5XE/TiNL2QkXpiI/AAAAAAAAAA4/culaHGP0RDw/s1600/2.png"&gt;&lt;img style="text-align: center; margin: 0px auto 10px; width: 200px; display: block; height: 118px; cursor: hand" id="BLOGGER_PHOTO_ID_5630427354675783202" border="0" alt="" src="http://2.bp.blogspot.com/-72KC-mpa5XE/TiNL2QkXpiI/AAAAAAAAAA4/culaHGP0RDw/s200/2.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;3) Upload a text file containing the following content to a document library. In this case I have created pw.txt.     &lt;br /&gt;&lt;/p&gt;  &lt;div style="height: 300px; overflow: scroll"&gt;   &lt;pre class="csharpcode"&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt; src=&lt;span class="str"&gt;&amp;quot;http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.js&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;   &lt;br /&gt;_spBodyOnLoadFunctionNames.push(&lt;span class="str"&gt;'WaitForCalendarToLoad'&lt;/span&gt;);&lt;br /&gt;&lt;span class="kwrd"&gt;var&lt;/span&gt; SEPARATOR = &lt;span class="str"&gt;&amp;quot;|||&amp;quot;&lt;/span&gt;; &lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; WaitForCalendarToLoad() {        &lt;br /&gt;    &lt;span class="kwrd"&gt;if&lt;/span&gt;(&lt;span class="kwrd"&gt;typeof&lt;/span&gt; SP.UI.ApplicationPages.CalendarNotify.$4a == &lt;span class="str"&gt;'undefined'&lt;/span&gt;) { &lt;br /&gt;        &lt;span class="rem"&gt;// post SP1&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; pwold$4b = SP.UI.ApplicationPages.CalendarNotify.$4b;&lt;br /&gt;        SP.UI.ApplicationPages.CalendarNotify.$4b = &lt;span class="kwrd"&gt;function&lt;/span&gt; () {&lt;br /&gt;            pwold$4b();&lt;br /&gt;            ColourCalendar();&lt;br /&gt;        }            &lt;br /&gt;        SP.UI.ApplicationPages.SummaryCalendarView.prototype.renderGrids = &lt;span class="kwrd"&gt;function&lt;/span&gt;($p0) {&lt;br /&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; $v_0 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Sys.StringBuilder();&lt;br /&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; $v_1 = $p0.length;&lt;br /&gt;            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; $v_2 = 0; $v_2 &amp;lt; $v_1; $v_2++) {&lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.$7t_2($v_2, $p0[$v_2]);                  &lt;br /&gt;            }                  &lt;br /&gt;            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; $v_3 = 0; $v_3 &amp;lt; $v_1; $v_3++) {&lt;br /&gt;                $v_0.append(&lt;span class="str"&gt;'&amp;lt;div&amp;gt;'&lt;/span&gt;);&lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.$I_2.$7o($v_0, $p0[$v_3], $v_3);&lt;br /&gt;                $v_0.append(&lt;span class="kwrd"&gt;this&lt;/span&gt;.emptY_DIV);&lt;br /&gt;                $v_0.append(&lt;span class="str"&gt;'&amp;lt;/div&amp;gt;'&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.setInnerHtml($v_0.toString());&lt;br /&gt;            ColourCalendar();&lt;br /&gt;        }        &lt;br /&gt;    }       &lt;br /&gt;    &lt;span class="kwrd"&gt;else&lt;/span&gt;&lt;br /&gt;    { &lt;br /&gt;        &lt;span class="rem"&gt;// pre SP1&lt;/span&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;var&lt;/span&gt; pwold$4a = SP.UI.ApplicationPages.CalendarNotify.$4a;&lt;br /&gt;        SP.UI.ApplicationPages.CalendarNotify.$4a = &lt;span class="kwrd"&gt;function&lt;/span&gt; () {&lt;br /&gt;            pwold$4a();&lt;br /&gt;            ColourCalendar();&lt;br /&gt;        }             &lt;br /&gt;        SP.UI.ApplicationPages.SummaryCalendarView.prototype.renderGrids = &lt;span class="kwrd"&gt;function&lt;/span&gt;($p0) {&lt;br /&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; $v_0 = &lt;span class="kwrd"&gt;new&lt;/span&gt; Sys.StringBuilder();&lt;br /&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; $v_1 = $p0.length;&lt;br /&gt;            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; $v_2 = 0; $v_2 &amp;lt; $v_1; $v_2++) {&lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.$7r_2($v_2, $p0[$v_2]);                  &lt;br /&gt;            }                  &lt;br /&gt;            &lt;span class="kwrd"&gt;for&lt;/span&gt; (&lt;span class="kwrd"&gt;var&lt;/span&gt; $v_3 = 0; $v_3 &amp;lt; $v_1; $v_3++) {&lt;br /&gt;                $v_0.append(&lt;span class="str"&gt;'&amp;lt;div&amp;gt;'&lt;/span&gt;);                       &lt;br /&gt;                &lt;span class="kwrd"&gt;this&lt;/span&gt;.$I_2.$7m($v_0, $p0[$v_3], $v_3);&lt;br /&gt;                $v_0.append(&lt;span class="kwrd"&gt;this&lt;/span&gt;.emptY_DIV);&lt;br /&gt;                $v_0.append(&lt;span class="str"&gt;'&amp;lt;/div&amp;gt;'&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.setInnerHtml($v_0.toString());&lt;br /&gt;            ColourCalendar();&lt;br /&gt;        }&lt;br /&gt;    }  &lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; ColourCalendar() {&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt;(jQuery(&lt;span class="str"&gt;'a:contains('&lt;/span&gt; + SEPARATOR + &lt;span class="str"&gt;')'&lt;/span&gt;) != &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;        {             &lt;br /&gt;        jQuery(&lt;span class="str"&gt;'a:contains('&lt;/span&gt; + SEPARATOR + &lt;span class="str"&gt;')'&lt;/span&gt;).each(&lt;span class="kwrd"&gt;function&lt;/span&gt; (i) {&lt;br /&gt;            $box = jQuery(&lt;span class="kwrd"&gt;this&lt;/span&gt;).parents(&lt;span class="str"&gt;'div[title]'&lt;/span&gt;);&lt;br /&gt;            &lt;span class="kwrd"&gt;var&lt;/span&gt; colour = GetColourCodeFromCategory(GetCategory(&lt;span class="kwrd"&gt;this&lt;/span&gt;.innerHTML));&lt;br /&gt;            &lt;span class="kwrd"&gt;this&lt;/span&gt;.innerHTML = GetActualText(&lt;span class="kwrd"&gt;this&lt;/span&gt;.innerHTML);&lt;br /&gt;            jQuery($box).attr(&lt;span class="str"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;, GetActualText(jQuery($box).attr(&lt;span class="str"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;)));&lt;br /&gt;            $box.css(&lt;span class="str"&gt;'background-color'&lt;/span&gt;, colour);&lt;br /&gt;            });        &lt;br /&gt;    }   &lt;br /&gt;}   &lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; GetActualText(originalText) {     &lt;br /&gt;    &lt;span class="kwrd"&gt;var&lt;/span&gt; parts = originalText.split(SEPARATOR);&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; parts[0] + parts[2];   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; GetCategory(originalText) {&lt;br /&gt;    &lt;span class="kwrd"&gt;var&lt;/span&gt; parts = originalText.split(SEPARATOR);&lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; parts[1];   &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;function&lt;/span&gt; GetColourCodeFromCategory(category) {&lt;br /&gt;    &lt;span class="kwrd"&gt;var&lt;/span&gt; colour = &lt;span class="kwrd"&gt;null&lt;/span&gt;;     &lt;br /&gt;    &lt;span class="kwrd"&gt;switch&lt;/span&gt; (category.trim().toLowerCase()) {&lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'meeting'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;'#4FDB51'&lt;/span&gt;;&lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'work hours'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;'#4FB8DB'&lt;/span&gt;;&lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'business'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#F08616&amp;quot;&lt;/span&gt;;&lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'holiday'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#F55875&amp;quot;&lt;/span&gt;;         &lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'get-together'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#E0F558&amp;quot;&lt;/span&gt;;         &lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'gifts'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#F558D5&amp;quot;&lt;/span&gt;;         &lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'birthday'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#6E80FA&amp;quot;&lt;/span&gt;;         &lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;       &lt;br /&gt;        &lt;span class="kwrd"&gt;case&lt;/span&gt; &lt;span class="str"&gt;'anniversary'&lt;/span&gt;:         &lt;br /&gt;            colour = &lt;span class="str"&gt;&amp;quot;#FF4040&amp;quot;&lt;/span&gt;;         &lt;br /&gt;            &lt;span class="kwrd"&gt;break&lt;/span&gt;;     &lt;br /&gt;    }     &lt;br /&gt;    &lt;span class="kwrd"&gt;return&lt;/span&gt; colour;   &lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt; &lt;br /&gt;        &lt;br /&gt;        &lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.csharpcode, .csharpcode pre&lt;br /&gt;{&lt;br /&gt;	font-size: small;&lt;br /&gt;	color: black;&lt;br /&gt;	font-family: consolas, "Courier New", courier, monospace;&lt;br /&gt;	background-color: #ffffff;&lt;br /&gt;	/*white-space: pre;*/&lt;br /&gt;}&lt;br /&gt;.csharpcode pre { margin: 0em; }&lt;br /&gt;.csharpcode .rem { color: #008000; }&lt;br /&gt;.csharpcode .kwrd { color: #0000ff; }&lt;br /&gt;.csharpcode .str { color: #006080; }&lt;br /&gt;.csharpcode .op { color: #0000c0; }&lt;br /&gt;.csharpcode .preproc { color: #cc6633; }&lt;br /&gt;.csharpcode .asp { background-color: #ffff00; }&lt;br /&gt;.csharpcode .html { color: #800000; }&lt;br /&gt;.csharpcode .attr { color: #ff0000; }&lt;br /&gt;.csharpcode .alt &lt;br /&gt;{&lt;br /&gt;	background-color: #f4f4f4;&lt;br /&gt;	width: 100%;&lt;br /&gt;	margin: 0em;&lt;br /&gt;}&lt;br /&gt;.csharpcode .lnum { color: #606060; }&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;I know people have been having trouble copying this script so you can &lt;a href="https://docs.google.com/leaf?id=0B9I-SUza4bqYYzNjZGJiZTQtM2Q1YS00MDk4LTg1Y2QtNWQ5NDcxNWI5Y2M0&amp;amp;hl=en_US"&gt;download it here&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;4) On the calendar page itself, edit the page and add a Content Editor Web Part. In the content editor web part settings, set the content link to the url of the newly uploaded text file, click the test link to ensure that the url is correct (i.e. it downloads the file) &lt;br /&gt;  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-ZWuWTuqSFMw/TiNL_MYIbQI/AAAAAAAAABA/SEhxmkLGDUg/s1600/3.png"&gt;&lt;img style="text-align: center; margin: 0px auto 10px; width: 199px; display: block; height: 200px; cursor: hand" id="BLOGGER_PHOTO_ID_5630427508169534722" border="0" alt="" src="http://2.bp.blogspot.com/-ZWuWTuqSFMw/TiNL_MYIbQI/AAAAAAAAABA/SEhxmkLGDUg/s200/3.png" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;5) Refresh the page and you should find the calendar is now coloured. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are a couple of things to note here, for the JQuery link I have used Microsoft's CDN link. This means that the page will load the JQuery library from Microsoft. Browser caching means it won't do this for every page view but if you would prefer to use a locally held library instead (if you don't have internet access for instance) then just change the script link in the script above. Any relatively recent version of JQuery should work fine. &lt;br /&gt;&lt;br /&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1904100058420469460?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2011/07/sharepoint-2010-colour-calendar-post.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-RtgJSt7A_G8/TiNLpemTq1I/AAAAAAAAAAw/FID73wLDeJw/s72-c/1.png" height="72" width="72" /><thr:total>80</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-8001637008618185225</guid><pubDate>Fri, 26 Mar 2010 20:11:00 +0000</pubDate><atom:updated>2010-03-27T07:34:12.764Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">Mac</category><category domain="http://www.blogger.com/atom/ns#">SSD</category><category domain="http://www.blogger.com/atom/ns#">Macbook pro</category><category domain="http://www.blogger.com/atom/ns#">Virtual machine</category><title>SSD Goodness and SharePoint Virtual Machines</title><description>As you may or may not know my machine of choice is a Macbook Pro. I became a convert a couple of years ago and haven't looked back. I just prefer them for normal day to day use and the hardware is fantastic.&lt;br /&gt;
&lt;br /&gt;
Recently I upgraded to a new 17" Macbook Pro with matt screen to get the extra resolution. The laptop itself isn't all that much bigger than the 15" one I had previously but the development experience is much nicer.&lt;br /&gt;
&lt;br /&gt;
It came with a 500GB 7200rpm hard drive which is plenty fast enough but when running a SharePoint 2010 VM I definitely had to wait around a bit whilst it ground into action. I could see that it wasn't CPU bound, just waiting for the hard disk a lot. My Macbook Pro has 6GB RAM of which 4GB was assigned to the VM which I was running in VMWare Fusion.&lt;br /&gt;
&lt;br /&gt;
Having read a lot about SSDs (Solid State Drives), the pitfalls, the good ones and bad ones I decided to take the plunge having seen the prices come down enough to warrant it. I did some research (Anandtech is a good source) and decided that it came down to one of the following three:-&lt;br /&gt;
&lt;br /&gt;
• Intel X25-M 80GB&lt;br /&gt;
• OCZ Vertex 60GB&lt;br /&gt;
• OCZ Solid 2 120GB&lt;br /&gt;
&lt;br /&gt;
The first two are roughly the same price with the third costing just a little bit more here in the UK. Due to how SSDs work it is good to not over fill them and so I decided to go with the 3rd one, the speed difference between it and the 2nd being marginal.&lt;br /&gt;
&lt;br /&gt;
At the same time I removed the super drive from my MBP (dvd writer to non Mac fans) and bought a caddy to hold the original hard drive, I can’t remember the last time I burned a DVD, dealing mostly with disk images these days so no great loss.&lt;br /&gt;
&lt;br /&gt;
Install was a breeze as was setting up my system again. Time Machine on the Mac makes restoring a machine from a backup almost comically easy compared to the equivalent experience on PCs. In no time at all I was back up and running. I transferred my itunes library to the hard drive so as not to take up too much space and slimmed down unnecessary programs and drivers.&lt;br /&gt;
&lt;br /&gt;
Wow. The increase in speed is amazing. Applications open in a fraction of the time they used to. MS Word would take quite a few “bounces” on the dock before finally appearing where as now it is fairly instantaneous. Boot up and shutdown is very quick and sleep is immediate.&lt;br /&gt;
&lt;br /&gt;
Now there is a lot of talk about how these drives’ write performance degrades over time and technologies around to attempt to resolve this (TRIM and Garbage Collection or GC) and what support there is in the OS etc. However as I mentioned before Time Machine on the Mac makes it so easy to restore a machine that I don’t mind simply wiping the drive and restoring from Time Machine, it would take 5 minutes to set off one night and in the morning would be done with completely restored performance.&lt;br /&gt;
&lt;br /&gt;
Nice as the improved responsiveness and slickness within OSX is for me the best improvement has come in using my VM. At first I was going to leave the VMs on the hard drive but I test drove my main SharePoint 2010 VM on the SSD. It absolutely flew. It is far faster than it was running on a dedicated machine on bare metal. SharePoint Designer opens instantly, Visual Studio is very quick and navigating through an SP2010 site is quick and easy.&lt;br /&gt;
&lt;br /&gt;
I can’t recommend these enough as an upgrade to especially a laptop environment but probably even desktops. After all I was using a 7200 rpm drive beforehand in this machine and I still noticed a huge difference.&lt;br /&gt;
&lt;br /&gt;
Buy one now!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-8001637008618185225?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2010/03/ssd-goodness-and-sharepoint-virtual.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1019709208670565245</guid><pubDate>Tue, 23 Feb 2010 20:05:00 +0000</pubDate><atom:updated>2011-12-08T16:27:04.653Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">SP2010</category><category domain="http://www.blogger.com/atom/ns#">colour calendar</category><category domain="http://www.blogger.com/atom/ns#">SharePoint 2010</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">calendar</category><category domain="http://www.blogger.com/atom/ns#">color calendar</category><title>SharePoint 2010 Colour (color) Calendar</title><description>&lt;p&gt;&lt;h1&gt;&lt;a href="http://planetwilson.blogspot.com/2011/07/sharepoint-2010-colour-calendar-post.html"&gt;*** Please see updated code here ***&lt;/a&gt;&lt;/h1&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;Following a number of requests I have produced a first attempt at a colour calendar solution for SharePoint 2010.&lt;br /&gt;SP2010 does offer a form of colouring for calendars but only to allow different colours for overlaid calendars. The other change introduced in SP2010 is that the calendar itself is a mixture of rendered mark-up sent to the client with the actual events rendered at runtime in JavaScript.&lt;br /&gt;We are going to use a similar mechanism to that employed in the other colouring solutions I have produced in that we will colour the elements in client side script once the calendar has loaded. Initially we will just hard code the colour values in the JavaScript file; a future post will cover making Client Object Model calls to retrieve the colouring values from a list so we can reuse the colours across many calendars. This will also use JQuery to simplify the manipulation of the HTML.&lt;br /&gt;For now though we will concentrate on the colouring of a single calendar view. We are going to utilise two script files, the first is JQuery available from jquery.com and the second we will write ourselves to contain the colouring script. Download the latest JQuery minified file, at time of writing this should be a file named jquery-1.4.2.min.js&lt;br /&gt;Copy the following code and paste into a file. I have named mine PlanetWilson2010Cal.js file&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;_spBodyOnLoadFunctionNames.push('WaitForCalendarToLoad');&lt;br /&gt;&lt;br /&gt;var SEPARATOR = "|||";&lt;br /&gt;&lt;br /&gt;function WaitForCalendarToLoad() {&lt;br /&gt;  // we will slightly rewrite this existing function as defined originally in SP.UI.ApplicationPages.Calendar.debug.js&lt;br /&gt;  var pwold$4a = SP.UI.ApplicationPages.CalendarNotify.$4a;&lt;br /&gt;SP.UI.ApplicationPages.CalendarNotify.$4a = function () {&lt;br /&gt;      pwold$4a();&lt;br /&gt;      ColourCalendar();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function ColourCalendar() {&lt;br /&gt;if($('a:contains(' + SEPARATOR + ')') != null)&lt;br /&gt;{&lt;br /&gt;  $('a:contains(' + SEPARATOR + ')').each(&lt;br /&gt;      function (i) {&lt;br /&gt;          $box = $(this).parents('div[title]');&lt;br /&gt;          var colour = GetColourCodeFromCategory(GetCategory(this.innerHTML));&lt;br /&gt;          this.innerHTML = GetActualText(this.innerHTML);&lt;br /&gt;          $($box).attr("title", GetActualText($($box).attr("title")));&lt;br /&gt;          $box.css('background-color', colour);&lt;br /&gt;      });&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function GetActualText(originalText) {&lt;br /&gt;  var parts = originalText.split(SEPARATOR);&lt;br /&gt;  return parts[0] + parts[2];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function GetCategory(originalText) {&lt;br /&gt;  var parts = originalText.split(SEPARATOR);&lt;br /&gt;  return parts[1];&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function GetColourCodeFromCategory(category) {&lt;br /&gt;  var colour = null;&lt;br /&gt;  switch (category.trim().toLowerCase()) {&lt;br /&gt;      case 'meeting':&lt;br /&gt;          colour = '#4FDB51';&lt;br /&gt;          break;&lt;br /&gt;      case 'work hours':&lt;br /&gt;          colour = '#4FB8DB';&lt;br /&gt;          break;&lt;br /&gt;      case 'business':&lt;br /&gt;          colour = "#F08616";&lt;br /&gt;          break;&lt;br /&gt;      case 'holiday':&lt;br /&gt;          colour = "#F55875";&lt;br /&gt;          break;&lt;br /&gt;      case 'get-together':&lt;br /&gt;          colour = "#E0F558";&lt;br /&gt;          break;&lt;br /&gt;      case 'gifts':&lt;br /&gt;          colour = "#F558D5";&lt;br /&gt;          break;&lt;br /&gt;      case 'birthday':&lt;br /&gt;          colour = "#6E80FA";&lt;br /&gt;          break;&lt;br /&gt;      case 'anniversary':&lt;br /&gt;          colour = "#FF4040";&lt;br /&gt;          break;&lt;br /&gt;  }&lt;br /&gt;  return colour;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Add these two files to a document library in your site. I have added them to a library called "shared documents" in the root of the site collection. You can add them where you want but be sure to update the script references below accordingly.&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_8yYCvwdJans/S4Q0t4gxZaI/AAAAAAAAAIA/rRvPSiuK4WA/s1600-h/1%5B2%5D.png"&gt;&lt;img alt="1" border="0" height="92" src="http://lh6.ggpht.com/_8yYCvwdJans/S4Q0ueGo4tI/AAAAAAAAAIE/Pt9JshrYDVc/1_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="1" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;Next edit the calendar view page to add a content editor web part. You should be able to just choose Site actions -&amp;gt; Edit Page to get into edit mode. Then add a content editor web part above the calendar view. Paste the following code into the web part:-&lt;br /&gt;&lt;pre class="csharpcode" style="height: 60px;"&gt;&amp;lt;script type="text/javascript" src="/Shared Documents/jquery-1.4.2.min.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script type="text/javascript" src="/Shared Documents/PlanetWilson2010Cal.js"&amp;gt;&amp;lt;/script&amp;gt; &lt;/pre&gt;&lt;a href="http://lh5.ggpht.com/_8yYCvwdJans/S4Q0uy-tBfI/AAAAAAAAAII/ib0Zxct6VEA/s1600-h/1b%5B2%5D.png"&gt;&lt;img alt="1b" border="0" height="151" src="http://lh4.ggpht.com/_8yYCvwdJans/S4Q0vLKLt0I/AAAAAAAAAIM/e4MPFioLHgY/1b_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="1b" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;Be careful here as I find the behaviour of the CEWP to be a little unpredictable and it sometimes strips out my script tags. I haven't got to the bottom of this yet and it may be a particular scenario under which it occurs.&lt;br /&gt;Now we need to actually get the calendar to output correctly so our colour coding works. On the calendar screen now click on the List Settings button. This will take you to the list settings screen. We need to create a new calculated column called CategoryTitle. When prompted for the formula use the following:-&lt;br /&gt;= "|||" &amp;amp; [Category] &amp;amp; "|||" &amp;amp; [Title]&lt;br /&gt;&lt;a href="http://lh5.ggpht.com/_8yYCvwdJans/S4Q0v1-5VII/AAAAAAAAAIQ/LI-eO5En2yc/s1600-h/2%5B2%5D.png"&gt;&lt;img alt="2" border="0" height="169" src="http://lh6.ggpht.com/_8yYCvwdJans/S4Q0wGBNkbI/AAAAAAAAAIU/7UeLsbn9-no/2_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="2" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;Back on the list settings screen, click to edit the Calendar view and choose the Month View, Week View and Day View under Calendar Columns to all be your new CategoryTitle field.&lt;br /&gt;&lt;a href="http://lh3.ggpht.com/_8yYCvwdJans/S4Q0w0Mj6II/AAAAAAAAAIY/46GDT9XNGgo/s1600-h/4%5B2%5D.png"&gt;&lt;img alt="4" border="0" height="146" src="http://lh6.ggpht.com/_8yYCvwdJans/S4Q0xWXwNeI/AAAAAAAAAIc/aJyX-RAkK_o/4_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="4" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;Now when you go back to the main calendar you should see any events you create are colour coded!&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_8yYCvwdJans/S4Q0x3_IlLI/AAAAAAAAAIg/6Z9cUCPm0nA/s1600-h/5%5B2%5D.png"&gt;&lt;img alt="5" border="0" height="114" src="http://lh6.ggpht.com/_8yYCvwdJans/S4Q0yDCRskI/AAAAAAAAAIk/FXoGZ9c4h3w/5_thumb.png?imgmax=800" style="border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline;" title="5" width="244" /&gt;&lt;/a&gt;&lt;br /&gt;If you wish to change the default categories on the list then do so but you will need to edit the colouring script to add new CASE statements in the last function GetColourCodeFromCategory(). Be careful to ensure the categories you add here are put into lowercase as the script lowercases everything for comparison.&lt;div&gt;&lt;br /&gt;Next time I will hopefully expand this solution to make client side calls to SharePoint to retrieve the colouring values from a SharePoint list. Most people probably won't need this but it will be a nice example of querying from the client.&lt;br /&gt;&lt;p&gt;&lt;b&gt;UPDATE:&lt;/b&gt; Many thanks to Jakub Gutkowski for pointing out my schoolboy coding error which meant it wasn't working in Firefox and the addition to make it work on expand/collapse.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1019709208670565245?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2010/02/sharepoint-2010-colour-color-calendar.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_8yYCvwdJans/S4Q0ueGo4tI/AAAAAAAAAIE/Pt9JshrYDVc/s72-c/1_thumb.png?imgmax=800" height="72" width="72" /><thr:total>124</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-8989996805613488516</guid><pubDate>Thu, 13 Aug 2009 19:08:00 +0000</pubDate><atom:updated>2010-03-27T07:32:29.375Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">publishing page</category><category domain="http://www.blogger.com/atom/ns#">output cache</category><category domain="http://www.blogger.com/atom/ns#">MOSS</category><title>Clearing individual pages from output cache in a publishing site</title><description>If you are using MOSS for a public facing internet site, the chances are you are using page output caching to increase scalability and performance. If you aren't you certainly should be. Page output caching is a feature of ASP.NET which MOSS overlays it's own control over the top.&lt;br /&gt;
&lt;br /&gt;
Under site collection settings you can set up cache profiles which dictate how pages are cached and apply them to different parts of the site. You may have some areas which cache for several hours and other pages which only cache for a few minutes. Either way, not going through the full page rendering cycle for these pages if they are in output cache massively increases the number of visitors your site can support.&lt;br /&gt;
&lt;br /&gt;
Often though you have a need to get some pages refreshed more quickly than just waiting for them to fall out of cache. Sure you can perform an app pool reset but that will take all pages out of cache and possibly lose users their session depending on your session management strategy.&lt;br /&gt;
&lt;br /&gt;
It is possible to force an individual page to be removed from output cache and thus have it re-rendered immediately, useful for getting important content updates to users immediately.&lt;br /&gt;
&lt;br /&gt;
The required call is the &lt;span style="font-family: 'courier new';"&gt;HttpResponse.RemoveOutputCacheItem()&lt;/span&gt; method which takes a parameter of a string for the site relative URL of the page you wish to remove from cache, e.g. &lt;span style="font-family: 'courier new';"&gt;/pages/landingpage.aspx&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Given that this must occur within the application you are trying to clear a page from how do we call this ourselves? One approach is to create a custom layouts page which we can navigate to directly and enter the URL to get it cleared. As our public site is very likely set up with anonymous access we will need to ensure that the page inherits from &lt;span style="font-family: 'courier new';"&gt;Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase&lt;/span&gt;. This will allow it to be viewed by anonymous users.&lt;br /&gt;
&lt;br /&gt;
I have created a sample page which will do this work for us, it is a page you can drop directly into your layouts folder and call from within your site. All the work is done in inline code much like many of the MOSS layouts pages so it doesn't require a code deployment.&lt;br /&gt;
&lt;br /&gt;
Finally I also placed a secondary text box on the page asking for a pass code in order to perform the change so that if the URL of the page is discovered by an external user then can't easily reset the output cache for a page. You would want to change this pass code in your file to something more appropriate. Find the line which looks like&lt;br /&gt;
&lt;br /&gt;
&lt;span style="font-family: 'courier new';"&gt;if(txtPasscode.Text != "supersecretpassword1")&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and change the value to something else.&lt;br /&gt;
&lt;br /&gt;
Simply copy the code below into a text file called something like ClearPageFromOutputCache.aspx, drop it into the layouts folder at&lt;span style="font-family: 'courier new';"&gt; C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can then access the page using the URL &lt;span style="font-family: 'courier new';"&gt;http://www.nameofmypublicsite.com/_layouts/ClearPageFromOutputCache.aspx&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_8yYCvwdJans/SoRlOfXPbBI/AAAAAAAAAHE/aHv0klkv_yM/s1600-h/Picture+3.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5369527955344026642" src="http://3.bp.blogspot.com/_8yYCvwdJans/SoRlOfXPbBI/AAAAAAAAAHE/aHv0klkv_yM/s320/Picture+3.png" style="cursor: pointer; display: block; height: 69px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Pop in the site relative URL and your chosen pass code and the page should be removed from output cache. Due to how the API works even if you put a non-existent URL in it returns success but there is nothing I can do about this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; height: 400px; line-height: 14px; overflow: scroll; padding: 5px; width: 100%;"&gt;&lt;code&gt;&amp;lt;%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;
&amp;lt;%@ Page Language="C#" Inherits="Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase" MasterPageFile="~/_layouts/application.master" EnableViewState="false" EnableViewStateMac="false" %&amp;gt;
&amp;lt;%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %&amp;gt;
&amp;lt;%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;
&amp;lt;%@ Register TagPrefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;
&amp;lt;%@ Import Namespace="Microsoft.SharePoint" %&amp;gt;
&amp;lt;%@ Register TagPrefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;
&amp;lt;%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %&amp;gt;
&amp;lt;%@ Import Namespace="System.Collections.Generic" %&amp;gt;

&amp;lt;script runat="server"&amp;gt;
protected override void OnLoad(EventArgs e)
{  
if (IsPostBack)
{
if (txtUrl.Text.Trim() == "")
{
lblResults.Text = "Please enter a valid URL";
return;
}

if(txtUrl.Text.Trim().ToLower().StartsWith("http://"))
{
lblResults.Text = "Please enter a relative URL";
return;
}

if(txtPasscode.Text != "supersecretpassword1")
{
lblResults.Text = "ERROR";
return;
}      

try
{
HttpResponse.RemoveOutputCacheItem(txtUrl.Text.Trim());
lblResults.Text = "SUCCESS";
}
catch (Exception ex)
{
lblResults.Text = ex.ToString();
}
}
}
&amp;lt;/script&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderPageTitle" runat="server"&amp;gt;
&amp;lt;sharepoint:encodedliteral runat="server" text="Page Output Cache Clear Tool" encodemethod='HtmlEncode' /&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server"&amp;gt;
&amp;lt;sharepoint:formattedstring formattext="Page Output Cache Clear Tool" encodemethod="HtmlEncodeAllowSimpleTextFormatting"
runat="server"&amp;gt;
&amp;lt;asp:HyperLink id="onetidListEditTitleLink" runat="server" visible="true"/&amp;gt;
&amp;lt;/sharepoint:formattedstring&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderPageImage" runat="server"&amp;gt;
&amp;lt;img src="/_layouts/images/blank.gif" width="1" height="1" alt=""&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderPageDescription" runat="server"&amp;gt;
&amp;lt;/asp:Content&amp;gt;
&amp;lt;asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server"&amp;gt;
&amp;lt;table cellspacing="0" cellpadding="0" border="0" style="width: 100%; height: 100%" class="propertysheet"&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-descriptiontext"&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-sectionheader"&amp;gt;
&amp;lt;h3 class="ms-standardheader"&amp;gt;URL&amp;lt;/h3&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-descriptiontext ms-inputformdescription"&amp;gt;
Enter URL of page to clear from output cache, ensure it is a relative URL and NOT an absolute URL&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;td class="ms-authoringcontrols ms-inputformcontrols"&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
&amp;lt;asp:TextBox ID="txtUrl" runat="server" CssClass="ms-input" Columns="100" /&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-descriptiontext"&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-sectionheader"&amp;gt;
&amp;lt;h3 class="ms-standardheader"&amp;gt;Passcode&amp;lt;/h3&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-descriptiontext ms-inputformdescription"&amp;gt;Enter Passcode&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;td class="ms-authoringcontrols ms-inputformcontrols"&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
&amp;lt;asp:TextBox ID="txtPasscode" TextMode="Password" runat="server" CssClass="ms-input" Columns="100" /&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
&amp;lt;asp:Label CssClass="ms-formvalidation" Text="" runat="server" ID="lblResults"&amp;gt;&amp;lt;/asp:Label&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-sectionline" height="2" colspan="5"&amp;gt;
&amp;lt;img src="/_layouts/images/blank.gif" width="1" height="1" alt=""&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td class="ms-spaceBetContentAndButton" colspan="5"&amp;gt;
&amp;lt;img src="/_layouts/images/blank.gif" width="1" height="1" alt=""&amp;gt;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td colspan="5"&amp;gt;
&amp;lt;table cellpadding="0" cellspacing="0" width="100%"&amp;gt;
&amp;lt;colgroup&amp;gt;
&amp;lt;col width="99%"&amp;gt;
&amp;lt;col width="1%"&amp;gt;
&amp;lt;/colgroup&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;td&amp;gt;
&amp;amp;nbsp;&amp;lt;/td&amp;gt;
&amp;lt;td nowrap id="align01"&amp;gt;
&amp;lt;input id="onetidCreateList" class="ms-ButtonHeightWidth" type="submit" value="&amp;lt;SharePoint:EncodedLiteral runat='server' text='&amp;lt;%$Resources:wss,multipages_okbutton_text%&amp;gt;' EncodeMethod='HtmlEncode'/&amp;gt;"
accesskey="&amp;lt;SharePoint:EncodedLiteral runat='server' text='&amp;lt;%$Resources:wss,multipages_okbutton_accesskey%&amp;gt;' EncodeMethod='HtmlEncode'/&amp;gt;"&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;tr height="60"&amp;gt;
&amp;lt;td&amp;gt;
&amp;amp;nbsp;&amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;sharepoint:formdigest runat="server" /&amp;gt;
&amp;lt;/asp:Content&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-8989996805613488516?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2009/08/clearing-individual-pages-from-output.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_8yYCvwdJans/SoRlOfXPbBI/AAAAAAAAAHE/aHv0klkv_yM/s72-c/Picture+3.png" height="72" width="72" /><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1317967490733899187</guid><pubDate>Thu, 23 Jul 2009 07:18:00 +0000</pubDate><atom:updated>2009-07-23T07:26:42.604Z</atom:updated><title>MOSS publishing sites and download aspx file problem - part 2</title><description>As you may recall in this &lt;a href="http://planetwilson.blogspot.com/2009/02/moss-publishing-sites-and-output.html"&gt;earlier blog post&lt;/a&gt; I had come across a problem where certain browsers put pages into output cache with slightly different HTTP response headers which &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_0"&gt;caused&lt;/span&gt; issues for subsequent users to that page with normal browsers.&lt;br /&gt;&lt;br /&gt;This turned out to be ASP.NET and not &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;IIS&lt;/span&gt; or MOSS. It was all down to the browser definition files as described in &lt;a href="http://msdn.microsoft.com/en-us/library/ms228122.aspx"&gt;this &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;MSDN&lt;/span&gt; article&lt;/a&gt;. A bunch of XML configuration files which specify what capabilities certain browsers have. Unfortunately they are very out of date since they were created at the time  .NET 2.0 came out and mobile browsers have moved on significantly since then.&lt;br /&gt;&lt;br /&gt;I was able to override the default behaviour of ASP.NET by creating an entry in a custom .browser file in the App_browsers folder of our web site. By creating a &lt;browser&gt; node with a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;refId&lt;/span&gt;="Default" it effectively overrode a property on one of the base definitions hence applying it for pretty much all requests, the property in question &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_4"&gt;being&lt;/span&gt; "&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;preferredRenderingMime&lt;/span&gt;" set to "text/html".&lt;br /&gt;&lt;br /&gt;Problem solved!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1317967490733899187?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2009/07/moss-publishing-sites-and-download-aspx.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-6353993018216786173</guid><pubDate>Tue, 26 May 2009 10:35:00 +0000</pubDate><atom:updated>2009-05-26T10:38:33.314Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">MOSS search content source bug</category><title>Annoying content source bug</title><description>I recently came across this annoying bug when setting up content sources recently.&lt;br /&gt;&lt;br /&gt;If you try and specify multiple start addresses which differ only by query string then you get an error.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/ShvGIj08AiI/AAAAAAAAAG0/Jm1tYV2pNdk/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 203px;" src="http://4.bp.blogspot.com/_8yYCvwdJans/ShvGIj08AiI/AAAAAAAAAG0/Jm1tYV2pNdk/s320/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5340079633536385570" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The error is  "the object you are trying to create already exists. try again using a different name"&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/ShvGOzpIdVI/AAAAAAAAAG8/fc8z68avs68/s1600-h/2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 126px;" src="http://1.bp.blogspot.com/_8yYCvwdJans/ShvGOzpIdVI/AAAAAAAAAG8/fc8z68avs68/s320/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5340079740861052242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It seems that SharePoint uses only the main part of the URL for adding these to an internal collection. Using Reflector on Microsoft.SharePoint.Portal.Search.Admin.Pages and following the code path through confirmed this to be the case.&lt;br /&gt;&lt;br /&gt;The solution is to create a page with those URLs on and crawl that instead. Not the end of the world but annoying all the same.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-6353993018216786173?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2009/05/annoying-content-source-bug.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_8yYCvwdJans/ShvGIj08AiI/AAAAAAAAAG0/Jm1tYV2pNdk/s72-c/1.PNG" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-3095640876556470247</guid><pubDate>Wed, 11 Feb 2009 13:12:00 +0000</pubDate><atom:updated>2009-02-12T10:13:25.019Z</atom:updated><title>MOSS publishing sites and download aspx file problem</title><description>A project I was working on recently experienced a peculiar problem where users would browse to a page and be prompted to download the page e.g. save home.aspx somewhere locally. This was a MOSS publishing internet public facing site with multiple web front ends and page output caching set up.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/SZLPEoAViMI/AAAAAAAAAGc/77BhA6lY0qw/s1600-h/0.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 120px;" src="http://4.bp.blogspot.com/_8yYCvwdJans/SZLPEoAViMI/AAAAAAAAAGc/77BhA6lY0qw/s320/0.PNG" alt="" id="BLOGGER_PHOTO_ID_5301527389733750978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The downloaded page was not the aspx source itself but the properly rendered HTML.&lt;br /&gt;&lt;br /&gt;The problem was seemingly random and intermittent, it would appear on different web front ends and an IISRESET would cure the problem for a while but then other pages would then start to suffer from the same problem.&lt;br /&gt;&lt;br /&gt;Eventually after finding a page which exhibited this behaviour and using Fiddler to look at the headers of the request and response I saw that the response content-tye header was set to "text/vnd.wap.wml" and not "text/html" as one might expect.&lt;br /&gt;&lt;br /&gt;The problem was that the first person to hit that particular page was using a mobile browser whose user-agent string and Accepts header were making SharePoint/IIS return a content type like that above. Unfortunately this response was then place in the page output cache in MOSS.&lt;br /&gt;&lt;br /&gt;When the next person to come along requested the page using a full fat browser like IE or Firefox, those browsers did not know how to handle the content type and offered to save the file instead!&lt;br /&gt;&lt;br /&gt;Solution?&lt;br /&gt;&lt;br /&gt;To vary the output caching dependant on the browser in use. Care is needed here to not impact the efficiency of the caching too much. You could for instance use the site output cache profile settings and choose user-agent against the vary by HTTP header. This is less than ideal however as user-agent strings can vary greatly:-&lt;br /&gt;&lt;br /&gt;"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)"&lt;br /&gt;&lt;br /&gt;Different browsers, versions of browsers, .NET versions installed in the case of Windows PCs and multiple combinations of each can lead to dozens of potential user-agent strings. Storing a separate version of each page for each one would be very wasteful.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/SZLPQJNUGgI/AAAAAAAAAGk/FXY_g5mVuoQ/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 197px;" src="http://1.bp.blogspot.com/_8yYCvwdJans/SZLPQJNUGgI/AAAAAAAAAGk/FXY_g5mVuoQ/s320/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5301527587625114114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;A better solution would be to just store a different cached version per browser i.e. just part of the user-agent string. This can be achieved by implementing a vary by custom handler on your site.This implements the IVaryByCustomHandler interface and your own logic determines what to base the output cache on.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/SZLPXtTlhzI/AAAAAAAAAGs/CGSwk1PseKk/s1600-h/2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 192px;" src="http://4.bp.blogspot.com/_8yYCvwdJans/SZLPXtTlhzI/AAAAAAAAAGs/CGSwk1PseKk/s320/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5301527717574182706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is an MSDN article detailing this here:-&lt;br /&gt;&lt;br /&gt;http://msdn.microsoft.com/en-us/library/ms550239.aspx&lt;br /&gt;&lt;br /&gt;and my implementation:-&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px dashed rgb(153, 153, 153); padding: 5px; overflow: auto; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; color: rgb(0, 0, 0); background-color: rgb(238, 238, 238); font-size: 12px; line-height: 14px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;public string GetVaryByCustomString(HttpApplication app, HttpContext context, string custom)&lt;br /&gt;{&lt;br /&gt;   //The code looks for parameters specified in the cache&lt;br /&gt;   //profile that are passed to the handler and parses those&lt;br /&gt;   //delimited by a semicolon.&lt;br /&gt;   StringBuilder sb = new StringBuilder();&lt;br /&gt;   string[] strings = custom.Split(';');&lt;br /&gt;   bool appended = false;&lt;br /&gt;   foreach (string str in strings)&lt;br /&gt;   {&lt;br /&gt;       switch (str)&lt;br /&gt;       {&lt;br /&gt;           case "PWBrowserCheck":&lt;br /&gt;               if (appended)&lt;br /&gt;                   sb.Append(';');&lt;br /&gt;&lt;br /&gt;               sb.Append(Request.Browser.Type.ToString());&lt;br /&gt;               break;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;           default:&lt;br /&gt;               continue;&lt;br /&gt;       }&lt;br /&gt;       appended = true;&lt;br /&gt;   }&lt;br /&gt;   return sb.ToString();&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-3095640876556470247?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2009/02/moss-publishing-sites-and-output.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_8yYCvwdJans/SZLPEoAViMI/AAAAAAAAAGc/77BhA6lY0qw/s72-c/0.PNG" height="72" width="72" /><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1315850602982430512</guid><pubDate>Thu, 03 Jul 2008 14:43:00 +0000</pubDate><atom:updated>2008-12-10T16:44:19.702Z</atom:updated><title>SharePoint site columns and a mngfield.aspx error</title><description>I came across an interesting SharePoint bug recently when deploying custom site columns to a site collection.&lt;br /&gt;&lt;br /&gt;Some people were complaining that they couldn't get my colour calendar solution to work properly on their systems. That when they installed they got an error trying to view the site column gallery. It turns out that there is a bug in SharePoint to do with the site column gallery and URL case sensitivity.&lt;br /&gt;&lt;br /&gt;In the MSDN forums someone had come across the problem before (search for post by CorbyH425) &lt;a target="_blank" href="http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2863822&amp;amp;SiteID=1"&gt;http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=2863822&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;My solution contained some custom field definitions in an elements XML file. I was trying to install to a site collection but not the root one.&lt;br /&gt;&lt;br /&gt;Let's assume the site collection was created on this URL :-&lt;br /&gt;&lt;br /&gt;http://mybigsite.com/sites/MWBigSite1&lt;br /&gt;&lt;br /&gt;I then install my solution, deploy my solution and activate the site collection scoped feature passing the following url to stsadm :-&lt;br /&gt;&lt;br /&gt;http://mybigsite.com/sites/mwbigsite1&lt;br /&gt;&lt;br /&gt;If you then navigate to the site column gallery in the root of the site collection http://mybigsite.com/sites/mwbigsite1/_layouts/mngfield.aspx an error occurs.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/SGzoiZ2KHgI/AAAAAAAAAE0/HpuQM89bDwg/s1600-h/error.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/SGzoiZ2KHgI/AAAAAAAAAE0/HpuQM89bDwg/s320/error.PNG" alt="" id="BLOGGER_PHOTO_ID_5218801745966800386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;A quick check with verbose logging switched on reveals the following&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;Application error when access /_layouts/mngfield.aspx, Error=Object reference not set to an instance of an object.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you install, deploy and activate but provide the url the site was created on with the correct case then all is fine.&lt;br /&gt;&lt;br /&gt;So although urls you use when deploying should be case insensitive it may pay to just copy and paste the actual url from the browser for stsadm purposes, alternatively, use stsadm to add the solution and the use the solution management UI in central admin to deploy and activate.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1315850602982430512?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2008/07/sharepoint-site-columns-and.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_8yYCvwdJans/SGzoiZ2KHgI/AAAAAAAAAE0/HpuQM89bDwg/s72-c/error.PNG" height="72" width="72" /><thr:total>4</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-3211200928460248761</guid><pubDate>Tue, 15 Apr 2008 10:23:00 +0000</pubDate><atom:updated>2008-04-15T10:28:40.039Z</atom:updated><title>New release of colour (color) calendar v2.3</title><description>&lt;p&gt;A new release of the colour calendar. Here are the changes:-&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Field naming changes in the UI to make them more user friendly.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Event Category Title field does not appear when viewing details of an event.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Enable width fix option on colour coding web part - this implements the fix required to allow you to resize the calendar view web part without having scroll bars appear. (thanks to &lt;a href="http://www.thesug.org/blogs/kyles" target="blank"&gt;Kyle&lt;/a&gt; for this)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;An instruction manual is now included in the release! &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Thanks to everyone for all the feedback. As usual the release can be found &lt;a href="http://www.codeplex.com/planetwilson"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-3211200928460248761?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2008/04/new-release-of-colour-color-calendar.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>46</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-87042320244017892</guid><pubDate>Mon, 24 Mar 2008 21:22:00 +0000</pubDate><atom:updated>2008-04-04T21:04:08.487Z</atom:updated><title>Another MacBook Pro convert...</title><description>There seems to be a spate of posts like this extolling the virtues of MacBook Pros and here is another!&lt;br /&gt;&lt;br /&gt;I needed a new laptop as I recently switched jobs and need my own kit now. After first trying a Dell M1530 (horrible screen) and then a Zepto (Scandinavia's largest laptop manufacturer! why oh why did I not go for a big name? anyway space bar didn't work) I decided I just needed something that worked and I was reading such great things about the MacBook Pros.&lt;br /&gt;&lt;br /&gt;I went along to the Apple store and tried one out, I was hooked. These things are wonderful pieces of kit. Amazing build quality, fantastic screens, really slim and light. I went for a 15.4” machine as the 17” is just a little too big for my liking plus I have worked at 1920x1200 for a couple of years on a Dell but for the past few months was finding myself winding the resolution down as it was too high so the 1440x900 on the 15.4” is quite nice.&lt;br /&gt;&lt;br /&gt;I got one of the new Penryn (new Intel 45nm processors) based ones and bought my own RAM for it. Chose the 2.4GHz as 0.1GHZ with a bit of extra cache simply isn't worth £300 extra.&lt;br /&gt;&lt;br /&gt;Unlike most of the other SharePoint guys who have gone down this route though I have not decided to just run with Vista and here is why...&lt;br /&gt;&lt;br /&gt;I want to use all of my 4Gb RAM which means Vista x64 or OSX (which has been 64 bit for a while) Now Bootcamp works really well and I have installed and used Vista on it fine. In fact the new OS X install DVDs which have the Bootcamp drivers on even have proper 64 bit drivers for all the devices in a MBP, smoothest install ever. However it is still Vista. I just can't stand it. It is harder to use than XP and is such a resource hog.&lt;br /&gt;&lt;br /&gt;The biggest bottleneck in a laptop with VM work is typically the hard drive and Vista hammers it. The fact is that running VMs using VMWare Fusion in OS X is hands down faster and smoother than VMWare Workstation in Vista. I can run VMs with more memory or just more VMs with OS X. It certainly seems to handle memory pressure better than Vista. Also suspending and restoring VMs is soooo much quicker in Fusion it is unbelievable. I have no idea why and I tried fiddling with the settings in VMWare workstation but it made no difference. I know VMWare workstation is more powerful with more options but honestly Fusion does everything I need.&lt;br /&gt;&lt;br /&gt;Not everything is perfect, the keyboard takes some getting used to and there are different shortcuts inside and outside the VMs. Also 2 USB ports isn't enough although fairly easily rectified with a small USB hub I carry with me. I haven't had the chance to try out a super fast Firewire 800 external drive yet. OS X has its quirks, the way windows maximise and minimise drives me a bit mad for instance.&lt;br /&gt;&lt;br /&gt;I have a Bootcamped XP installation running in Fusion for running Office and any Windows apps I haven't found equivalents for in OS X (i.e. games and Outlook), this is all seamless due to Unity mode in Fusion (check out VMWare Fusion Unity on YouTube) Development VMs then sit full screen on their own desktops and it is a quick key press to jump from one to another.&lt;br /&gt;&lt;br /&gt;About a month ago I spent 6 hours trying to sort out a friend's laptop that had been reduced to a never ending BSOD reboot loop due to Vista SP1 (not beta) being applied and decided life is too short to waste on it.&lt;br /&gt;As most SharePoint dev takes place in VMs I just don't care about the host OS any more, OS X &lt;span style="font-style: italic;"&gt;just works&lt;/span&gt;. There are so many little things about this new laptop which are cool, it has been a long time since I used a piece of technology and doing so made me smile....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-87042320244017892?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2008/03/another-macbook-pro-convert.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-7473504241737018384</guid><pubDate>Mon, 18 Feb 2008 15:30:00 +0000</pubDate><atom:updated>2010-03-27T07:31:59.414Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">color</category><category domain="http://www.blogger.com/atom/ns#">colour</category><category domain="http://www.blogger.com/atom/ns#">calendar</category><category domain="http://www.blogger.com/atom/ns#">MOSS</category><title>Version 2 of the Colour (color) Calendar Released</title><description>I have finished working on what I hope is the final version of the colour calendar.&lt;br /&gt;
&lt;br /&gt;
The previous version was well received but was lacking in a couple of areas. Firstly it required the creation of custom calendar lists. The custom list was based on the in-built calendar list but was missing some of the functionality like Connect to Outlook. Secondly you had to manually add the colour coder web part to calendar view screens.&lt;br /&gt;
&lt;br /&gt;
The new version is built right into the existing SharePoint calendar list. Once you have deployed the solution you will find a new option under list settings for calendar lists to enable and disable the colour coding functionality.&lt;br /&gt;
&lt;br /&gt;
Enabling the functionality creates the needed columns and adds the web part to any calendar views present on the list. Simply by clicking the enable button you will have a working colour calendar.&lt;br /&gt;
&lt;br /&gt;
Disabling the functionality simply switches the display titles back to the default, it does not remove the colour coding web part or remove the columns so that you do not lose data. You can simply switch it back on again to see the colouring.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_8yYCvwdJans/R7mkxoMUTwI/AAAAAAAAAEk/FA9A8IJmQLI/s1600-h/1.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5168343219893980930" src="http://2.bp.blogspot.com/_8yYCvwdJans/R7mkxoMUTwI/AAAAAAAAAEk/FA9A8IJmQLI/s320/1.PNG" style="cursor: hand; cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The colour coder web part works as before defaulting to a central colour mapping list in the root web but you can override to a local one if you wish.&lt;br /&gt;
&lt;br /&gt;
If you add additional calendar views to your list, simply disable and then re-enable the functionality to have it applied to the new views.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://3.bp.blogspot.com/_8yYCvwdJans/R7mk74MUTxI/AAAAAAAAAEs/pRaSwWF8ANk/s1600-h/2.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5168343395987640082" src="http://3.bp.blogspot.com/_8yYCvwdJans/R7mk74MUTxI/AAAAAAAAAEs/pRaSwWF8ANk/s320/2.PNG" style="cursor: hand; cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
It has been built so as to be upgradeable from the previous version. If you run the upgrade script as opposed to the deploy script then you will find your old colour calendar lists still work but the option to create a "Colour Calendar List" will be removed. You can obviously just use the new method for any new colour calendars you wish to create.&lt;br /&gt;
&lt;br /&gt;
Thanks for all the feedback so far.&lt;br /&gt;
&lt;br /&gt;
As usual the latest release can be found &lt;a href="http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=planetwilson&amp;amp;ReleaseId=10828"&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Regards,&lt;br /&gt;
&lt;br /&gt;
Mark Wilson&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-7473504241737018384?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2008/02/version-2-of-colour-calendar-released.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_8yYCvwdJans/R7mkxoMUTwI/AAAAAAAAAEk/FA9A8IJmQLI/s72-c/1.PNG" height="72" width="72" /><thr:total>218</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-3792708729820322207</guid><pubDate>Tue, 11 Dec 2007 08:46:00 +0000</pubDate><atom:updated>2007-12-11T09:22:20.740Z</atom:updated><title>ItemCount and Items.Count</title><description>Noticed a strange thing the other day, a list has the property ItemCount and also an Items collection which has its own .Count but they don't always give the same answer. If I have a piece of code like this pointing to a list with 4 items in it.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;!--  Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/  --&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 1&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (SPSite site &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;new&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; SPSite(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;http://mwmoss/marktest&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;))&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 2&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;{&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 3&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;    &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;    using&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; (SPWeb web &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; site.OpenWeb())&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 4&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        {&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 5&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                SPList list &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;=&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; web.Lists[&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Mark's Contacts&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;];&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 6&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 7&lt;/span&gt;         &lt;span style="color: rgb(0, 0, 0);"&gt;        &lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;while&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;(list.Items.Count &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 8&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                {&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt; 9&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                         list.Items[&lt;/span&gt;&lt;span style="color: rgb(128, 0, 128);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;].Delete();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;10&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                       Console.WriteLine(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;ItemCount &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; list.ItemCount.ToString());&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;11&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;                       Console.WriteLine(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;Items.Count &lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;"&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;+&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; list.Items.Count.ToString());&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;12&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;       }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;13&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;        }&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 128, 128);"&gt;14&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The output looks like this:-&lt;br /&gt;&lt;br /&gt;ItemCount 4&lt;br /&gt;Items.Count 3&lt;br /&gt;ItemCount 4&lt;br /&gt;Items.Count 2&lt;br /&gt;ItemCount 4&lt;br /&gt;Items.Count 1&lt;br /&gt;ItemCount 4&lt;br /&gt;Items.Count 0&lt;br /&gt;&lt;br /&gt;I guess internally some collection isn't getting updated as we go round the loop. Something to be careful of anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-3792708729820322207?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/12/itemcount-and-itemscount.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1215300314166189684</guid><pubDate>Sun, 18 Nov 2007 18:07:00 +0000</pubDate><atom:updated>2008-12-10T16:44:21.624Z</atom:updated><title>Updated colour (color) calendar for SharePoint 2007</title><description>&lt;b&gt;&lt;h2&gt;&lt;span style="font-weight: bold;color:red;" &gt;This article has also been superceded by an updated V2 version which be found &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://planetwilson.blogspot.com/2008/02/version-2-of-colour-calendar-released.html"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;/h2&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I have finished the new version of the SharePoint 2007 colour calendar. Here are some of the features:-&lt;br /&gt;&lt;br /&gt;- Built as a SharePoint solution.&lt;br /&gt;- New web part to do the colour coding, no messing with Javascript.&lt;br /&gt;- New type of list to define the colour mappings so you can have one central place to hold colour mappings.&lt;br /&gt;- Works with WSS or MOSS.&lt;br /&gt;- Foreground and background colouring.&lt;br /&gt;&lt;br /&gt;There is a new type of list called Colour Calendar and another type of list called Colour Calendar Mapping. An instance of the mapping list is created by default in the root of the site collection with colour mappings for the default event categories.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/R0CBFcu4h6I/AAAAAAAAAEM/0rmtHcVxlt4/s1600-h/ccallists.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8yYCvwdJans/R0CBFcu4h6I/AAAAAAAAAEM/0rmtHcVxlt4/s320/ccallists.PNG" alt="" id="BLOGGER_PHOTO_ID_5134245505814529954" border="0" /&gt;&lt;/a&gt;This mapping list defines the foreground and background colours of each event category.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/R0CBS8u4h7I/AAAAAAAAAEU/q6stL7DP8LQ/s1600-h/calmap.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/R0CBS8u4h7I/AAAAAAAAAEU/q6stL7DP8LQ/s320/calmap.PNG" alt="" id="BLOGGER_PHOTO_ID_5134245737742763954" border="0" /&gt;&lt;/a&gt;The colour calendar list is based on the in built calendar list but has two fields added, the event category plus a calculated field needed to make the colouring work.&lt;br /&gt;&lt;br /&gt;Having created a colour calendar you need to edit the calendar.aspx page view and add a "PlanetWilson Calendar Colour Coder" web part (snappy title eh?). This should be placed below the calendar view list view webpart.&lt;br /&gt;&lt;br /&gt;You should now have a colour coded calendar.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/R0CBnsu4h8I/AAAAAAAAAEc/jUwfd9wki4M/s1600-h/ccal.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_8yYCvwdJans/R0CBnsu4h8I/AAAAAAAAAEc/jUwfd9wki4M/s320/ccal.PNG" alt="" id="BLOGGER_PHOTO_ID_5134246094225049538" border="0" /&gt;&lt;/a&gt;By default the web part gets its colour mappings from the central mapping list deployed at the site collection root. It does however specify a property to point it at a different mapping list should you want some different categories and colours for a calendar. Just create a mapping list somewhere else and set the property to the list, it can be fully qualified URL or relative, don't put the view part on the end of this URL e..g&lt;br /&gt;&lt;br /&gt;http://mwmoss/test/mappinglist2&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;./mappinglist2&lt;br /&gt;&lt;br /&gt;The categories are held in a site column call Event category, you can change this to add new categories or change existing ones. Be aware though that if you choose the option to push changes down to all the lists you may overwrite any custom categories you made on an individual calendar.&lt;br /&gt;&lt;br /&gt;Anyway I hope it is an improvement on the previous version. The source code and WSP file can be found here:-&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.codeplex.com/planetwilson"&gt;http://www.codeplex.com/planetwilson&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;Are you having problems getting it to work?&lt;br /&gt;1) Did you create an instance of the Colour Calendar and NOT the standard calendar list?&lt;br /&gt;2) Did you edit the calendar.aspx page or the page where you have placed a web part for this newly created list and added a "PlanetWilson Calendar Colour Coder" web part? Is it definitely placed AFTER the calendar list view web part?&lt;br /&gt;&lt;br /&gt;Thanks to my good buddy Chris (&lt;a href="http://chrissyblanco.blogspot.com/"&gt;http://chrissyblanco.blogspot.com&lt;/a&gt;) for pointing out when I was being stupid banging my head against a brick wall with calculated fields (turns out you definitely need theResultType attribute - doh!)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1215300314166189684?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/11/updated-colour-color-calendar-for.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_8yYCvwdJans/R0CBFcu4h6I/AAAAAAAAAEM/0rmtHcVxlt4/s72-c/ccallists.PNG" height="72" width="72" /><thr:total>71</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1574431275969294763</guid><pubDate>Thu, 08 Nov 2007 07:19:00 +0000</pubDate><atom:updated>2007-11-08T07:24:19.956Z</atom:updated><title>TechEd Barcelona</title><description>I am over here at TechEd Barcelona at the moment, there have been some great SharePoint sessions from people like Patrick Tisseghem and Ted Pattison. Ted's session yesterday on security really cleared up a few things for me around the difference between WSS users and Windows users. You can download the source for his demo code &lt;a href="http://www.tedpattison.net/downloads.aspx"&gt;from his site&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Really looking forward to Patrick's session on SharePoint and Ajax today, I'll also be trying to find time to finish my new version of the Colour Calendar solution, it will be a proper deployable SharePoint solution offering a centrally managed set of categories and colours. No fiddling with Javascript I promise!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1574431275969294763?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/11/teched-barcelona.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-6350138640211661796</guid><pubDate>Mon, 29 Oct 2007 20:39:00 +0000</pubDate><atom:updated>2010-03-27T07:32:50.420Z</atom:updated><category domain="http://www.blogger.com/atom/ns#">web.config</category><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">debug</category><category domain="http://www.blogger.com/atom/ns#">solution</category><title>SharePoint Debug Switcher</title><description>I recently decided to build a little solution to more easily switch on debugging on a web application in SharePoint. Currently there are four different places to switch on in web.config for debug info. These are the call stack setting, the debug compilation settings and the custom errors setting.&lt;br /&gt;
&lt;br /&gt;
SharePoint luckily provides an API we can use to make modifications to the web.config file and the great thing about this API is it takes care of a multiple web front end scenario for us, as long as we make the changes through this API then they are propagated to all web front ends belonging to that web application.&lt;br /&gt;
&lt;br /&gt;
The API classes in question are SPWebConfigModification, a bunch of which you build up and add to the WebConfigModifications collection of an SPWebApplication object representing your SharePoint web app. We get hold of the SPWebApplication object through an SPWebService class and passing the current HTTP context.&lt;br /&gt;
&lt;br /&gt;
e.g.&lt;style type="text/css"&gt;
.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: Consolas, "Courier New", Courier, Monospace;
background-color: #ffffff;
/*white-space: pre;*/
}

.csharpcode pre { margin: 0em; }

.csharpcode .rem { color: #008000; }

.csharpcode .kwrd { color: #0000ff; }

.csharpcode .str { color: #006080; }

.csharpcode .op { color: #0000c0; }

.csharpcode .preproc { color: #cc6633; }

.csharpcode .asp { background-color: #ffff00; }

.csharpcode .html { color: #800000; }

.csharpcode .attr { color: #ff0000; }

.csharpcode .alt 
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}

.csharpcode .lnum { color: #606060; }
&lt;/style&gt;&lt;br /&gt;
&lt;pre class="csharpcode"&gt;SPWebService webService;
webService = SPFarm.Local.Servers.GetValue();

SPWebApplication app = webService.WebApplications[SPControl.
GetContextWebApplication(HttpContext.Current).Id];

SPWebConfigModification mod = &lt;span class="kwrd"&gt;new&lt;/span&gt; SPWebConfigModification();
mod.Path = &lt;span class="str"&gt;"configuration/SharePoint/SafeMode"&lt;/span&gt;;
mod.Name = &lt;span class="str"&gt;"CallStack"&lt;/span&gt;;
mod.Owner = &lt;span class="str"&gt;"PlanetWilson.SharePoint.SPDebugSwitch"&lt;/span&gt;;
mod.Value = enable.ToString();
mod.Sequence = 0;
mod.Type = SPWebConfigModification.SPWebConfigModificationType.EnsureAttribute;
app.WebConfigModifications.Add(mod);&lt;/pre&gt;...&lt;br /&gt;
&lt;br /&gt;
You can see in the full source code that we get a hold of the web application object using an SPWebService object, add the four sets of changes then call the ApplyWebConfigModifications method on the web service - that's it we are done!&lt;br /&gt;
&lt;br /&gt;
It is a fairly simple project. The rest of the files deal with deployment as a solution which is scoped at the "site" level, i.e. site collection and requires site collection admin rights for access to the functionality. A layouts application is used to execute this code and links from site settings take the user to the layouts application.&lt;br /&gt;
&lt;br /&gt;
Once the solution has been installed, deployed and activated on a site collection you will find two extra links under the "Site Collection Administration" section of site settings, one to enable and one to disable debugging support.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://2.bp.blogspot.com/_8yYCvwdJans/RyZLjivTeXI/AAAAAAAAAEE/ORdetQAdSpg/s1600-h/links.PNG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5126868299800607090" src="http://2.bp.blogspot.com/_8yYCvwdJans/RyZLjivTeXI/AAAAAAAAAEE/ORdetQAdSpg/s320/links.PNG" style="cursor: pointer; display: block; margin: 0px auto 10px; text-align: center;" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The source code and solution file can be found &lt;a href="http://www.codeplex.com/planetwilson" target="_blank"&gt;here on CodePlex&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-6350138640211661796?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/10/sharepoint-debug-switcher.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_8yYCvwdJans/RyZLjivTeXI/AAAAAAAAAEE/ORdetQAdSpg/s72-c/links.PNG" height="72" width="72" /><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-8486736763074730092</guid><pubDate>Thu, 27 Sep 2007 13:29:00 +0000</pubDate><atom:updated>2008-12-10T16:44:22.149Z</atom:updated><title>SharePoint 2003 colour (color) calendar</title><description>In a previous post I mentioned that I had created a colour-coded (or color-coded if you are from the US) version of the in built &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;SharePoint&lt;/span&gt; 2003 calendar. (You can find the MOSS/WSS v3 version of the colour calendar &lt;a href="http://planetwilson.blogspot.com/2007/11/updated-colour-color-calendar-for.html"&gt;here&lt;/a&gt;) I have had quite a few requests to provide the 2003 solution and although my blog was going to be about MOSS mainly I'll post the 2003 solution here. I am not allowed to share that exact solution I previously mentioned but I have however come up with a different method which actually has turned out to be a little simpler!&lt;br /&gt;&lt;br /&gt;The default &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;SharePoint&lt;/span&gt; 2003 calendar is generated by Javascript in the browser so the solution is a little more complicated than you might imagine. The trick is to ensure that the colour coding information is sent out to the page so that a custom javascript function can pick it up and colour code the entries.&lt;br /&gt;&lt;br /&gt;First of all you require a custom list definition inside a custom site definition on the file system. I won't go into detail on how to do this is it is documented elsewhere (&lt;a href="http://msdn2.microsoft.com/en-us/library/ms983903.aspx" target="_blank"&gt;http://msdn2.microsoft.com/en-us/library/ms983903.aspx&lt;/a&gt;). Microsoft do not strictly speaking support changing any of the shipping template definitions so change the default ones at your peril. I will attach a zip file with a sample list definition inside if you want to see it working quickly.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_8yYCvwdJans/Rvu3mAINodI/AAAAAAAAACs/Neh1btmn_Z8/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_8yYCvwdJans/Rvu3mAINodI/AAAAAAAAACs/Neh1btmn_Z8/s320/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5114883665306690002" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The custom list &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;defintion&lt;/span&gt; should be based on the EVENTS list definition and registered in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ONET&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;xml&lt;/span&gt; Let's call this folder &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;MWEVENTS&lt;/span&gt; for arguments sake, in the diagram I have created a custom &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;SPS&lt;/span&gt; template called &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;SPSMW&lt;/span&gt; but &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;this&lt;/span&gt; could &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;easily&lt;/span&gt; be done in a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;WSS&lt;/span&gt; site definition too.&lt;br /&gt;&lt;br /&gt;Now we need to pass this colour to the Javascript function which generates the calendar. Broadly speaking the steps are as follows :-&lt;br /&gt;&lt;br /&gt;1) Add a new category field to the custom list definition to allow a colour to be selected.&lt;br /&gt;2) Include a script reference to the javascript file containing the functions which will do the colouring&lt;br /&gt;3) Change the title of the event to item id + "|||" + title&lt;br /&gt;4) Store in javascript array the colour category for each event&lt;br /&gt;5) After building the calendar, call our custom function passing the javascript array of colour category assignments.&lt;br /&gt;6) Within the custom javascript functions, find the relevant items in the DOM and colour code them!&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://mankymanning.googlepages.com/SolutionFiles.zip"&gt;download the sample list definition files here&lt;/a&gt;, I have commented SCHEMA.XML to point out where the changes have been made. As well as the list definition there is a custom Javascript file (&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;mwcalendar&lt;/span&gt;.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;js&lt;/span&gt;) which should be placed in the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;wpresources&lt;/span&gt; folder of the local site. You could make it global by placing in _&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;wpresources&lt;/span&gt; and changing the link in SCHEMA.XML if you prefer.&lt;br /&gt;&lt;br /&gt;You should find that your calendar is now coloured in all three calendar views (day/week/month)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/Rvu3vQINoeI/AAAAAAAAAC0/hXAg1oU0Htw/s1600-h/2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8yYCvwdJans/Rvu3vQINoeI/AAAAAAAAAC0/hXAg1oU0Htw/s320/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5114883824220479970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Cheers,&lt;br /&gt;&lt;br /&gt;Mark&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-8486736763074730092?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/09/sharepoint-2003-colour-color-calendar.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_8yYCvwdJans/Rvu3mAINodI/AAAAAAAAACs/Neh1btmn_Z8/s72-c/1.PNG" height="72" width="72" /><thr:total>5</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1788859405313292161</guid><pubDate>Tue, 04 Sep 2007 08:50:00 +0000</pubDate><atom:updated>2010-06-15T09:30:31.828Z</atom:updated><title>SharePoint 2007 colour (color) calendar</title><description>&lt;b&gt;&lt;h2&gt;&lt;span style="font-weight: bold;color:red;" &gt;&lt;br /&gt;
&lt;br /&gt;
ATTENTION!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This article has been superceded by an updated deployable version which be found &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://planetwilson.blogspot.com/2008/02/version-2-of-colour-calendar-released.html"&gt;here.&lt;/a&gt;&lt;br /&gt;
&lt;/h2&gt;&lt;/b&gt;&lt;br /&gt;
The in-built calendar view is SharePoint 2007 is a heck of a lot better than the one in 2003 but it still lacks a feature requested by many customers - the ability to colour (or color for our US friends) code the entries like you can in Outlook.&lt;br /&gt;
&lt;br /&gt;
I had previously created a coloured calendar in 2003 and started to investigate how this might be achieved in 2007. Whilst there are commercial alternatives avilable, the licencing models can be cumbersome - tied to a physical machine etc which make development and deployment a pain.&lt;br /&gt;
&lt;br /&gt;
(&lt;span style="font-weight: bold;"&gt;Update&lt;/span&gt;: if you want to know about the 2003 version, click &lt;a href="http://planetwilson.blogspot.com/2007/09/sharepoint-2003-colour-color-calendar.html"&gt;here&lt;/a&gt;)&lt;br /&gt;
&lt;br /&gt;
In SharePoint 2003 the calendar was rendered entirely using Javascript so it was a question of modifying the schema.xml file for the list to output the relevant parameters and then overiding an ows.js function to ensure the colours got rendered. However in 2007 the calendar view is generated from code, specifically a bunch if classes like SPListView, SPCalendarView etc. Lots of this class heirarchy is marked as sealed or internal so it is not easy to try to inherit and change the behaviour. Plus lots of the code is obfuscated too.&lt;br /&gt;
&lt;br /&gt;
As an alternative approach I began to look at perhaps manipulating the calendar in Javascript once it had been delivered to the browser (thanks to Todd Bleeker for inspiration here)&lt;br /&gt;
&lt;br /&gt;
First of all I created a standard SharePoint Calendar list. Then I added a Choice column called Category and put the following values in the choice field.&lt;br /&gt;
&lt;br /&gt;
Appointment&lt;br /&gt;
Birthday&lt;br /&gt;
Business&lt;br /&gt;
Important&lt;br /&gt;
Vacation&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/RuEB1ZE5OjI/AAAAAAAAACE/OqgF5izysrY/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/RuEB1ZE5OjI/AAAAAAAAACE/OqgF5izysrY/s320/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5107365469190961714" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Secondly I created a calculated column called CatTitle set to the following formula as seen in the image,&lt;br /&gt;
&lt;br /&gt;
=Category &amp;amp; "|||" &amp;amp; Title&lt;br /&gt;
&lt;br /&gt;
You could make these site columns if you wish to re-use elsewhere.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/RuECCZE5OkI/AAAAAAAAACM/91156seOl2c/s1600-h/2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/RuECCZE5OkI/AAAAAAAAACM/91156seOl2c/s320/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5107365692529261122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Finally change the calendar view on the list so that the display field for each of day/week/month view is the CatTitle field.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/RuECJZE5OlI/AAAAAAAAACU/AEzU0kdaFg8/s1600-h/3.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/RuECJZE5OlI/AAAAAAAAACU/AEzU0kdaFg8/s320/3.PNG" alt="" id="BLOGGER_PHOTO_ID_5107365812788345426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now we need to insert some javascript to edit the titles so that they category and pipes are removed and the entries are coloured in. Edit the calendar page (Site Actions -&gt; Edit Page) and insert a content editor web part UNDER the calendar list view. Paste the following javasript into the source view. Make the web part hidden.&lt;br /&gt;
&lt;br /&gt;
&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:200px;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;script&amp;gt;  
 var SEPARATOR = "|||";  
 var nodes, category;  
 nodes = document.getElementsByTagName("a");  
 function getObjInnerText (obj)  
 {  
   return (obj.innerText) ? obj.innerText : (obj.textContent) ? obj.textContent : "";  
 }   
 for(var i = 0; i &amp;lt; nodes.length; i++)  
 {  
   if(getObjInnerText(nodes[i]).indexOf(SEPARATOR) != -1)  
   {  
     UpdateCalendarEntryText(nodes[i]);  
     var foundNode = nodes[i];  
     var trap = 0;  
     while(foundNode.nodeName.toLowerCase() != "td")  
     {  
       foundNode = foundNode.parentNode;  
       trap++;  
       if(trap &amp;gt; 10)  
       {  
         break; // don't want to end up in a loop  
       }  
     }  
     var colourinfo = GetCalendarColourInfo(category);  
     if(colourinfo.bg != "")  
     {  
       foundNode.style.background = colourinfo.bg;  
     }  
     // try and update the text colour if we can TD/A/NOBR/B/#text  
     if(colourinfo.fg != "")  
     {  
       try  
       {  
         // there should only be one anchor tag  
         childNodes = foundNode.all;  
         for(var j = 0; j &amp;lt; childNodes.length; j++)  
         {  
           if(childNodes[j].nodeName.toLowerCase() == "a")  
           {  
             // found anchor tag  
             childNodes[j].style.color = colourinfo.fg;  
             // set the NOBR tag as well to set the time if it is shown, but set it on the B tag for month view  
             if(childNodes[j].children[0].nodeName.toLowerCase() == "nobr")  
             {  // month view has an extra b tag surrounding the text  
               childNodes[j].children[0].style.color = colourinfo.fg;  
               if(childNodes[j].children[0].children[0].nodeName.toLowerCase() == "b")  
               {  
                 childNodes[j].children[0].children[0].style.color = colourinfo.fg;  
               }  
             }  
             break;  
           }  
         }  
       }  
       catch(e) {}  
     }  
   }  
 }  
 function ColourInfo(bg, fg)  
 {  
   this.bg = bg;  
   this.fg = fg;  
 }  
 function UpdateCalendarEntryText(anchorNode)  
 {  
   var children = anchorNode.childNodes;  
   for(var i = 0; i &amp;lt; children.length; i++)  
   {  
     if(children[i].nodeType == 3 &amp;amp;&amp;amp; children[i].nodeValue.indexOf(SEPARATOR) != -1)  
     {  
       var parts = children[i].nodeValue.split(SEPARATOR);  
       category = parts[0];  
       children[i].nodeValue = parts[1];      
     }  
     else  
       UpdateCalendarEntryText(children[i]);  
   }  
 }  
 function GetCalendarColourInfo(desc)  
 {  
   var colour = new ColourInfo("", "");  
   var trimmed = desc.replace(/^\s+|\s+$/g, '') ;  
   switch(trimmed.toLowerCase())  
   {  
     case "appointment":  
           colour.bg = "#ffd266";  
           colour.fg = "";  
           break;  
           case "birthday":  
           colour.bg = "#ae99dc";  
           colour.fg = "";  
           break;  
           case "business":  
           colour.bg = "#8aabe0";  
           colour.fg = "";  
           break;  
           case "important":  
           colour.bg = "#e77379";  
           colour.fg = "";  
           break;  
           case "vacation":  
           colour.bg = "#fffa91";  
           colour.fg = "";  
           break;  
     default:  
     {  
       colour.bg = "";  
       colour.fg = "";  
     }  
   }  
   return colour;  
 }  
 &amp;lt;/script&amp;gt;  
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
You should now have a coloured calendar! Month, week and day views should appear coloured. Remember that if you place a calendar web part on a site that you will need a hidden content editor web part containing the javascript as well.&lt;br /&gt;
&lt;br /&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s1600-h/5.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_8yYCvwdJans/RuECTJE5OmI/AAAAAAAAACc/iEqKLxyaZ9I/s320/5.PNG" alt="" id="BLOGGER_PHOTO_ID_5107365980292069986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you want to change the categories and colours, then simply add or change entries in the choice column and change the function in the Javascript accordingly.&lt;br /&gt;
&lt;br /&gt;
In an ideal world this would be some sort of deployable feature, perhaps  custom list definition. I will have a look at doing this at some point if I get time....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1788859405313292161?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/09/sharepoint-2007-colour-color-calendar.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_8yYCvwdJans/RuEB1ZE5OjI/AAAAAAAAACE/OqgF5izysrY/s72-c/1.PNG" height="72" width="72" /><thr:total>91</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-1643044572694557319</guid><pubDate>Wed, 29 Aug 2007 08:44:00 +0000</pubDate><atom:updated>2008-12-10T16:44:23.305Z</atom:updated><title>How to add a picker to the send to other location screen</title><description>&lt;span style="font-weight: bold; font-style: italic;"&gt;Update:&lt;/span&gt;&lt;span style="font-style: italic;"&gt; Although the soution here is not strictly supported as I modified core.js to quickly demonstrate the functionality, the note at the end of the post shows how to make it a supported change. Just thought I would mention this as some people have been commenting about unsupported changes....&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The standard send to other location functionality in MOSS leaves bit to be desired as the end user is forced to paste a URL into the textbox of a target lit to send the document to.&lt;br /&gt;&lt;br /&gt;This post shows how we can place an asset picker in the page to assist the end user in selecting a target location. This is the send to functionality I am referring to:-&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_8yYCvwdJans/RtU0X57FC1I/AAAAAAAAABE/dq05wvq4nEQ/s1600-h/1.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_8yYCvwdJans/RtU0X57FC1I/AAAAAAAAABE/dq05wvq4nEQ/s200/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5104043337984576338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First of all the send to another location link takes you to a layouts page called copy.aspx. We will make a copy of this page so as not to alter the original and call it copy2.aspx in the same folder (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS).&lt;br /&gt;&lt;br /&gt;The picker we are going to use is on re-purposed from the site manager page. I'll briefly describe how the picker is launched. There is a function called LaunchPickerTreeDialog contained inside the PickerTreeDialog.js, this in turn calls a general modal dialog box function inside core.js. As long as we pass the appropriate parameters to this call we can re-use the tree picker.&lt;br /&gt;&lt;br /&gt;First we need to add a reference to the PickerTreeDialog.js file, I added my script reference under the page head content placeholder like so:-&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;asp:Content ContentPlaceHolderId="PlaceHolderAdditionalPageHead" runat="server"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;script type="text/javascript" language="javascript" src="/_layouts/1033/PickerTreeDialog.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Secondly we need to add a button and attch the script to it to launch the picker, find the following piece of code:-&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;TD class="ms-authoringcontrols" width="100%" colspan="2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;wssawc:InputFormTextBox Title="&amp;lt;%$Resources:wss,copy_enterfolder%&amp;gt;" class="ms-input" ID="TxtFolder" Columns="35" Runat="server" maxlength=255 size=60 width=100% /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and replace it with this:-&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;TD class="ms-authoringcontrols" width="100%" colspan="1"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;wssawc:InputFormTextBox Title="&amp;lt;%$Resources:wss,copy_enterfolder%&amp;gt;" class="ms-input" ID="TxtFolder" Columns="35" Runat="server" maxlength=255 size=60 width=100% /&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;td colspan="1"&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  function launchPicker()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   var url=location.protocol + "//" + location.hostname ;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   var callback=function(arr)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   {&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    if(arr==null || arr==undefined)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;     return;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    var site=arr[1];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    var list=arr[2];&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    var x=document.getElementById("sendToBrowse").parentNode.previousSibling.children[0]; &amp;lt;!-- this will need to change if you change the layout --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    x.value = url + site + (site == '/' ? '' : '/') + list;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   LaunchPickerTreeDialog("Select Destination","","","",url,null,"","","/_layouts/images/Copy.gif", 0, callback );&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;  }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &amp;lt;input type="button" id="sendToBrowse" onclick="launchPicker();" value="..."&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&amp;lt;/TD&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now all we need to do is make the send to functionality call our new copy.aspx page instead of the original copy. Locate core.js in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033. If you search inside that file for copy.aspx, there are two places it is defined, edit both to say copy2.aspx. That's it! The send to other location functionality will now use our modified screen, complete with location picker dialog.&lt;br /&gt;&lt;br /&gt;The end result should look like this:-&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/RtU1VJ7FC2I/AAAAAAAAABM/gWLGMhXBPqU/s1600-h/2.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_8yYCvwdJans/RtU1VJ7FC2I/AAAAAAAAABM/gWLGMhXBPqU/s200/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5104044390251563874" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The method I have detailed here does involve making a change to core.js which is not strictly speaking a supported modification, also it will affect all sites on the machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;With a little extra work you can get around this. Instead of modifying the core.js file directly you can just take a copy of the function in which those changes reside (AddSendSubMenu) and override it in your own custom javascript file. This can be achieved with either a custom site definition specifying a CustomJSUrl property (see SDK for more details) or by creating a copy of the default master page, making the sites inherit from that and embed a reference to your custom JS file in there.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-1643044572694557319?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/08/how-to-add-picker-to-send-to-other.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_8yYCvwdJans/RtU0X57FC1I/AAAAAAAAABE/dq05wvq4nEQ/s72-c/1.PNG" height="72" width="72" /><thr:total>21</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-2140315042882145454</guid><pubDate>Tue, 31 Jul 2007 08:51:00 +0000</pubDate><atom:updated>2008-12-10T16:44:23.557Z</atom:updated><title>The trial period for this product has expired.</title><description>So I have MOSS RTM installed on a machine and I attempt to kick off a publish workflow on the home page of a portal that I just edited and I get an error "The trial period for this product has expired"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="file:///C:/DOCUME%7E1/mwilson/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/Rq8keq_OsaI/AAAAAAAAAAs/I00Q-ZJjjAE/s1600-h/error.PNG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/Rq8keq_OsaI/AAAAAAAAAAs/I00Q-ZJjjAE/s320/error.PNG" alt="" id="BLOGGER_PHOTO_ID_5093329812933489058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now a quick look around and some other people have also experienced this and claim that the farm service account needs to be a local administrator to fix this? I tried both the administrators group and power users group but only membership of local admins group this fixed the problem.&lt;br /&gt;&lt;br /&gt;According to this technet article the farm account should not be a member of the local admin group. Anyone else seen this or can shed any light on it? Maybe it is a bug to be fixed in SP1....&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;a href="http://technet2.microsoft.com/Office/en-us/library/f07768d4-ca37-447a-a056-1a67d93ef5401033.mspx?mfr=true"&gt;http://technet2.microsoft.com/Office/en-us/library/f07768d4-ca37-447a-a056-1a67d93ef5401033.mspx&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a href="http://technet2.microsoft.com/Office/en-us/library/f07768d4-ca37-447a-a056-1a67d93ef5401033.mspx?mfr=true"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-2140315042882145454?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/07/trial-period-for-this-product-has.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_8yYCvwdJans/Rq8keq_OsaI/AAAAAAAAAAs/I00Q-ZJjjAE/s72-c/error.PNG" height="72" width="72" /><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-2510073341633360261</guid><pubDate>Fri, 30 Mar 2007 10:30:00 +0000</pubDate><atom:updated>2007-03-30T10:33:15.552Z</atom:updated><title>VSTO Deployment Woes</title><description>Sooooo we are developing a VSTO 2005 SE plugin which needs to work in Outlook 2003 and 2007. So far so good. But what about deployment? You normally need to set CAS policy for the add-in so it  is trusted by Outlook and will run. Microsoft even give an ecxample of how to do this here:-&lt;br /&gt;&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx" target="new"&gt;http://msdn2.microsoft.com/en-us/library/aa537173(office.11).aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have used a custom action in the installer to set the CAS policy on install and this works fine. However we have a problem in that installing add-ins for all users doesn't quite work for Outlook 2007 (others have found this according to my searches on MSDN forums) Apparently according to a MS person in this post, under Office 2007 only add-ins registered under HKCU are loaded, those under HKLM are ignored:-&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1009337&amp;amp;SiteID=1" target="new"&gt;http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1009337&amp;amp;SiteID=1&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;So we changed our add-in install location to install to the app data folder as each person was going to need to install for themselves. However people who are non-admins can't set the CAS policy.&lt;br /&gt;&lt;br /&gt;So these two problems together seem to mean that we have to give each and every user local admin rights, get them to install and then revoke those rights - a deployment nightmare for any large number of users!&lt;br /&gt;&lt;br /&gt;Anyone else got around this at all? I really really hope that this isn't the way VSTO plugin solutions need to be deployed, I have been in contact with a helpful person at Microsoft UK who has in turn been in touch with a program manager in Redmond but no answer so far....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-2510073341633360261?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/03/vsto-deployment-woes.html</link><author>noreply@blogger.com (Mark Wilson)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2123409279078878090.post-5264232090784520236</guid><pubDate>Tue, 27 Mar 2007 09:04:00 +0000</pubDate><atom:updated>2008-12-10T16:44:24.057Z</atom:updated><title>Getting email functionality with MOSS without Exchange</title><description>Often when building a MOSS &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;VPC&lt;/span&gt; you would like to have email functionality. Under &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;SPS&lt;/span&gt; 2003 this meant making the server a domain controller and installing Exchange, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;SPS&lt;/span&gt; 2003 happily co-existed with Exchange. This won't work with MOSS however as it relies on looking at the local SMTP drop folder. Exchange takes over the SMTP service and so email stops working.&lt;br /&gt;&lt;br /&gt;An alternative is to install a more lightweight SMTP/POP3 server which will co-exist with MOSS.  Happily such a program exists in the form of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;MailEnable&lt;/span&gt;. It has a free version for personal or commercial use which we can use in a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;VPC&lt;/span&gt;. (http://www.mailenable.com/standard_edition.asp)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following steps assume that you have MOSS installed in a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;VPC&lt;/span&gt; in a &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;workgroup&lt;/span&gt; environment. The instructions assume that the machine name is &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;MOSSDEV&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Install &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;MailEnable&lt;/span&gt; specifying the domain you want to handle emails for - e.g. &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;mossdev&lt;/span&gt;.com. When prompted choose a post office name which is sensible e.g. MOSS, it doesn't actually matter what it is. When prompted enter the domain name &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;mossdev&lt;/span&gt;.com, &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;DNS&lt;/span&gt; host, 127.0.0.1, SMTP port 30&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;After install open the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;MailEnable&lt;/span&gt; administrator application, add another domain called moss.mossdev.com, specify that it should act as  a smart host for this domain and attempt to deliver to the mail to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;mossdev&lt;/span&gt; (i.e. the machine name) When asked about adding an alias say no. The reason for this is to provide a sub-domain for which MailEnable will pass the email on to the IIS SMTP server. This sub-domain could actually be called anything, fred.mossdev.com for instance. This sub-domain shold be used in the incoming email settings in MOSS for the display name.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_8yYCvwdJans/RgkOWbNId1I/AAAAAAAAAAU/ykTwfKMZl1k/s1600-h/1.PNG"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_8yYCvwdJans/RgkOWbNId1I/AAAAAAAAAAU/ykTwfKMZl1k/s400/1.PNG" alt="" id="BLOGGER_PHOTO_ID_5046580635868100434" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In the admin app under the SMTP connector (in the tree view under servers -&gt; localhost -&gt; Connectors -&gt; SMTP) node, right click properties. On the general tab ensure the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;DNS&lt;/span&gt; address to 127.0.0.1. On the inbound tab ensure the SMTP service port is 30, these settings should have been set by the options you set on install, we are just checking here.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Create a mailbox in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_15"&gt;MailEnable&lt;/span&gt; for your own account, e.g. administrator@mossdev.com&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/RgkOgrNId2I/AAAAAAAAAAc/3YyQdBW_Z14/s1600-h/2.PNG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/RgkOgrNId2I/AAAAAAAAAAc/3YyQdBW_Z14/s320/2.PNG" alt="" id="BLOGGER_PHOTO_ID_5046580811961759586" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Open &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_16"&gt;IIS&lt;/span&gt; manager. On the SMTP properties, on the access tab, set the relay restrictions to allow any computer to relay. On the delivery tab, click outbound connections and set the &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_17"&gt;TCP&lt;/span&gt; port to 30.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;In the SMTP node in &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_18"&gt;IIS&lt;/span&gt; manager add a new domain alias for moss.mossdev.com.&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_8yYCvwdJans/RgkO7rNId3I/AAAAAAAAAAk/OHmM5jeDoXY/s1600-h/3.PNG"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_8yYCvwdJans/RgkO7rNId3I/AAAAAAAAAAk/OHmM5jeDoXY/s400/3.PNG" alt="" id="BLOGGER_PHOTO_ID_5046581275818227570" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Set incoming email as normal  in central admin and outbound email set to &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_19"&gt;mossdev&lt;/span&gt; (i.e. local machine name)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Install an email client such as Outlook and set it to use POP3. Provide the server name as &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_20"&gt;mossdev&lt;/span&gt;. You will need to ensure that you change the smtp send port to 30 from the 25 it will default to.&lt;/li&gt;&lt;/ul&gt;You should now have incoming and outgoing email functionality in MOSS without requiring an Exchange environment, this certainly makes &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_21"&gt;VPC&lt;/span&gt; development a little easier. Certain features such as list synchronisation with Outlook won't work but for basic email it is fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2123409279078878090-5264232090784520236?l=planetwilson.blogspot.com' alt='' /&gt;&lt;/div&gt;</description><link>http://planetwilson.blogspot.com/2007/03/often-when-building-moss-vpc-you-would.html</link><author>noreply@blogger.com (Mark Wilson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_8yYCvwdJans/RgkOWbNId1I/AAAAAAAAAAU/ykTwfKMZl1k/s72-c/1.PNG" height="72" width="72" /><thr:total>2</thr:total></item></channel></rss>

