Building Websites with the ASP.NET Community Starter Kit - K. Scott Allen - E-Book

Building Websites with the ASP.NET Community Starter Kit E-Book

K. Scott Allen

0,0
34,79 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Microsoft's ASP.NET Community Starter Kit (CSK) is a powerful, freely available application that allows you to quickly create a fully featured community-driven website, complete with article and news management, downloads, forums, and user handling. Supported and tested by thousands of developers in the ASP.NET community across the world, the Community Starter Kit offers you the luxury of a scalable and extensible architecture, and the ability to brand your own site. This book will take you inside the Community Starter Kit, allowing you to harness its power for easily creating your own websites. The book is structured to help you understand, implement and extend the Community Starter Kit:



Understand how the Community Starter Kit works.

Build the skills to implement your own site.

Develop the confidence to extend the system for your own needs.



With this book, you will learn how to:



Install and configure the CSK

Find your way around the CSKs towering range of features

Create and administer community websites

Become familiar with the common CSK ASP.NET controls

Customize your CSK site

Discover the secrets of the CSK core architecture

Explore the inner workings of CSK modules

Extend the CSK by creating new modules

Customize existing modules with Web controls

Add an RSS feed to share your content with others

Deploy your CSK website



This book is for ASP.NET developers with a sound grasp of C# and access to Visual Studio .NET. This book uses the Visual Studio. NET version of the ASP.NET Community Starter Kit available from http://www.asp.net/StarterKits/

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 292

