Thursday, January 29, 2009

Snapshots

Sharepoint for BlackBerry App (Web Part implement)



DocAve of TSM for SharePoint




SharePoint Portal




















Wednesday, January 14, 2009

A publishing site definition solution snapshot.


The Microsoft SharePoint Theme Definition Xml Bug

Blowing snow outside and even can not to see the faced person. Keep dig out my second version of custom theme.

The bug description: you can not define the TemplateID of 12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML with the same first 8 letters naming or it will show you error of "A theme with the name "XXXX" and version already exists on the server".

I met such error when I create my second version of one custom theme.




10 steps to create custom field control by STSDEV




Basically, the field control is a easy implement to deploy.
There's a Field Control template within SharePoint template when you create by VS 2008.
Usually, best bet is create one by VS SharePoint template and test it out then pack by STSDEV and deploy. Here is the 10 main steps:





  1. VS 2008 - Tools - STSDEV (need configured first), create a STSDEV solution by solution type: Empty solution (C# assembly), don't forget to create a correlative key.


  2. Open the C# solution and add a new SharePoint Empty project by this solution.


  3. Add a new Field Control into the SharePoint project.


  4. Create a XXXXFieldRending.ascx file to TEMPLATE\CONTROLTEMPLATES\XXXXFieldRending.ascx
    Here is the example code:

    <%@ Control Language="C#" Debug="true"%>
    <%@ Assembly Name="Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register TagPrefix="SharePoint" Assembly="Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" namespace="Microsoft.SharePoint.WebControls"%>

    <SharePoint:RenderingTemplate ID="KBIDFieldRendering" runat="server">
    <Template>
    <table class="ms-form">
    <tr>
    <td>
    <asp:Literal ID="Desc_Category" runat="server"></asp:Literal>
    <asp:Literal ID="Category" runat="server"></asp:Literal>
    <asp:Literal ID="Desc_KBID" runat="server"></asp:Literal>
    <asp:Literal ID="KBID" runat="server"></asp:Literal>
    </td>
    </tr>
    </table>
    </Template>
    </SharePoint:RenderingTemplate>



  5. Open TEMPLATE\XML\fldtypes_XXXX.xml, get assembly string and put in Field Name="FieldTypeClass", RenderPattern Name="DisplayPattern" can be finally put and test.


  6. Update and overwrite the XXXX\XXXX.FieldControl.cs


  7. Debugging and compiling SharePoint project to test working fine. (Need copy ascx, xml and dll file to correct system folders and then iisreset)


  8. Drag folder XXXX and TEMPLATE into the STSDEV project, XXXX within project root, TEMPLATE is supposed to put in Rootfiles\


  9. Debug and compile the STSDEV project at DebugBuild mode.


  10. Change mode to DebugDeploy and build STSDEV project for deploy to MOSS site. You will see the correct field type when you create a new column in site.