A little while back I had to create a solution to colour code a 2010 calendar to be used for internal scheduling here at bluesource… so I thought I’d share it with you chaps..!
The idea behind it is that a list can be used to manage unique keys against colour values. For instance, say a single calendar is used to book all projects. Each project has a unique number, and you wanted those to be automatically colour-coded (without having to use calendar overlays). This solution allows you to specify a key against a colour value – eg ‘Whichever calendar entry has [1234AABB] in the title of the entry, I want to be blue (#000066)’ .
Download the WSP Here: bluesource.intranet.zip
Please Note: bluesource does not accept any liability for this solution, it is the work of myself only – and as any custom solution, should be installed on development systems first.
It comprises of 2 pieces:
- A list definition – A list will need to be created from the definition. Unique keys and colour values are entered into the list (in the same site collection as the calendar).
- Deploy the WSP, and activate the Bluesource.Intranet.CalendarColours feature in Site Collection Features.
- Create a new list from the ‘CalendarColours’ list definition.
- Enter your values in the list (shown below):
- Title: The unique key to look for the calendar title
- Background Hex Value: Hex colour value to make item background
- Text Hex Value: Hex colour value for text
- Add the Calendar Colour Coding web part to the calendar page:
- Enter your calendar entries, using the unique keys – and voila:
Hope this helps – if people want the source code leave me a comment…
Posted in Calendar, Colour Coding, SharePoint, SharePoint 2010 | Tagged SharePoint 2010; Calendar Colour Coding; | 7 Comments »
So I recently had to write a console application to post data to a SharePoint 2010 list, using the web services – but without using any ‘normal’ .NET web references. The server was set up with Basic Authentication.
This involved forming the SOAP envelope manually, and using a POST command. One thing that tripped me up (…and very nearly made me cry) was that most samples on the net use <soap:Envelope> – whereas it only worked for me when I used <soap12:Envelope> (with the correct namespace of course).
Anyway the code is below – so hopefully it might help some of you not waste so much time as I did… ;/
static void Main(string args)
string soapEnv = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"" +
" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"" +
" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">" +
"<UpdateListItems xmlns=\"http://schemas.microsoft.com/sharepoint/soap/\">" +
"<Method ID=\"1\" Cmd=\"New\">" +
"<Field Name=\"Title\">Added item</Field>" +
string user = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(username@domain + ":" + "password"));
string uri = "http://sharepoint-url-here/_vti_bin/lists.asmx";
WebClient client = new WebClient();
client.Headers["SOAPAction"] = "http://schemas.microsoft.com/sharepoint/soap/UpdateListItems";
client.Headers["Content-Type"] = "application/soap+xml; charset=utf-8";
client.Headers["Authorization"] = "Basic " + user;
client.Encoding = Encoding.UTF8;
System.Text.ASCIIEncoding encode = new ASCIIEncoding();
Byte bytes = encode.GetBytes(soapEnv);
string response = client.UploadString(new Uri(uri, UriKind.Absolute), "POST", soapEnv);
catch (Exception ex)
Posted in 2010, C#, Custom Code, SharePoint, Web Services | Tagged SharePoint 2010 Lists Web Service;WebClient;POST;Soap12; | Leave a Comment »
The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:
The Blog-Health-o-Meter™ reads This blog is doing awesome!.
A helper monkey made this abstract painting, inspired by your stats.
A Boeing 747-400 passenger jet can hold 416 passengers. This blog was viewed about 2,600 times in 2010. That’s about 6 full 747s.
In 2010, there were 2 new posts, growing the total archive of this blog to 14 posts. There were 8 pictures uploaded, taking up a total of 1mb.
The busiest day of the year was March 2nd with 38 views. The most popular post that day was About Me.
Where did they come from?
The top referring sites in 2010 were baddaz.com, topsharepoint.com, spqteams, google.com, and linkedin.com.
Attractions in 2010
These are the posts and pages that got the most views in 2010.
About Me August 2009
InfoPath Popup Forms for Public Facing Websites (Web 2.0 Style) September 2009
InfoPath Custom Save Action: Save as Draft and Avoid Validation July 2009
InfoPath and Windows 7: System.Security.SecurityException September 2009
InfoPath Rich Text Display in Form: Expression Box December 2008
Posted in Uncategorized | Leave a Comment »
We’ve just launched our latest MOSS website here:
Much of the site is standard MOSS functionality – apart from custom built top and left navigation web parts (shown below)…
To enhance the user experience in navigating the site, I developed a custom Top Navigation control (pictured below). The control cycles through each subsite and it’s Pages library, bringing back all the Pages which the user has declared to be on the navigation. Then the Title, Description and a custom ‘NavImage’ image field is displayed in the flyout. The Flyout is standard CSS and JS.
The left navigation control was built to enable more accessible <UL> and <LI> elements to be output.
Posted in Uncategorized | 1 Comment »
I’ve been working on a WSS site for a friend of mine in my spare time lately, and it’s finally ready to launch!
Take a look if you’re interested: http://www.CambridgeAutogleam.com …
Main highlights of development…
3) Testimonials. Testimonials are driven from a list in the administration site. To add a new testimonial, he just has to add a new item to the list. Items are just ordered by date created, keeping things nice and simple. Data views are used to display them.
4) Twitter interaction. I initially used some of the standard twitter XML data to display updates in the footer of the site – but after deployment to 1and1 it seemed that these feeds were blocked. To work around the issue, I took the approach detailed here: http://blog.bullseyeconsulting.com/archive/2009/01/04/twitter-on-sharepoint.aspx , which meant the call to the twitter update runs from the client rather than server.
Hopefully this proves that interesting and dynamic websites can be built on a WSS platform! Let me know what you guys think…
Posted in branding, css, SharePoint, stylesheet, Website, WSS, XHTML | 2 Comments »