From owner-freebsd-www Fri Jan 17 05:53:16 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id FAA00294 for www-outgoing; Fri, 17 Jan 1997 05:53:16 -0800 (PST) Received: from hemi.com (hemi.com [204.132.158.10]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id FAA00289 for ; Fri, 17 Jan 1997 05:53:14 -0800 (PST) Received: (from mbarkah@localhost) by hemi.com (8.8.4/8.7.3) id GAA16031; Fri, 17 Jan 1997 06:21:56 -0700 (MST) From: Ade Barkah Message-Id: <199701171321.GAA16031@hemi.com> Subject: Test CGI interface... (was: Re: cvs commit: www/data comm...) To: jkh@time.cdrom.com (Jordan K. Hubbard) Date: Fri, 17 Jan 1997 06:21:55 -0700 (MST) Cc: freebsd-www@freebsd.org In-Reply-To: <22777.853231108@time.cdrom.com> from "Jordan K. Hubbard" at "Jan 14, 97 00:38:28 am" X-Mailer: ELM [version 2.4ME+ PL22 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-www@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > 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 - -------------------------------------------------------------------