Improvements

Apr 3, 2008 at 7:57 AM
Please post suggestions, improvements etc here.

Thank you for your input.
Apr 15, 2009 at 6:37 PM
I was going to use the tool to ad a custom theme I created to multiple sites but when I clicked on the custom theme name in the Available Themes tab I got the following error (see below section B). I have also included the code I added to the spthemes.xml file in 12hive (see below section A). One final note I clicked continue and it seems as if the themes are all shifted down one so if myTheme is first and Default is second in the list when clicking on on the myTheme I get an error, but when clicking on Default I get properties of myTheme in properties window pane.


******Section A******
myTheme.INF

[info]
title=myTheme
codepage=65001
version=3.00
format=3.00
readonly=true
refcount=0

[titles]
1031=myTheme
1036=myTheme
1040=myTheme
3082=myTheme
1043=myTheme
1046=myTheme
1053=myTheme
1044=myTheme
1030=myTheme
1035=myTheme
1041=myTheme
1042=myTheme
1028=myTheme
2052=myTheme
1029=myTheme
1045=myTheme
1032=myTheme
1038=myTheme
1049=myTheme
1055=myTheme
2070=myTheme
1025=myTheme
1037=myTheme
1054=myTheme


SPTHEMES.XML

    <Templates>
        <TemplateID>myTheme</TemplateID>
        <DisplayName>My Theme</DisplayName>
        <Description>The theme has a white background with blue control areas and the theme Logo.</Description>
        <Thumbnail>images/myTheme/myTheme-Template-Thumbnail.gif</Thumbnail>
        <Preview>images/myTheme/myTheme-Template-Thumbnail.gif</Preview>
    </Templates>

********Section B*******
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Community.SharePoint.Utilities.Branding.BrandingTool.lstThemes_SelectedIndexChanged(Object sender, EventArgs e)
   at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
   at System.Windows.Forms.ListBox.WmReflectCommand(Message& m)
   at System.Windows.Forms.ListBox.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
SharePointBrandingTool
    Assembly Version: 1.6.6.0
    Win32 Version: 1.6.6.0
    ../SharePoint_Branding_Tool_v1_7_0/SharePointBrandingTool.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Data
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
Microsoft.SharePoint
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6219.1000
    ..assembly/GAC_MSIL/Microsoft.SharePoint/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.dll
----------------------------------------
Microsoft.SharePoint.Library
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6211.1000
    ..assembly/GAC_MSIL/Microsoft.SharePoint.Library/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Library.dll
----------------------------------------
Microsoft.SharePoint.Security
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.4518.1016
    ..assembly/GAC_MSIL/Microsoft.SharePoint.Security/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Security.dll
----------------------------------------
System.Transactions
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Microsoft.SharePoint.Search
    Assembly Version: 12.0.0.0
    Win32 Version: 12.0.6211.1000
    ..assembly/GAC_32/Microsoft.SharePoint.Search/12.0.0.0__71e9bce111e9429c/Microsoft.SharePoint.Search.dll
----------------------------------------
msvcm80
    Assembly Version: 8.0.50727.1433
    Win32 Version: 8.00.50727.1433
    ..WinSxS/x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.1433_x-ww_5CF844D2/msvcm80.dll
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.1433 (REDBITS.050727-1400)
    ..assembly/GAC_32/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Apr 15, 2009 at 6:41 PM
Edited Apr 15, 2009 at 6:42 PM
p.s.  I can successfully apply the theme both thru the object model (I set up a custom application page similar to your desktop application but it only does single site at a time and has other features built into it) and thru the normal sharepoint theme web page in the site settings so the theme works.

Thanks,

LSG
Apr 17, 2009 at 9:35 AM
Hi Shane,

Thanks for the suggestion - The tool is still incomplete in terms of code - the code I have written works, but still has a few gaps to be completed.
When I get time, I will for sure update the code to fix up these issues, issues with various cultures, and a few feature upgrades.

Meanwhile, do you want to send me your theme for testing purposes, to see if I can reproduce your issue?

Cheers,
Doug