Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jan 1997 06:21:55 -0700 (MST)
From:      Ade Barkah <mbarkah@hemi.com>
To:        jkh@time.cdrom.com (Jordan K. Hubbard)
Cc:        freebsd-www@freebsd.org
Subject:   Test CGI interface... (was: Re: cvs commit: www/data comm...)
Message-ID:  <199701171321.GAA16031@hemi.com>
In-Reply-To: <22777.853231108@time.cdrom.com> from "Jordan K. Hubbard" at "Jan 14, 97 00:38:28 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> >    http://freebsd.hemi.com/commercial
> 
> The link at "let us know" points to mailto.html, which doesn't really
> provide the expected "fill in your information" screen so much as it
> does general information. ...

Sorry for the late late response, but see below. =-)

I've changed my copy to just a mailto:www@freebsd.org for now,
since as John pointed out the gallery.cgi doesn't really do what
we'd want for these commercial entries.

> In http://freebsd.hemi.com/commercial/misc.html, you reference the
> now-departed coffee mugs and tee-shirts.  Walnut Creek doesn't
> do those anymore. :(

Ack! Just when I wanted to buy a mug. =-( I've put a more generic
entry instead.

> Otherwise, it looks just fine!  I assume that sub-sectioning the
> gallery page is a project for later? ;-)

Sure, just tempt me. =-)

Please review http://freebsd.hemi.com/gallery.html.

I've:

1) Set up a database locally (Postgres 95 v6.00 beta), and moved
   the gallery entries into the database. I've thought about having
   them in a simple hash, but I think a full database will be useful 
   (for instance, the commercial entries can just be added as another 
   table.) 

2) Written a CGI script (Martin, you want it ?) to access the Postgres
   backend and produce an HTML file with FreeBSD's "look and feel". It
   tells the backend to spit out entries matching a specific category 
   (Commercial, Non-Profit, and Personal), sorted by name. Pretty small.

3) Modified gallery.sgml to access the CGI script.

Notes:

a. I chose Postgres, but mSQL is likely sufficient. Regardless, this 
   means that freefall (or most likely spatter) will need a database 
   system installed if one isn't there already if we go this way. I 
   used Edmund Mergl's pg95perl5 API to access the backend from Perl.

b. Not wanting to manually type 200+ gallery entries into the database, 
   I have a Perl script do it for me, but unfortunately my regexp
   only catched maybe 95% of the entries. I'll add the rest manually 
   or something.

Some other things...

The sorting order doesn't fold case, so "AZ" is lower than "ab". Also
doesn't handle names starting with "The" properly.

The table looks as follows:

create table gallery (
   organization varchar,
   description varchar,
   url varchar,
   category varchar,
   contact_email varchar,
   date date 
);

Hopefully with the date field, the CGI can automatically mark "New"
entries with the cute .gif file (currently not implemented.) None
of the "contact email" addresses are filled in for now.

Mmm, what else. Oh, yeah, the source is in ~mbarkah/cgi on freefall.
It needs Lincoln Stein's CGI.pm to run.  

I'd appreciate any comments as always.

Cya,

-Ade 
-------------------------------------------------------------------
Inet: mbarkah@hemi.com - HEMISPHERE ONLINE - <http://www.hemi.com/>;
-------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701171321.GAA16031>