So You Want An Active Channel, Huh?

By Joe Burns

...use these to jump around or read it all

[Active Channel? Hah?] [OK - I Clicked]
[The Active Channel Format] [What's that CDF Thing?]
[XML? Hah?] [Do It Yourself CDF] [Other Commands]

     So, have you seen these things floating around lately:

You have to have IE4.0 for this to work

     They're pretty popular little pups with the Internet "in" crowd. In fact, requests to put together a tutorial on the subject of Active Channels have been filling the Goodies mailbox. So here we go. This is a basic instructional look at what an Active Channel is and how you can get one on your site.


Active Channel? Hah?

     You're to read that line above with a bit of an Archie Bunker voice. If you don't know who Archie Bunker is then boy do I feel old.
     An Active Channel is another idea from the laboratories of Microsoft. As such, you require the use of the Microsoft Explorer browser, version 4.0 or better, in order to get in on all the actively channeled fun.
     Think of it this way, the people that come to your site have the ability to set up a pathway in which you can "push" them information other than what is on the page. In activating this pathway, or channel, the user allows you a bit more leeway in bombarding them with information. You can push, or "pull" depending on what side of the argument you wish to be on, the user just about anything, a monthly newsletter, new site info, or a listing of new tutorials.
     What's more, the user who clicked to create an active channel with you now has an additional "bookmark" to your site. In fact, that's how people started referring to these little gems in the first emails. Users wanted to know how to create the fancy bookmark. So, if you haven't already clicked on a page in order to set up a channel, go ahead and click on the Active Channel logo above. You'll get a box that looks a lot like this:

Me John - Big Tree!

     For now, just choose to add the site to your channel bar as I have it earmarked in the above image. Go ahead. You can always delete it later.


OK - I Clicked

     Woohoo!! You clicked and fell right into my evil plan. I now own you and all that is yours! Ha ha ha ha ha ha! *sniff* We now return you back to your regularly scheduled reality already in progress...

     Now you have an active channel set up with my site. To see the fruits of your labor, look at the very top of your browser window. There should be a button there marked "Channels". There's a little satellite receiver image right near it. Go ahead and click on that. The screen should split and you should see a little HTML Goodies logo next to the same little satellite dish image. If there's no image, you may need to run your mouse over the text. Then you'll get the image.


The Active Channel Format

     Now that you have a channel that links you right to my page, let me show you how to get one on your page so others can begin channeling through you. Hopefully someone will begin channeling Elvis soon. (Uh, thank you very much)

Here's the format:

<A HREF="goodies.cdf"><IMG SRC="add_chan.gif"></A>

     Notice it's little more than a basic HREF link command. The only real difference is that this link is headed toward a file with a CDF extension. See that above? The image I am using as the link is called add_chan.gif. But you don't need an image for it to work. You can put in straight text if you want. That little image is just how I usually see these things denoted on other web pages, so I'm using it here.


What's that CDF Thing?

     If you people would stop asking questions I could wrap these tutorials up much faster.
     CDF stands for Channel Definition Format. It's a text file that denotes what you have available on your site. And it's what sets up your Active Channel. Here's what my CDF file, named goodies.cdf, looks like:


<?XML VERSION="1.0" ENCODING="UTF-8"?>

<CHANNEL HREF="index.html" BASE="index.html">

<TITLE>HTML Goodies</TITLE>

<ABSTRACT>HTML/DHTML Tutorials and Java Script</ABSTRACT>

<LOGO HREF="goodieschannel.gif" STYLE="IMAGE"/>

</CHANNEL>


      The CDF above, and all CDF files for that matter are simple text. Just the same as any HTML document you've ever made. It's just text. That text is then saved to a file and the file is given the extension .cdf. Again, think of it as creating an HTML file, except you use the extension .cdf instead of .html.

     Now, it may look like I've got a basic HTML file here with a few mistakes. Not so. You see, the CDF file is not written in HTML per se, but rather a cousin of HTML called XML, Extensible Mark-up Language. OK, now's when this thing starts to get a little goofy and people start to drop out saying "Ah, the heck with it."


XML? Hah?

     Archie Bunker again. XML is a format of mark-up language that is not "fixed" into a format like HTML. It is actually not a language at all, it is a meta-language that allows you to create your own set of commands and instructions, you programmer you. It is designed to allow you to be able to write SGML (Standard Generalized Mark-up Language), the "mother-tongue" of all mark-up languages. But it looks better in the brochure.
     Be not afraid, the commands you will use for your CDF files will resemble HTML closely enough that you'll be able to create just what you need.
     If you'd like to delve deeper into XML and see how it's put together, try my XML tutorials.
     But if reading high-end computer language specs isn't your bag, let's just move forward to how to make your own CDF file.


Do It Yourself CDF

     Let's make a file the old fashion way - steal it from Joe.
     Go ahead and copy the little CDF file from above and paste it into a text editor like Notepad or SimpleText, or WordPad, or whatever you use to edit your HTML documents.

Please Note:
     This CDF is about as basic as you can get. It does one thing - it sets up a channel. There are many more things you can do, and I'll get to them, but to get off the ground, we'll start with this.

     You can pretty much see where to change out the text to suit your needs, but just so you know what your doing, here's the CDF again, and what each part means:


  • <?XML VERSION="1.0" ENCODING="UTF-8"?>
         This is the XML declaration statement. It tells the browser that the following document is in XML format version 1.0. The question marks at the beginning and end are a nice touch don't you think? The encoding statement tells the browser what format is being used to build this format.

  • <CHANNEL HREF= "index.html" BASE="index.html">
         This is the encompassing CHANNEL statement. Everything that sits within the start and end CHANNEL commands will denote the channel's traits. The HREF and BASE commands denote the page and base (Like a BASE HREF command)of each of the file names that follow. The reason these are the same is because my channel is on the main page, which is also the base address. Make your BASE the main URL of your site.

  • <TITLE>HTML Goodies</TITLE>
         This is the title that appears in the channel. (Remember when you clicked on the channels icon at the top? That's where this pops up.)

  • <ABSTRACT>HTML/DHTML Tutorials and Java Script</ABSTRACT>
         Ditto.

  • <LOGO HREF= "goodieschannel.gif" STYLE="IMAGE"/>
         This is the icon that appears in the channel list. The format is XML. Follow it - remember that this is not HTML. The image cannot be animated and cannot be any larger than 30X80. If it is, it'll just get scrunched down to size. Here's the one I used in this CDF:

    Hey!  Back off, pal!

  • </CHANNEL>
         This wraps up the channel section and this particular CDF.


Other Commands

     There are a slew of other commands that you can incorporate when you create your Active Channel. Here are a few to get you off the ground in the order of most useful, in my mind anyway.
  • <ITEM>
         This denotes an item that you can "push" to the user, like an html file. It goes inside the CHANNEL commands. For example:

    <CHANNEL>
    <ITEM HREF="http://www.page.com/newsletter.html" PRECACHE="yes">
    <CHANNEL>

         What would happen here is that an HTML page titled newsletter.html will be pushed to the user. Notice the PRECACHE="yes" command also. That little addition to the ITEM command makes the browser go and get the item and stick it in the cache so that when you click on the channel to read newsletter.html, it pops up straight away because it was pre-cached.


  • <USAGE VALUE="--" />
         This too goes inside the CHANNEL command. It denotes how the browser is to use the thing denoted in the <ITEM> command. The available values include Desktop component, channel, and screen saver. You can guess by the names where they will show up on your computer. Example:

    <CHANNEL>
    <ITEM HREF="http://www.page.com/newsletter.html" PRECACHE="yes">
    <USAGE VALUE="channel" />
    <CHANNEL>

         This HTML document will appear in the channel.


  • <LOGIN>
         This allows you to set a login and password for people who want to get your information through a channel. In this case the password is "goodies" and the login is "joe".

    <CHANNEL>
    <ITEM HREF="newsletter.html" PRECACHE="yes">
    <LOGIN METHOD="BASIC" PASS="goodies" USER="joe" />
    <USAGE VALUE="channel" />
    <CHANNEL>


  • <SCHEDULE>
         This denotes the schedule for the active channel content. So if you are pushing information that has an end date, you can use the command to have the channel end on its own rather than having to go in and change out the information yourself. Example:

    <CHANNEL>
    <ITEM HREF="newsletter.html" PRECACHE="yes">

    <SCHEDULE STARTDATE="1998.02.28" ENDDATE="1999.09.31">
         <INTERVALTIME DAY="5"/>
         <EARLIESTTIME HOUR="5" />
         <LATESTTIME HOUR="12" />
    </SCHEDULE>

    <LOGIN METHOD="BASIC" PASS="goodies" USER="joe" />
    <USAGE VALUE="channel" />
    <CHANNEL>

    • INTERVALTIME denotes update frequency. You can use DAY, HOUR, or MIN.
    • EARLIESTTIME denotes the earliest time during the schedule when an update can occur. You can use DAY, HOUR, or MIN to set parameters.
    • LATESTTIME denotes the latest time during the interval that an update can occur. You can use DAY, HOUR, or MIN.


  • <LOG>
         This commands denotes that something is to be recorded in a client log. The only currently supported item is document:view.
         The subcommand is <LOGTARGET>. It denotes what makes up the log and where the log will be sent. The best use for this is a log of user activity.

    <CHANNEL>

    <LOG>
    <LOGTARGET HREF="http:/www.page.com/activitylog" METHOD="POST" SCOPE="ONLINE">
         <HTTP-EQIV NAME="encoding-type" VALUE="zip" />
         <PURGETIME DAY="2" HOUR="12" />
    </LOGTARGET>>
    </LOG>

    <ITEM HREF="newsletter.html" PRECACHE="yes">
    <SCHEDULE STARTDATE="1998.02.28" ENDDATE="1999.09.31">
         <INTERVALTIME DAY="5" />
         <EARLIESTTIME HOUR="5" />
         <LATESTTIME HOUR="12" />
    </SCHEDULE>
    <LOGIN METHOD="BASIC" PASS="goodies" USER="joe" />
    <USAGE VALUE="channel" />
    <CHANNEL>

    The commands:

         <HTTP-EQIV NAME="encoding-type" VALUE="zip" />
         <PURGETIME DAY="2" HOUR="12" />

         Denote that the item that is placed within the directory http:/www.page.com/activitylog will be made into a zip file and will be replaced by a new log, or purged, every two days at noon.


That's That

     That's about all you'll need to put together your own active channel. All those fancy commands aside, the bulk of your work will be done by the short CDF format I showed way up at the top. Add an ITEM to distribute, and you'll be pretty much good to go. The rest of the commands do a good deal of fine tuning, but are not overly needed to create a solid channel for your viewers.

 

Enjoy!

 

[Active Channel? Hah?] [OK - I Clicked]
[The Active Channel Format] [What's that CDF Thing?]
[XML? Hah?] [Do It Yourself CDF] [Other Commands]


Make a Comment

Loading Comments...

  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
  •  
  •