Please upgrade your web browser now. Internet Explorer 6 is no longer supported.
Zac Smith
SharePoint, WSS and MOSS development.

Today we are doing a soft launch of our new store for SharePoint Themes. We are starting from small beginnings but have quite a few plans for the future.... In the coming months we plan to roll out more SharePoint Themes, Master Pages, Page Layouts and of course SharePoint 2010 branding resources.

SharePoint Themes

Our focus is on creating high quality branding resources for SharePoint at a price point that makes sense. Creating SharePoint themes is fairly complicated unless you have a pretty deep understanding of the many thousands of core SharePoint CSS classes. I commonly see quotes of over $5000 for one theme! Much of what can currently be found for sale are either poorly designed or lack the thourough integration of items such as the calendar, wiki, list forms and application pages. We are hoping to fill this gap and solve a few of your SharePoint branding headaches.

So check the site out, buy a theme and check back later for some more quality stock!

Categories: WSS, SharePoint, Trinkit, MOSS, Branding, Themes

Whats been happening lately

by Zac Smith 27-Jul-09, 0 Comments

It's been a busy few weeks with little time for this blog, so I have put together a catch up post of some recent news:

The Wellington Community SharePoint Conference
The inaugral conference went off without a hitch at the start of the month. I enjoyed presenting and meeting a number of SharePoint enthusiasts. The speakers slide decks have been posted up on the NZ SharePoint user group website.

SharePoint 2010
The first snippets of the next version of SharePoint have been released. I highly recommend watching the sneak peak videos - they are real eye openers! Also check out the developer documentation for some SDK info.

June cumulative update
Another update for SharePoint and WSS was released, check out the team blog for more info (yup, this is just filler).

Trinkit moved to auckland
Kate and I have moved shop to Auckland. 7 years of howling gales finally got to me and we have moved north in search of greener pastures. At this stage I'm pretty booked up for the next 6 months but Kate has a little bit of capacity if you know of anyone needing specialist SharePoint IA, design and integration skills.

Categories: MOSS, WSS, Trinkit, SharePoint
Recently there have been a few key improvements to the STSADM backup command which I have found to make life a lot easier (and safer!).

After installing Service Pack 2 and running the backup command you will notice a few subtle, but important changes:


Previously it was a best practice to set the site being backed up to read only using the setsitelock command. This is something that I am guessing 95% of people never did. And who can blame them as it wasn't made terribly obvious. Fortunately the backup command now automatically sets this and lazy admins can have peace of mind.

The April CU also provided an important update to how backup and restore works, particularly with publishing sites. In SharePoint, the actual page layout aspx files are stored with some hardcoded metadata which includes the url of the site they belong to. Previously when performing a backup & restore to different farms with different URLs this could cause issues. Import/Export does not have this problem as the page layouts are recreated in the target site. The backup command has now been updated to fix this issue and this method of migrating content between farms is now supported. Note that the June CU is now available and supersedes the April CU.

So why would you want to use backup/restore over import/export to migrate content anyway?
If you commonly use the SPSiteDataQuery class, ContentQuery webpart or the DataView webpart you rely on GUID references to lists for query commands. By default, import/export assigns new GUIDS to any lists that are migrated which will upset the queries that rely on them. Using backup/restore was an easy way to avoid this issue.

Of course it was fairly easy to write some import code using the object model and retain the GUID values. And if you still want to use import/export that is the way to go.
Categories: MOSS, WCM, Development, Infrastructure, SharePoint, WSS
I don’t particularly enjoy installing SharePoint, I’ve done it a million times and really it’s quite a boring process. When I do end up having to install it, I generally use a simple 4 account method:

  1. Admin (SPAdmin) - Used for installation and administration of SharePoint
  2. App Pool  (SPAppPool) - all web apps except central admin run with this account as their identity
  3. Services (SPService) - App pool account for central admin and the SSP service account
  4. Search (SPSearch) - Used for all search services
Generally I’m installing SharePoint for my own dev/test purposes, so this suits just fine. I think it is also fine for small scale installations or instances when the admin in charge of account creation isn’t interested in creating 8+ accounts. To be honest I think a lot of the time using the 8+ accounts is a tad overkill, and people are just blindly following ‘best practices’ without applying them to their specific environment. But being more of a dev type than an infrastructure type I don’t feel qualified to formally make that recommendation.

