SharePoint 2010 Theme Test

by fkollmann 6/25/2010 12:06:42 PM

As I tried to understand which colors match in SharePoint 2010 I created a test theme (using the Theme Builder, see theme download below):

image

This results in the following screens…

System

image

image

image

image

Views

image

image

image

image

Menus

image

image

Ribbon

image

image

Popups

 image

image

image

image

WebParts

image

image

image 

Special

image 

image 

DOWNLOAD Theme

Theming in SharePoint 2010

by fkollmann 6/24/2010 6:04:15 PM

As many might have already noticed the theming support of SharePoint 2010 was completely changed. It took me some time and a lot of research to get a good understand on how it works now. I would like to give a small summary and leave the rest to some articles which explain it quite well:

  1. Themes come from Office Design files
    They are either created using the SharePoint web interface (but cannot be saved then) or by using Office 2007+.

    Read more on which colors are applied where.
    Read more on how to create theme files using PowerPoint.
    Read more on how to create theme files using OpenXML.
    Try out the Microsoft Theme Builder.

  2. CSS files and images can be themed
    This means that when you create web parts for SharePoint, make sure they match the SharePoint 2010 default coloring.

    Read more on how the themes are being applied and themed versions of CSS files and images are being created.
    Read more on how to make your own CSS file and images to be themable.

  3. CSS files and images cannot be customized
    There is no reliable and acceptable way to modify themed CSS files or images. Give up on trying to do so since your changes can be easily overwritten!

I hope this provides some hint on this important topic.

UPDATE: Added link to my extended theme test.

Remove SharePoint 2010 Quick Launch Menu

by fkollmann 6/21/2010 2:35:30 PM

We tried to remove the quick launch menu since we did not want to have it in our design. Unfortunately the Ribbon bar was no longer working correctly:

Chrome:

Uncaught TypeError: Cannot set property 'control' of undefined

Internet Explorer:

Message: 'undefined' is Null or no/invalid Object
Line: 5
Char: 94383
Code: 0
URI: http ://*********/ScriptResource.axd?d=Wsxg_ZzMhZWYMpVRDIuk-hGcVKhqljKiPvDNcfDYa2N6qCWpS4qNnlSsYlRua2ETufmyST1szAgs4HAQsNYsbhwIb6mePyRWKe8O6MP3oKw1&t=ffffffffec2d9970

Firefox:

Error: a is undefined
Source: http ://**********/ScriptResource.axd?d=Wsxg_ZzMhZWYMpVRDIuk-hGcVKhqljKiPvDNcfDYa2N6qCWpS4qNnlSsYlRua2ETufmyST1szAgs4HAQsNYsbhwIb6mePyRWKe8O6MP3oKw1&t=ffffffffec2d9970
Line: 5

This is because the quick launch menu is required…

function init_zz17_V4QuickLaunchMenu() {$create(SP.UI.AspMenu, null, null, null, $get('zz17_V4QuickLaunchMenu'));}

and cannot be removed that easily :-/ . The correct way to remove it is to remove the data source reference:

Change for “native” SharePoint 2010 layout from…

<SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" …>

to…

<SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="" …>

Visual Studio 2010 SharePoint Power Tools allow sandboxed Visual Web Parts

by fkollmann 6/18/2010 9:07:41 PM

Visual Web Parts are now possible even with sandboxed solutions as Microsoft released the Visual Studio 2010 SharePoint Power Tools.

HOMEPAGE

SharePoint 2010 resource files have to be complete

by fkollmann 6/17/2010 12:29:00 PM

After trying a lot of stuff on how to translate/localize XML declarations and code in SharePoint 2010, I came across a bad topic: translated resource files have to be complete!

Assuming that the following structure exists:

  • Foo.resx
    • HelloWorld –> “Hello World!”
    • ExampleTitle –> “Example”
  • Foo.de-DE.resx
    • HelloWorld –> “Hallo Welt!”

Requesting ‘ExampleTitle’ in a German web will not return the expected “Example” (as it would using compiled resources) but “$Resources:Example”.

There are two ways how resources are being requested by SharePoint:

Requesting localized string by XML declaration

These are the resource references: $Resources:<resx file base name>,<resx key>;

This results in the following error in the SharePoint log:

