Developing an Active ChannelDeveloping an Active Channel*
*Contents  *Index  *Topic Contents

*Previous Topic: Active Channel Features
*Next Topic: Optimizing Active Channels over HTTP

Developing an Active Channel

To create an Active Channel on an existing Web site, simply create a CDF file by following these steps:

  1. Design the channel.
  2. Create the logo images.
  3. Create the CDF file.
  4. Post the CDF file.
  5. Offer the new channel to users.

Design the Active Channel

When creating a CDF file, the first step is to determine the structure of the channel. The channel can be designed to represent the structure of an existing Web site, or it can be a subset of a Web site's content with a completely different hierarchy. The structure of the channel is created in the CDF file with the use of the CHANNEL and ITEM elements to represent the subchannel hierarchy and HTML items (content). To prevent users from being overwhelmed with information and images, as well as to provide a uniform "look and feel" among channels, keep the following guidelines in mind:

Create the Logo Images

There are several places in the user interface where images associated with an Active Channel are displayed:

When creating a channel, Web publishers should provide appropriate images for each of these categories, although Microsoft will provide default images wherever necessary. The top-level CHANNEL element should include three LOGO child elements, one for each type of STYLE attribute, as follows:

<CHANNEL HREF="http://www.mysample.com/mainchannel.htm">
    <LOGO HREF="http://www.mysample.com/widelogo.gif" STYLE="IMAGE-WIDE"/>
	    <!-- For Channels Explorer Bar -->
    <LOGO HREF="http://www.mysample.com/logo.gif" STYLE="IMAGE"/>
	    <!-- For desktop Channel Bar -->
    <LOGO HREF="http://www.mysample.com/icon.gif" STYLE="ICON"/>
	    <!-- For category folder -->
    <subitems omitted>
    .
    .
    .
</CHANNEL>

The STYLE="ICON" attribute is included in case the user places an Active Channel in a category folder. When this occurs, the channel will appear in the list of available channels in the Channels Explorer Bar when that channel folder group is selected. All other CHANNEL and ITEM elements in the CDF file should include only one LOGO child element with the STYLE="ICON" attribute. When creating your image files, be sure to make the background color transparent, if applicable. It's also recommended that your image be fairly simple so that it's easy to recognize at the 16H x 16W size. Additional information about image specifications is available in the Guidelines for Active Channel Images.

Create the CDF file

When the channel structure has been designed and the logos have been created, the CDF file can be written. The CDF file must include at least one CHANNEL element and should include the SCHEDULE and LOGO elements. The ITEM element must be used to include any Web pages as part of the channel's content. As the content contained in the channel is added, removed, or modified over time, Web publishers should update the CDF file to reflect the changes. For information about using a channel creation tool, see Microsoft CDF Generator.

The CHANNEL element is used to define the top-level channel itself, along with any subitems nested within that channel. Thus, the occurrence of the <CHANNEL> and </CHANNEL> tags defines the hierarchy of the channel. The LOGO element is used to specify an image file that is displayed in the desktop Channel Bar.

Post the CDF file

After creating the CDF file, it should be posted on the Web site it describes. Typically, the file would be placed in a public folder on the Web site's HTTP server.

Offer the New Channel to Users

Finally, Web publishers need to provide a method for users to install their Active Channel (or Active Desktop item). Users will be able to add channels from three primary sources:

Although a simple HREF in an anchor (<A>) element pointing to a CDF file will initiate the channel subscription process, your page should include the Add Active Channel or Add to Active Desktop logo button for consistency and maximum usability. These buttons should have scripts associated with them that, when clicked, perform the proper behavior in any browser. When using the scripts in the following example, clicking the button with Microsoft® Internet Explorer 4.0 displays the Add Channel dialog box by linking to the CDF file. If users without Internet Explorer 4.0 click the button, they will be directed to download the new version.

Note To use the Microsoft Add Active Channel button logo image or the Add to Active Desktop button logo image, you must sign up and accept the terms of the Active Channel Logo Agreement at http://www.microsoft.com/sbnmember/ielogo/default.asp.

Follow these steps to add the logos and scripts to your HTML page.

