Introducing HyperNews

by David Alan Black

For all the excitement over the Web—some justified, some exaggerated—a case could still be made for pinning the medal on Usenet as the most important and really original Internet contribution to communication. Fortunately, we have never had to choose between them—and now, with the availability of Daniel LaLiberte's HyperNews package, we can have the best of the functionality of both in one place.

A HyperNews “base article” is a WWW page, with a newsgroup-like segment at the end (see Figure 1--in fact, look at it more than once as you read). The HyperNews segment is organized by thread, with cascaded response subject lines. The responses, moreover, may be entered as plain text, “smart text” (does some formatting for you), a URL, or HTML. Thus the body of any response can incorporate another web page, operate as a mini-web page of its own, or simply consist of a Usenet-like typed statement.

When you visit a HyperNews article and view a response, you can (depending on local access settings) add your own response to it, start a new thread, or navigate among the threads and responses in various ways. Any response you add can—in fact, must—be previewed before it is finally posted, so you have a chance to see what your response will look like and, if you included hyperlinks, whether you got them right.

Retrieving a HyperNews base article is just like retrieving any other web page. Initial access generally goes through the “get” script, so a typical URL looks like union.ncsa.uiuc.edu/HyperNews/get/hypernews.html.

This sample URL actually points to the HyperNews home page, which is not only indispensable if you are interested in running the package, but also provides a pretty spectacular example of HyperNews in action. As you will see if you visit, it is possible to have any number of base articles at a given site—after all, they are web pages. This home page also offers a glimpse of the range of roles that a HyperNews extension can play in the life of a web page. The response section can shoulder most of the substance of the page (as in the “Bugs” article, where much of the information sought is likely to reside in the response section); or function as a relatively low-key guestbook-style scratchpad; or anything in between.

Anatomy of a Base Article

What you see when you visit a HyperNews article is basically a web page with a response outline—possibly a very long one—at the bottom. Behind the scenes, the HyperNews base article is a virtual home page, constructed on demand by the suite of Perl scripts which make up the HyperNews distribution. It consists of the following four sections, each of which is configurable in various ways, shown in Figure 2.

The separation of the base article into these several logical components gives you quite a bit of control over its look and feel. Each base article has an associated .html.urc file in which header, footer, and body URLs are specified. This makes for relatively easy maintenance and testing—perhaps no easier than any other non-trivial web installation, but it's nice that the pieces are separate and that the scripts do the bulk of the work in making sense of them.

The body, in most cases, contains whatever the page is really “about”. There's no point giving examples here—it's a web page, with everything that implies. During the process of creating a base article, you can enter the body by hand in HTML, plain text, or “smart text”; or you can specify a URL. If you enter text or HTML, HyperNews creates a name-body.html file for you, which you can later edit. If you specify a single URL for the body, your base article will consist of a retrieval of that URL, positioned among the other elements of the HyperNews page as sketched out in Figure 2.