Veröffentlichungsjahr: 2004

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Building Websites with the ASP.NET Community Starter Kit
Credits
About the Authors
Introduction
What This Book Covers
What You Need for Using This Book
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Questions
1. The ASP.NET Community Starter Kit
What Can the Community Starter Kit Do for You?
The License Agreement
Installing the Community Starter Kit
Summary
2. Touring a Community Starter Kit Website
Overview of the Community Starter Kit
The Main Page
The Community Logo
The Community Menu
The Search Box
Login/Register
Advertising
Web Boxes
Web Services Boxes
Voting Polls
The Contents
Overview of the CSK Modules
Articles
Events
Books
Links
Discussions
Photo Gallery
Downloads
Parent Section
HTML Page
Common Features in the CSK Modules
Security
Moderation
Comments
Ratings
Notifications
Quotas
HTML Editor
Creating and Using User Accounts
Creating a New User Account
Log In
Edit Profile
Logging in as Administrator
Summary
3. Creating and Administering Community Websites
Using the Community Administration Menu
Edit Sections
Editing a Section
General
Appearance
Web Boxes
Security
Web Services
Advanced
Add New Section
Edit Voting Polls
Edit Service Subscriptions
Edit Messages
Edit Topics
Edit Users
Edit Web Box Services
Send Newsletter
Edit Images
View Activity Log
Delete Content
View Documentation
Administering Advertisements
Administering Quotes
The ISP Administration Page
Creating a New Community
Summary
4. Themes, Skins, and the Common Controls
Meeting Themes, Skins, and Styles
Playing with Visual Studio
Painting the Skin with Style
What are Skins Made Of?
Page Skins
Content Skins
Control Skins
Template Skins
The Web Boxes
Creating Themes
The Community Starter Kit Custom Controls
Learning about the Common Content Controls
AddContent
Author
BriefDescription
CommunityImageButton
ContentList
DateCreated
DisplayQuota
HtmlTextBox
ItemAuthor
ItemBriefDescription
ItemDateCreated
ItemEditContent
ItemHasRead
ItemImage
ItemReadMoreLink
ItemTitle
ItemTitleLink
ItemViewCount
LengthValidator
Logo
PageFooter
PageHeader
SectionTitle
Sorter
Title
UploadValidator
ViewCount
Summary
5. Customizing your Website
Setting up a New Community
Preparing the Folder Structure and the Page Skin
Adding Information
Having a New Home
About Me
Advertising the Books
Forum
Changing the Layout
Updating the Parent Section and the Styles
Summary
6. The Community Starter Kit Core Architecture
The CSK Folder Structure and Configuration Files
Configuring the CSK Project
Web.Config
ISP Administrator Information
Default Page Information
Database Connection Information
Enabling Web Services Timer
Enabling Debug Mode
Handing Client Requests
Configuring Authentication Information
Setting the Maximum Request Length
Handling Image File Requests
Configuring Web Services
Global.asax
What Do the Main CSK Folders Contain?
The Admin Folder
The Advertisements Folder
The Communities Folder
The ISPAdmin Folder
The Engine Folder
Building Pages for the Client
The Default Page
Analyzing the Community Default Page
Processing Client Requests
Processing the Request in Application_BeginRequest
Getting Page Information in GetPageInfo
Authenticating the Request in Application_AuthenticateRequest
Processing the Request in the Middle Tier
The Community Starter Kit Framework
The Framework Base Classes
The CommunitiesSectionHandler Class
The CommunityGlobals Class
The SkinnedCommunityControl Class
ContentAddPage, ContentEditPage, ContentItemPage, and ContentListPage
The PageInfo Class
The QuotaInfo Class
Handling Communities
Handling Sections
Handling Images
Handling Content Pages
Handling Search
Studying the Engine/Admin Folder
Modules for the CSK
The Database Structure
The Tables
Online CSK Resources
Summary
7. Inside a CSK Module
Database Layer
Procedures and Functions
Community_ArticlesAddArticle
Community_ArticlesGetArticles
Ordering Content
Paging and Sorting Content
Community_ArticlesGetArticle
Delete Content
Module Classes
Components
Component Helpers
Get Articles
Content
communityDefault.aspx
Article Content Control
The Article Skin
InitializeSkin Method
Skins and Styles
Summary
8. Creating a New Module
Module Design
Module Construction Blueprint
The Community_Faq Table
The Community_Faqs Stored Procedures
Community_FaqsAddFaq
Community_FaqsEditFaq
Community_FaqsGetFaqs
Community_FaqsGetFaq
Initializing the FAQ Module
FAQ Components
FaqInfo
FaqUtility
FAQ WebControls
FaqAnswer and FaqReference
FaqEditContent
Content Classes
Faq and FaqSection
AddFaq and EditFaq
FAQ Page Content Skins
Module Styles
Putting It Together
Summary
9. Customization with User Controls
The Custom Module Section
The "Recent Logins" User Control
Community_RecentLogins Stored Procedure
Recent Logins.ascx
Recent Logins Administration
Custom Web Boxes
FAQ Web Boxes
Current Event Web Box
Summary
10. Adding an RSS Feed
The RSS 2.0 Specification
Community RSS Design
HttpModule Changes and Configuration
CommunityRSS.aspx
Testing the RSS Feed
Advertising the RSS Feed
Summary
11. Deployment
Installing Content Files
Copy Project
Xcopy Deployment
Configuring ASP.NET
ASP.NET on Windows 2000
ASP.NET on Windows 2003
CSK Site Configuration
Database Deployment
DTS Deployment
Script Deployment
Backup and Restore
Database Ownership Problems
Community Starter Kit Configuration
Web.Config
ISPAdmin
Working with Other Sites
Summary
A. CSK Controls
BriefDescription
ContentList
DateCreated
DisplayQuota
HtmlTextBox
ItemReadMoreLink
ItemTitleLink
LengthValidator
PageFooter
SectionTitle
Sorter
Title
UploadValidator
Index

Building Websites with the ASP.NET Community Starter Kit

Cristian Darie

K. Scott Allen

Building Websites with the ASP.NET Community Starter Kit

Copyright © 2004 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First edition: May 2004

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 1-904811-00-0

www.packtpub.com

Cover Image by www.visionwt.com

Credits

Authors

K. Scott Allen

Cristian Darie

Technical Reviewers

Ovidiu Platon

Dave Ranck

Colin Mumford

Commissioning Editor

Douglas Paterson

Layout

Niranjan Jahagirdar

Technical Editors

Deepa Aswani

Saurabh Bijur

Dipali Chittar

Indexer

Vijay Tase

Proofreaders

Chris Smith

Vijay Tase

Helen Wood

About the Authors

