|
Professional Community Server Themes
Wrox’s Professional Community Server Themes is one the first guide to the Chameleon theming engine. Inside, Telligent developers Wyatt Preul and Ben Tiedt share their experience with Community Server, and teach readers how to extend their implementation with theming. Professional Community Server Themes is heavy on fully implemented examples,
making this a hands-on guide that will get readers customizing the look of their Community Server install quickly. Topics include:
* URL Rewriting
* Modifying SiteUrls.config through Overrides
* Understanding Chameleon
* Implementing Blog Themes
* Interaction with ASP.NET AJAX
* Dynamic Configuration Options
* Content Scrubbing
* Creating Custom Chameleon Controls
and more.
CONTENTS:
Contents
Acknowledgments x
Introduction xix
Chapter 1: Key Concepts 1
Themes in Community Server 2007 1
Theme Portability 1
Standard Control Features 2
Theme File Reduction 2
Types of Themes 2
SiteUrls and URL Rewriting 3
Chameleon 3
Request to Rendering Diagram 4
Dynamic Configuration 5
Content Scrubbing 5
Summary 6
Chapter 2: Getting Started 7
Required Software 7
Selecting a Database Server 8
Selecting an Integrated Development Environment 8
Downloading Community Server 9
Installing Community Server 9
Understanding the Installation File Structure 10
Setting Up a Development Environment 11
Previewing Themes 12
Summary 14
Chapter 3: URL Rewriting 15
URL Rewriting 15
SiteUrls.config File 17
Locations 18
url Element 19
Transformers 21
Navigation and Links 22
Summary 24
<
xii
Contents
Chapter 4: Adding New Pages to SiteUrls.config 25
Modifying SiteUrls.config through Overrides 25
Remove Override Example 27
Update Override Example 27
Add Override Example 28
Change Override Example 28
New Override Example 29
Overrides File Review 29
Adding a Simple URL 29
Adding a URL with Query Strings 31
Summary 31
Chapter 5: Basics of Chameleon 33
Implicit Data Binding 33
Contextual Data Binding in Action 34
Base Control Types 35
Single-Value Controls 35
Defining Wrapping Markup 36
Defining Render Conditions 38
Formatting API-Related Single-Value Controls 39
API-Related Single-Value Controls Naming Conventions 44
List Controls 44
List Control Templates 45
Defining Query Overrides 47
API-Related List Controls 48
API-Related Single-Value Controls Naming Conventions 50
Pager Controls 50
Pager 50
PostbackPager 55
CallbackPager 56
ScrollingPager 56
PagerGroup 58
Form Controls 59
ValidationGroup 59
Properties for Child Control IDs 60
Properties for Completion Actions 61
Subform Controls 61
Subform Naming Conventions and Host Form Support 63
xiii
Contents
Condition Controls 63
Conditions 63
Property and Value Comparison Condition 65
Property Comparison Condition 67
ControlVisibilityCondition 69
UserInRoleCondition 70
SectionPermissionCondition 70
CurrentSiteUrlCondition 70
CurrentUserIsAccessingUserCondition 71
Action Controls 71
ExecuteScriptAction 72
GoToCurrentContentAction 72
GoToCurrentPostAction 72
GoToModifiedUrlAction 72
GoToReferralUrlAction 73
GoToSiteUrlAction 74
SetVisibilityAction 74
CustomAction 74
Actions 75
Utility Controls 75
ConditionalAction 75
ConditionalContent 76
ModifiedUrl 77
PlaceHolder 77
ThemeImage 77
ThemeScript 78
ThemeStyle 78
SiteUrl 78
Page Controls 79
Summary 79
Chapter 6: Implementing Blog Themes 81
Blog Theme Files 81
Creating a Custom Blog Theme 82
Creating a Basic theme.config File 82
Creating a Master Page 83
Creating Postlist.aspx 86
Creating a Stylesheet 88
Summary 94
xiv
Contents
Chapter 7: Implementing Site Themes 95
Site Theme Files 95
Blog-Specific Theme Files 97
Forum-Specific Theme Files 97
Photo Gallery - Specific Files 98
File Gallery - Specific Theme Files 99
Extending Existing Themes 99
Creating a Site theme.config File 101
Creating a Site Master Page 102
Creating the Site Homepage 102
Summary 104
Chapter 8: Theme Considerations 105
Interaction with ASP.NET AJAX 105
Installing ASP.NET AJAX 106
ASP.NET AJAX Example 106
Interaction with External Scripts 109
Interaction with Silverlight 110
Packaging Your Theme for Distribution 115
Summary 116
Chapter 9: Basics of Dynamic Configuration Options 117
Theme Configuration Pages 117
Configuration Form 118
Preview 118
Save 119
Export 119
Import 120
Restore Defaults 120
The theme.config File 121
Theme node 121
Property Groups 122
id 123
resourceName, resourceFile, and text 123
descriptionResourceName, descriptionResourceFile, and descriptionText 123
orderNumber 123
visible 124
Unrecognized Attributes 124
Contents
Property Subgroups 124
id 124
resourceName, resourceFile, and text 125
descriptionResourceName, descriptionResourceFile, and descriptionText 125
orderNumber 125
visible 125
Unrecognized Attributes 125
Properties 126
id 126
resourceName, resourceFile, and text 126
descriptionResourceName, descriptionResourceFile, and descriptionText 127
descriptionImageUrl 127
orderNumber 127
dataType 127
defaultValue 130
editable 131
visible 131
controlType 131
Unrecognized Attributes 132
Property Values 132
value 133
resourceName, resourceFile, and text 133
orderNumber 133
Unrecognized Attributes 133
Property Rules 133
type 134
processImmediately 134
Unrecognized Attributes 134
Built-In Property Controls 135
CssValueSelectionControl 135
HtmlTextSelectionControl 136
ImageSelectionControl 138
MultilineStringControl 140
HtmlEditorStringControl 141
SiteFileUrlControl 142
BlogFileUrlControl 142
Built-In Property Rules 143
ValueAutomationRule 143
Using Theme Configuration Data 144
Using Theme Configuration Controls 144
Using Theme Configuration Data in Code 146
Summary 149
xvi
Contents
Chapter 10: Adding Dynamic Configuration Options to a Theme 151
Adding a Simple Configuration Option 151
Site Background Color Configuration 152
Site Font Configuration Example 154
Image Background Configuration Example 156
Previewing Configuration Changes 157
Adding a CSS Previewable Configuration Option 157
Adding a Conditional Rendering Option 158
Defining a Custom Property Rule 159
Summary 162
Chapter 11: Content Scrubbing 163
Markup Safety and the HtmlScrubber 163
Configuring the HtmlScrubber 164
Well-formed Markup and the HtmlNestingCorrectionModule 167
Configuring the HtmlNestingCorrectionModule 168
Summary 169
Chapter 12: Creating Custom Chameleon Controls 171
Using Implicit Data Binding 171
Custom Single-value Controls 173
Abstract Members of WrappedContentBase 173
Utility Members of WrappedContentBase 173
Implementing the PostExtendedAttributeLink Control 177
Custom List Controls 181
Abstract Members of PreTemplatedListBase 181
Utility Members of PreTemplatedListBase 181
Implementing the GroupList Control 185
Custom Form Controls 191
Abstract Members of WrappedFormBase 192
Utility Members of WrappedFormBase 192
Implementing the SendEmailForm Control 195
Custom SubForm Controls 202
Abstract Members of WrappedSubFormBase 202
Utility Members of WrappedSubFormBase 202
Implementing the ExtendedAttributeSubForm Control 203
Custom Condition Controls 208
Abstract Members of ConditionBase 208
Utility Members of ConditionBase 208
Implementing the CurrentTimeCondition Control 208
xvii
Contents
Custom Action Controls 210
Abstract Members of ActionBase 210
Implementing the IncludeStyleAction Control 211
Distributing Custom Controls 213
Summary 213
Chapter 13: Creating Custom Dynamic Configuration Controls and Rules 215
Custom Property Controls 215
IPropertyControl 216
IPropertyValuesControl 217
Implementing the RadioButtonListPropertyControl 218
Custom Property Rules 223
IPropertyRule 223
Implementing the AcceptableIntRangeRule 224
Summary 225
Chapter 14: Creating a Custom Editor 227
Editor Overview 227
Existing Editors 228
Custom Editor Example 229
Installing an Editor 236
Summary 236
Chapter 15: Creating a Custom Browseable List 237
Browseable List Overview 237
Existing Browseable Lists 238
Installing a Browseable List 238
Custom Browseable List Example 239
Summary 246
Appendix A: SiteUrls.config Reference 247
Appendix B: Chameleon Controls - Common 251
Appendix C: Chameleon Controls - Blogs 279
Appendix D: Chameleon Controls - Forums 291
82086ftoc.qxd:WroxPro 9/30/07 11:46 PM Page xvii
xviii
Contents
Appendix E: Chameleon Controls - File Galleries 303
Appendix F: Chameleon Controls - Photo Galleries 313
Appendix G: Theme.config Reference 323
Index 327
|