The header and footer can be specified in the installation-wide configuration file hnrc, and/or separately for one or more base articles in the relevant .html.urc file(s). Installation-wide header and footer specifications in hnrc may consist of text, URL, or HTML. (I'd advise against putting full-blown HTML in the header specification, though—it's unlikely to be necessary, and it doesn't always mesh with the icons it ends up sharing space with.) Per-article header and footer specifications consist of URLs whose sources will be retrieved and placed, respectively, above the body and below the responses. The header and/or footer can also be left empty.

Both header and footer are propagated to the responses; that is, every response to an article (and responses to responses, etc.) includes and displays their base article's header and footer. This means that you should probably keep the size of the header and footer down, and that they should be relevant to every response, or at least unobtrusive (i.e., this is probably not the right place for site-wide greeting messages).

Access and Security

Disclaimer: I know enough to keep my systems as secure as I feel they need to be, but I am not a security guru. If you install HyperNews, you should familiarize yourself with all the available information on security, and make sure that you are satisfied with the robustness of your particular setup.

As a HyperNews administrator, you have control over who gets to do what. The “who” here has three possible values: administrator, member, and anyone. The “what” includes creating new base articles; reading articles and responses; and adding, deleting, and/or moving responses. You can pretty much mix and match restriction among the access levels and the available activities. For instance, you might want to grant unrestricted read access to your article and responses, but limit response-adding to members.

In all likelihood, you won't want anyone other than administrators (that is, you) creating base articles—otherwise you might wake up one morning to find that your machine has become an outpost of the Barry Manilow fan club. When it comes to adding responses, however, you might want to adopt a more open policy. The one thing about completely open response-adding that worries me is that it's possible to sign with someone else's name and e-mail address. That person will get a confirmation notice by e-mail (if that option is configured, which it is by default); but that may be cold comfort if several hundred web surfers have already read an illegitimately attributed posting. Requiring membership, on the other hand, might be a deterrent to posting, at least for the casual visitor, since it involves taking the time to fill out a form.

I'll describe some further aspects of access and security in the following section.

Installation and Setup

The HyperNews distributions is a suite of Perl 5 CGI scripts. I hit a bit of a snag here—I had to recompile Perl to get rid of some weird and disabling behavior having to do with reading configuration files. (It's still a mystery to me why it happened.) Perl 5.001m seems to be the Perl release of choice for running HyperNews.

I've installed HyperNews on two machines, using a pretty by-the-book directory structure. The major step is:

cd /usr/local/lib/httpd/cgi-bin
cp HyperNews1.version.tgz .
tar -xvzf HyperNews1.<version>.tgz

version will be something like 1.9B5.5. This creates the subdirectory HyperNews1.version. The installation instructions recommend moving this directory to HyperNews:

mv HyperNews1.version HyperNews

The HyperNews directory tree must be writeable by your httpd server process during installation (though not thereafter, and in fact it's recommended that you remove write permissions once the package is installed). My server runs as user http, group www, so I did:

chown -R http:www HyperNews

The HyperNews tree is where the scripts and the principal configuration file live. HyperNews documents (base article and response .html files, and the smaller configuration files that go with them) go in a separate subdirectory, generally under /usr/local/lib/httpd/htdocs (or equivalent). Therefore, you will do something like:

cd ../htdoc
mkdir hn
chown http:www hn

The next step in installation is to run the setup script, which you do with your HTML browser:

netscape http://myhost/HyperNews/.scripts/setup-form.pl

You can also run a command-line version of the setup script, but you then have to edit the configuration file manually and run it again. It's handy once you know what you're doing, but not very installer-friendly the first time around.

The setup script asks you a number of questions. I won't cover all of them, but a few things you should be aware of are:

  • Note that the default path is /usr/local/etc rather than /usr/local/lib, so if your setup is like mine, you'll want to change it.

  • Make sure to push the “Rebuild Password and Group Files” button, unless you have some reason to want to create the password files by hand.

  • The name you give for the administrator should be an actual user or valid mail alias.

When you submit the setup form, it creates (backing up if needed) the main configuration file, /usr/local/lib/httpd/HyperNews/hnrc. Once that file is in place, you can change it manually. Some manual changes will take effect immediately; others, specifically those concerning access and membership, are really directives which tell the setup script to create or delete certain access files and symbolic links. For those changes to take effect, you have to run the setup script again; otherwise, your configuration file and actual setup will not accord with each other. (Updating the setup after manually changing hnrc is a good time to run the quicker command-line version, setup.pl.)

If you look at the HyperNews directory after running setup-form.pl, you will see that there are a number of symbolic links to various scripts, as well as two new subdirectories: Admin and SECURED. The basic logic of the directory structure meshes with the levels of access:

  • All scripts are kept in HyperNews/.scripts.

  • Those that can be run by anyone have links in HyperNews.

  • Those that can be run by members have links in SECURED.

  • Those that can only be run by administrators have links in Admin.

If you change the who-gets-to-do-what settings in hnrc and run the commandline setup.pl script, the relevant links will be added or deleted.

The setup process also creates password and other access-related files. These files are the gatekeepers for the different access policies governing the script directories. This per-directory security is handled through the server; for example, .htaccess files for NCSA httpd. (And that brings us full circle to my security disclaimer!)

Customizing and Configuring

There's a fair amount of configuring you can do by tweaking the hnrc and/or the article-specific .html,urc files. More major changes involve modifying (polite word for hacking) the Perl scripts. I've done a bit of this. For instance, on one of the sites where I've installed HyperNews, its main use will be to add response functionality to the photographic portfolio of one of my colleagues. We decided to eliminate the icons, present by default, which indicate the response type—happy, angry, comment, question, etc. These icons can be informative, but they also play a large role in setting the tone of the page, and they won't be appropriate for every HyperNews article. I've also thinned out the article response form, since we're not planning to use membership and wanted to incorporate our own wording for the form's instructions.

As with all package-hacking, my assaults on the HyperNews code will make it harder to upgrade to new versions at that particular site. In fact, if I hadn't needed no-icon-ness right away, I might very well have hung tight and seen whether it gets incorporated into the package down the road. One of the great things about the HyperNews home page (see URL, above) is that many suggestions for change and improvement can be, and are, posted—and Daniel LaLiberte, the author of HyperNews, is extremely receptive and responsive. If you want to keep pace with HyperNews development and releases, you can subscribe to the “history” page at union.ncsa.uiuc.edu/HyperNews/get/history.html.

Hyper-Remarks

If a package like HyperNews could be described thoroughly in an article of this length, it probably wouldn't be worth writing an article about. There are plenty of features and possibilities, and a few problems, that I haven't covered. If HyperNews intrigues you, have a look at its home page, where you can read and post responses to many base articles, including a couple of test and guestbook-style ones. You'll find a lot of support from the community of users, and you may very well also find one or more uses for HyperNews in the context of your own web development.

David Alan Black ([email protected])

Load Disqus comments