Step 1. Place these logo image buttons on your Web server.

Add Active Channel

Use this image to allow users to install your Active Channel.

Add to Active Desktop

Use this image to allow users to add your item to their Active Desktop.

Web publishers are encouraged to use these official Internet Explorer button logo images to provide users with a more visible, consistent, and easily recognizable method for adding Active Channels and Active Desktop items.

Step 2. Using Notepad or your favorite HTML editor, open the HTML page that will contain these logos.

Step 3. Copy and paste the following script between the <HEAD> and </HEAD> tags in the HTML page you are editing:

<!-- Begin Put this script into the head of the page -->
<script language="JavaScript">
    function isMsie4orGreater() { 
    var ua = window.navigator.userAgent;   var msie = ua.indexOf ( "MSIE " );
    if  (msie > 0)
        {return (parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) ) >=4) && 
        (ua.indexOf("MSIE 4.0b") <0) ;}
    else {return false;}}
</script>
<!-- End   Put this script into the head of the page -->

Step 4. For each individual Add logo included on the HTML page, copy and paste the following lines of HTML:

<a name="uniqueName" 
href="http://www.microsoft.com/ie/ie40/download/?/ie/ie40/download/redirect.htm"> 
<img src="urlOfLogoImage" border=0 width=136 height=20></a>
<script language="JavaScript">
    if ( isMsie4orGreater()) { uniqueName.href ="urlToCDF"; }
</script>

Edit the above script by making the following changes:

Tip Web publishers might also want to use Dynamic HTML to conditionally display or hide content based on whether the user has a subscription to their Active Channel.

The channel guide

Web publishers can include their Active Channels in the Internet Explorer 4.0 channel guide. This acts as a primary resource for users to find channels that match their interests. The channel guide provides users with several channel listings that are separated into the following categories:

Microsoft Active Channel partners will be listed in the guide with a 32H x 80W GIF logo image. All other channels will be listed in the guide with the channel's title only. When a user places the mouse pointer over the publisher's logo or title, a ToolTip appears with the channel's description. When the user clicks the channel title or logo in the channel guide, a "Preview Page" is displayed. This page is a 365H x 460W-pixel HTML page located on the publisher's server that acts as an advertisement for all of the publisher's Webcasting offerings. The use of Dynamic HTML is strongly encouraged on this page to make the experience more interactive and engaging for the user. Similar to the "Webcasting Offerings Page" described above, the Preview Page should contain the official button and script for each Active Channel or Active Desktop item offered by the Web publisher. The logo image (where applicable), channel description, and Preview Page URL must be provided to Microsoft by the publisher to be placed in the Internet Explorer channel guide. For more information about placing your channel in the Internet Explorer 4.0 channel guide, see the Microsoft SiteBuilder Network Web site at http://www.microsoft.com/sitebuilder, or look in the channel guide itself.

CDF Sample and Explanation

The following sample CDF file shows the syntax used in the CDF, with detailed explanations in the next section. This sample is included in the \samples\channel directory, which is installed in the c:\inetsdk directory by default. To subscribe to the sample channel, follow the instructions provided in the Readme.txt file located in that directory. To subscribe to a channel on a Web page, simply click one of the channel logos in the desktop Channel Bar, or click on the Channel Guide to find a list of additional channels. To subscribe to the Internet Client SDK channel, use Internet Explorer 4.0 to navigate to http://www.microsoft.com/msdn/sdk/inetsdk/help/default.htm, and click the Add Active Channel button. Following is the sample CDF file included in the SDK.