Cristian Darie is an experienced programmer specializing in various Microsoft and open source technologies, and relational database management systems. Having worked with computers since he was old enough to press the keyboard, he initially tasted programming success with a first prize in his first programming contest at the age of 12, and from there moved on to many other similar achievements in years that followed. As an eagle-eyed technical reviewer with Wrox Press, Cristian was tempted into writing and has since co-authored several .NET and database books for Wrox Press and Apress, including Beginning ASP.NET E-Commerce and The Programmer’s Guide to SQL.

Cristian is currently building a large community website using the Community Starter Kit for University "Politehnica" of Bucharest. He can be contacted through his personal website at http://www.CristianDarie.ro.

K. Scott Allen is the Chief Software Architect for Medisolv, Inc., and holds MCP and MCSD certifications. In 12 years of software development, Scott has worked on everything from real-time firmware in 8-bit embedded devices to highly scalable Internet applications connecting COM+ and J2EE components with web services. Living in Hagerstown, Maryland, Scott tries to play as much softball as possible during the summer. Scott is a cofounder of the site http://www.OdeToCode.com, a .NET developer resource built using the Community Starter Kit. You can reach Scott at <[email protected]>.

I would like to thank Douglas Paterson and Poonam Lall for their generous help and support while working on this book.

Introduction

The ASP.NET Community Starter Kit allows you to quickly create a fully featured community-driven website, complete with article and news management, downloads, forums, and user handling. Available for free from Microsoft, this application puts a staggering range of functionality into your hands, and either by using it as is, or customizing it to your requirements, you are giving your projects a great head start.

Supported and tested by thousands of developers in the ASP.NET community across the world, the Community Starter Kit offers you the luxury of a scalable and extensible architecture, as well as the ability to control the look and feel of your site.

The book is structured to help you understand, implement, and extend the Community Starter Kit; it will take you inside the Community Starter Kit, allowing you to harness its power for easily creating your own websites.

What This Book Covers

Chapter 1 introduces the Community Starter Kit (CSK), and shows how to install it so you are up and running.Chapter 2 takes us on a tour of the sample community website that ships with the CSK — the Lunar .NET community. This chapter is your orientation to the features and functionality provided by the CSK, and is our first step towards creating our own community website.

InChapter 3 we see how to administer the data that gets displayed by the CSK, and learn how to manage our community, and multiple communities on the same installation, through the various administration tools provided by the CSK.

The Community Starter Kit has been designed from the ground up to support easy integration of skins and styles, allowing you to change the look and feel of your site with ease. InChapter 4 we take a detailed look at themes, skins and the common controls that control the overall appearance of your site. Before we delve into the CSK framework and architecture, we have a quick walkthrough of implementing a completely new CSK site inChapter 5.

Understanding the core architecture of CSK is essential if you want to extend the system or even modify the existing code. InChapter 6 we’ll learn how the Community Starter Kit builds the client pages, and what are the major classes that drive it.

InChapter 7 we look inside one of the modules that ship with the CSK to gain an overall view of the structure of a CSK module.

With knowledge of how to work with the administrative features and an understanding of the inner workings of the CSK, inChapter 8 we move on to extending the CSK by creating a new module: a Frequently Asked Questions module. The strategies and principles learned in this chapter will prepare you for developing custom modules to add your own functionality to the CSK.

Creating a new module from scratch is not the only way to customize the CSK application, and inChapter 9, we look at customizing through the use of user control (.ASCX) files. The flexibility of the CSK is further demonstrated inChapter 10, where we build an RSS feed to syndicate the output from any part of the site.

The final chapter of the book,Chapter 11, shows how to deploy a CSK website to a production environment, and tackles preparing the web server, and deploying both the code and the database to your hosting setup.

What You Need for Using This Book

This book has been written for ASP.NET developers with a sound grasp of C#. To use this book you need to have the following:

Access to Visual Studio .NET Professional or higher

This book uses the C#, Visual Studio. NET version of the ASP.NET Community Starter Kit available from:

http://www.asp.net/StarterKits/DownloadCommunity.aspx?tabindex=0&tabid=1

To install and run the ASP.NET Community Starter Kit, you will need the following:

The .NET FrameworkOne of Windows Server 2003, Windows 2000, or Windows XP operating systemsAn installation of SQL Server 2000 or MSDE

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an e-mail to <[email protected]>, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, then please send us a note in the Suggest a title form on www.packtpub.com or e-mail <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, then see our author guide on www.packtpub.com/authors.

Customer Support

Downloading the Example Code for the Book

Visithttp://www.packtpub.com/support, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed.

Note

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in text or a code error — we would be grateful if you could report this to us. By doing this you can save other readers from frustration, and also help to improve subsequent versions of this book.

If you find any errata, you can report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the Submit Errata link, and entering the details of your errata. Once your errata have been verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book and we will do our best to address it.

Chapter 1. The ASP.NET Community Starter Kit

Everybody agrees that .NET brought in many improvements over previous development paradigms and technologies. The drawback with new technologies is that developers need time to master the new skills; the large code bases, solutions, techniques, and expertise that were available with older technologies are no longer applicable within the framework of new technologies. It is always more difficult to build a complex solution with a technology you haven’t yet mastered, no matter what that technology is.

In order to help developers become more efficient with ASP.NET, Microsoft has released a number of starter kits that help ASP.NET developers to create their own solutions in a faster and easier manner.

The ASP.NET Starter Kits are complete solutions that you can update and customize for your own needs. When building complex applications, designing the application architecture is often a time-consuming step. Borrowing the entire architecture from an existing solution can be of immense help if the job is done right.

At the time of writing, there were five starter kits available for download at http://www.asp.net/starterkits (visit the site for more information on these):

Time Tracker Starter KitReports Starter KitCommunity Starter KitCommerce Starter KitPortal Starter Kit

The names of the starter kits are self-describing.

This book is exclusively dedicated to the Community Starter Kit (CSK), which is the most complex and powerful of all the starter kits. It provides a complete application that can be adjusted exclusively using the administrative interface included within the starter kit without touching a single line of code or knowing its internal working.

In the first five chapters, you’ll learn how to create your own customized solution by using the administrative interface that comes with the Community Starter Kit application. In Chapters 6 through 11, you will learn how to programmatically create new modules and plug them into the site.

What Can the Community Starter Kit Do for You?

The CSK helps you to create and administer online community websites by providing the complete source code for a carefully tested, scalable, and modular structure that can be reused and customized to suit your particular needs.

Note

Community websites are websites that support online communities. These can be regional user communities, developer resource sites, news sites, or other kinds of user‑group sites. Most community websites provide features such as presenting news and events concerning the community, photo galleries, links to other websites, discussion forums, and so on.

The CSK application itself is quite complex but can save you many hours of design and development efforts. It is built using powerful and flexible 3-tier architecture with reusable components and offers good performance. We’ll discuss the details of the architecture starting withChapter 6, but an example of its modularity is that the application, excluding the administration pages, has only two ASPX web forms. Each client page is dynamically built using separate web user controls and data gathered from the SQL Server database.

By default, the CSK comes with out-of-the box functionality that includes support for nine types of content including articles, books, events, photo galleries, downloads, user polls, and more. It also supports features such as moderation, upload quotas, comments, user polls, ratings, newsletters, advertisements, web services, and security. We’ll take a detailed look at each of these in Chapters 2 and 3.

Note

To see how these features work, you can preview the Lunar .NET community (the sample community that ships with the CSK) at http://www.asp.net/CommunityStarterKit/.

The CSK has built-in functionality for skinnable interfaces, which means you can change its appearance entirely through its administration interface and configuration files without modifying a single line of code.

An advantage of using the CSK is that a number of Internet Service Providers (ISPs) support automatic deployment of websites that are based on it. We’ll talk more about deployment techniques and strategies inChapter 11.

The License Agreement

The license agreement for the ASP.NET Starter Kits specifies that apart from some restrictions, you’re allowed to use them for any commercial or non-commercial purposes. Thus, you’re allowed to create your own websites based on the CSK code and use them for your own needs.