Even for a development server it is really important to have some separation of accounts. It is in your best interest to simulate a production scenario as best you can. Take for example if you were to use the SharePoint admin account as an application pool identity. You may have permissions to do things on your dev server (in code) that will probably have issues in a production scenario.
Categories: Development, MOSS, SharePoint, WSS
When developing against lists, column names with spaces can be rather annoying. Internally SharePoint encodes spaces with the characters '_x0020_'. This isn't the end of the world but is a bit of a pain when writing code that uses the column names. Over the past few months I have found that I got into the habit of always creating columns without the space, and then renaming them.
 
As an example if I wanted to create a column named 'Account Number' I would first name it 'AccountNumber'. The internal name is set only once and is based on what the column is called when it is created. After the initial creation I can then safely rename the column with the space and still reference it as 'AccountNumber'.
 
I have developed the same habit for naming lists. With lists I think it is even more important to not have spaces as you end up with urls that look like this: http://site/lists/my%20task%20list/allitems.aspx. This is not particularly nice to look at and may even cause problems for some search engines. This is also makes it hard to read the URL and ends up as a bit of an accessiblity negative.
You can use the exact same technique as described for naming columns.

Categories: Accessibility, MOSS, WSS, SharePoint
Sales, marketing, project managers and even IT managers always seem to latch onto the concept of building a web part to provide custom functionality in SharePoint. I’m always being asked to create a web part for various tasks which just complicates things. In reality 95% of the time a web control will do the job just fine, or better yet a user control.
 
A web part usually dictates that you will be dynamically creating asp.net controls at runtime or writing HTML tags in managed code. Both of these techniques are pretty horrible and provide no separation between logic and presentation. There are many examples of this on CodePlex.
 
A user control has a few key advantages over web parts:
  • Easier development: User controls provide a design time surface and allows easier HTML integration
  • Easier deployment: There are less steps required to make a user control available in a SharePoint site
  • Less unwanted HTML: Web parts and the web part framework include additional HTML bloat that decreases accessibility
That said there are a few good reasons why you would want to build a web part:
  • Reusability: If the component is going to be used in multiple pages with different configurations
  • Admin control: Web part properties provide a convenient way for admins to manage settings
  • Collaboration: Where users or content authors want to be able to add web parts to their own pages
If you decide that you do need a web part, I would still advocate using a user control. You can either use something like SmartPart, or preferably just embed it yourself as it’s a very simple task. By embedding a user control to a web part in a 1-1 relationship, you have the opportunity to use web part properties as well as providing the best user experience.
 
The same theory can be applied to field controls. Another option when creating web parts is to use XSLT to control the display. I believe this is a great approach as it provides good separation between logic and presentation, makes it easier for integrators and promotes accessible HTML.
 
I guess web parts just sound cooler?
 
Resources:
Categories: Development, MOSS, SharePoint, WSS, WCM

Sometimes when updating a custom theme it can be really difficult to get your changes to take effect.

Normally the process to update a theme would be something like:

  1. Copy new theme files to theme directory
  2. Change selected theme to any other theme in site settings
  3. Perform an IISRESET
  4. Re-apply theme in site settings

However, sometimes no matter how hard you try it just won’t update. In fact even if you manually update the cached theme css file in SharePoint Designer (in the _themes dir) it just reverts back to the previous version.

Turns out there is an extra step after copying your theme files in. You need to update the version settings in the theme.INF file. If I was changing this for the SIMPLE theme I would find the file to edit in the following directory:

Theme Location

And the values that need to be updated are highlighted below:

 Theme INF File

I normally just increment the numbers each time as with any versioning.

Follow the rest of the steps and you should have no trouble.

Here are a couple of related resources:

Categories: Development, SharePoint, WSS, MOSS

Recession Blogging

by Zac Smith 23-Mar-09, 0 Comments

I haven’t written a blog post in a very long time, and there’s a good reason for that – I’ve been very, very busy. Today is the first time in a long while that I feel like I can take the time to write a blog post without a client potentially being annoyed that I’ve been doing something other than working on their project. Subsequently the list of things to blog about has grown really long so I have heaps to share over the next few months.

A few people have already been talking about SharePoint and the recession lately, and what to do in these uncertain times ...

I think a ‘recession’ in general is a good excuse for many things – laying off staff, salary freezes, going back to school or buying cheaper cookies for morning tea. But what does the recession mean for you and me?

Here at Trinkit/SharePoint Depot we have been coming up with a recession plan. The general thought is that we may have more time on our hands so we have brainstormed a bunch of things we can do....

  • Create products
  • Explore new technologies
  • Create internal applications
  • Enhance company profile and brand
  • Get more involved in the community (Blog more)
  • Spend more time mentoring junior staff