06/15/2010 16:57:20.06     vssphost4.exe (0x0F98)                      0x06C8    SharePoint Foundation             General                           8e25    Medium      Failed to look up string with key "<resx key>", keyfile <resx file>.    
06/15/2010 16:57:20.06     vssphost4.exe (0x0F98)                      0x06C8    SharePoint Foundation             General                           8l3c    Medium      Localized resource for token '<resx key>' could not be found for file with path: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\<feature name>\feature.xml".    

Requesting localized string using code

I use the following method to query translations from code:

UPDATE: Due to the fact that the SPContext is not set in feature receivers when the feature is being activated using the commandline, I extended the function to be able to pass ((SPSite)properties.Feature.Parent).RootWeb:

public static class LocalizationHelpers
{
    public const string DefaultResourceFile = "<default resource name, without extension>";

    public static string GetLocalizedString(string str)
    {
        if (string.IsNullOrEmpty(str))
            throw new ArgumentException("null or empty", "str");

        return GetLocalizedStringInternal(str, DefaultResourceFile, null);
    }

    public static string GetLocalizedString(string str, SPWeb web)
    {
        if (string.IsNullOrEmpty(str))
            throw new ArgumentException("null or empty", "str");

        if (web == null)
            throw new ArgumentNullException("web");

        return GetLocalizedStringInternal(str, DefaultResourceFile, web);
    }

    public static string GetLocalizedString(string str, string file)
    {
        if (string.IsNullOrEmpty(str))
            throw new ArgumentException("null or empty", "str");

        if (string.IsNullOrEmpty(file))
            throw new ArgumentException("null or empty", "file");

        return GetLocalizedStringInternal(str, file, null);
    }

    public static string GetLocalizedString(string str, string file, SPWeb web)
    {
        if (string.IsNullOrEmpty(str))
            throw new ArgumentException("null or empty", "str");

        if (string.IsNullOrEmpty(file))
            throw new ArgumentException("null or empty", "file");

        if (web == null)
            throw new ArgumentNullException("web");

        return GetLocalizedStringInternal(str, file, web);
    }

    private static string GetLocalizedStringInternal(string str, string file, SPWeb web)
    {
        // determine language
        var lang = 1033u; // english

        if (web != null)
            lang = web.Language;

        else if ((SPContext.Current != null) && (SPContext.Current.Web != null))
            lang = SPContext.Current.Web.Language;

        // request string
        var r = SPUtility.GetLocalizedString("$Resources:" + str, file, lang);
        // enrich error string
        if (r.StartsWith("$Resources:"))
            r = string.Format("$Resources:{0},{1},{2};", file, str, lang);

        return r;
    }
}

More details: http://blogs.msdn.com/b/johnwpowell/archive/2009/11/29/sharepoint-2010-localization-with-visual-studio-2010.aspx

SharePoint 2010 ListTemplate.Name cannot be translated

by fkollmann 6/16/2010 5:35:50 PM

The whole day I was hunting an error where SharePoint 2010 refused to create a list instance (both by XML declaration and by code). All I got was either “filename invalid … 0x81020030” (XMl declaration) or NullReferenceException (by code, having the other error as inner exception when debugging).

After digging around a little bit I came across the following log message:

06/16/2010 17:24:12.65     vssphost4.exe (0x1290)                      0x17D4    SharePoint Foundation             General                           72k9    High        Failed to retrieve the list schema for feature fb18e164-124b-4da0-96d0-a6404af4996c, list template 17346; expected to find it at: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\Features\Common_ListNavigation\$Resources:common,ListNavigationListName;".   

Since I try to define constants in resource files, too. I simply stored the ListTemplate.Name attribute in a resource to ensure the name does not have to be changed in different places:

<ListTemplate
    Name="$Resources:common,ListNavigationListName;"
    Type="17346"
    BaseType="0"
    OnQuickLaunch="TRUE"
    SecurityBits="11"
    Sequence="410"
    DisplayName="ListNavigationListDefinition"
    Description="My List Definition"
    Image="/_layouts/images/itgen.png"/>

Unfortunately this is not supported :-/ .

SharePoint version table

by fkollmann 4/26/2010 3:28:00 PM

SharePoint 2010