The complete license agreement terms for using the starter kit application can be found at http://www.asp.net/samplessourcelicense. Even though the terms are pretty relaxed, please read them carefully before starting to create your websites based on the CSK.

Installing the Community Starter Kit

Before moving on to the installation details, make sure you have met the necessary system requirements:

.NET Framework version 1.0 or 1.1Windows 2000, Windows XP Professional Edition, or Windows Server 2003SQL Server 2000 or MSDE 2000Internet Information Services (IIS)

Note

You can’t use the CSK with Windows XP Home Edition because it doesn’t include IIS.

Before installing the starter kit, make sure you have the appropriate software and hardware environment. If you don’t have SQL Server, you can install it from the Visual Studio .NET kit or from its official homepage, http://www.microsoft.com/sql/msde/. You can install IIS by going to the Windows Components Wizard located at Control Panel | Add/Remove Programs | Add/Remove Windows Components.

Once you have your system ready for the CSK, it’s time to download the starter kit from http://www.asp.net/starterkits.

Note

Before downloading the starter kit, you are offered the option to create a user account for the ASP.NET Forums. The CSK discussions provide useful insight about developing solutions using the CSK.

After you go to the Download Starter Kit link in the CSK section, you’ll need to choose what version of the starter kit to download.

There are six versions of the CSK available for download for the three standard .NET languages provided by Microsoft: C#, VB.NET, and J#. For each of these languages, you can download the SDK version or the VS (Visual Studio .NET) version. The SDK version doesn’t use code-behind files and is more appropriate for development environments like Web Matrix.

Note

Web Matrix is a free ASP.NET development tool that you can download from http://www.asp.net/webmatrix and its installer kit is only 1.3 MB. It doesn’t support all the features you can find in Visual Studio .NET, such as support for code-behind files, IntelliSense, or debugging, but can be very useful for developing small ASP.NET applications. For more information about Web Matrix, visit: http://aspnet.4guysfromrolla.com/articles/061803-1.aspx or http://www.aspnetpro.com/productreviews

There is no difference in functionality between the different versions of the starter kit. The only difference is the language they’re written in and the way they are packaged.

This book focuses on the CSVS version of the starter kit, which is a C# ASP.NET web application for Visual Studio .NET. The file download for this starter kit is named ASP.NET Community (CSVS) Installer v1.0.msi.

After downloading the MSI file, the installation shouldn’t raise any problems. At the beginning, you’re presented with some useful details about the system requirements and the installation location:

The actual web locations, admin name, and password may differ since you have the option to change them during installation.

After accepting the license agreement for Microsoft ASP.NET Starter Kit, you’ll have the option to specify:

The physical location on the hard drive where the CSK files will be installed:The web location where the starter kit will install. For this book, we suggest that you leave the default virtual directory name (Community Starter Kit) unchanged, making it accessible through http://computername/CommunityStarterKit. However, changing the web folder name won’t make much of a difference.The MSDE or SQL Server login information that will be used by the installer to create the necessary database objects. Obviously, the user account you specify must have permissions to create databases or objects in a specific database (if you’ll choose to use an existing database).The name of the CSK database. You can choose to create a new database (which is the recommended option if you have the necessary privileges), or you can use an already existing database.The login information that the CSK will use to access the CommunityStarterKit database. This doesn’t have to be the same as what you supplied earlier when installing the database. Here you can supply a username with rights only to the CommunityStarterKit database.ISP admin username and ISP admin password data (which, by default, are ISPAdmin and ISPPassword respectively), and community admin username and community admin password (by default, both are Admin).

Note

A single CSK installation can support multiple communities. During the setup, the installer creates a single sample community whose administrator account is Admin. Admin is a local community account and has privileges only inside its community. The ISPAdmin account, on the other hand, is not part of any community. ISPAdmin is used to access the ISP administration pages, where you can manage the communities in the CSK installation.

That’s it — the CSK is now ready for action! The installer also populates the database with a sample community named Lunar .NET (an imaginary community for .NET programmers on the moon station) that you can see in action right away. If you haven’t changed the default virtual directory name, you can visit the Lunar .NET community at http://localhost/CommunityStarterKit:

Note