After coming up with all these great ideas, we found that we were actually looking forward to a ‘recessive’ quiet time. For me personally I look forward to getting more involved in the community and getting through some of those old TODO’s.

UPDATE: I wrote this post about 6 weeks ago and have only just now found the time to publish it.

Categories: MOSS, Community, SharePoint, WSS

There are a lot of cool things you can do when working with profile functionality in SharePoint - e.g. people search, my sites, audiences, people based workflow, profile management..

 

But when it comes to developing and testing it can be hard to tell how well things are working unless you have a bunch of test users with meaninful profile data.

 

If you've ever used one of Microsofts virtual machines that come with the litware test domain, you'll be familiar with Don Funk, Brian Cox and the rest of the gang. Those are all active directory accounts with profile data including direct reports which is great for testing org charts.

 

So how can we get those accounts into our own AD domain?

Easy - Use the LDFIDE tool that comes with windows server. Exporting the accounts into a file and importing that file into a different domain does present a number of problems: the domain name is different, many exported fields are read only, passwords cannot be imported. I've gone ahead and solved those problems for you, so if you want to import those users into your own domain just follow these steps:

  • Download the Sample Users text file. Replace the test domain values with your own. I use DC=mossdev,DC=local. I also have all email addresses going to mossdev.com which is a local mail service. I have a catch all email account setup so that all emails to my users feed into the one outlook inbox. I have also specified an OU called Profile Accounts to keep them seperate from all of the default accounts.
  • From the command prompt run
      ldifde -i -k -f c:\sampleadusers.txt
    To import all the users, you will need to keep running the command until all users have been processed. This is because of the dependicenies between managers/direct reports.
  • Download the Update Passwords text file and replace unicodePwd with your own base64 encoded password. The password in that text file is "P@ssw0rd" which I often use for test accounts. If you are encoding your own password its important to use a unicode encoding of a string. The string value would look something like "\P@ssw0rd\". You'll only need the passwords if you actually want to log in with the accounts.
  • From the command prompt run
     ldifde -i -h -f c:\updatepasswords.txt
    to update all the passwords.

Now you should have a domain of 78 users full of profile info that you can play with.

Now I can log in as Don, create a mysite and view his profile properties along with org chart:

 
dons profile
 
 
Categories: MOSS, SharePoint, WSS, Search, Development

Tech-Ed 2008 Session Content

by Zac Smith 10-Sep-08, 3 Comments

Tech-Ed seems like a distant memory now but it was actually only a week ago. I had an awesome time and already looking forward to next year. Was good to meet up with some the US SharePoint MVPs and Experts. Here is a photo of me and Matt presenting our SharePoint tools session:

Apologies to anyone that has been waiting for the session content but here it goes anyway .....

OFC301 - Creating Content Centric Publishing Sites with MOSS 2007.

Instructions on deploying the site definition:

  1. Run the install script to deploy solution to your SharePoint environment.
  2. Create a new site collection based on the Tech-Ed Publishing Solution
  3. If you didn’t create the site definition at the root of the site you will need to update some of the Pie images on the content pages
  4. For the feature webpart to workyou will need to create the Feature list. Create a list called Features with the columns: Title, Feature Description (multiline text) andSolution Area (lookup on pages list). Then put the listinto datasheet view and copy and paste the list items from the spreadsheet.

OFC303 - Tools and techniques for productive and effective SharePoint development.

General Links: Slide Deck, Matts Blog, Bookmarklets, Dev Shortcuts, SPDevExplorer, Community Kit for SharePoint, Search Community Toolkit, Pod Casting Toolkit, Fantastic 40 Templates, Telerik Controls, Bamboo Solutions, PowerShell (and a guide to get you started)

Microsoft Content: MSDN WSS Portal, MSDN MOSS Portal, TechNet WSS Portal, TechNet MOSS Portal, MSDN WSS SDK, MSDN MOSS SDK, GearUp, Office Online, Developer Intro Portal

Forums: SharePointU, MSDN, TechNet

Aggregate Blogs: MVPs, MS Individuals, MS Teams

And the almighty tools list ........

Build and Packaging Tools

CAML/Search Tools

Visual Studio Optimisations

Content/Config Replication

In-SharePoint Tools

Testing Tools

Inspection Tools

Governance/Manageabilty 

STSADM Tools

Planning/Design Tools

Logging Tools

General Tools

.NET Essentials

Enjoy and see you next year!

Categories: MOSS, SharePoint, Tech-Ed, WSS
 Next >>