My last article outlined the changes made to Chameleon and Theming between CS2007 and CS2008 and could be used as a guide for an in-depth, manual upgrade of a CS2007 theme to CS2008.  In this article, however, I'll provide my suggested approach to upgrading themes for CS2008.

 

Upgrading a CS2007 Site Theme for CS2008

  1. Remove Old Files/Folders
    The following files and folders are no longer used in CS2008 and should be removed (if they exist) to prevent unnecessary review when upgrading to future versions of Community Server:
    1. Files/ folder
    2. Galleries/ folder
    3. Roller/ folder
    4. User/privatemessagelist.aspx file
  2. Search and Replace
    Some changes from CS2007 just require a few simple search-and-replaces against a theme's files.  Using a tool that can perform search-and-replace operations within files in a folder (including sub-folders), such as my personal favorite EmEditor, perform the following case-insensitive replacements across all files in the custom theme:
    1. LinkTo="UserPrivateMessages" to LinkTo="UserConversations"
    2. LinkTo="PrivateMessage" to LinkTo="SendConversationMessage"
    3. ImagesBaseUrl="~/Themes/default/images/common/" to ImagesBaseUrl="~/utility/images/"
    4. Src="~/Themes/default/common/UserWelcome.ascx" to Src="~/utility/usercontrols/UserWelcome.ascx"
    5. Formatter.Truncate( to Formatter.MaxLength(
    6. Formatter.CheckStringLength( to Formatter.MaxLength(
    7. Formatter.StripAllTags( to Formatter.RemoveHtml(
  3. Search and Think
    All <CSFile:> and <CSGallery:> prefixed controls are no longer valid in CS2008.  I'd suggest searching for such controls and either (1) remove them or (2) replace them with an appropriate <CSMedia:> prefixed control.  To find all remaining references to these controls, use a search tool (as used in step 2) to find:
    1. <CSFile:
    2. <CSGallery:
    Additionally, occurrences of the following inline code should be updated as these methods are no longer supported.  For each occurrence, I would suggest reviewing the corresponding theme file from one of the CS2008 themes and implementing the modification that was made in those themes in the custom theme.  Occurrences of the following text should be reviewed:
    1. Formatter.FormatAgoDate
    2. Formatter.WhiteSpace
    3. Formatter.FormatUsername
  4. Copy New Files/Folders
    With new functionality comes new theme files.  The following files did not exist in CS2007 but are required for a full-featured CS2008 theme.  The following files can be copied from an existing CS2008 theme (Hawaii, Calypso, and Lean-and-Green support all CS2008 features) and then modified to work with the custom theme's master pages and styles.  The following files and folders are new to CS2008:
    1. User/activitylist.aspx file
    2. User/announcementlist.aspx file
    3. User/commentlist.aspx file
    4. User/conversation.aspx file
    5. User/conversationlist.aspx file
    6. User/createeditconversation.aspx file
    7. User/createeditprofilemessage.aspx file
    8. User/editapikeymodal.aspx file
    9. User/editapikeys.aspx file
    10. User/favoritelist.aspx file
    11. User/friendshiplist.aspx file
    12. User/requestfriend.aspx file
    13. User/userfile.aspx file
    14. User/userfilelist.aspx file
    15. User/userfileslideshow.aspx file
    16. Utility/insertmedia.aspx file
    17. Media/ folder
    18. Hubs/ folder
  5. Copy Heavily Modified Files
    Some theme files in CS2008 were modified heavily to support new features.  For these files, I would suggest copying the CS2008 version of the file from one of the included themes (Hawaii, Calypso, or Lean-and-Green) and restyle the copied file to work with the custom theme.  The following files were heavily modified:
    1. Forums/createeditforumpostform.aspx
    2. Forums/thread-threadedview.ascx
    3. User/edituser.aspx
    4. User/userprofile.aspx
    5. Utility/selectcontent.aspx
  6. Be Aware of CSS Rules
    When copying files from an existing theme to a custom theme, be sure to review the CSS classes and rules used by those files.  While copying the theme pages will render the content, without the associated CSS style rules, the pages may not render well.

NOTE: There were many changes to the underlying API in Community Server.  While these steps should cover most themes, if a CS2007 theme relied heavily on inline code, it is possible that some of the API references are no longer valid.  In themes that make frequent use of inline code, I suggest manually reviewing all of the inline code for the theme to ensure that it is valid in CS2008.

 

Upgrading a CS2007 Blog Theme for CS2008

Luckily, fewer changes were made to blog themes in CS2008.  To upgrade a blog theme, follow steps #2 and #3 above.

 

Group/Hub Themes in CS2008

Sub-communites, referred to as "Groups" in the UI and "Hubs" in themes and the API, are new to Community Server 2008.  To support groups/hubs with a custom theme upgraded from CS2008, a new theme within the themes/hubs/ folder will need to be created.

As with new blog and site themes, I suggest copying an existing theme and implementing the desired changes.

 

Questions?  Issues?  Let me know in the comments.