
MANIFEST

=======================================================================

PART ONE:  the CGI dir

This directory (the tarball you just unpacked) is intended to be 
your cgi-bin directory.  This is why the first thing you see is 
an .htaccess file for apache httpd.

    -rw-r--r--   1 de       lickstaf       91 Jul 22  1999 .htaccess

I called this directory Tcl2K, and I'll leave it named that way
so that references in the config file and docs won't confuse you
too much.
	
All these cgi scripts are written in CGItcl.  note that you can
test CGItcl scripts without an http server, by sourcing them.
They will spit out on stdout the HTML that they would otherwise
have thrown at the client browser via the httpserver.

    -rwxr-xr-x   1 de       lickstaf     4693 Sep 10 00:19 DoAssign.cgi*
    -rwxr-xr-x   1 de       lickstaf     9557 Jul 14  1999 DoDemos.cgi*
    -rwxr-xr-x   1 de       lickstaf     4420 Sep 30 15:47 DoDownload.cgi*
    -rwxr-xr-x   1 de       lickstaf     2600 Jul 22  1999 DoPC.cgi*
    -rwxr-xr-x   1 de       lickstaf    16561 Jul 22  1999 DoRevform.cgi*
    -rwxr-xr-x   1 de       lickstaf     9831 Jul 30  1999 DoReview.cgi*
    -rwxr-xr-x   1 de       lickstaf    15075 Sep 10 00:06 DoSubmit.cgi*
    -rwxr-xr-x   1 de       lickstaf     9917 Jul 14  1999 DoWips.cgi*
    -rwxr-xr-x   1 de       lickstaf     2498 Jul 19  1999 addemos.cgi*
    -rwxr-xr-x   1 de       lickstaf     1151 Jul 19  1999 admin.cgi*
    -rwxr-xr-x   1 de       lickstaf     2496 Jul 19  1999 adwips.cgi*
    -rwxr-xr-x   1 de       lickstaf     1920 Jul 19  1999 assign.cgi*
    -rwxr-xr-x   1 de       lickstaf     1518 Jul 14  1999 delreview.cgi*
    -rwxr-xr-x   1 de       lickstaf     1444 Jul 14  1999 display.cgi*
    -rwxr-xr-x   1 de       lickstaf     2299 Sep 20 14:07 index.cgi*
    -rwxr-xr-x   1 de       lickstaf     2325 Jul 30  1999 panels.cgi*
    -rwxr-xr-x   1 de       lickstaf     2079 Jul 19  1999 pc.cgi*
    -rwxr-xr-x   1 de       lickstaf     1578 Jul 19  1999 review.cgi*
    -rwxr-xr-x   1 de       lickstaf     2241 Sep 10 16:59 reviewers.cgi*
    -rwxr-xr-x   1 de       lickstaf     2345 Sep 30 22:15 showme.cgi*
    -rwxr-xr-x   1 de       lickstaf     2784 Jul 19  1999 submit.cgi*
    -rwxr-xr-x   1 de       lickstaf      718 Jul 14  1999 table.cgi*
    -rwxr-xr-x   1 de       lickstaf      243 Jul 19  1999 test.cgi*
    -rwxr-xr-x   1 de       lickstaf     4049 Sep 29 12:46 tutorials.cgi*
    -rwxr-xr-x   1 de       lickstaf      508 Jul 16  1999 upload.cgi*

These are executable Tcl scripts.  They start with a line like this

	#!/opt/tcl803/bin/tcl

which you obviously will need to replace with the appropriate path
of a TclX interp AS SEEN BY YOUR HTTPD.   Remember, these scripts
run in the context of the httpd, and of course you are a smart
person and run your httpd as "nobody," right?  Thus the world-rx
protection.

Next come the "libraries" as it were, which are just more tcl.

    -rw-r--r--   1 de       lickstaf    56586 Jul 19  1999 cgi.tcl
    -rw-r--r--   1 de       lickstaf     8308 Sep 20 14:09 common.tcl
    -rwxr-xr-x   1 de       lickstaf    12671 Oct  1 23:53 tclPaperslib.tcl*
    -rw-r--r--   1 de       lickstaf      953 Jul 16  1999 test.tcl

cgi.tcl is the pureTcl CGItcl package.  Just source it.  You can
install it as a Tcl8 package and use "package require" if you are
really determined, but why bother?  This is easier.

tclPaperslib (you will probably rename this) is the guts of the
actual gdb mechanisms for storing and retrieving various kinds
of paper and review data.  read it.

common.tcl is a convention in CGItcl.  a group of cgi scripts with
a common context share this file;  they all source it;  and it provides
them with certain standard URLs and other "global variable" sorts of
constructs.  Here's a few bits-n-pieces out of this file, which is just
more tcl:

	set TclTkW3 http://www.tcltk.com
	set LickW3 http://www.ucolick.org
	...
	set DeW3  $LickW3/~de
	set TclW3 $DeW3/Tcl
	...
	set Tcl2K $LickW3/cgi-bin/Tcl2K
	set TclFeather $DeW3/TclFeather.gif
	set TclAnim $DeW3/FeatherAnim.gif
	...
	cgi_admin_mail_addr de@ucolick.org
	cgi_link Webmaster "Webmaster@ucolick.org" mailto:webmaster@ucolick.org
	cgi_link DeMail "De Clarke (de@ucolick.org)" mailto:de@ucolick.org
	...
	cgi_link De       "De Clarke"                   $DeW3
	cgi_link admin    "Webmaster"                   mailto:[cgi_admin_mail_addr]