Generally, the installation process works well; however, there have been some reports on the ASP.NET forums with problems installing the kit. Typical problems are related to the connection string used to access the CommunityStarterKit database. The connection string is stored in the Web.Config file in the CSK project folder. Also, the CSK installer program creates a log file named install.log in the setup folder. This is also a good place to look for the root of your problem.

As mentioned earlier in the chapter, you can change the appearance of the website using the administrative interface. This is because the underlying architecture is based on skins. With only a few clicks, it’s possible to completely change the face of the site. The following screenshot shows one of the themes included in the starter kit:

Summary

In this chapter, we took the first step into the world of CSK. We briefly discussed what the Community Started Kit can do. We discussed the system requirements necessary to install the CSK and went through the installation process.

This starter kit can prove to be a very useful tool in your web development toolbox. It was designed with both usability and reusability in mind, and with its powerful and flexible infrastructure, building customized community websites becomes a straightforward task. Our next step will be towards learning how to customize and extend the CSK.

In the next chapter, we’ll take a journey through the features bundled with the CSK.

Chapter 2. Touring a Community Starter Kit Website

It’s time to make a trip to the moon. Touring the Lunar .NET community, the sample community website that ships with the Community Starter Kit (CSK), will help you learn about the features and functionality bundled in the starter kit. The first step towards creating your own community website based on the CSK is to get accustomed to its functionality.

Lunar .NET implements almost all the functionality supported by the starter kit engine. After this tour, you might find that the CSK includes everything you need for your own website and more.

Chapters 3, 4, and 5 will teach you how to create a community website by reusing what you already have. In the later chapters, you’ll learn how to extend the CSK by creating new modules.

In this chapter, we aim to:

Analyze the general features provided by all major CSK modulesLearn how to create and edit new user accountsLook at how each CSK module works

Overview of the Community Starter Kit

Let’s load the Lunar .NET community in Internet Explorer. If you installed the CSK with the default options, you can access it at http://localhost/CommunityStarterKit. The following screenshot shows the default look of the main page of the Lunar .NET community:

It’s assumed you’re running the CSK on your local machine. If this is not the case, you’ll need to refer to the machine that hosts the remote community instead of localhost. Also, if you chose to use a different virtual directory when installing the kit, you’ll need to use that name instead of CommunityStarterKit in the URL.

The Main Page

The main page in the Lunar .NET community contains the elements expected of any community website: a logo, a menu with links to various sections, an advertising banner, and so on. In this chapter we learn how the built-in functionality works, and inChapter 3 we’ll learn how to administer it through the Community Administration Menu.

Bear in mind that it’s possible to completely change the layout of a CSK website by building new skins (as we’ll learn inChapter 4) or using the predefined themes that ship with the CSK.

Note

You can preview the predefined themes at http://localhost/CommunityStarterKit/Admin/help/theme.htm.

The Community Logo

The community logo appears in the upper left part of the site. It can be changed by editing the logo of the home page in the Community Administration Menu.

The Community Menu

The community menu is just below the logo, and contains links to the sections of your community. Each section in the community has a content type, such as Books, Links, or Photo Galleries. Each content type is governed by a specific CSK module (such as Books module, Articles module, and so on).

You can have several sections in your community website with the same content type. For example, you can have two Books sections named "C# Books" and "VB.NET Books", both built using the Books module.

We’ll discuss the CSK modules and the different types of content supported by the CSK later in this chapter.

The Search Box

The Search box permits searching for content in the section that is being visited or in all public sections of the website. The following screenshot shows this feature in action:

We’ll discuss how the search functionality works internally inChapter 6.

Login/Register

The main page features the Login and Register links for unauthenticated users and the Log Off and Edit Profile sections for logged in users. Their functionality is obvious, and we’ll analyze them in detail in the Creating and Using User Accounts section later in this chapter.

Advertising

At the top and in the right of the main page, you can see two advertising boxes generated by AdRotator controls. InChapter 3, we’ll discuss how to configure the ads to be displayed.

Web Boxes

Web Boxes are used to display information outside of the main content area of your pages. In the Lunar .NET community site, by default, you can see a random quote box and a list of new photos in the right side of the page.