<?XML version="1.0"?>
<CHANNEL HREF="http://www.mysite.com/Channel/homepage.htm"
     BASE="http://www.mysite.com/Channel/">
    <TITLE>Sample "Color" Channel</TITLE>
    <ABSTRACT>The sample color channel contains a red, green, and blue page for viewing.</ABSTRACT>
    <LOGO HREF="logo_big.gif" STYLE="IMAGE-WIDE"/>
    <LOGO HREF="logo_med.gif" STYLE="IMAGE"/>
    <SCHEDULE STARTDATE="1997-09-23">
        <INTERVALTIME DAY="1" />
        <EARLIESTTIME HOUR="2" />
        <LATESTTIME HOUR="6" />
    </SCHEDULE>
       <ITEM HREF="page1.htm">
        <LOGO HREF="red.gif" STYLE="ICON"/>
        <TITLE>The Red Page</TITLE>
        <ABSTRACT>This is the abstract description for the red page.</ABSTRACT>
    </ITEM>
    <ITEM HREF="page2.htm">
        <LOGO HREF="green.gif" STYLE="ICON"/>
         <TITLE>The Green Page</TITLE>
        <ABSTRACT>This is the abstract description for the green page.</ABSTRACT>
       </ITEM>
    <ITEM HREF="page3.htm">
        <LOGO HREF="blue.gif" STYLE="ICON"/>
        <TITLE>The Blue Page</TITLE>
        <ABSTRACT>This is the abstract description for the blue page.</ABSTRACT>
    </ITEM>
    <ITEM HREF="scrnsave.htm">
        <USAGE VALUE="ScreenSaver"></USAGE>
    </ITEM>
</CHANNEL>

The following section lists portions of the CDF example file and then describes the function of the elements and their associated attributes. Where possible, the effect on the user is also indicated.

<CHANNEL HREF="http://www.mysite.com/Channel/homepage.htm"
     BASE="http://www.mysite.com/Channel/">

In this case, the CHANNEL element defines the top-level channel of the hierarchy. Every element that follows until the matching </CHANNEL> element is subordinate to this channel. The HREF attribute defines the Web page to be displayed in the browser when the channel is selected either in the desktop Channel Bar or in the Channels Explorer Bar. The BASE attribute defines the URL of the location where the channel's resources exist. This allows Web publishers to specify other URLs in the CDF file using relative paths.

<TITLE>Sample "Color" Channel</TITLE>
<ABSTRACT>The sample color channel contains a red, green, and blue page for viewing.</ABSTRACT>

The TITLE element defines the text that is associated with this channel in the browser's channel pane. The ABSTRACT element defines a text string that is displayed in a ToolTip when the cursor is placed over the channel.

<LOGO HREF="logo_big.gif" STYLE="IMAGE-WIDE"/>
<LOGO HREF="logo_med.gif" STYLE="IMAGE"/>

The LOGO element marked with the "IMAGE-WIDE" style attribute is displayed in the Channels Explorer Bar, while the "IMAGE" style is shown in the desktop Channel Bar. Clicking this image results in opening the URL specified in the top-level CHANNEL element, or the channel hierarchy is shown, if applicable.

<SCHEDULE STARTDATE="1997-09-23" STOPDATE="1997-11-23">
    <INTERVALTIME DAY="1" />
    <EARLIESTTIME HOUR="2" />
    <LATESTTIME HOUR="6" />
</SCHEDULE>

The SCHEDULE element indicates how often, and during what time range, the channel should be updated. This is designed to help Web sites manage their server traffic. The preceding example is set to update the channel every day between 2 A.M. and 6 A.M. This schedule information is set to expire on November 23, 1997.

<ITEM HREF="page1.htm">
    <LOGO HREF="red.gif" STYLE="ICON"/>
    <TITLE>The Red Page</TITLE>
    <ABSTRACT>This is the abstract description for the red page.</ABSTRACT>
</ITEM>

The ITEM element defines a Web page as a subitem in the sample CDF channel. This item will be displayed in the channel's hierarchy exposed in the Channels Explorer Bar, along with the "ICON" image specified in the LOGO element.

<ITEM HREF="scrnsave.htm">
    <USAGE VALUE="ScreenSaver"></USAGE>
</ITEM>

This occurrence of the ITEM element (along with USAGE) defines the URL of an HTML page to be displayed in the Channel Screen Saver page. The ITEM and USAGE elements can also be used to define an HTML page as an Active Desktop item. These items can contain any valid HTML elements, such as images, ActiveX™ Controls, Java applets, and so on, and can be placed directly on the desktop with Internet Explorer 4.0. For more information on Active Desktop items, review the documentation for Creating Items for the Active Desktop.

</Channel>

This end tag indicates that the definition of the sample CDF channel is complete.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.