what this stuff does is establish short, easy aliases which
can be used later in all the cgi scripts instead of long
unwieldy hrefs.  AND when this stuff changes, you change it
in ONE PLACE in common.tcl, not in twenty-odd little cgi scripts.
Here's a bunch more config stuff from this file:

	...
	# some useful looky-feely stuff
	#
	set SansSerif "Lucida,Helvetica,Arial"
	set Courier "Courier,Typewriter"
	set HighLight "#444444"
	set size2 "<font size=\"+2\">"
	...
	#
	# Global variables for this year:  these strings get used a lot.
	#
	set TclChairs "De Clarke and Tom Poindexter -- tclchairs@usenix.org"
	set TclConf "7th Annual Usenix Tcl/Tk Conference"
	set TclNick "Tcl/2K"
	set TclWhere "Austin, TX"
	set TclWhen "Feb 14-18 2000"
	set WebMaster "de@ucolick.org"
	set ReviewsTo "tcl2k@ucolick.org"
	set MainPage "$Tcl2K/index.cgi"
	set ReviewDeadline "October 1, 1999"
	set pcPage "http://www.ucolick.org/cgi-bin/Tcl2K/index.cgi"
	#
	# these aren't necessarily identical, as you see...
	#
	# You MUST set Testing to 0 when you are finished testing this code.
	# If Testing is set to 1, several essential features will be disabled.
	set Testing 0
	#
	set BASE "$Tcl2K"
	set CGIBASE $BASE
	set BASEDIR /lopt/apache/cgi-bin/Tcl2K
	#
	set HTMLURL http://www.ucolick.org/~de/Tcl2K
	set HTMLDIR /lopt/apache/u/de/Tcl2K
	set HTMLPATH ~de/Tcl2K
	set reviewsDir reviews
	set submissDir submissions
	#
	set DataFile data/tclPapers.dat
	...

This last block of stuff is where you would put your app-specific
strings, images, etc.

Anyway, you get the idea.  common.tcl is the "rc file" for the
whole shebang.  It's important that you read it, understand it,
and modify it.

Typical opening lines of a cgi script:

	#!/opt/tcl803/bin/tcl
	
	# first, get the goodies you need
	#
	source cgi.tcl
	package require Tclgdbm
	#
	# this should start a safe interp
	#
	source tclPaperslib.tcl
	set WhichLogo ProgComm
	#
	cgi_eval {
	
	    source common.tcl
	
	    cgi_title "$TclNick :  Welcome, PC members"
	
	...

The data directory is where you stash the .dat file for gdb.
Some useful images are found in the images dir.  Ignore the
tmp dir for now.  The little "test" files are fragments of
tcl showing some tclgdbm syntax.

    drwxr-xr-x   2 de       lickstaf      512 Feb 10 13:46 data/
    drwxr-xr-x   2 de       lickstaf      512 Jul 19  1999 images/
    -rw-r--r--   1 de       lickstaf      304 Jul 14  1999 rename
    drwxr-xr-x   2 de       lickstaf      512 Feb 10 13:44 reviews/
    -rw-r--r--   1 de       lickstaf      239 Jul 30  1999 test
    -rw-r--r--   1 de       lickstaf      176 Jul 30  1999 test2
    drwxr-xr-x   2 de       lickstaf      512 Feb 10 13:47 tmp/

=======================================================================
PART TWO:  NOT IN CGI TREE

Up to now we've looked at files to be installed in a cgi-bin directory
like
	
	http://YourServer.your.domain:/cgi-bin/MyConf

But there's another side of the machinery, as you will have noticed if
you really did read common.tcl.

We don't allow server-side writes into the root tree on our http server.  
We are smart, or paranoid, or both.  So I configured the suite to do all
its miscellaneous reading and writing in another location, out in my
own personal web tree.

Out here there are several directories for storing and processing
the reviews and papers.

drwxr-xr-x   2 de       lickstaf     1536 Oct  7 00:40 ack/
drwxr-xr-x   2 de       lickstaf      512 Oct  2 23:05 bad/
drwxrwxrwx   2 de       lickstaf      512 Oct  7 00:13 incoming/
drwxr-xr-x   2 de       lickstaf     1024 Oct  6 21:45 log/
drwxrwxr-x   2 de       lickstaf     1024 Oct  4 01:28 pro/
drwxrwxrwx   2 de       lickstaf      512 Oct  7 00:40 rcv/
drwxrwxrwx   5 de       lickstaf     4096 Oct  7 00:13 reviews/
drwxrwxrwx  35 de       lickstaf     1024 Sep 14 13:13 submissions/
drwxr-xr-x   2 de       lickstaf      512 Jul  9  1999 tmp/


There are also two scripts, which you'll find in the accompanying
tarball ReviewProcess.tar.gz.  There's a README in there too.