Web Services Boxes

Web Services Boxes are similar to Web Boxes, except that they get their source information from an external RSS feed. By default, you can see information gathered from the official Star Wars website in the right part of the page.

Voting Polls

The community administrator can add voting polls through the Community Administration Menu. You can see in the following screenshot how the voting poll looks by default:

The Contents

The main page content area changes depending on the type of community section being viewed. The home page, which is a parent section, shows links to the other sections of the website. If you go to one of these sections, the contents section will change accordingly. We’ll see more about each kind of website section later in this chapter, and inChapter 3, we’ll see how to change these sections using the Community Administration Menu.

Overview of the CSK Modules

Now let’s learn more about each type of content supported by the CSK by playing further with the Lunar .NET community.

In the following sections, we will look at:

ArticlesEventsBooksLinksDiscussion ForumsPhoto GalleryDownloadsParent SectionHTML Page

In this chapter, we aim at having a good overview and knowledge about the capabilities of these modules. We will discuss their functionality with more details inChapter 3 while learning how to administer them using the Community Administration Menu.

Articles

The Articles page of the Lunar .NET community can be accessed by clicking on the Mission link. The Articles module first shows a list of the articles in the current section:

While logged in as Admin, apart from the usual content, you can also see the following elements:

The Admin link, which leads to the Community Administration MenuThe edit, delete, and move controls that appear for every article in the sectionThe Add Article link, which allows adding a new article to the section

The roles that are allowed to read, edit, delete, or add articles for a section can be set by the administrator in the Community Administration Menu | Edit Sections | Edit Section | Security menu. However, the administrator account always has those privileges.

When the Read More link is clicked, the article details page is shown:

Note the Edit this Article and Delete this Article links, which appear only when you are logged in as administrator.

When editing or adding a new article, an easy-to-use interface is provided:

Feel free to play around a little bit and get used to adding and updating articles. Note that for writing in the Extended Text section, you are provided with the HTML Editor (we will look at this in detail later in the chapter).

Events

The Events section shows the upcoming events in your community. You can access this section of the site by clicking on the Events link. The following screenshot shows the display of an event in the Lunar .NET community:

The Events section works in a way similar to the Articles section, except:

You can associate an image with every event.You can schedule an event to appear only after a certain date.In order to edit or delete events, you need to go to the event’s details page by clicking on its Read More link.

There is a View Past Events link that lets you see events that expired and are no longer shown in the main Events page.

Events are automatically ordered by date, so you aren’t provided with up and down links to modify the order in which they appear.

Books

You can access the Books section of the site by clicking on the .NET Books link. The Books section is shown in the following screenshot:

The Books module is similar in functionality to the Articles module, except:

You can associate a cover image with each book.You can add a link to a place where the book can be bought.Each book includes further details such as its title, author, price, and so on.

Links

You can access the Links section of the sample website by clicking on the Favorite Links link in the menu. Each link object has a title, URL, and description. By default, there are five link objects listed per page. The administrative buttons allow you to edit, delete, or change the order of links:

Discussions

The Discussions module is used to host a discussion forum.

Note

Discussions contain threads, and threads contain messages. Users can post new threads in a discussion or new messages in a thread.

On clicking the Discuss link in the menu, you get the Discuss page that contains links to the three discussions (the Private discussion is only visible to community administrators.)

Note

The Discuss page is a parent section that contains three separate discussion topics. Each of those discussions is governed by the Discussions module. The list of discussion topics can only be modified from the Community Administration Menu, which allows adding, removing, and changing website sections.

The following screenshot shows the threads in the Job Board discussion:

Users that visit the discussions can:

Post new threads. However, this option is affected by security options set for that section. In Lunar .NET, only administrators can post new threads in the Job Board forum, but everyone can post new threads in the Discussions forum.Reply to messages that exist in current threads.Post locked threads by selecting the Do not allow replies to this post checkbox when adding a new thread. When a thread is locked, other users aren’t allowed to respond to that thread.Post announcements by selecting the Announcement checkbox when adding a new thread. An announcement is a thread that is marked with a special icon (an exclamation mark) when listed.