This table shows the version and build numbers for SPF 2010.

Build Number Version String
4514 Beta 2
4730 RC1
4755 RTM / official release

Latest Version: RTM (English)

SharePoint 2007

This table shows the version and build numbers for WSS 3.0 and MOSS 2007.

The version of the current installation can easily be looked up in the Central Administration: Operations > Topology and Services > Servers in farm.

Build Number Version String
4518 RTM / first release
6219 Service Pack 1
6318 Infrastructure Update
6327 Cumulative Update October 2008
6335 Cumulative Update December 2008
6341 Cumulative Update February 2009
6421 Service Pack 2
6504 Cumulative Update April 2009
6510 Cumulative Update June 2009
6520 Cumulative Update October 2009
6524 Cumulative Update December 2009
6529 Cumulative Update February 2010

Latest Version: Service Pack 2 (English, German); CU February 2010 (WSS, MOSS)

SharePoint Web.config isolation for Virtual Directories

by fkollmann 2/19/2010 11:51:39 AM

Since I started my work on Codename “Umbrella” (which is SharePoint for the Windows Home Server) like nine moths ago, I struggled with SharePoint running in a (custom) Minimal trust level which breaks all the existing applications running in virtual (sub) directories.

Even today I was not able to find a good solution, but finally came up with a actually working one:

To prevent the Windows Home Server web applications from inheriting the restrictions (because they are virtual directories inside the SharePoint web application) the /configuration/system.web element has to be enclosed by a location element to restrict its influence:

<location path="." inheritInChildApplications="false">
    ........
</location>

This solution has been proven to fix the issues. However it comes with a certain degree of incompatibility which has not been fully tested yet and requires further investigation. The following things are known to fail:
  • Deploy/Retraction of solutions

If someone comes by a better solution or wants to discuss this, please feel free to contact me.

Related article on Codename “Umbrella”: http://codenameumbrella.codeplex.com/wikipage?title=WebConfigIsolation&referringTitle=FAQ

A SharePoint Build and Deployment Tool v2 released

by fkollmann 2/8/2010 7:52:11 AM

Collaboris released a new version of their awesome SharePoint deployment tool “A SharePoint Build and Deployment Tool”.

The provides a lot of MSBuild tasks for creating a deployment process for SharePoint (WSS and MOSS).

DOWNLOAD, Homepage

SharePoint und Office 2010 beta 2 available

by fkollmann 11/18/2009 11:38:41 PM

image

 

DOWNLOAD:

  • SharePoint Server Enterprise 2010 (MOSS): 64b, key (via e-mail)
  • SharePoint Server for Internet Sites Enterprise 2010: 64b, key (via e-mail)
  • SharePoint Foundation 2010 (WSS): 64b
  • SQL Server 2008 SP1 Cumulative Update 2: KB970315 (download “SQL_Server_2008_SP1_Cumulative_Update_2”)
  • WCF Fix for SharePoint: Win2k8/Vista, Win2k8r2/Win7
  • Language Packs

 

Find more details on SharePoint 2010 issues here: http://blogs.msdn.com/opal/archive/2009/11/16/installation-notice-for-sharepoint-2010-public-beta.aspx

 

  • FAST Search Server for SharePoint: 64b
  • SharePoint Designer 2010: 32b, 64b
  • Forefront for SharePoint: 64b
  • Office 2010 Filter Packs: 64b

 

  • Office Professional Plus 2010: 32b+64b+key
    • Click “Get it now” button, top right
    • The MS Download Manager is being used. If you have trouble, add the newly opened download window URL to trusted sites.

 

  • BCM for Outlook 2010: 32b, 64b
  • PowerPivot for Excel 2010: 32b+64b (see “Instructions”!)
  • Groove Server 2010: 64b
  • Access 2010 Runtime: 32b+64b

 

  • Project Professional 2010: 32b, 64b, key 
  • Project Server 2010: 64b

 

 

Entering the Product Key:

  1. Start the program (e.g. Word/Outlook/…, Visio, etc.)
  2. Click on “File” > “Help”
  3. Click the “Change Product Key” link on the right
  4. Enter the product key
  5. Click “Install”
  6. Close and restart the program
  7. The “old” activation dialog now appears
  8. Activate the product