• //W3C//DTD HTML 4.0 Transitional//EN">

    What's New in CSK 1.1 


    Bug Fixes

    Modified Functionality

    New Functionality

    New Feature Details

    Private Messages

    This mod adds private email message functionality to the CSK. Private Messages (or PMs) allow users of the CSK to send emails to another CSK user's private email addresses without disclosing the private email addresses to either user.

    Features:

    • New option in user profile registration and admin edit user tool to enable or disable private messages for the user.
       
    • New option in display profile that will show a link to the send private message page if that user's profile has private messages enabled.
         
    • New Message in Admin Messages tool called Private Message that provides a template for the email message. This template has custom placeholder options described later.
         
    • New Send Private Message named page. This form provides an interface by which any registered user can send private messages to any other registered user. Both sender and recipient must have enabled private messages. Includes an *option* where the sender can send their own private email address to the recipient for direct replies. Also includes message preview, validation, and error logging (email send failures only). 
       
    • Follows the existing design patterns for CSK development.
       
    • Send Private Message form can be directly linked from any path in the CSK. Query string parameters for recipient name and subject are optional, but supported. If no recipient is supplied in the URL, the form's drop-down list can be used to select any available recipient.
    • Includes custom web controls for adding an image link in content lists and content items. This is described in more detail below.

    The core idea of this mod is to allow users to send email to the private email address of other users via a web form. This will prevent either party from knowing the other user's real private email address, thus protecting their privacy.

    To accomplish this, this mod changes the User Registration form, which is used in the Admin Edit user tool, the New user Registration, and the Edit Profile features of the CSK. A new option for enabling private messages is added to this form. The value for this option is stored in the Community_Users table.

    The Show profile pages will now include an indication of the user's private message option, and if the user enabled private messages, a "Send Private Message" link will appear on the bottom of the page.

    There are three new web controls that can be dropped into various skin files. These web controls place an image hyperlink in the page that, when clicked, will take the user to the send private message page directly. In this case, the private message form will be pre-populated with the recipient's user name and the subject will reflect the content item the user clicked the link from. Though these controls are included in this distribution, none of the pre-defined themes use them. 
     
    How to use the inline image controls:  

    • In content skin files such as Articles_Article.ascx, insert this tag beside the <community:author> tag:
       
      <community:SendPmImage runat="server" ID="SendPmImage1" />
       
    • In content list files such as Articles_ArticleSection.ascx, insert this tag beside the <community:ItemAuthor> tag in the item template.
       
      <community:ItemSendPmImage runat="server" ID="SendPmImage1" />
       
    • For discussion sections, you can use the ItemSendPmImage control near the ItemAuthor control same as for any content list page. But a special control is included in this distribution just for adding an image link to the "Last Post By" person's name. Near the <community:ItemDiscussLastCommentUsername> tag, place this control:
       
      <community:ItemDiscussLastCommentSendPmImage runat="server" ID="SendPmImage1" /> 

    The Send Private Message form itself is a rather simple user control. It validates that the sender and recipient both enabled private messages. It also validates that the sender is logged into the site, and that the recipient is a valid user. The recipient, and sometimes the subject, can be pre-populated from query string parameters (recipient=xxx&subject=yyyy). The recipient names appear in a drop-down list of users. If the form is invoked via a direct link without the recipient= query string parameter, the user will have to manually choose a valid recipient. This list only shows the users that have private messages enabled, and the list is cached until a new user registers, or an existing user's profile is updated.

    The send Private Message form performs the same validation during postbacks as it does during initial load to protect against form-post hacks.

    The initial form has a clear form and preview message button. Clear form does the obvious. Preview message will show the user the exact message that will be sent (merging the user supplied subject and body with the Private Message email template). The preview mode has buttons that will either send the message or take the user back to edit mode. When send message is sent, the user will be shown a success message, or a failure message. Failures will place an error in the Admin Activity log.

    The send private message form also provides the user an option to send their own private email address with the mail. This will disclose their private address to the recipient, but does allow the recipient to reply directly from their mail client rather than using the site's private message form. When this option is enabled, the message will use the sender's private mail as the email's From: line. Otherwise, the From: line will contain notify@PrimaryDomain where PrimaryDomain is the PrimaryDomain specified in ISPAdmin for this community.

    The Private Message Email Template:

    The email sent for a private message combines the contents of the Private Message email template, with the Message body typed by the sender. These templates are available in the Edit Messages Admin tool. The default template included with this mod makes use of all available placeholders as an example. The idea here is that the admin can make sure that all private messages include links to disable the PM feature if the recipient no longer wants to receive them, and other static information.

    The template supports the same placeholders as any other Message, plus these unique ones:

    • <SenderUserName> = the user name of the sender.
    • <RecipientFullName> = the full name of the recipient.
    • <RecipientUsername> = the user name of the recipient.
    • <EditProfileLink> = the URL for the Edit Profile page.
    • <ContentSubject> = the subject supplied by the user in the Send PM form.
    • <ReplyLink> = the URL that the recipient can use to reply to the message.
    • <BodyText> = The body text typed by the sender.
    • <CommunityName> = The name of the community as specified in ISPAdmin.

    Multi-Level Section Menu Component

    The Multi-Level Section Menu is a modification of the built-in SectionMenu component of the CSK. The purpose of this new component is to supply a navigation control that provides the user with a tree style menu showing parent and child sections in a visually intuitive way. The built-in component only shows the top-level sections.

    In this release, the Arc theme has been modified to use the new Multi-Level Section Menu components as an example.

    Features:

    • Multi-level tree navigation of sections and child sections.
       
    • Indication of which section the user is currently visiting (optional)
       
    • Ability to expand only the current branch, or the entire menu
       
    • Ability to control the depth of the displayed branches.
       
    • Output is pure HTML. No client side scripting.

    The Mult-iLevel Section Menu only works well in vertical navigation menus where the menu items appear in a side-bar on the page (the Default Lunar theme and Arc themes use this style of menu). This control isn't easily adaptable to a horizontal menu layout where menu items appear side by side, but careful use of the repeater layout may be able to achieve a workable effect. 

    When allowing deep navigation with this control it may become necessary to limit the number of levels that can be expanded (support for this is provided). Each nested level of section displayed will indent 10 pixels to the right. When you have a large number of sections nested under each other, the menu could begin to take up too much horizontal space for your site's side bar to contain without disrupting your overall layout. Pay particular attention to the design of your page skin's to ensure that the deepest levels of your menu don't distort the page's visual appearance. About 3 or 4 levels is the practical limit even when using brief or abbreviated section titles; however, it is widely considered poor design for a site to have navigation structures deeper than 3 or 4 levels anyway.

    Properties: 

    The Multi-Level Section Menu component supports 3 new properties that you can specify when you place the tag into a skin file. The SubSectionMenu component is supplied these same properties automatically.

    • ExpandLevels: This determines how many levels deep the menu will show. If not specified, The default is ExpandLevels="0", which will show ALL sections and sub-section levels in the menu.
       
    • ExpandAll: this determines the behavior of the menu's displaying of sub-menu items. If not specified, the default is ExpandAll= "false".If set true, the menu will expand all branches no matter which branch is active. If false, it only expands the selected branch. How many levels deep the expansion goes is controlled by the ExpandLevels property. If setting ExpandAll to true, it is recommended that you limit the ExpandLevels to 1 or 2.
       
    • ShowSelection: This determines if an alternate style will be applied to the menu or sub-menu item that matches the current page the user is viewing. The default for this is true. If true, the style name of the Multi-Level Section Menu control plus "_SelectedMenuItem" will be set as the CSS classname of the hyperlink element for the menu item that matches the page the user is viewing. The default style of the Multi-Level Section Menu element  is "SectionMenu" so the name of the style that will be applied to the selected menu item is "SectionMenu_SelectedMenuItem".

    Custom Redirects Admin Tool

    In this release, there is a new admin tool in the admin section where you can define URL redirections. Each redirection includes a source URL and destination URL. Any browser request for the source URL will be redirected (using Response .Redirect()) to the destination URL. You can redirect requests for specific pages, or requests for any resource in a specific CSK section.

    This mod is designed for situations where a CSK section or page was moved or deleted, but you still want links from search engines or other sites point to a valid URL rather than the 404 fun-house.

    Note: If you are redirecting a section, then requests for resources in that section will be redirected to the specified destination URL or path. However, sub-sections under the redirected section will NOT be redirected. If you are moving a parent section, you will need separate redirect entries for the all of its child sections.

    How the Mod works:

    When a request is made to a CSK application from a browser, the CommunitiesModule class is responsible for parsing the requested URL and determining what resource is being requested. This mod plugs into this class and adds a check to see if the requested URL matches one of the redirect entries in the database. If so, it will redirect the browser to the new URL.

    There are two kinds of redirects that this mod deals with. Requests made for a specific page and requests made to a section. If you defined a redirect for a specific page, then your destination URL must also be a specific URL. But if your source URL is a section redirection, you have two choices:

    1. Redirect to a specific URL. This means that any request made to a resource in the source section's path will be directed to this exact page.
       
    2. Redirect to a section path. This means that any request made to a resource in the source section's path will be redirected to the same filename in the new path.

    The admin utility has pretty good validation to prevent invalid redirects from being entered, but it isn't perfect. The things to keep in mind when defining a redirect in the admin tools are:

    • Source URLs must be resources in the CSK site.
       
    • Source URLs are ALWAYS relative to the application root (leave off the "http://" part of the URL)
       
    • Source URLs that are redirecting a section must NOT specify a page name and must end with the "/" character.
         
    • Source URLs that are redirecting a specific page must specify the exact page name at the end of the URL and should not end with a "/" character.
       
    • Destination URLs follow the same formatting rules as source URLs with one important distinction. They can specify an external resource on another site. This works with both Specific page destinations and path (section) destinations. In other words, you can redirect a request for a page or section on your CSK site to another web site completely.

    Example Redirections:

    You move a specific content page from one section to another:

    Source: myParent/mySection/123.aspx
    Source Type: Exact Url
    Destination: myNewParent/myNewSection/123.aspx
    Dest Type: Exact Url

    You renamed a section in the Edit section admin tool:

    Source: myParent/mySection/
    Source Type: Section Url
    Destination: myNewParent/myNewSection/
    Dest Type: Path Url

    You deleted a section and want to point requests back to the CSK's home

    Source: myParent/mySection/
    Source Type: Section Url
    Destination: default.aspx
    Dest Type: Exact Url

    You deleted a section and want to point requests to a similar area of another site.

    Source: myParent/mySection/
    Source Type: Section Url
    Destination: http://www.newsite.com/similarSection/default.html
    Dest Type: Exact Url

    You moved a section to another site that has the exact same page names

    Source: myParent/mySection/
    Source Type: Section Url
    Destination: http://www.newsite.com/newSection/
    Dest Type: Path Url

    Integrated FreeTextBox

    This release replaces the CSK's graphical HTML editor with a new version based on FreeTextBox 1.6.2. The FreeTextBox source code has been fully integrated into the CSK using the standard CSK namespace and class names. The means there are no external DLLs to include and no need to configure references or compile two sets of source code.

    Additionally, the FreeTextBox source has been altered to support the CSK's standard HTML Editor functionality and security including: Support for the CSK Section's HTML Editor Modes (full, limited, none); Supporting the Insert Emote Icon and paste code block functionality; and supporting the CSK's text transformations.

    The FreeTextBox source has been renamed to the same as the CSK's original Editor (HtmlTextBox) and supports all of the same properties that the original editor did. The new component does support all of the properties of the FreeTextBox, and these can be included in skin files as properties of the <community:HtmlTextBox> component to control the FreeTextBox's appearance and functionality. In addition, it also supports all of the properties of the original HTML Editor. 

    The FreeTextBox also includes VisualStudio.NET designers so you can configure many of the settings for the freetext box in VS.NET's graphical designer via the properties window. This functionality is supported in the CSK version, and any skin with an HtmlTextBox control supports this designer automatically.

    The Editor.css file

    One interesting challenge with the HTML editor is that text entered into the editor should appear just like it would when the content is displayed in the CSK. However, unless you specify exact font name, style, and size in the editor, the text you enter into the Editor will not have explicit formatting. The CSK would apply a standard CSS style to that content when displaying the text, but the entered text would not reflect this.

    So that the editor's default formatting matches what the CSK's theme would apply, this distribution adds support for a special CSS file to be used with the new Editor.

    In the default theme's style folder at: /Communities/Common/Themes/Default/Styles/Editor/ you will find a new file called Editor.css. This file contains the default text style (in the body element) and the default code block style (in the pre element). The styles in this file are applied to the editor so that text will have the theme's standard text formatting already applied when you are viewing text in the editor.

    Different themes though, may use different styles for standard text. To support this, you can make a new Editor.css file for any theme. Simply create the /Styles/Editor/ folder in your theme's folder, and add your own Editor.css file to it. When creating an Editor.css file for a theme, you should probably base the styles off of that theme's Article_FullDescription class, and the pre style in the theme's regular CSS file. Note that only one style can be applied to the editor in any one theme, so avoid radically different font formatting in different types of content pages in your themes.

    When the Editor loads up, it first checks to see if there is an Editor.css file for the section's current theme. If there is not one, it will apply the styles from the default theme's Editor.css.

    Note: Admin tools do not have a section theme, and will always load the default theme's Editor.css file.

    The HtmlTextBox control in many skins supplies a CssClass property. Though supported by the new editor, this CssClass will generally not do anything and can't be used to control the default formatting of text entered into the editor. The property is supported for backwards compatibility with CSK 1.0 themes only.

    Properties of the new HtmlTextBox control:

    With the exceptions noted below, the CSK's HtmlTextBox control will support all of the same properties of the original CSK's editor, plus the new properties supported by the FreeTextBox control. The FreeTextBox's documentation is included in this distribution for reference, but be aware that in the CSK, the FreeTextBox has been renamed to HtmlTextBox (for compatibility with the CSK's original Editor code) and the namespaces also differ.

    • Image Gallery, General Info : The image gallery is not, by default, specific to any one community. It is a shared folder under /Communities/Common/Images/HtmlTextBoxUserImages/. Any images in this location will automatically be visible in the Image Gallery (sub-folders are supported) for all communities. If you wish to allow users to upload new images to the gallery, you will have to grant the ASP.NET Machine account write access to this folder through windows explorer. Otherwise the Image Gallery will only allow users to select existing images. All communities will share this same folder unless you specify a new path via the ImageGalleryPath property.
       
    • The ImageGalleryPath property : You can specify this property (in each skin file where the HtmlTextBox control is declared). This property controls which folder the editor will use for the image gallery. You can set this property (use relative URLs) to specify a new folder for the Editor to use. The code was modified so that the CSK will automatically map the relative path to your CSK's root path. Using this property, you can manually separate different communities to use different image gallery folders.
       
      Example:
      <community:HtmlTextBox ImageGalleryPath= "Communities/Community1/Images/HtmlTextBoxUserImages">
         
    • ToolbarLayout and AutoConfigure: By default, the HtmlTextBox will use a customized toolbar layout that enabled most of the features of the FreeTextBox editor (plus the new CSK specific features for Emote Icon and Paste Code Block). You can override the default toolbar layout by using the AutoConfigure property (set to "EnableAll", "Minimal", "Default", or "Alternate"). Specifying this setting will override the standard toolbar layout. You can also supply a custom list of items to define the toolbar via the ToolbarLayout property. The CSK's version of the toolbar supports all of the standard FreeTextBox toolbar items, plus the new "EmoteiconPicker" and "InsertCodeBlock" options.
       
      Refer to the FreeTextBox documentation for more info on these properties.
       
    • HelperFilesPath: By default, the helper files (the aspx files that control the image gallery, color picker, and other pop-up windows) is set to /Engine/Framework/HtmlTextBox/ If you specify your own value for this property, the modified code will automatically map the path to the CSK's root. Use a relative path without leading "/" character.
       
    • Columns and Rows properties: The CSK's original editor supported these properties for controlling how large the textbox will appear in downlevel browsers. In the new editor these properties are remapped to the FreeTextBox's DownlevelRows and DownlevelColumns properties. Either set of properties can be used.
       
    • DownlevelMode: The FreeTextBox property called DownlevelMode has been disabled. There was a major bug in the FreeTextBox's "Basic Editor" that caused it to break under some versions of Netscape and Mozilla (probably others as well). In this release, this property has been hard coded to TextArea only to ensure downlevel compatibility.
       
    • ButtonPath: This property was modified so that the default button path is: /Communities/Common/Images/HtmlTextBoxEditorImages/. If you specify a new value for this property, the CSK will automatically map the supplied relative URL to the CSK's root. All of the standard FreeTextBox button styles are included in this location.
       
    • Height and Width properties: These are still supported, and the CSK supplies this value for most skins. However, you may find better appearance if you simply omit these properties from your skins and let the control size itself. By default it will attempt to size to 100% width and 400px height.
       
    • Text property: The FreeTextBox's text property has been renamed to TextOld in this mod. Due to significant differences in the standard FreeTextBox output vs. the CSK's normal text output, it was necessary to change how the control outputs text. The new behavior causes the Text property to mimic the FreeTextBox's standard RawText property. This allows the CSK to continue using the same format for storing Editor created text and preserves the standard CSK text transformation functionality.
       
    • ForceDownLevel property: This is a new property added to the control that causes the FreeTextBox to render in downlevel mode even on IE browsers when a section has its HTML Editor setting set to "none".

    Known bugs


    Back to Documentation Index