Monday, 23 February 2009

Displaying SharePoint version information in Office documents

One thing I get asked for from time to time is to display the latest SharePoint version information in Office documents and templates. I have always found it easier to create new custom columns for this and populate them using an event handler.

Seeing as though I think this may be useful for others, I have uploaded some code and resources to Codeplex which provides this functionality. It comprises of two components:

- A site collection feature to deploy four new custom site columns for use in Content Types or document libraries where version information is to be shown in Office documents.

- A site feature which implements an event handler to populate the custom columns with version information for any document library present in the site, including the current version, when the document was last approved, who approved it, and when it was approved.

Once the custom column information is being populated by the event receiver, it can be shown in Office documents using the Quick Parts (Office 2007) or Fields (Office 2003 or 2007) features.

You can download the solution file, source code, and instructions at http://www.codeplex.com/spversionindocs.

Friday, 13 February 2009

Best Practices Resource Center for MOSS 2007

I think Microsoft has done a really good job with their Best Practices Resource Center for SharePoint Server 2007. It breaks down the main consideration areas and offers best practice tips in short bullet points with a link to show more detail. This site is a must-read for anyone involved in SharePoint solution architecture and development: http://technet.microsoft.com/en-us/office/sharepointserver/bb736746.aspx

Thursday, 12 February 2009

Sign In Web Part

I have just added my Sign In Web Part to Codeplex. It's quite a simple Web Part really, but I have used it for a couple of customers who wanted to make the Sign In facility more prominent than the "Sign In" link in the top right corner of the page.

Once the user has signed in, the button will disappear and a message can be shown in its place, or if the authenticated message is left blank in the Web Part properties, no message is shown and the Web Part will appear invisible to the user.Both the button and authenticated message control can be customised with a CSS reference for styling, the dimensions of the button can be modified, and the authenticated message can be changed:


You can download it at www.codeplex.com/signinwebpart

Monday, 9 February 2009

A-Z People Search in MOSS 2007

Whilst researching a requirement to provide people search results in a grid view, I came up with this solution using out-of-the-box MOSS Web Parts. It comprises of a new people search results page, Content Editor Web Part showing the A-Z links, and the standard People Results Web Part with changes to the XSLT to show results in a table view, as shown below.


Because it uses OOB Web Parts, you get the usual search refinement facilities on the left, and of course any federated or faceted search options that you may want to configure on the page. I have configured the XSLT so that you get the presence icon next to the person’s name, a mailto link for their e-mail address, and their profile page will open in a new window when their name is clicked. You can obviously change the XSLT to show extra columns if required.

I have uploaded the files mentioned to http://cid-3db995be5d5d9d8f.skydrive.live.com/self.aspx/Public/A-ZPeopleSearch.zip.

Friday, 6 February 2009

List of default site definitions

This may come in handy for someone, so I thought I would upload it - It's a spreadsheet containing a list of all the default site definitions in MOSS 2007, including their Title, ID, and template reference: http://cid-3db995be5d5d9d8f.skydrive.live.com/self.aspx/Public/Default%20Site%20Definitions.xlsx.