Skip to main content

Blogs

Go Search
Home
Blogs
Wiki
Events
Training
Forums
Tools
Jobs
Support
Account
  

Sharepoint Studio > Blogs
By Mark Stokes

I have been putting a lot of thought into the best practices lately for deploying my different types of sites for my current project.

Recently there have been a lot of discussions over the good and bads of SharePoint Site Definitions and I think there are a lot of people who don't really understand the issues surrounding the decision we make as to whether we should use Site Definitons, or Site Templates.

Of course, with any form of technology implementation there are pros and cons of all approaches and there isn't one single correct way forward for all projects. Each situation will have its own requirements and sometimes that will point us towards Site Definitions, sometimes towards Site Templates and sometimes we need something altogether new.

In my current project I want to make extensive use of Feature Stapling for my different types of SharePoint site (Directorate, Department, Team, Project, programme, social, etc). Since I want to direct content at these site types using Feature Stapling and Feature Receivers I need a method of identifying what type of site I am dealing with (so I can recursively run through my current sites activating features and making code changes in receiver classes and targeting features to new sites of a particular type.

For this reason, I don't really want to define anything in my Site Definition. I just want a blank site definition with a custom template name so that I can pick it in the template picker pages when creating a new site, and so I can target content with Feature Stapling. So, all I want from my Site Definition is a custom Template Name.

Raymond Mitchell has posted a very good series of articles that outline the different approaches we can take to define and provision our sites, and he finishes off with a nugget. We can make use of the out of the box Site Definitions (such as the blank site template) but give it a custom Template Name. This is achieved by specifying a custom SPWebProvisioningProvider that effectively spoofs the Template Name and applies an out of the box (or other custom) Site Definition.

At the moment, this is a genius of an idea and I have yet to come across any major drawbacks of this approach.

I will let Raymond himself explain how to do this as I don't want to take any credit!

By Mark Stokes

I wonder if anyone has any experience configuring profile properties in MOSS?

I am trying to customise users profiles so that the profile database can be nursed into becoming the corporate directory. Once I have setup the profile properties I can configure some custom search pages to give a pretty good corporate directory. However I have come across some pretty major limitations that I can't seem to get around.

1. Profile Syncing is one way, from AD to MOSS. If I let a user update their own information (all users should be able to update all their own details) then this will not be sync'd back to AD and the next import could overwrite the user entered data. Because of this, we probably won't store this user data in AD, but just pull in basic uneditable information (such as account and email details) and use MOSS at the authoritative source for everything else (not my personal preference, but not many choices without AD write back). This will require me to go through all profile properties and remove their bindings to AD fields, a long laborious job!

2. Reordering the Profile Properties is a right royal pain in the backside. Moving items up and down one by one with a refresh in between clicks takes foooooooorrrrevvvveeeeerrr.... I have written a small Windows App to make this a bit quicker that I will make available on CodePlex when I tidy a couple of bits up and add in support for editing sections and not just properties.

3. Changing the default properties. A lot of the default properties are locked so I cannot edit them. A Key example is Office. I have a choice list that I want users to select from, but since this was implemented at set to inherit from AD I cannot modify this Property to allow a choice list. I also am unable to delete it so I can create my own Office Property. My only option left is to disable the default property and create a new one with a different name, since Office will be used. Rubbish, what a waste of space and storage. Does anyone know how I can unlock these properties to make use of them?

4. Deploying Profile Settings between environments. There is no way that I know at the moment of deploying profile property settings between environments, which opens the door to days of manual editing to synchronize the settings between multiple environments. I will also guarantee that some errors or mis-configurations WILL get incorporated into this process. We are humans after all. Chris O'Brien has made a start on some code to move properties between environments, but this needs a bit more work, such as exporting sections and maintaining these section / relationship properties. I will endeavor to extend this and include it in the Profile Manager windows app I mentioned above.

5. User Profile Editing Page. Since I will have a lot of Profile Properties, and they are grouped into Sections, the Mange profile page for users ignores these sections completely. So they just have one long page of options. I will need to create a custom manage profile page to implement a reasonable user experience.

I would very much welcome comments on peoples views of these issues and would love to hear how other people have managed customizations of the Profile Database.

Thanks

Mark Stokes
SharePoint Studio
http://sharepointstudio.com

By Mark Stokes

My blog is a bit unusal now, as I am trying to put all my content into the Wiki section of this site, so I will be using my blog to highlight new information I have posted there.

For starters, I have just collated a fair bit of information on configuring MySites and Profiles.

Find the article here:
Configuring MySites

Also, feel free to sign up, log in and edit the article to your hearts content. By us all contributing the information will just get better.

Mark.
By Mark Stokes
Thanks to Megan Davies for this step-by-step guide to Sysprepping your Development machine.
 
You can find it in the Wiki (click the link below).  Feel free to make any changes you want to keep our information up to date and accurate.

Sysprepping your Virtual Machine for other developers

Mark
By Mark Stokes
Thanks to Evan Grimmett for this list:
 
100  Generic list
101  Document library
102  Survey
103  Links list
104  Announcements list
105  Contacts list
106  Events list
107  Tasks list
108  Discussion board
109  Picture library
110  Data sources
111  Site template gallery
112  User Information list
113  Web Part gallery
114  List template gallery
115  XML Form library
116  Master pages gallery
117  No-Code Workflows
118  Custom Workflow Process
119  Wiki Page library
120  Custom grid for a list
130  Data Connection library
140  Workflow History
150  Gantt Tasks list
200  Meeting Series list
201  Meeting Agenda list
202  Meeting Attendees list
204  Meeting Decisions list
207  Meeting Objectives list
210  Meeting text box
211  Meeting Things To Bring list
212  Meeting Workspace Pages list
300  Portal Sites list
301  Blog Posts list
302  Blog Comments list
303  Blog Categories list
850  Page Library
1100  Issue tracking
1200  Administrator tasks list
2002  Personal document library
2003  Private document library
 
 
By Mark Stokes
Please design and build a house for me. I am not quite sure of what I need, so you should use your discretion.
 
My house should have between two and forty-five bedrooms. Just make sure the plans are such that the bedrooms can be easily added or deleted. When you bring the blueprints to me, I will make the final decision of what I want. Also, bring me the cost breakdown for each configuration so that I can arbitrarily pick one.
Keep in mind that the house I ultimately choose must cost less than the one I am currently living in. Make sure, however, that you correct all the deficiencies that exist in my current house (the floor of my kitchen vibrates when I walk across it, and the walls don't have nearly enough insulation).
 
As you design, also keep in mind that I want to keep yearly maintenance costs as low as possible. This should mean the incorporation of extra-cost features like aluminum, vinyl, or composite siding. (If you choose not to specify aluminum, be prepared to explain your decision in detail.)
 
 
Please take care that modern design practices and the latest materials are used in construction of the house, as I want it to be a showplace for the most up-to-date ideas and methods. Be alerted, however, that the kitchen should be designed to accommodate, among other things, my 1952 Gibson refrigerator.
 
To insure that you are building the correct house for our entire family, make certain that you contact each of our children, and also our in-laws. My mother-in-law will have very strong feelings about how the house should be designed, since she visits us at least once a year. Make sure that you weigh all of these options carefully and come to the right decision. I, however, retain the right to overrule any choices that you make.
 
Please don't bother me with small details right now. Your job is to develop the overall plans for the house: get the big picture. At this time, for example, it is not appropriate to be choosing the color of the carpet.
 
However, keep in mind that my wife likes blue. Also, do not worry at this time about acquiring the resources to build the house itself. Your first priority is to develop detailed plans and specifications. Once I approve these plans, however, I would expect the house to be under roof within 48 hours.
 
While you are designing this house specifically for me, keep in mind that sooner or later I will have to sell it to someone else. It therefore should appeal to a wide variety of potential buyers. Please make sure before you finalize the plans that there is a consensus of the population in my area that they like the features in this house.
 
I advise you to run up and look at my neighbor's house he constructed last year. We like it a great deal. It has many features that we would also like in our new home, particularly the 75-foot swimming pool. With careful engineering, I believe that you can design this into our new house without impacting the final cost.
 
Please prepare a complete set of blueprints. It is not necessary at this time to do the real design, since they will be used only for construction bids. Be advised, however, that you will be held accountable for any increase of construction costs as a result of later design changes.
 
You must be thrilled to work on such an interesting project as this! To be able to use the latest techniques and materials and to be given such freedom in your designs is something that can't happen very often. Contact me as soon as possible with your complete ideas and plans.
 
PS: My wife has just told me that she disagrees with many of the instructions I've given you in this letter. As architect, it is your responsibility to resolve these differences. I have tried in the past and have been unable to accomplish this. If you can't handle this responsibility, I will have to find another architect.
 
PPS: Perhaps what I need is not a house at all, but a travel trailer. Please advise me as soon as possible if this is the case.
By Mark Stokes

Step 1 – Default Time Zone settings
Note: This step will not effect any sites currently created, but will be used in the creation of new sites.

  • Central administration
  • Application management
  • Web application general settings
  • Default Time Zone
    • Select time zone
      • GMT

Step 2 – Resent current Sites.

  • Navigate to any site in your Site Collection
  • Site Actions -> Site Settings
  • Site Collection Administration
    • Go to top level site settings
  • Site Administration
    • Regional Settings
      • Locale
        • Choose your required locale
    • Subsite Settings
      • All sub-sites inherit these Regional Settings
    • Click Ok

All sites in your Site Collection will now be updated with the required Regional Settings, and any new sites will also be updated.

By Mark Stokes
You can set SPListItems to expire at a date of your choosing.  This annot be done through the UI, but can be done programmatically.
 
Before the code below will work you have to set a couple of options on the list or document library.
 
You need to enable Require Content Approval  and Major and minor versions.
 
You need to enable content expiration on the List / Document Library information policy.  This can be done by going to the list settings page and clicking the Information management policy settings link and click the content type you wish to enable content expiry.  You can set a different policy for different content types.
 
When you are editing the policy, enable content expiration, set the retention period to be set programmatically and set the action you want to happen upon content disposition.
 
Now that is set up, we can set the expiry date.
 
I have an approval workflow and within the "Workflow Completed" action I set various properties on the SPListItem.
 
Here is how to do it.....
 
You need to add a reference to:
Microsoft Office Server DLC component
 
Located at:
c:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\Microsoft.Office.Policy.dll
 
Then add the following using directive:
using Microsoft.Office.RecordsManagement.PolicyFeatures;
 
The following code snippet achieves this:
SPListItem item = this.workflowProperties.Item;

Expiration
.SetExpirationDateForItem(item, DateTime.Now.AddMonths(6), false);
 
And there you go.
 
More information here:
By Mark Stokes

A very useful article on customising the Content Query Web Part look and feel:

http://msdn.microsoft.com/en-us/library/bb447557.aspx
 
 
Microsoft Windows SharePoint Services Logo

 Blog Roll

Microsoft SharePoint Products and Technologies Team Blog
SharePoint Solutions Blog
Microsoft SharePoint Designer Team Blog