Classified Ads for Frontier 5

In late 1996 I put together a classified ads server for Frontier, it's been running on one of our Mac servers ever since, very reliably, without much attention from us.

Since it's a fairly big application that relies on lots of Frontier's website framework, I wanted it to be one of the first things to be ported to Windows and Frontier 5 compatibility.

I'm running a test ClassAds server on our NT 4.0 Workstation machine. Please go play with it.


When you're ready, you can install a ClassAds server on your system.

How to set up

  1. After loading the fat page into your object database, open classAds.init and click on Run. It creates and initializes two objects, a table of CGI scripts, and user.classAds.

  2. Open user.classAds.prefs.

  3. user.classAds.prefs.archivesFolder -- this is the place where Frontier will archive ads that have expired. It defaults to a sub-folder of the Frontier folder.

  4. user.classAds.prefs.categories -- is an outline containing the categories for your site. Open the outline and add or delete categories. You can choose to add or delete categories later.

  5. user.classAds.prefs.cgiServerAddress -- is the IP address of the machine that's running the CGI scripts. It includes the port following the colon. If you are running Frontier on a different port than 80, you should change this accordingly. I do not recommend changing the IP address, unless you really know what you're doing. I think it pretty much has to be the machine you're managing the website on.

  6. user.classAds.prefs.copyright -- this is the text of a copyright notice that appears on each page.

  7. user.classAds.prefs.hoursTillArchive -- is the number of hours that a message stays on the site before being archived.

  8. user.classAds.prefs.serialNum -- is the number of the next ad to be added to the system.

  9. user.classAds.prefs.webmaster -- is the email address of the person responsible for the site. This mail address appears at the bottom of each page in the site.

  10. user.classAds.prefs.websiteFolder -- is the local file path to the folder that contains the pages of the Class Ads site. It should be somewhere in the folder hierarchy that your web server delivers to clients.

  11. user.classAds.prefs.websiteUrl -- is the URL for the websiteFolder.

  12. After reviewing and possibly changing all the prefs, as described above, open user.classAds.website. Here's a question -- does your server use default or index or something else as the default page on your website? If it's something other than default, put the cursor on classAds.website.default, change its name to index or whatever.

    To change the name of something in the object database, select the text, and type in the new value. To have the change take effect, click on another object name.

  13. Does your server use .html as the extension for static web pages? If not, open user.classAds.website, open the #prefs table, and edit the value of #fileExtension to be the extension that your server requires.

  14. Now you're ready to build the website. Quit and relaunch Frontier. Choose ClassAds from the Suites sub-menu of the Main menu in Frontier. A new menu appears in your menu bar called ClassAds. Choose Build Website from this menu. When it's finished, a dialog appears. Click on OK.

General note

Every time you want to work on your ClassAds site, be sure to choose the ClassAds command from the Suites sub-menu of Frontier's main menu. It has the commands in it that you'll need to make things flow more smoothly.

Testing your server

The first test is to add an ad to your server, to make sure this most important function works.

In your web browser, enter the URL that's in user.classAds.prefs.websiteUrl.

Click on the New Ad link at the top of the page. A form displays. Enter the items and then click on Preview Ad.

Follow the instructions on that page. When you're ready to post the ad, click on the Submit button.

If everything is configured correctly, after submitting the form, your browser should be redirected to the page containing your new ad.

Refining things

You can edit all the templates for the text produced by the ClassAds software.

To do so, you have to be familiar with HTML and with Frontier's built-in outliner.

Choose the commands in the Templates sub-menu of the ClassAds menu, to open the various templates.

You can also customize the appearance of each of the web pages on the site. For more information on that, see the web tutorial on the Frontier 5 site.

Starting over

If you want to start with a fresh ClassAds site, choose the Start Over command from the ClassAds menu. It deletes and re-initializes the user.classAds table. It is truly a radical step. Before choosing this command you may want to back up Frontier.root, using the Backup command in the Main menu.

Dave Winer

This is a fat web page containing suites.classAds. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 2/24/98; 10:05:01 AM and it was last built on 9/11/98; 9:23:34 AM. Webmaster: dave@userland.com.