Index: openacs-4/packages/acs-core-docs/www/acs-admin.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-admin.html,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 5 Nov 2003 11:48:09 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 11 Nov 2003 10:28:27 -0000 1.18 @@ -1 +1 @@ -Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install Unix-like system and supporting software
Install Oracle 8.1.7
Install PostGreSQL
Install AOLserver 3.3oacs1
Install OpenACS 5.0.0a4
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a New Service
5. Upgrading
Support for upgrades.
6. Maintenance
Hosting Web Sites
Database Management
Backup and Recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
+Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
3. Complete Installation
Install Unix-like system and supporting software
Install Oracle 8.1.7
Install PostGreSQL
Install AOLserver 3.3oacs1
Install OpenACS 5.0.0a4
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a New Service
5. Upgrading
Support for upgrades.
6. Maintenance
Hosting Web Sites
Database Management
Backup and Recovery
A. Install Red Hat 8/9
B. Install additional supporting software
Unpack the OpenACS tarball
Initialize CVS (OPTIONAL)
Add PSGML commands to emacs init file (OPTIONAL)
Install Daemontools (OPTIONAL)
Install qmail (OPTIONAL)
Install Analog web file analyzer
Install nspam
Install Full Text Search
Install nsopenssl
Install tclwebtest.
C. Credits
Where did this document come from?
Linux Install Guides
Security Information
Resources
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-package-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-package-dev.html,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-core-docs/www/acs-package-dev.html 31 Oct 2003 10:54:19 -0000 1.7 +++ openacs-4/packages/acs-core-docs/www/acs-package-dev.html 11 Nov 2003 10:28:27 -0000 1.8 @@ -1,2 +1,2 @@ -Part�III.�For OpenACS Package Developers

For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. -

View comments on this page at openacs.org
+Part�III.�For OpenACS Package Developers

For OpenACS Package Developers

Tutorials and reference material for creating new OpenACS packages. +

View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/acs-plat-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/acs-plat-dev.html,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 31 Oct 2003 10:54:19 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 11 Nov 2003 10:28:27 -0000 1.9 @@ -1 +1 @@ -Part�IV.�For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

Platform Development
10. Kernel Documentation
Overview
OpenACS 4 Object Model Requirements
OpenACS 4 Object Model Design
OpenACS 4 Permissions Requirements
OpenACS 4 Permissions Design
OpenACS 4 Groups Requirements
OpenACS 4 Groups Design
OpenACS 4 Subsites Requirements
OpenACS 4 Subsites Design Document
OpenACS 5.0.0a4 Package Manager Requirements
OpenACS 5.0.0a4 Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Internationalization
OpenACS 4 Security Requirements
OpenACS 4 Security Design
OpenACS 4 Security Notes
OpenACS 4 Request Processor Requirements
OpenACS 4 Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
View comments on this page at openacs.org
+Part�IV.�For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

Platform Development
10. Kernel Documentation
Overview
OpenACS 4 Object Model Requirements
OpenACS 4 Object Model Design
OpenACS 4 Permissions Requirements
OpenACS 4 Permissions Design
OpenACS 4 Groups Requirements
OpenACS 4 Groups Design
OpenACS 4 Subsites Requirements
OpenACS 4 Subsites Design Document
OpenACS 5.0.0a4 Package Manager Requirements
OpenACS 5.0.0a4 Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Internationalization
OpenACS 4 Security Requirements
OpenACS 4 Security Design
OpenACS 4 Security Notes
OpenACS 4 Request Processor Requirements
OpenACS 4 Request Processor Design
Documenting Tcl Files: Page Contracts and Libraries
Bootstrapping OpenACS
External Authentication Requirements
View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/analog-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/analog-install.html,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/analog-install.html 5 Nov 2003 11:48:09 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/analog-install.html 11 Nov 2003 10:28:27 -0000 1.5 @@ -1,4 +1,4 @@ -Install Analog web file analyzer

Install Analog web file analyzer

Download the Analog source tarball in +Install Analog web file analyzer

Install Analog web file analyzer

Download the Analog source tarball in /tmp. Unpack, compile, and install analog.

[root@yourserver aolserver]# cd /usr/local/src
 [root@yourserver src]# tar xzf /tmp/analog-5.32.tar.gz
 [root@yourserver src]# cd analog-5.32
@@ -17,4 +17,4 @@
 cd analog-5.32
 make
 cd ..
-mv analog-5.32 /usr/share/

See also Section�, “Set up Log Analysis Reports - OPTIONAL”

View comments on this page at openacs.org
+mv analog-5.32 /usr/share/

See also the section called “Set up Log Analysis Reports - OPTIONAL”

View comments on this page at openacs.org
Index: openacs-4/packages/acs-core-docs/www/aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver.html,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/aolserver.html 5 Nov 2003 14:46:51 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/aolserver.html 11 Nov 2003 10:28:27 -0000 1.22 @@ -1,4 +1,4 @@ -Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

+Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup
OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -18,7 +18,7 @@ [root@yourserver src]#

cd /usr/local/src
 wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz
-tar xzf aolserver3.3oacs1.tar.gz
  • Compile AOLserver.�Compile and install AOLserver. First, prepare the installation directory and the source code. The message about BUILD-MODULES can be ignored.

    root@yourserver root]# mkdir -p /usr/local/aolserver
    +tar xzf aolserver3.3oacs1.tar.gz

    This section also relies on some OpenACS files, which you can get with the section called “Unpack the OpenACS tarball”.

  • Compile AOLserver.�Compile and install AOLserver. First, prepare the installation directory and the source code. The message about BUILD-MODULES can be ignored.

    root@yourserver root]# mkdir -p /usr/local/aolserver
     [root@yourserver root]# cd /usr/local/src/aolserver
     [root@yourserver aolserver]# ./conf-clean
     cat: BUILD-MODULES: No such file or directory
    @@ -39,7 +39,7 @@
               tarball's default value with our default value, /usr/local/aolserver:

    [root@yourserver aolserver]# echo "/usr/local/aolserver" > conf-inst
     [root@yourserver aolserver]#

    conf-make should contain the name of the GNU Make command on your system. It defaults to - gmake.

    Set an environment variable that the nspostgres driver + gmake. Debian users: ln -s /usr/bin/make /usr/bin/gmake.

    Set an environment variable that the nspostgres driver Makefile needs to compile correctly and run conf, which compiles AOLserver, the default modules, and the database driver, and Index: openacs-4/packages/acs-core-docs/www/apm-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-design.html,v diff -u -N -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/apm-design.html 5 Nov 2003 14:46:51 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 11 Nov 2003 10:28:27 -0000 1.20 @@ -1,4 +1,4 @@ -OpenACS 5.0.0a4 Package Manager Design

    OpenACS 5.0.0a4 Package Manager Design

    +OpenACS 5.0.0a4 Package Manager Design

    OpenACS 5.0.0a4 Package Manager Design

    by Bryan Quinn
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -88,7 +88,7 @@ packages for other ACS users to download and install.

    For a simple illustration of the difference between ACS without APM (pre-3.3) and ACS with APM (3.3 and beyond), consider a hypothetical ACS installation that uses only two of the thirty-odd modules available circa ACS -3.2 (say, bboard and e-commerce):

    APM itself is part of a package, the OpenACS Kernel, an OpenACS +3.2 (say, bboard and e-commerce):

    APM itself is part of a package, the OpenACS Kernel, an OpenACS service that is the only mandatory component of an OpenACS installation.

    Competitive Analysis

    The OpenACS is a platform for web-based application software, and any software platform has the potential to develop problems like those described above. Fortunately, there are many precedents for systematic solutions, Index: openacs-4/packages/acs-core-docs/www/apm-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/apm-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/apm-requirements.html 31 Oct 2003 10:54:19 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/apm-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 5.0.0a4 Package Manager Requirements

    OpenACS 5.0.0a4 Package Manager Requirements

    +OpenACS 5.0.0a4 Package Manager Requirements

    OpenACS 5.0.0a4 Package Manager Requirements

    by Bryan Quinn and Todd Nightingale
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 5 Nov 2003 14:46:51 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,4 +1,4 @@ -Backup and Recovery

    Backup and Recovery

    +Backup and Recovery

    Backup and Recovery

    by Don Baccus with additions by Joel Aufrecht
    @@ -143,7 +143,7 @@ single nightly backup file which is then collected into a bigger backup file that includes the other parts of the service (web pages, content, code). To make a new file every - night, edit the crontab file for service0:

    [service0@yourserver service0]$ export EDITOR=emacs;crontab -e

    Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_`date +\%Y-\%m-\%d`.dmp service0

    If you plan to back up the whole /var/lib/aolserver/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_nightly.dmp service0

    A full Backup/Recovery cycle

    On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.

    Delete the Service

    [root@yourserver root]# svc -d /service/service0
    +        night, edit the crontab file for service0:

    [service0@yourserver service0]$ export EDITOR=emacs;crontab -e

    Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_`date +\%Y-\%m-\%d`.dmp service0

    If you plan to back up the whole /var/lib/aolserver/service0 directory, then it would be redundant to keep a history of database backups. In that case, set up the cron job to overwrite the previous backup each time:

    0 1 * * * /usr/local/pgsql/bin/pg_dump -f /var/lib/aolserver/service0/database-backup/service0_nightly.dmp service0

    A full Backup/Recovery cycle

    On a test service, make sure that your backup-recovery process work. After backing up the database and file system, delete the service as detailed below and then recover it.

    Delete the Service

    [root@yourserver root]# svc -d /service/service0
     [root@yourserver root]# mv /var/lib/aolserver/service0/ /var/lib/aolserver/service0.lost
     [root@yourserver root]# rm /service/service0
     rm: remove symbolic link `/service/service0'? y
    Index: openacs-4/packages/acs-core-docs/www/bootstrap-acs.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v
    diff -u -N -r1.20 -r1.21
    --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html	5 Nov 2003 14:46:51 -0000	1.20
    +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html	11 Nov 2003 10:28:27 -0000	1.21
    @@ -1,4 +1,4 @@
    -Bootstrapping OpenACS

    Bootstrapping OpenACS

    +Bootstrapping OpenACS

    Bootstrapping OpenACS

    by Jon Salz
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/complete-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/complete-install.html,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/complete-install.html 31 Oct 2003 10:54:19 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/complete-install.html 11 Nov 2003 10:28:27 -0000 1.3 @@ -1 +1 @@ -Chapter�3.�Complete Installation

    View comments on this page at openacs.org
    +Chapter�3.�Complete Installation
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/configure.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/configure.html,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/configure.html 31 Oct 2003 10:54:19 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/configure.html 11 Nov 2003 10:28:27 -0000 1.6 @@ -1 +1 @@ -Chapter�4.�Configuring a New Service

    Chapter�4.�Configuring a New Service

    Placeholder

    View comments on this page at openacs.org
    +Chapter�4.�Configuring a New Service

    Chapter�4.�Configuring a New Service

    Placeholder

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/credits.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/credits.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/credits.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/credits.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Appendix�C.�Credits

    Appendix�C.�Credits

    +Appendix�C.�Credits

    Appendix�C.�Credits

    by Vinod Kurup
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/cvs-service-import.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/cvs-service-import.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/cvs-service-import.html 5 Nov 2003 14:46:51 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/cvs-service-import.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Add the Service to CVS - OPTIONAL

    Add the Service to CVS - OPTIONAL

    These steps take an existing OpenACS directory and add +Add the Service to CVS - OPTIONAL

    Add the Service to CVS - OPTIONAL

    These steps take an existing OpenACS directory and add it to a CVS repository..

    1. Create and set permissions on a subdirectory in the local cvs repository.

      [root@yourserver root]# mkdir /cvsroot/service0
       [root@yourserver root]# chown service0.web /cvsroot/service0
      Index: openacs-4/packages/acs-core-docs/www/cvs-tips.html
      ===================================================================
      RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/cvs-tips.html,v
      diff -u -N -r1.5 -r1.6
      --- openacs-4/packages/acs-core-docs/www/cvs-tips.html	31 Oct 2003 10:54:19 -0000	1.5
      +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html	11 Nov 2003 10:28:27 -0000	1.6
      @@ -1,4 +1,4 @@
      -Appendix�D.�Using CVS with an OpenACS Site

      Appendix�D.�Using CVS with an OpenACS Site

      +Appendix�D.�Using CVS with an OpenACS Site

      Appendix�D.�Using CVS with an OpenACS Site

      by Joel Aufrecht
      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/database-management.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/database-management.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/database-management.html 5 Nov 2003 14:46:51 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/database-management.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,4 +1,4 @@ -Database Management

      Database Management

      +Database Management

      Database Management

      by Joel Aufrecht
      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/db-api-detailed.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api-detailed.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Database Access API

      Database Access API

      +Database Access API

      Database Access API

      by Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.
      Index: openacs-4/packages/acs-core-docs/www/db-api.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/db-api.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/db-api.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/db-api.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -The OpenACS Database Access API

      The OpenACS Database Access API

      +The OpenACS Database Access API

      The OpenACS Database Access API

      By Pete Su and Jon Salz. Modified by Roberto Mello. Index: openacs-4/packages/acs-core-docs/www/dev-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/dev-guide.html,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 31 Oct 2003 10:54:19 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 11 Nov 2003 10:28:27 -0000 1.16 @@ -1 +1 @@ -Chapter�8.�Development Reference

      View comments on this page at openacs.org
      +Chapter�8.�Development Reference
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/docbook-primer.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/docbook-primer.html,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 5 Nov 2003 14:46:51 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 11 Nov 2003 10:28:27 -0000 1.22 @@ -1,4 +1,4 @@ -OpenACS Documentation Guide

      OpenACS Documentation Guide

      +OpenACS Documentation Guide

      OpenACS Documentation Guide

      By claus@arsdigita.com, with additions by Roberto Mello and the OpenACS Community @@ -31,7 +31,7 @@ In order to separate content and presentation, all OpenACS documentation will be marked up to conform to the DocBook XML DTD - + This enables us to publish in a variety of formats and relieves each contributor of the burden of presentation, freeing him to focus on content and sharing knowledge. @@ -52,7 +52,7 @@ list of elements and use more exotic features in your documents. The list is made up of SGML-elements but basically the same elements are valid in the XML DTD as long as you remember to: - +

      • Always close your tags with corresponding end-tags and to not use other tag minimization @@ -98,7 +98,7 @@ The documentation for each package will make up a little "book" that is structured like this - examples are emphasized: - +

             book                        : Docs for one package - templating
        @@ -122,20 +122,20 @@
               sources of these DocBook documents
               to get an idea of how they are tied together.
             

      Headlines, Sections

      - + Given that your job starts at the sect1-level, all your documents should open with a <sect1>-tag and end with the corresponding </sect1>.

      - + You need to feed every <sect1> two attributes. The first attribute, id, is standard and can be used with all elements. It comes in very - handy when interlinking between documents (more about this when talking about links in Section�, “Links”). + handy when interlinking between documents (more about this when talking about links in the section called “Links”). The value of id has to be unique throughout the book you're making since the id's in your sect1's will turn into filenames when the book is parsed into HTML.

      - + The other attribute is xreflabel. The value of this is the text that will appear as the link when referring to this sect1.

      @@ -150,7 +150,7 @@ </sect1>

      - + Inside this container your document will be split up into <sect2>'s, each with the same requirements - id and xreflabel @@ -159,7 +159,7 @@ When it comes to naming your sect2's and below, prefix them with some abbreviation of the id in the sect1 such as requirements-overview.

    Code

    - + For displaying a snippet of code, a filename or anything else you just want to appear as a part of a sentence, we will use the tag <computeroutput>. @@ -169,12 +169,12 @@ <programlisting> is used. Just wrap your code block in it; mono-spacing, indents and all that stuff is taken care of automatically.

    Links

    - + Linking falls into two different categories: inside the book you're making and outside:

    1. Inside linking, cross-referencing other parts of your book

    By having unique id's you can cross-reference any part of your book with a simple tag, regardless of where that part is. -

    Check out how I link to a subsection of the Developer's Guide:

    +	  

    Check out how I link to a subsection of the Developer's Guide:

     
     	    Put this in your XML:
     
    @@ -205,14 +205,14 @@
     	    And the output is:
     
     	    - Find information about what a package looks like in 
    -	    Section�, “What a Package Looks Like”
    +	    the section called “What a Package Looks Like”
     
     	  

    Note that since I haven't provided an xreflabel for the subsection, packages-looks, the parser will try its best to explain where the link takes you.

    2. Linking outside the documentation

    - + If you're hyper-linking out of the documentation, it works almost the same way as HTML - the tag is just a little different @@ -233,7 +233,7 @@ do it, so if you want to start converting your documents right away, start out with the ones without graphics ;)

    - + To insert a graphic we use the elements <mediaobject>, <imageobject>, @@ -259,7 +259,7 @@ Put your graphics in a separate directory ("images") and link to them only with relative paths.

    Lists

    - + Here's how you make the DocBook equivalent of the three usual HTML-lists:

    1. How to make an <ul>

    Making an unordered list is pretty much like doing the same thing in HTML - if you close your <li>, that is. The only differences are that each list item has to be wrapped in something more, such as @@ -304,7 +304,7 @@ </variablelist>

    Tables

    - + DocBook supports several types of tables, but in most cases, the <informaltable> is enough: @@ -341,7 +341,7 @@ <table> for an example.

    Emphasis

    - + Our documentation uses two flavors of emphasis - italics and bold type. DocBook uses one - <emphasis>.

    Index: openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Constraint naming standard

    Constraint naming standard

    By mbryzek@arsdigita.com


    +Constraint naming standard

    Constraint naming standard

    By mbryzek@arsdigita.com


    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    The Big Picture

    Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By michael@arsdigita.com and +ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By michael@arsdigita.com and aure@arsdigita.com


    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -PL/SQL Standards

    PL/SQL Standards

    +PL/SQL Standards

    PL/SQL Standards

    By richardl@arsdigita.com and yon@arsdigita.com


    Index: openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Release Version Numbering

    Release Version Numbering

    By Ron Henderson


    +Release Version Numbering

    Release Version Numbering

    By Ron Henderson


    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

    Index: openacs-4/packages/acs-core-docs/www/eng-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards.html,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 31 Oct 2003 10:54:19 -0000 1.13 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 11 Nov 2003 10:28:27 -0000 1.14 @@ -1 +1 @@ -Chapter�9.�Engineering Standards

    View comments on this page at openacs.org
    +Chapter�9.�Engineering Standards
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html,v diff -u -N -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 5 Nov 2003 14:46:51 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 11 Nov 2003 10:28:27 -0000 1.10 @@ -1,4 +1,4 @@ -External Authentication Requirements

    External Authentication Requirements

    Vision

    People have plenty of usernames and passwords already, we +External Authentication Requirements

    External Authentication Requirements

    Vision

    People have plenty of usernames and passwords already, we don't want them to have yet another. We want people to be able to log in to OpenACS with the same password they use to log in to any other system.

    Besides, administrators have better things to do than create @@ -44,7 +44,7 @@ only one implementation of the authentication API, namly the one included in OpenACS Core.

  • Authentication Driver API: The service contract which authentication drivers implement.

  • Conceptual Pictures

    Authentication:

    -

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

    FeatureStatusDescription
    EXT-AUTH-01AExtend Authentication/Acct Status API
    EXT-AUTH-03AAccount Creation API
    EXT-AUTH-05APassword Management API
    EXT-AUTH-30AAuthority Management API

    Login

    FeatureStatusDescription
    EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
    EXT-AUTH-38Aad_form complain feature
    EXT-AUTH-19ARewrite password recovery to use API
    EXT-AUTH-21ARewrite email verification with API
    EXT-AUTH-28AUsername is email switch

    Users will log in using a username, a authority, and a +

    Account Management (NO PICTURE YET)

    Batch Synchronization (NO PICTURE YET)

    Requirements

    New API

    FeatureStatusDescription
    EXT-AUTH-01AExtend Authentication/Acct Status API
    EXT-AUTH-03AAccount Creation API
    EXT-AUTH-05APassword Management API
    EXT-AUTH-30AAuthority Management API

    Login

    FeatureStatusDescription
    EXT-AUTH-04ARewrite login, register, and admin pages to use APIs
    EXT-AUTH-38Aad_form complain feature
    EXT-AUTH-19ARewrite password recovery to use API
    EXT-AUTH-21ARewrite email verification with API
    EXT-AUTH-28AUsername is email switch

    Users will log in using a username, a authority, and a password. The authority is the source for user/password verification. OpenACS can be an authority itself.

    Each user in OpenACS will belong to exactly one authority, which can either be the "local" OpenACS users table, in which case the Index: openacs-4/packages/acs-core-docs/www/filename.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/filename.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/filename.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/filename.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Detailed Design Documentation Template

    Detailed Design Documentation Template

    By You

    Start Note

    +Detailed Design Documentation Template

    Detailed Design Documentation Template

    By You

    Start Note

    NOTE: Some of the sections of this template may not apply to your package, e.g. there may be no user-visible UI elements for a component of the OpenACS Core. Furthermore, it may be easier in some circumstances Index: openacs-4/packages/acs-core-docs/www/for-everyone.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/for-everyone.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 28 Oct 2003 22:07:34 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1 +1 @@ -Part�I.�OpenACS For Everyone

    View comments on this page at openacs.org
    +Part�I.�OpenACS For Everyone
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/general-documents.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/general-documents.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/general-documents.html 28 Oct 2003 22:07:34 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1 +1 @@ -Chapter�1.�High level information: What is OpenACS?

    Chapter�1.�High level information: What is OpenACS?

    View comments on this page at openacs.org
    +Chapter�1.�High level information: What is OpenACS?

    Chapter�1.�High level information: What is OpenACS?

    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/groups-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-design.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/groups-design.html 31 Oct 2003 10:54:19 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Groups Design

    OpenACS 4 Groups Design

    +OpenACS 4 Groups Design

    OpenACS 4 Groups Design

    by Rafael H. Schloming and Mark Thomas
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/groups-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/groups-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 31 Oct 2003 10:54:19 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Groups Requirements

    OpenACS 4 Groups Requirements

    +OpenACS 4 Groups Requirements

    OpenACS 4 Groups Requirements

    by Rafael H. Schloming, Mark Thomas
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/i18n-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n-requirements.html,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/i18n-requirements.html 31 Oct 2003 10:54:19 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/i18n-requirements.html 11 Nov 2003 10:28:27 -0000 1.6 @@ -1,4 +1,4 @@ -OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    +OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    by Henry Minsky, Yon Feldman, Lars Pind, Index: openacs-4/packages/acs-core-docs/www/i18n.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/i18n.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/i18n.html 5 Nov 2003 14:46:51 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/i18n.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Internationalization

    Internationalization

    +Internationalization

    Internationalization

    By Peter Marklund and Lars Pind


    @@ -38,7 +38,7 @@ which are static and mostly text, it may be easier to create a new ADP page for each language. In this case, the pages are distinguished by a file naming convention. -

    Separate Templates for each Locale

    If the request processor finds a file named filename.locale.adp, where locale matches the user's locale, it will process that file instead of filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are still processed.

    Message Keys in Template Files (ADP Files)

    +

    Separate Templates for each Locale

    If the request processor finds a file named filename.locale.adp, where locale matches the user's locale, it will process that file instead of filename.adp. For example, for a user with locale tl_PH, the file index.tl_PH.adp, if found, will be used instead of index.adp. The locale-specific file should thus contain text in the language appropriate for that locale. The code in the page, however, should still be in English. Message keys are still processed.

    Message Keys in Template Files (ADP Files)

    Internationalizing templates is about replacing human readable text in a certain language with internal message keys, which can then be dynamically replaced with real human language in @@ -101,9 +101,9 @@

    Here are a couple of examples. Say we have the following two parameters, taken directly from the dotlrn package. -

    Table�10.1.�

    Parameter NameParameter Value
    class_instance_pages_csv#dotlrn.class_page_home_title#,Simple 2-Column;#dotlrn.class_page_calendar_title#,Simple 1-Column;#dotlrn.class_page_file_storage_title#,Simple 1-Column
    departments_pretty_name#departments_pretty_name#

    +

    Table�10.1.�

    Parameter NameParameter Value
    class_instance_pages_csv#dotlrn.class_page_home_title#,Simple 2-Column;#dotlrn.class_page_calendar_title#,Simple 1-Column;#dotlrn.class_page_file_storage_title#,Simple 1-Column
    departments_pretty_name#departments_pretty_name#

    Then, depending on how we retrieve the value, here's what we get: -

    Table�10.2.�

    Command used to retrieve ValueRetrieved Value
    parameter::get -localize -parameter class_instances_pages_csvKurs Startseite,Simple 2-Column;Kalender,Simple 1-Column;Dateien,Simple 1-Column
    parameter::get -localize -parameter departments_pretty_nameAbteilung
    parameter::get -parameter departments_pretty_name#departments_pretty_name#

    +

    Table�10.2.�

    Command used to retrieve ValueRetrieved Value
    parameter::get -localize -parameter class_instances_pages_csvKurs Startseite,Simple 2-Column;Kalender,Simple 1-Column;Dateien,Simple 1-Column
    parameter::get -localize -parameter departments_pretty_nameAbteilung
    parameter::get -parameter departments_pretty_name#departments_pretty_name#

    The value in the rightmost column in the table above is the value returned by an invocation of parameter::get. Note that for localization to happen you must use the -localize flag. @@ -151,7 +151,7 @@ Use the *_pretty version in your ADP page.

    To internationalize numbers, use lc_numeric $value, which formats the number using the appropriate decimal point and thousand separator for the locale. -

    Internationalizing Forms

    When coding forms, remember to use message keys for each piece of text that is user-visible, including form option labels and button labels.

    Internationalizing Existing Packages

    Internationalize Message text in ADP and TCL

    Acs-lang includes tools to automate some +

    Internationalizing Forms

    When coding forms, remember to use message keys for each piece of text that is user-visible, including form option labels and button labels.

    Internationalizing Existing Packages

    Internationalize Message text in ADP and TCL

    Acs-lang includes tools to automate some internationalization. From /acs-admin/apm/, select a package and then click on @@ -240,9 +240,9 @@ with the appropriate notation for the type of file, and store the text in the message catalog. You need to run the process twice, once for ADP files, and once for Tcl files. -

    Internationalize Package Parameters with visible messages

    +

    Internationalize Package Parameters with visible messages

    See Multilingual APM Parameters -

    Internationalize Date and Time queries

    1. Find datetime in .xql files. Use command line tools to find suspect SQL code:

      grep -r "to_char.*H" *
      +    

    Internationalize Date and Time queries

    1. Find datetime in .xql files. Use command line tools to find suspect SQL code:

      grep -r "to_char.*H" *
       grep -r "to_date.*H" *
       
    2. In SQL statements, replace the format string with the ANSI standard format, YYYY-MM-DD HH24:MI:SS and change the field name to *_ansi so that it cannot be confused with previous, improperly formatting fields. For example,

      to_char(timestamp,'MM/DD/YYYY HH:MI:SS') as foo_date_pretty

      becomes

      to_char(timestamp,'YYYY-MM-DD HH24:MI:SS') as foo_date_ansi
    3. In TCL files where the date fields are used, convert the datetime from local server timezone, which is how it's stored in the database, to the user's timezone for display. Do this with the localizing function lc_time_system_to_conn:

       set foo_date_ansi [lc_time_system_to_conn $foo_date_ansi]

      When a datetime will be written to the database, first convert it from the user's local time to the server's timezone with lc_time_conn_to_system. Index: openacs-4/packages/acs-core-docs/www/index.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/index.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/index.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/index.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1 +1 @@ -OpenACS Core Documentation

      OpenACS Core Documentation


      Table of Contents

      I. OpenACS For Everyone
      1. High level information: What is OpenACS?
      Overview
      OpenACS Release Notes
      II. Administrator's Guide
      2. Installation Overview
      Basic Steps
      Prerequisite Software
      3. Complete Installation
      Install Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostGreSQL
      Install AOLserver 3.3oacs1
      Install OpenACS 5.0.0a4
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a New Service
      5. Upgrading
      Support for upgrades.
      6. Maintenance
      Hosting Web Sites
      Database Management
      Backup and Recovery
      A. Install Red Hat 8/9
      B. Install additional supporting software
      Unpack the OpenACS tarball
      Initialize CVS (OPTIONAL)
      Add PSGML commands to emacs init file (OPTIONAL)
      Install Daemontools (OPTIONAL)
      Install qmail (OPTIONAL)
      Install Analog web file analyzer
      Install nspam
      Install Full Text Search
      Install nsopenssl
      Install tclwebtest.
      C. Credits
      Where did this document come from?
      Linux Install Guides
      Security Information
      Resources
      III. For OpenACS Package Developers
      7. Development Tutorial
      Creating a Package
      Setting Up Database Objects
      Creating Web Pages
      Debugging and Automated Testing
      Advanced Topics
      8. Development Reference
      OpenACS 5.0.0a4 Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS 5.0.0a4
      Groups, Context, Permissions
      Writing OpenACS 5.0.0a4 Application Pages
      Parties in OpenACS 5.0.0a4
      OpenACS 4.x Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      9. Engineering Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      D. Using CVS with an OpenACS Site
      Add the Service to CVS - OPTIONAL
      E. How to package and release OpenACS
      IV. For OpenACS Platform Developers
      Platform Development
      10. Kernel Documentation
      Overview
      OpenACS 4 Object Model Requirements
      OpenACS 4 Object Model Design
      OpenACS 4 Permissions Requirements
      OpenACS 4 Permissions Design
      OpenACS 4 Groups Requirements
      OpenACS 4 Groups Design
      OpenACS 4 Subsites Requirements
      OpenACS 4 Subsites Design Document
      OpenACS 5.0.0a4 Package Manager Requirements
      OpenACS 5.0.0a4 Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      OpenACS 4 Security Requirements
      OpenACS 4 Security Design
      OpenACS 4 Security Notes
      OpenACS 4 Request Processor Requirements
      OpenACS 4 Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements

      List of Tables

      8.1.
      8.2.
      8.3.
      8.4.
      8.5.
      8.6.
      8.7.
      8.8.
      8.9.
      8.10.
      8.11.
      8.12.
      10.1.
      10.2.
      View comments on this page at openacs.org
      +OpenACS Core Documentation

      OpenACS Core Documentation


      Table of Contents

      I. OpenACS For Everyone
      1. High level information: What is OpenACS?
      Overview
      OpenACS Release Notes
      II. Administrator's Guide
      2. Installation Overview
      Basic Steps
      Prerequisite Software
      3. Complete Installation
      Install Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostGreSQL
      Install AOLserver 3.3oacs1
      Install OpenACS 5.0.0a4
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a New Service
      5. Upgrading
      Support for upgrades.
      6. Maintenance
      Hosting Web Sites
      Database Management
      Backup and Recovery
      A. Install Red Hat 8/9
      B. Install additional supporting software
      Unpack the OpenACS tarball
      Initialize CVS (OPTIONAL)
      Add PSGML commands to emacs init file (OPTIONAL)
      Install Daemontools (OPTIONAL)
      Install qmail (OPTIONAL)
      Install Analog web file analyzer
      Install nspam
      Install Full Text Search
      Install nsopenssl
      Install tclwebtest.
      C. Credits
      Where did this document come from?
      Linux Install Guides
      Security Information
      Resources
      III. For OpenACS Package Developers
      7. Development Tutorial
      Creating a Package
      Setting Up Database Objects
      Creating Web Pages
      Debugging and Automated Testing
      Advanced Topics
      8. Development Reference
      OpenACS 5.0.0a4 Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS 5.0.0a4
      Groups, Context, Permissions
      Writing OpenACS 5.0.0a4 Application Pages
      Parties in OpenACS 5.0.0a4
      OpenACS 4.x Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      9. Engineering Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      D. Using CVS with an OpenACS Site
      Add the Service to CVS - OPTIONAL
      E. How to package and release OpenACS
      IV. For OpenACS Platform Developers
      Platform Development
      10. Kernel Documentation
      Overview
      OpenACS 4 Object Model Requirements
      OpenACS 4 Object Model Design
      OpenACS 4 Permissions Requirements
      OpenACS 4 Permissions Design
      OpenACS 4 Groups Requirements
      OpenACS 4 Groups Design
      OpenACS 4 Subsites Requirements
      OpenACS 4 Subsites Design Document
      OpenACS 5.0.0a4 Package Manager Requirements
      OpenACS 5.0.0a4 Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      OpenACS 4 Security Requirements
      OpenACS 4 Security Design
      OpenACS 4 Security Notes
      OpenACS 4 Request Processor Requirements
      OpenACS 4 Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements

      List of Tables

      8.1.
      8.2.
      8.3.
      8.4.
      8.5.
      8.6.
      8.7.
      8.8.
      8.9.
      8.10.
      8.11.
      8.12.
      10.1.
      10.2.
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/individual-programs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/individual-programs.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/individual-programs.html 5 Nov 2003 11:48:10 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/individual-programs.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Prerequisite Software

      Prerequisite Software

      +Prerequisite Software

      Prerequisite Software

      by Joel Aufrecht
      OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -17,7 +17,7 @@ standard Linux shell. If you are using a different shell, you will need to substitute your shell's conventions for setting environment variables when - appropriate.

    4. Mac OS X.�Section�, “OpenACS Installation Guide for Mac OS X”

    5. Windows/VMWare.�Section�, “OpenACS Installation Guide for Windows2000” The only + appropriate.

    6. Mac OS X.�the section called “OpenACS Installation Guide for Mac OS X”

    7. Windows/VMWare.�the section called “OpenACS Installation Guide for Windows2000” The only way to run OpenACS on Windows is through the VMWare emulator. (Please let me know if you have OpenACS running directly in Windows.)

  • Build Environment.�The Reference Platform installation compiles most programs from Index: openacs-4/packages/acs-core-docs/www/install-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-cvs.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/install-cvs.html 5 Nov 2003 14:46:51 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/install-cvs.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Initialize CVS (OPTIONAL)

    Initialize CVS (OPTIONAL)

    CVS is a source control system. Create and initialize a +Initialize CVS (OPTIONAL)

    Initialize CVS (OPTIONAL)

    CVS is a source control system. Create and initialize a directory for a local cvs repository.

    [root@yourserver tmp]# mkdir /cvsroot
     [root@yourserver tmp]# cvs -d /cvsroot init
     [root@yourserver tmp]#
    Index: openacs-4/packages/acs-core-docs/www/install-daemontools.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-daemontools.html,v
    diff -u -N -r1.11 -r1.12
    --- openacs-4/packages/acs-core-docs/www/install-daemontools.html	5 Nov 2003 14:46:51 -0000	1.11
    +++ openacs-4/packages/acs-core-docs/www/install-daemontools.html	11 Nov 2003 10:28:27 -0000	1.12
    @@ -1,16 +1,16 @@
    -Install Daemontools (OPTIONAL)

    Install Daemontools (OPTIONAL)

    Daemontools is a collection of programs for controlling +Install Daemontools (OPTIONAL)

    Install Daemontools (OPTIONAL)

    Daemontools is a collection of programs for controlling other processes. We use daemontools to run and monitor AOLServer. It is installed in /package. These commands install daemontools and svgroup. svgroup is a script for granting permissions, to allow users other than root to use daemontools for specific - services.

    1. Install Daemontools

      download daemontools and install it.

      • Red Hat 8

        [root@yourserver root]# mkdir -p /package
        +      services.

        1. Install Daemontools

          download daemontools and install it.

          • Red Hat 8

            [root@yourserver root]# mkdir -p /package
             [root@yourserver root]# chmod 1755 /package/
             [root@yourserver root]# cd /package/
             [root@yourserver package]# tar xzf /tmp/daemontools-0.76.tar.gz
             [root@yourserver package]# cd admin/daemontools-0.76/
             [root@yourserver daemontools-0.76]# package/install
             Linking ./src/* into ./compile...
            -(many lines omitted)
            +
             Creating /service...
             Adding svscanboot to inittab...
             init should start svscan now.
            @@ -42,8 +42,7 @@
             [root@yourserver admin]# cd daemontools-0.76
             [root@yourserver daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch
             [root@yourserver daemontools-0.76]# package/install
            -Linking ./src/* into ./compile...
            -(many lines omitted)
            +Linking ./src/* into ./compile...(many lines omitted)
             Creating /service...
             Adding svscanboot to inittab...
             init should start svscan now.
            Index: openacs-4/packages/acs-core-docs/www/install-full-text-search.html
            ===================================================================
            RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/install-full-text-search.html,v
            diff -u -N -r1.10 -r1.11
            --- openacs-4/packages/acs-core-docs/www/install-full-text-search.html	5 Nov 2003 11:48:10 -0000	1.10
            +++ openacs-4/packages/acs-core-docs/www/install-full-text-search.html	11 Nov 2003 10:28:27 -0000	1.11
            @@ -1,12 +1,11 @@
            -Install Full Text Search

            Install Full Text Search

            Install OpenFTS module

            If you want full text search, and you are running PostGreSQL, install this module to support FTS. Do this step after you have installed both PostGreSQL and +Install Full Text Search

            Install Full Text Search

            Install OpenFTS module

            If you want full text search, and you are running PostGreSQL, install this module to support FTS. Do this step after you have installed both PostGreSQL and Aolserver. You will need the openfts tarball in /tmp.

            1. Install Tsearch. This is a PostGreSQL module that OpenFTS requires.

              [root@yourserver root]# su - postgres
               [postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.4/contrib/tsearch/
               [postgres@yourserver tsearch]$ make
               sed 's,MODULE_PATHNAME,$libdir/tsearch,g' tsearch.sql.in >tsearch.sql
              -/usr/bin/flex  -8 -Ptsearch_yy -o'parser.c' parser.l
              -(many lines omitted)
              +/usr/bin/flex  -8 -Ptsearch_yy -o'parser.c' parser.l(many lines omitted)
               rm -f libtsearch.so
               ln -s libtsearch.so.0.0 libtsearch.so
               [postgres@yourserver tsearch]$ make install
              @@ -74,7 +73,7 @@
               make
               su postgres
               make install
              -exit

      Install OpenFTS prerequisites in PostGreSQL instance

      If you are installing Full Text Search, add required +exit

  • Install OpenFTS prerequisites in PostGreSQL instance

    If you are installing Full Text Search, add required packages to the new database. (In order for full text search to work, you must also install the PostGreSQL OpenFTS module and prerequisites.)

    [service0@yourserver service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.2.4/contrib/tsearch/tsearch.sql
    Index: openacs-4/packages/acs-core-docs/www/install-more-software.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-more-software.html,v
    diff -u -N -r1.5 -r1.6
    --- openacs-4/packages/acs-core-docs/www/install-more-software.html	5 Nov 2003 11:48:10 -0000	1.5
    +++ openacs-4/packages/acs-core-docs/www/install-more-software.html	11 Nov 2003 10:28:27 -0000	1.6
    @@ -1,4 +1,4 @@
    -Appendix�B.�Install additional supporting software

    Appendix�B.�Install additional supporting software

    +Appendix�B.�Install additional supporting software

    Appendix�B.�Install additional supporting software

    by Joel Aufrecht
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/install-nsopenssl.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-nsopenssl.html,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 5 Nov 2003 11:48:10 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 11 Nov 2003 10:28:27 -0000 1.7 @@ -1,4 +1,4 @@ -Install nsopenssl

    Install nsopenssl

    This AOLserver module is required if you want people to connect to your site via +Install nsopenssl

    Install nsopenssl

    This AOLserver module is required if you want people to connect to your site via https. These commands compile nsopenssl and install it, along with a tcl helper script to handle https connections. You will also need ssl certificates. Because those should @@ -19,8 +19,7 @@ [root@yourserver nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/ [root@yourserver nsopenssl-2.1]#

    cd /usr/local/src/aolserver
    -wget --passive
    -http://www.scottg.net/download/nsopenssl-2.1.tar.gz
    +wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz
     tar xzf nsopenssl-2.1.tar.gz 
     cd nsopenssl-2.1 
     make OPENSSL=/usr/local/ssl 
    Index: openacs-4/packages/acs-core-docs/www/install-nspam.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-nspam.html,v
    diff -u -N -r1.1 -r1.2
    --- openacs-4/packages/acs-core-docs/www/install-nspam.html	28 Oct 2003 22:18:46 -0000	1.1
    +++ openacs-4/packages/acs-core-docs/www/install-nspam.html	11 Nov 2003 10:28:27 -0000	1.2
    @@ -1 +1 @@
    -Install nspam
    View comments on this page at openacs.org
    +Install nspam
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-origins.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-origins.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/install-origins.html 28 Oct 2003 22:18:46 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/install-origins.html 11 Nov 2003 10:28:27 -0000 1.2 @@ -1,4 +1,4 @@ -Where did this document come from?

    Where did this document come from?

    +Where did this document come from?

    Where did this document come from?

    This document was created by Vinod Kurup, but it's really just plagiarism from a number of documents that came before it. If I've used something that you've written without proper credit, let me Index: openacs-4/packages/acs-core-docs/www/install-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-overview.html,v diff -u -N -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/install-overview.html 5 Nov 2003 11:48:10 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/install-overview.html 11 Nov 2003 10:28:27 -0000 1.18 @@ -1,4 +1,4 @@ -Chapter�2.�Installation Overview

    Chapter�2.�Installation Overview

    +Chapter�2.�Installation Overview

    Chapter�2.�Installation Overview

    by Vinod Kurup
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/install-qmail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-qmail.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/install-qmail.html 5 Nov 2003 14:46:51 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/install-qmail.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Install qmail (OPTIONAL)

    Install qmail (OPTIONAL)

    Qmail is a Mail Transfer Agent. It handles incoming and +Install qmail (OPTIONAL)

    Install qmail (OPTIONAL)

    Qmail is a Mail Transfer Agent. It handles incoming and outgoing mail. Install qmail if you want your OpenACS server to send and receive mail, and you don't want to use an alternate MTA.

    Red Hat 9: all djb tools (qmail, daemontools, ucspi) will @@ -14,8 +14,7 @@ cd ..

    All platforms continue:

    [root@yourserver src]# cd ucspi-tcp-0.88
     [root@yourserver ucspi-tcp-0.88]# make
     ( cat warn-auto.sh; \
    -echo 'main="$1"; shift'; \
    -(many lines omitted)
    +echo 'main="$1"; shift'; \(many lines omitted)
     ./compile instcheck.c
     ./load instcheck hier.o auto_home.o unix.a byte.a
     [root@yourserver ucspi-tcp-0.88]# make setup check
    @@ -30,7 +29,7 @@
     tcpserver: usage: tcpserver [ -1UXpPhHrRoOdDqQv ] [ -c limit ] [ -x rules.cdb ] [ -B banner ] [ -g gid ] [ -u uid
     ] [ -b backlog ] [ -l localname ] [ -t timeout ] host port program
     [root@yourserver ucspi-tcp-0.88]#
    -

    +

    (I'm not sure if this next step is 100% necessary, but when I skip it I get problems. If you get the error 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) then you need to do this.) AOLServer sends outgoing mail via the ns_sendmail command, which pipes a command to the sendmail executable. Or, in our @@ -44,7 +43,7 @@ send outgoing mail.

    [root@yourserver ucspi-tcp-0.88]# cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
     [root@yourserver ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
     
    cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp 
    -tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp 
  • Install Qmail.�

    Download qmail, +tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

  • Install Qmail.�

    Download qmail, set up the standard supporting users and build the binaries:

    [root@yourserver root]# cd /usr/local/src
     [root@yourserver src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
     [root@yourserver src]# tar xzf netqmail-1.04.tar.gz
    @@ -84,8 +83,7 @@
     [root@yourserver netqmail-1.04]# cd netqmail-1.04
     [root@yourserver netqmail-1.04]# make setup check
     ( cat warn-auto.sh; \
    -echo CC=\'`head -1 conf-cc`\'; \
    -(many lines omitted)
    +echo CC=\'`head -1 conf-cc`\'; \(many lines omitted)
     ./install
     ./instcheck
     
    cd /usr/local/src 
    @@ -104,7 +102,7 @@
     cd netqmail-1.04
     ./collate.sh
     cd netqmail-1.04
    -make setup check

    Replace sendmail with qmail's wrapper.

    [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
    +make setup check

    Replace sendmail with qmail's wrapper.

    [root@yourserver qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
     [root@yourserver qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
     [root@yourserver qmail-1.03]#
     
    rm -f /usr/bin/sendmail /usr/sbin/sendmail
    @@ -126,7 +124,7 @@
     
    cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root 
     chmod 644 ~alias/.qmail* 
     /var/qmail/bin/maildirmake ~alias/Maildir/ 
    -chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format +chown -R alias.nofiles /var/qmail/alias/Maildir

    Configure qmail to use the Maildir delivery format (instead of mbox), and install a version of the qmail startup script modified to use Maildir.

    [root@yourserver alias]# echo "./Maildir" > /var/qmail/bin/.qmail
     [root@yourserver alias]# cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
     [root@yourserver alias]# chmod 755 /var/qmail/rc
    Index: openacs-4/packages/acs-core-docs/www/install-redhat.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-redhat.html,v
    diff -u -N -r1.12 -r1.13
    --- openacs-4/packages/acs-core-docs/www/install-redhat.html	5 Nov 2003 14:46:51 -0000	1.12
    +++ openacs-4/packages/acs-core-docs/www/install-redhat.html	11 Nov 2003 10:28:27 -0000	1.13
    @@ -1,4 +1,4 @@
    -Appendix�A.�Install Red Hat 8/9

    Appendix�A.�Install Red Hat 8/9

    +Appendix�A.�Install Red Hat 8/9

    Appendix�A.�Install Red Hat 8/9

    by Joel Aufrecht
    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -27,7 +27,7 @@

    1. Unplug the network cable from your computer. We don't want to connect to the network until we're sure the computer is secure. - + (Wherever you see the word secure, you should always read it as, "secure enough for our purposes, given the amount of work we're @@ -55,7 +55,7 @@ Review (and modify if needed) the partitions created and click Next

    2. On the pop-up window asking "Are you sure you want to do this?" click Yes - IF YOU ARE WIPING YOUR HARD DRIVE.

    3. Click Next on the boot loader screen

  • Configure Networking. + IF YOU ARE WIPING YOUR HARD DRIVE.

  • Click Next on the boot loader screen

  • Configure Networking. Again, if you know what you're doing, do this step yourself, being sure to note the firewall holes. Otherwise, follow the instructions in this step to set up a computer directly connected to the internet with a dedicated IP address.

    1. DHCP is a system by which a computer that @@ -76,7 +76,7 @@ Mail (SMTP). In the Other ports box, enter 443, 8000, 8443. Click Next. -Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the +Port 443 is for https (http over ssl), and 8000 and 8443 are http and https access to the development server we'll be setting up.

  • Select any additional languages you want the computer to support and then click Next

  • Choose your time zone and click Next.

  • Type in a root password, twice.

  • On the Package selection page, we're going to @@ -88,9 +88,9 @@ risk that's still screened by the firewall, or a resource hog. Just don't install a database or web server, because that would conflict with the database and web server we'll install later. -

    check�Editors�(this�installs�emacs),
    +

    check�Editors�(this�installs�emacs),
    click�Details�next�to�Text-based�Internet,�check�lynx,�and�click�OK;
    -check�Authoring�and�Publishing�(this�installs�docbook),
    +check�Authoring�and�Publishing�(this�installs�docbook),
    uncheck�Server�Configuration�Tools,
    uncheck�Web�Server,
    uncheck�Windows�File�Server,
    @@ -105,7 +105,7 @@ Flat View and wait. In a minute, a list of packages will appear.

    uncheck�apmd�(monitors�power,�not�very�useful�for�servers),�
    -check�ImageMagick�(required�for�the�photo-album�packages,�
    +check�ImageMagick�(required�for�the�photo-album�packages,�
    uncheckisdn4k-utils�(unless�you�are�using�isdn,�this�installs�a�useless�daemon),�
    check�mutt�(a�mail�program�that�reads�Maildir),
    uncheck�nfs-utils�(nfs�is�a�major�security�risk),�
    @@ -143,7 +143,7 @@ kernel and openssl/openssh root exploits, so you should be upgrading all of that. Since you are upgrading the kernel, reboot after this step. -

  • Lock down SSH

    1. +

    2. Lock down SSH

      1. SSH is the protocol we use to connect securely to the computer (replacing telnet, which is insecure). sshd is the daemon that listens for incoming Index: openacs-4/packages/acs-core-docs/www/install-resources.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-resources.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/install-resources.html 28 Oct 2003 22:18:46 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/install-resources.html 11 Nov 2003 10:28:27 -0000 1.2 @@ -1,4 +1,4 @@ -Resources

        Resources

        +Resources

        Resources

        Here are some resources that OpenACS users have found useful.

        Books

        All of the software that you will need is free and open-source, except for Oracle. You can obtain a free copy of Oracle for development purposes. This is described in the Acquire Oracle section. @@ -38,7 +38,7 @@

        su - nsadmin
         svc -d /service/server1
         dropdb server1
        -createdb server1

    Paths and Users

    Figure�2.2.�Assumptions in this Chapter

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS serviceservice0
    OpenACS service accountservice0
    OpenACS database nameservice0
    Root of OpenACS service file tree/var/lib/aolserver/service0
    Location of source code tarballs for new software/tmp
    The OpenACS tarball contains some files which +createdb server1

    Paths and Users

    Figure�2.2.�Assumptions in this Chapter

    Fully qualified domain name of your serveryourserver.test
    name of administrative access accountremadmin
    OpenACS serviceservice0
    OpenACS service accountservice0
    OpenACS database nameservice0
    Root of OpenACS service file tree/var/lib/aolserver/service0
    Location of source code tarballs for new software/tmp
    The OpenACS tarball contains some files which are useful while setting up other software. Those files are located at:/tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files
    Database backup directory/var/lib/aolserver/service0/database-backup
    Service config files/var/lib/aolserver/service0/etc
    Service log files/var/lib/aolserver/service0/log
    Compile directory/usr/local/src
    PostGreSQL directory/usr/local/pgsql
    AOLServer directory/usr/local/aolserver

    None of these locations are set in stone - they're simply Index: openacs-4/packages/acs-core-docs/www/install-tclwebtest.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-tclwebtest.html,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 5 Nov 2003 15:37:05 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 11 Nov 2003 10:28:27 -0000 1.3 @@ -1,9 +1,8 @@ -Install tclwebtest.

    Install tclwebtest.

    Download the tclwebtest +Install tclwebtest.

    Install tclwebtest.

    Download the tclwebtest source, unpack it, and put it an appropriate place. As root:

    cd /tmp
    -wget http://prdownloads.sourceforge.net/tclwebtest/tclwebtest-0.3.tar.gz?use_mirror=unc
     tar xvzf tclwebtest-0.3.tar.gz
    -mv tclwebtest /usr/local/
    +mv tclwebtest-0.3 /usr/local/
     ln -s /usr/local/tclwebtest-0.3 /usr/local/tclwebtest
     ln -s /usr/local/tclwebtest/tclwebtest /usr/local/bin
     
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/kernel-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-doc.html,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 31 Oct 2003 10:54:19 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 11 Nov 2003 10:28:27 -0000 1.16 @@ -1 +1 @@ -Chapter�10.�Kernel Documentation
    View comments on this page at openacs.org
    +Chapter�10.�Kernel Documentation
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/kernel-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/kernel-overview.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 31 Oct 2003 10:54:19 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Overview

    Overview

    • +Overview

      Overview

      • The OpenACS Kernel, which handles system-wide necessities such as metadata, security, users and groups, subsites, and package Index: openacs-4/packages/acs-core-docs/www/ld-id2849650.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/ld-id2849650.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/ld-id2849650.html 11 Nov 2003 10:29:45 -0000 1.1 @@ -0,0 +1 @@ +Long Description

        This is an image of the flow in the Request Processor

        Index: openacs-4/packages/acs-core-docs/www/ld-id2886798.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/ld-id2886798.html,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/ld-id2886798.html 11 Nov 2003 10:29:45 -0000 1.1 @@ -0,0 +1 @@ +Long DescriptionOpenACS without APM vs. with APM Index: openacs-4/packages/acs-core-docs/www/mac-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/mac-installation.html,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/mac-installation.html 5 Nov 2003 14:46:51 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/mac-installation.html 11 Nov 2003 10:28:27 -0000 1.16 @@ -1,2 +1,2 @@ -OpenACS Installation Guide for Mac OS X

        OpenACS Installation Guide for Mac OS X

        There are several resources for installing on OS X.

        • OpenACS on Mac OS X Quickstart

        • An +OpenACS Installation Guide for Mac OS X

          OpenACS Installation Guide for Mac OS X

          There are several resources for installing on OS X.

          ($Id$)
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/maintenance-web.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maintenance-web.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/maintenance-web.html 5 Nov 2003 14:46:51 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/maintenance-web.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,4 +1,4 @@ -Hosting Web Sites

          Hosting Web Sites

          +Hosting Web Sites

          Hosting Web Sites

          by Joel Aufrecht
          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/maintenance.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/maintenance.html,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/acs-core-docs/www/maintenance.html 31 Oct 2003 10:54:19 -0000 1.7 +++ openacs-4/packages/acs-core-docs/www/maintenance.html 11 Nov 2003 10:28:27 -0000 1.8 @@ -1 +1 @@ -Chapter�6.�Maintenance

          Chapter�6.�Maintenance

          View comments on this page at openacs.org
          +Chapter�6.�Maintenance

          Chapter�6.�Maintenance

          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/object-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/object-identity.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Object Identity

          Object Identity

          +Object Identity

          Object Identity

          by Rafael H. Schloming
          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/object-system-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-design.html,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 31 Oct 2003 10:54:19 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 11 Nov 2003 10:28:27 -0000 1.16 @@ -1,4 +1,4 @@ -OpenACS 4 Object Model Design

          OpenACS 4 Object Model Design

          +OpenACS 4 Object Model Design

          OpenACS 4 Object Model Design

          by Pete Su, Michael Yoon, Richard Li Index: openacs-4/packages/acs-core-docs/www/object-system-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-system-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 31 Oct 2003 10:54:19 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Object Model Requirements

          OpenACS 4 Object Model Requirements

          +OpenACS 4 Object Model Requirements

          OpenACS 4 Object Model Requirements

          By Pete Su
          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/objects.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/objects.html,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/objects.html 5 Nov 2003 14:46:51 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/objects.html 11 Nov 2003 10:28:27 -0000 1.22 @@ -1,4 +1,4 @@ -OpenACS Data Models and the Object System

          OpenACS Data Models and the Object System

          +OpenACS Data Models and the Object System

          OpenACS Data Models and the Object System

          By Pete Su
          OpenACS docs are written by the named authors, and may be edited @@ -80,7 +80,7 @@ Fire up your text editor and open the ROOT/packages/notes/sql/oracle/notes-create.sql (ROOT/packages/notes/sql/postgresql/notes-create.sql for the PG version) file created when we created the package. Then, do the following: -

          Describe the new type to the type system

          +

          Describe the new type to the type system

          First, add an entry to the acs_object_types table with the following PL/SQL call:

           begin  
          @@ -140,7 +140,7 @@
           because the new type note is a subtype of
           acs_object, it will inherit these attributes, so there is
           no need for us to define them.
          -

          Define a table in which to store your objects

          +

          Define a table in which to store your objects

          The next thing we do is make a small modification to the data model to reflect the fact that each row in the notes table represents something that is not only an object of type @@ -165,7 +165,7 @@ use the acs_objects table to find objects will transparently find any objects that are instances of any subtype of acs_objects. -

          Define a package for type specific procedures

          +

          Define a package for type specific procedures

          The next step is to define a PL/SQL package for your new type, and write some basic procedures to create and delete objects. Here is a package definition for our new type: @@ -213,7 +213,7 @@ object OBJ was "read only", then any other object that used OBJ as its context would also be "read only" by default. We'll talk about this more later. -

          Define a package body for type specific procedures

          +

          Define a package body for type specific procedures

          The PL/SQL package body contains the implementations of the procedures defined above. The only subtle thing going on here is that we must use acs_object.new to insert a row into Index: openacs-4/packages/acs-core-docs/www/openacs-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-overview.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 31 Oct 2003 10:54:19 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,4 +1,4 @@ -Overview

          Overview

          +Overview

          Overview

          OpenACS (Open Architecture Community System) is an advanced toolkit for building scalable, community-oriented web applications. If you're thinking of building an Index: openacs-4/packages/acs-core-docs/www/openacs-unpack.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs-unpack.html,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/openacs-unpack.html 31 Oct 2003 10:54:20 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/openacs-unpack.html 11 Nov 2003 10:28:27 -0000 1.7 @@ -1,6 +1,17 @@ -Unpack the OpenACS tarball

          Unpack the OpenACS tarball

          The OpenACS tarball contains sample configuration files +Unpack the OpenACS tarball

          Unpack the OpenACS tarball

          The OpenACS tarball contains sample configuration files for some of the packages listed below. In order to access those files, unpack the tarball now.

          [root@yourserver root]# cd /tmp
           [root@yourserver tmp]# tar xzf openacs-5.0.0a4.tgz
           
          cd /tmp
          -tar xzf openacs-5.0.0a4.tgz
          View comments on this page at openacs.org
          +tar xzf openacs-5.0.0a4.tgz

          If you are installing from a different method and just need the configuration files, you can instead get them from CVS:

          [root@yourserver root]# cd /tmp
          +[root@yourserver tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
          +cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory
          +cvs server: Updating openacs-4/packages/acs-core-docs/www/files
          +U openacs-4/packages/acs-core-docs/www/files/README.TXT
          +(many lines omitted)
          +U openacs-4/packages/acs-core-docs/www/files/template-ini.ini
          +U openacs-4/packages/acs-core-docs/www/files/winnsd.txt
          +[root@yourserver tmp]# mv openacs-4 openacs-5.0.0a4
          +
          cd /tmp
          +cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/
          +mv openacs-4 openacs-5.0.0a4
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/openacs.html,v diff -u -N -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/openacs.html 5 Nov 2003 15:32:38 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/openacs.html 11 Nov 2003 10:28:27 -0000 1.20 @@ -1,4 +1,4 @@ -Install OpenACS 5.0.0a4

          Install OpenACS 5.0.0a4

          +Install OpenACS 5.0.0a4

          Install OpenACS 5.0.0a4

          by Vinod Kurup
          OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -38,7 +38,7 @@ [root@yourserver root]# useradd -g service0 -G web service0 -d /home/service0 [root@yourserver root]#

          Install with automated script (EXPERIMENTAL)

          Starting with OpenACS 5.0, an experimental script is available to automate all of the steps for the rest of this - section. Requires tclwebtest. If you are not feeling lucky, skip to Section�, “Install from tarball”.

          Get the install script from CVS. It is located within + section. Requires tclwebtest. If you are not feeling lucky, skip to the section called “Install from tarball”.

          Get the install script from CVS. It is located within the main cvs tree, at /etc/install. Use anonymous CVS checkout to get that directory in the home directory of the service's dedicated user. We put it there so that it is not @@ -57,7 +57,7 @@ /home/service0/install/install.tcl and change the values as documented in the file. It will work unchanged at 127.0.0.1:8000.

          Run the file as root.

          [service0@yourserver service0]$ exit 
          -[root@yourserver root]# ./home/service0/install/install.sh
          +[root@yourserver root]# sh /home/service0/install/install.sh
           /home/service0/install/install.sh: Starting installation with config_file 
           /home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/
           service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes, 
          @@ -66,7 +66,7 @@
           ./install.sh: Finished (re)installing /var/lib/aolserver/service0 at Wed Nov  
           5 13:27:17 CET 2003.  Access the new site at http://127.0.0.1:8000 with admin 
           username admin@yourserver.test and password 1
          -[root@yourserver root]#

          You can proceed to Section�, “Next Steps”.

          Install from tarball

          You should already have downloaded the OpenACS tarball +[root@yourserver root]#

          You can proceed to the section called “Next Steps”.

          Install from tarball

          You should already have downloaded the OpenACS tarball to the /tmp directory. If not, download the OpenACS tarball and save it in @@ -207,7 +207,7 @@ SVRMGR> alter user service0 quota unlimited on service0; SVRMGR> exit;

          Your table space is now ready. In case you are trying to delete a - previous OpenACS installation, consult these commands in Section�, “Deleting a tablespace” below. + previous OpenACS installation, consult these commands in the section called “Deleting a tablespace” below.

        • Make sure that you can login to Oracle using your service_name account:

          @@ -222,7 +222,7 @@
           		  You should see today's date in a format 'YYYY-MM-DD.'
           		  If you can't login, try redoing step 1 again. If the date is
           		  in the wrong format, make sure you followed the steps outlined in
          -		  Section�, “Troubleshooting Oracle Dates”
          +		  the section called “Troubleshooting Oracle Dates”
           		  

      • Prepare PostgreSQL for an OpenACS Service.�

        • PostGreSQL:

          Create a user in the database matching the service name. With default PostGreSQL authentication the name of the user of the process will be matched to this account @@ -239,7 +239,7 @@ CREATE DATABASE [service0@yourserver service0]$

          su - service0
          -createdb -E UNICODE service0
        • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.

          [service0@yourserver service0]$ export EDITOR=emacs;crontab -e

          Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

          0 1 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
        • Add Full Text Search Support (OPTIONAL)

        • [service0@yourserver service0]$ exit
          +createdb -E UNICODE service0
        • Automate daily database Vacuuming. This is a process which cleans out discarded data from the database. A quick way to automate vacuuming is to edit the cron file for the database user.

          [service0@yourserver service0]$ export EDITOR=emacs;crontab -e

          Add this line to the file. The numbers and stars at the beginning are cron columns that specify when the program should be run - in this case, whenever the minute is 0 and the hour is 1, i.e., 1:00 am every day.

          0 1 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0
        • Add Full Text Search Support (OPTIONAL)

        • [service0@yourserver service0]$ exit
           logout
           
           [root@yourserver root]# 
    • Configure an AOLserver Service for OpenACS.�

      1. @@ -249,7 +249,7 @@ need to configure a virtual server. The Reference Platform uses a configuration file included in the OpenACS tarball, /var/lib/aolserver/service0/etc/config.tcl. - Open it in an editor to adjust the parameters.

        [root@yourserver root]# su - service0
        +	   Open it in an editor to adjust the parameters.

        [root@yourserver root]# su - service0
         [service0@yourserver service0]$ cd /var/lib/aolserver/service0/etc
         [service0@yourserver etc]# emacs config.tcl
         

        Index: openacs-4/packages/acs-core-docs/www/oracle.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/oracle.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/oracle.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/oracle.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Install Oracle 8.1.7

        Install Oracle 8.1.7

        +Install Oracle 8.1.7

        Install Oracle 8.1.7

        by Vinod Kurup
        OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -67,7 +67,7 @@ of passwords, we advise you to follow these defaults unless you know what you are doing. Subsequent documents will expect that you used the defaults, so a change made here will necessitate further changes - later. For a guide to the defaults, please see Section�, “Defaults”. + later. For a guide to the defaults, please see the section called “Defaults”.

        @@ -330,16 +330,16 @@

        Note

        Some people have had trouble with this step on RedHat 7.3 and 8.0. If so, try the following steps before calling - ./runInstaller: + ./runInstaller:

        1. Execute the following command: - /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh + /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh

        2. - Type export LD_ASSUME_KERNEL=2.2.5 + Type export LD_ASSUME_KERNEL=2.2.5

      2. @@ -363,7 +363,7 @@ logged on as oracle using su - oracle. If so, edit the ~/.bash_profile as you - did in Section�, “Pre-Installation Tasks” + did in the section called “Pre-Installation Tasks”

      3. @@ -568,7 +568,7 @@

      4. Run the script. Switch to the oracle user first to set the environment appropriately and then do - su to get root privileges, while keeping + su to get root privileges, while keeping the oracle user's enviroment.

         joeuser:~$ su - oracle
        @@ -691,7 +691,7 @@
               This step will take you through the steps of creating a customized
               database. Be warned that this process takes about an hour on a
               Pentium II with 128 MB of RAM.
        -    

        Note

        RedHat 7.3 and 8.0 users: Before running dbassist, do the following.

        1. +

          Note

          RedHat 7.3 and 8.0 users: Before running dbassist, do the following.

          1. Download the glibc patch from Oracle Technet into /tmp.

          2. @@ -887,7 +887,7 @@

             SQL> select sysdate from dual;

            If you don't see a date that fits the format - YYYY-MM-DD, please read Section�, “Troubleshooting Oracle Dates”. + YYYY-MM-DD, please read the section called “Troubleshooting Oracle Dates”.

          3. At this point we are going to hammer your database with an intense acceptance test. This usually takes around 30 minutes. @@ -912,7 +912,7 @@ pre-existing database. Unfortunately, the only solution is to create a new database with a block size of at least 4096. For instructions on how to - do this, see Section�, “Creating the First Database” above. You + do this, see the section called “Creating the First Database” above. You can set the parameter using the dbassist program or by setting the DB_BLOCK_SIZE parameter in Index: openacs-4/packages/acs-core-docs/www/os-install.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-install.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/os-install.html 28 Oct 2003 22:18:46 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/os-install.html 11 Nov 2003 10:28:27 -0000 1.2 @@ -1,4 +1,4 @@ -Linux Install Guides

            Linux Install Guides

            +Linux Install Guides

            Linux Install Guides

            Here's a list of some helpful documentation for various OS's

            • Painless Debian Index: openacs-4/packages/acs-core-docs/www/os-security.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/os-security.html,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/acs-core-docs/www/os-security.html 28 Oct 2003 22:18:46 -0000 1.1 +++ openacs-4/packages/acs-core-docs/www/os-security.html 11 Nov 2003 10:28:27 -0000 1.2 @@ -1,4 +1,4 @@ -Security Information

              Security Information

              +Security Information

              Security Information

              Once you get your OS installed, it's imperative that you secure your installation. As Jon Griffin repeatedly warns us, "No distribution is secure out of the box." The Reference Platform implements Index: openacs-4/packages/acs-core-docs/www/packages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/packages.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/packages.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/packages.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -OpenACS 5.0.0a4 Packages

              OpenACS 5.0.0a4 Packages

              +OpenACS 5.0.0a4 Packages

              OpenACS 5.0.0a4 Packages

              By Pete Su and Bryan Quinn
              OpenACS docs are written by the named authors, and may be edited Index: openacs-4/packages/acs-core-docs/www/parties.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/parties.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/parties.html 5 Nov 2003 14:46:51 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/parties.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Parties in OpenACS 5.0.0a4

              Parties in OpenACS 5.0.0a4

              +Parties in OpenACS 5.0.0a4

              Parties in OpenACS 5.0.0a4

              by Rafael H. Schloming
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/permissions-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-design.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Permissions Design

              OpenACS 4 Permissions Design

              +OpenACS 4 Permissions Design

              OpenACS 4 Permissions Design

              by John Prevost and Rafael H. Schloming
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/permissions-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Permissions Requirements

              OpenACS 4 Permissions Requirements

              +OpenACS 4 Permissions Requirements

              OpenACS 4 Permissions Requirements

              by John McClary Prevost
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 5 Nov 2003 14:46:51 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4.x Permissions Tediously Explained

              OpenACS 4.x Permissions Tediously Explained

              +OpenACS 4.x Permissions Tediously Explained

              OpenACS 4.x Permissions Tediously Explained

              by Vadim Nasardinov. Modified and converted to Docbook XML by Roberto Mello

              Overview

              The general permissions system has a relatively complex data model in OpenACS 4.x. @@ -85,7 +85,7 @@ to store permission information explicitly about every object, i.e. if the system has 100,000 and 1,000 users who have the read privilege on all objects, then we would need to store 100,000,000 entries of the form: -

              Table�8.1.�

              object_idgrantee_idprivilege
              object_id_1user_id_1'read'
              object_id_1user_id_2'read'
              ...
              object_id_1user_id_n'read'
              object_id_2user_id_1'read'
              object_id_2user_id_2'read'
              ...
              object_id_2user_id_n'read'
              ...
              ...
              object_id_muser_id_1'read'
              object_id_muser_id_2'read'
              ...
              object_id_muser_id_n'read'

              +

              Table�8.1.�

              object_idgrantee_idprivilege
              object_id_1user_id_1'read'
              object_id_1user_id_2'read'
              ...
              object_id_1user_id_n'read'
              object_id_2user_id_1'read'
              object_id_2user_id_2'read'
              ...
              object_id_2user_id_n'read'
              ...
              ...
              object_id_muser_id_1'read'
              object_id_muser_id_2'read'
              ...
              object_id_muser_id_n'read'

              Although quite feasible, this approach fails to take advantage of the fact that objects in the system are commonly organized hierarchally, and permissions usually follow the hierarchical structure, so that if user @@ -100,7 +100,7 @@

              Context Hierarchy

              Suppose objects A, B, ..., and F form the following hierarchy. -

              Table�8.2.�

              A

              +

              Table�8.2.�

              A

              object_id=10

              B

              object_id=20 @@ -116,23 +116,23 @@ This can be represented in the acs_objects table by the following entries: -

              Table�8.3.�

              object_idcontext_id
              2010
              3010
              4020
              5020
              6030

              +

              Table�8.3.�

              object_idcontext_id
              2010
              3010
              4020
              5020
              6030

              The first entry tells us that object 20 is the descendant of object 10, and the third entry shows that object 40 is the descendant of object 20. By running a CONNECT BY query, we can compute that object 40 is the second-generation descendant of object 10. With this in mind, if we want to record the fact that user Joe has the read privilege on objects A, ..., F, we only need to record one entry in the acs_permissions table. -

              Table�8.4.�

              objectgranteeprivilege
              AJoeread

              +

              Table�8.4.�

              objectgranteeprivilege
              AJoeread

              The fact that Joe can also read B, C, ..., and F can be derived by ascertaining that these objects are children of A by traversing the context hierarchy. As it turns out, hierarchical queries are expensive. As Rafael Schloming put it so aptly, Oracle can't deal with hierarchies for shit.

              One way to solve this problem is to cache a flattened view of the context tree like so: -

              Table�8.5.�

              objectancestorn_generations
              AA0
              BB0
              BA1
              CC0
              CA1
              DD0
              DB1
              DA2
              EE0
              EB1
              EA2
              FF0
              FC1
              FA2

              +

              Table�8.5.�

              objectancestorn_generations
              AA0
              BB0
              BA1
              CC0
              CA1
              DD0
              DB1
              DA2
              EE0
              EB1
              EA2
              FF0
              FC1
              FA2

              Note that the number of entries in the flattened view grows exponentially with respect to the depth of the context tree. For instance, if you have a fully populated binary tree with a depth of n, then the number of entries @@ -203,7 +203,7 @@ an object's security_inherit_p column to 'f', you can stop permissions from cascading down the context tree. In the following example, Joe does not have the read permissions on C and F. -

              Table�8.6.�


              +

              Table�8.6.�


              A
              object_id=10
              readable�by�Joe
              @@ -231,7 +231,7 @@ Privileges are also organized hierarchically. In addition to the five main system privileges defined in the ACS Kernel data model, application developers may define their own. For instance, the Bboard package defines the following privileges: -

              Table�8.7.�

              privilege
              create_category
              create_forum
              create_message
              delete_category
              delete_forum
              delete_message
              moderate_forum
              read_category
              read_forum
              read_message
              write_category
              write_forum
              write_message

              +

              Table�8.7.�

              privilege
              create_category
              create_forum
              create_message
              delete_category
              delete_forum
              delete_message
              moderate_forum
              read_category
              read_forum
              read_message
              write_category
              write_forum
              write_message

              By defining parent-child relationship between privileges, the OpenACS data model makes it easier for developers to manage permissions. Instead of granting a user explicit read, write, delete, @@ -240,7 +240,7 @@ privilege to which the first four privileges are tied. To give a more detailed example, the Bboard privileges are structured as follows. -

              Table�8.8.�

              admin
              createdeletereadwritemoderate forum
              create categorycreate forumcreate messagedelete categorydelete forumdelete messageread categoryread forumread messagewrite categorywrite forumwrite message

              +

              Table�8.8.�

              admin
              createdeletereadwritemoderate forum
              create categorycreate forumcreate messagedelete categorydelete forumdelete messageread categoryread forumread messagewrite categorywrite forumwrite message

              The parent-child relationship between privileges is represented in the acs_privilege_hierarchy table:

              @@ -286,7 +286,7 @@
                   

              Party Hierarchy

              Now for the third hierarchy playing a promiment role in the permission system. The party data model is set up as follows. -

              +    

                 create table parties (
                     party_id
                         not null
              @@ -370,7 +370,7 @@
                   

              The acs_rels table entries would look like so: -

              Table�8.10.�

              rel_typeobject_oneobject_two
              +

              Table�8.10.�

              rel_typeobject_oneobject_two
              membership_rel Pranksters @@ -405,7 +405,7 @@

              The relevant entries in the acs_rels look like so. -

              Table�8.11.�

              rel_typeobject_oneobject_two
              +

              Table�8.11.�

              rel_typeobject_oneobject_two
              composition_rel Pranksters @@ -616,7 +616,7 @@

              Note that in the above example, acs_permissions had only one entry that needed to be deleted: -

              Table�8.12.�

              object_idgrantee_idprivilege
              +

              Table�8.12.�

              object_idgrantee_idprivilege
              default_context registered_users Index: openacs-4/packages/acs-core-docs/www/permissions.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/permissions.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/permissions.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/permissions.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Groups, Context, Permissions

              Groups, Context, Permissions

              By Pete Su


              +Groups, Context, Permissions

              Groups, Context, Permissions

              By Pete Su


              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

              Overview

              Index: openacs-4/packages/acs-core-docs/www/platform-dev.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/platform-dev.html,v diff -u -N -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/platform-dev.html 31 Oct 2003 10:54:20 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/platform-dev.html 11 Nov 2003 10:28:27 -0000 1.3 @@ -1,3 +1,3 @@ -Platform Development

              Platform Development

              Information about the internal workings of OpenACS, useful +Platform Development

              Platform Development

              Information about the internal workings of OpenACS, useful both for modifying the core functionality and for developing new packages.

              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/postgres.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/postgres.html,v diff -u -N -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/postgres.html 5 Nov 2003 14:46:52 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/postgres.html 11 Nov 2003 10:28:27 -0000 1.20 @@ -1,9 +1,14 @@ -Install PostGreSQL

              Install PostGreSQL

              +Install PostGreSQL

              Install PostGreSQL

              by Vinod Kurup
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

              Skip this section if you will run only Oracle.

              OpenACS 5.0.0a4 will run with PostGreSQL 7.2.x, 7.3.2, - 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL.

              • Using the Red Hat RPM.�Red Hat users: If you install PostGreSQL 7.3.2 from the Red Hat 9 RPM, you + 7.3.3, and 7.3.4. 7.3.4 is the recommended version of PostgreSQL.

                • Debian.�

                  Debian users can install the package and add some backwards-compatibility links:

                  apt-get install postgresql postgresql-dev postgresql-doc
                  +ln -s /usr/include/postgresql/ /usr/include/pgsql
                  +ln -s /var/lib/postgres /usr/local/pgsql
                  +ln -s /usr/include/pgsql /usr/local/pgsql/include
                  +su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1"

                  and proceed to Tune postgres. (OPTIONAL) or to the + next section.

                • Using the Red Hat RPM.�Red Hat users: If you install PostGreSQL 7.3.2 from the Red Hat 9 RPM, you can skip a few steps. These shell commands add some links for compatibility with the directories from a source-based install; start the service; create a new group for web service users, and modify the postgres user's environment (more @@ -63,7 +68,7 @@ Change to the postgres user and run ./configure to set the compilation options automatically. This is the point at which you can configure PostgreSQL in various ways. For example, if you want to enable - Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help. + Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.

                  [root@yourserver src]# su - postgres
                   [postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.3.4
                   [postgres@yourserver postgresql-7.3.4]$ ./configure
                  @@ -257,10 +262,10 @@
                         start on runlevel 2 unless you alter the above commands a
                         little. This usually isn't a problem as Red Hat defaults to runlevel 3)
                   
                  -    

                • Tune postgres. (OPTIONAL).�The default values for PostGreSQL are very conservative; we can safely change some of them and improve performance.

                  1. Change the kernel parameter for maximum shared memory +

                  2. Tune postgres. (OPTIONAL).�The default values for PostGreSQL are very conservative; we can safely change some of them and improve performance.

                    1. Change the kernel parameter for maximum shared memory segment size to 128Mb:

                      [root@yourserver root]# echo 134217728 >/proc/sys/kernel/shmmax
                       [root@yourserver root]#

                      Make that change permanent by editing - emacs /etc/sysctl.conf to + /etc/sysctl.conf to add these lines at the end:

                      # increase shared memory limit for postgres
                       kernel.shmmax = 134217728
                    2. Edit the PostGreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information)

                      #       Shared Memory Size
                       #
                      @@ -273,7 +278,6 @@
                       
                       #       Write-ahead log (WAL)
                       #
                      -wal_files = 3               # range 0-64
                       checkpoint_segments = 3     # in logfile segments (16MB each), min 1
                       

                      Restart postgres (service postgres restart) so that the changes take effect.

                  more information about PostgreSQL

                  • Index: openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Programming with AOLserver

                    Programming with AOLserver

                    +Programming with AOLserver

                    Programming with AOLserver

                    by Michael Yoon, Jon Salz and Lars Pind.
                    OpenACS docs are written by the named authors, and may be edited Index: openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 5 Nov 2003 14:46:52 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 11 Nov 2003 10:28:27 -0000 1.12 @@ -1,8 +1,8 @@ -Add PSGML commands to emacs init file (OPTIONAL)

                    Add PSGML commands to emacs init file (OPTIONAL)

                    +Add PSGML commands to emacs init file (OPTIONAL)

                    Add PSGML commands to emacs init file (OPTIONAL)

                    If you plan to write or edit any documentation with emacs, install a customized emacs configuration file with DocBook commands in the skeleton directory, so it will be used for all new users. The file also fixes the backspace -> help mis-mapping that often occurs in terminals.

                    [root@yourserver tmp]# cp /tmp/openacs-5.0.0a4/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
                     cp: overwrite `/etc/skel/.emacs'? y
                    -[root@yourserver tmp]# 
                    View comments on this page at openacs.org
                    +[root@yourserver tmp]#

                    Debian users:

                    apt-get install psgml
                    View comments on this page at openacs.org
                    Index: openacs-4/packages/acs-core-docs/www/psgml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/psgml-mode.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Using PSGML mode in Emacs

                    Using PSGML mode in Emacs

                    +Using PSGML mode in Emacs

                    Using PSGML mode in Emacs

                    By David Lutterkort
                    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/release-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/release-notes.html,v diff -u -N -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/release-notes.html 5 Nov 2003 14:46:52 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/release-notes.html 11 Nov 2003 10:28:27 -0000 1.24 @@ -1,4 +1,4 @@ -OpenACS Release Notes

                    OpenACS Release Notes

                    Version 5.0.0 alpha1

                    +OpenACS Release Notes

                    OpenACS Release Notes

                    Version 5.0.0 alpha1

                    This is the first alpha release of OpenACS 5.0.0. This release has a number of severe bugs, and is not suitable for production systems. It has passed several release criteria, @@ -10,7 +10,7 @@ Bug Tracker at the OpenACS website.

                    You may want to begin by reading our installation documentation for - Section�, “a Unix-like system”. Note that the Windows documentation is + the section called “a Unix-like system”. Note that the Windows documentation is not current for OpenACS 5.0.0a4, but an alternative is to use John Sequeira's Oasis VM project. @@ -83,4 +83,4 @@ Who's online feature.

                  • Spell checking. -

                  ($Id$)
                View comments on this page at openacs.org
                +

              ($Id$)
              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/releasing-openacs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/releasing-openacs.html,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 31 Oct 2003 15:57:35 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 11 Nov 2003 10:28:27 -0000 1.5 @@ -1,4 +1,4 @@ -Appendix�E.�How to package and release OpenACS

              Appendix�E.�How to package and release OpenACS

              1. Check out the cvs tree. The files must be checked out +Appendix�E.�How to package and release OpenACS

                Appendix�E.�How to package and release OpenACS

                1. Check out the cvs tree. The files must be checked out through a cvs account with write access. In this example, the cvs user on openacs.org is implied from the ssh login information previously set up. It could be overridden via foobar@openacs.org.

                  Index: openacs-4/packages/acs-core-docs/www/request-processor.html
                  ===================================================================
                  RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/request-processor.html,v
                  diff -u -N -r1.20 -r1.21
                  --- openacs-4/packages/acs-core-docs/www/request-processor.html	5 Nov 2003 14:46:52 -0000	1.20
                  +++ openacs-4/packages/acs-core-docs/www/request-processor.html	11 Nov 2003 10:28:27 -0000	1.21
                  @@ -1,4 +1,4 @@
                  -The Request Processor

                  The Request Processor

                  +The Request Processor

                  The Request Processor

                  By Pete Su
                  OpenACS docs are written by the named authors, and may be edited @@ -13,13 +13,13 @@ diagram summarizes the stages of the request processor assuming a URL request like http://someserver.com/notes/somepage.adp. -

                  +

                  Stage 1: Search Site Map

                  The first thing the RP does is to map the given URL to the appropriate physical directory in the filesystem, from which to serve content. We do this by searching the site map data model (touched on in the Packages, and further -discussed in Section�, “Writing OpenACS 5.0.0a4 Application Pages”). This data model maps URLs to objects representing +discussed in the section called “Writing OpenACS 5.0.0a4 Application Pages”). This data model maps URLs to objects representing content, and these objects are typically package instances.

                  After looking up the appropriate object, the RP stores the URL, the ID Index: openacs-4/packages/acs-core-docs/www/requirements-template.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/requirements-template.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -System/Application Requirements Template

                  System/Application Requirements Template

                  By You


                  +System/Application Requirements Template

                  System/Application Requirements Template

                  By You


                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Introduction

                  Index: openacs-4/packages/acs-core-docs/www/rp-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-design.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/rp-design.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Request Processor Design

                  OpenACS 4 Request Processor Design

                  +OpenACS 4 Request Processor Design

                  OpenACS 4 Request Processor Design

                  by Rafael H. Schloming
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/rp-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/rp-requirements.html,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 31 Oct 2003 10:54:20 -0000 1.13 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 11 Nov 2003 10:28:27 -0000 1.14 @@ -1,4 +1,4 @@ -OpenACS 4 Request Processor Requirements

                  OpenACS 4 Request Processor Requirements

                  +OpenACS 4 Request Processor Requirements

                  OpenACS 4 Request Processor Requirements

                  by Rafael H. Schloming
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/security-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-design.html,v diff -u -N -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/security-design.html 31 Oct 2003 10:54:20 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/security-design.html 11 Nov 2003 10:28:27 -0000 1.16 @@ -1,4 +1,4 @@ -OpenACS 4 Security Design

                  OpenACS 4 Security Design

                  +OpenACS 4 Security Design

                  OpenACS 4 Security Design

                  by Richard Li, Archit Shah
                  OpenACS docs are written by the named authors, and may be edited Index: openacs-4/packages/acs-core-docs/www/security-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-notes.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/security-notes.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -OpenACS 4 Security Notes

                  OpenACS 4 Security Notes

                  +OpenACS 4 Security Notes

                  OpenACS 4 Security Notes

                  by Richard Li
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/security-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Security Requirements

                  OpenACS 4 Security Requirements

                  +OpenACS 4 Security Requirements

                  OpenACS 4 Security Requirements

                  by Richard Li
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/subsites-design.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-design.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/subsites-design.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/subsites-design.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Subsites Design Document

                  OpenACS 4 Subsites Design Document

                  +OpenACS 4 Subsites Design Document

                  OpenACS 4 Subsites Design Document

                  by Rafael H. Schloming
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/subsites-requirements.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites-requirements.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/subsites-requirements.html 31 Oct 2003 10:54:20 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/subsites-requirements.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -OpenACS 4 Subsites Requirements

                  OpenACS 4 Subsites Requirements

                  +OpenACS 4 Subsites Requirements

                  OpenACS 4 Subsites Requirements

                  by Rafael H. Schloming and Dennis Gregorovic
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/subsites.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/subsites.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/subsites.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/subsites.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Writing OpenACS 5.0.0a4 Application Pages

                  Writing OpenACS 5.0.0a4 Application Pages

                  +Writing OpenACS 5.0.0a4 Application Pages

                  Writing OpenACS 5.0.0a4 Application Pages

                  By Rafael H. Schloming and Pete Su


                  Index: openacs-4/packages/acs-core-docs/www/tcl-doc.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tcl-doc.html,v diff -u -N -r1.21 -r1.22 --- openacs-4/packages/acs-core-docs/www/tcl-doc.html 5 Nov 2003 15:32:38 -0000 1.21 +++ openacs-4/packages/acs-core-docs/www/tcl-doc.html 11 Nov 2003 10:28:27 -0000 1.22 @@ -1,4 +1,4 @@ -Documenting Tcl Files: Page Contracts and Libraries

                  Documenting Tcl Files: Page Contracts and Libraries

                  +Documenting Tcl Files: Page Contracts and Libraries

                  Documenting Tcl Files: Page Contracts and Libraries

                  by Jon Salz on 3 July 2000
                  OpenACS docs are written by the named authors, and may be edited Index: openacs-4/packages/acs-core-docs/www/templates.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/templates.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/templates.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/templates.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -Using Templates in OpenACS 5.0.0a4

                  Using Templates in OpenACS 5.0.0a4

                  By Pete Su


                  +Using Templates in OpenACS 5.0.0a4

                  Using Templates in OpenACS 5.0.0a4

                  By Pete Su


                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  Overview

                  Index: openacs-4/packages/acs-core-docs/www/tutorial-advanced.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-advanced.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 5 Nov 2003 14:46:52 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,16 +1,16 @@ -Advanced Topics

                  Advanced Topics

                  Important

                  This section is a work in progress.

                  +Advanced Topics

                  Advanced Topics

                  Important

                  This section is a work in progress.

                  by Joel Aufrecht
                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

                  Overview

                  This tutorial covers topics which are not essential to +

                  Overview

                  This tutorial covers topics which are not essential to creating a minimal working package. Each section can be used independently of all of the others; all sections assume that you've completed the basic tutorial.

                  • How to enforce security so that users can't change other users records

                  • How to use the content management tables so that ... what?

                  • How to change the default stylesheets for Form Builder HTML forms.

                  • How to make your package searchable with OpenFTS/Oracle

                  • How to make your package send email notifications

                  • How to prepare pagelets for inclusion in other pages

                  • How and when to put procedures in a tcl procedure library

                  • How to add general_comments to your pages

                  • More on ad_form - data validation, other stuff. (plan to draw from Jon Griffin's doc)

                  • How and when to implement caching

                  • partialquery in xql

                  • How to use the html/text entry widget to get the - "does this look right" confirm page

                  • APM package dependencies

                  Write the Requirements and Design Specs

                  It's time to document. For the tutorial we'll use + "does this look right" confirm page

                2. APM package dependencies

                Write the Requirements and Design Specs

                It's time to document. For the tutorial we'll use pre-written documentation. When creating a package from scratch, start by copying the documentation template from /var/lib/aolserver/openacs-dev/packages/acs-core-docs/xml/docs/xml/package-documentation-template.xml @@ -60,7 +60,7 @@ Writing bi01.html for bibliography Writing index.html for book [service0@yourserver xml]$

                Verify that the documentation was generated and reflects - your changes by browsing to http://yoursite:8000/samplenote/doc

                Add the new package to CVS

                Before you do any more work, make sure that your work is + your changes by browsing to http://yoursite:8000/samplenote/doc

                Add the new package to CVS

                Before you do any more work, make sure that your work is protected by putting it all into cvs. The cvs add command is not recursive, so you'll have to traverse the directory tree manually and add as you go. (More on @@ -120,7 +120,7 @@ initial revision: 1.1 done (many lines omitted) -[service0@yourserver samplenote]$

                Delete with confirmation

                We need a way to delete records. We'll create a +[service0@yourserver samplenote]$

                Delete with confirmation

                We need a way to delete records. We'll create a recursive confirmation page.

                Add this column to the table_def in index.tcl

                {delete "" {} {<td><a href="note-delete?note_id=$note_id">Delete</a></td>}}

                Create the delete confirmation/execution page.

                [service0@yourserver www]$ emacs note-delete.tcl
                ad_page_contract {
                     A page that gets confirmation and then delete notes.
                 
                @@ -180,7 +180,7 @@
                 <formtemplate id="note-del-confirm"></formtemplate>
                 </form>

                The ADP is very simple. The formtemplate tag outputs the HTML -form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.

                General_comments

                You can track comments for any ACS Object. Here we'll track +form generated by the ad_form command with the matching name. Test it by adding the new files in the APM and then deleting a few samplenotes.

                General_comments

                You can track comments for any ACS Object. Here we'll track comments for notes. On the notes.tcl/adp pair, which is used to display individual notes, we want to put a link to add comments at the bottom of the screen. If there are any comments, we want to @@ -201,13 +201,13 @@ there are comments. Then you pass the note id, which is also the acs_object id.

                We put our two new variables in the notes.adp page.

                <a href="@comment_add_url@">Add a comment</a>
                -@comments_html@

                Prepare the package for distribution.

                Browse to the package manager. Click on +@comments_html@

                Prepare the package for distribution.

                Browse to the package manager. Click on tutorialapp.

                Click on Generate a distribution file for this package from the filesystem.

                Click on the file size (37.1KB) after the label Distribution File: and save the file to - /tmp.

                + /tmp.

              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/tutorial-database.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-database.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/tutorial-database.html 5 Nov 2003 14:46:52 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/tutorial-database.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,8 +1,8 @@ -Setting Up Database Objects

              Setting Up Database Objects

              +Setting Up Database Objects

              Setting Up Database Objects

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

              Code the data model

              We create all database objects with scripts in the +

              Code the data model

              We create all database objects with scripts in the myfirstpackage/sql/ directory. All database scripts are database-specific and are thus in either the myfirstpackage/sql/oracle or @@ -37,7 +37,7 @@ @author which will be picked up by the API browser. The string $Id$ will automatically be - expanded when the file is checked in to cvs.

              [service0@yourserver postgresql]$ emacs myfirstpackage-create.sql

              Paste this into the file and save and close.

              Figure�7.2.�Database Creation Script - master create file

              --
              +      expanded when the file is checked in to cvs.

              [service0@yourserver postgresql]$ emacs myfirstpackage-create.sql

              Paste this into the file and save and close.

              Figure�7.2.�Database Creation Script - master create file

              --
               -- @author rhs@mit.edu
               -- @cvs-id $Id$
               --
              @@ -51,18 +51,24 @@
                   'note_id',                     -- id_column
                   null                           -- name_method
               );
              +
              +-- necessary to work around limitation of content repository:
              +select content_folder__register_content_type(-100,'mfp_note','t');
              +
               

              The creation script calls a function, content_type__create_type, which in turn creates the necessary database changes to support our data object. Notice the use of "mfp." This token, derived from "My First Package," ensures that our object is unlikely to conflict with objects from other packages.

              Create a database file to drop everything if the package - is uninstalled.

              [service0@yourserver postgresql]$ emacs myfirstpackage-drop.sql

              Figure�7.3.�Database deletion script

              -- packages/myfirstpackage/sql/myfirstpackage-drop.sql
              +        is uninstalled.

              [service0@yourserver postgresql]$ emacs myfirstpackage-drop.sql

              Figure�7.3.�Database deletion script

              -- packages/myfirstpackage/sql/myfirstpackage-drop.sql
               -- drop script
               --
               -- @author joel@aufrecht.org
               -- @cvs-id $Id$
               --
              +select content_folder__unregister_content_type(-100,'mfp_note','t');
              +
               select content_type__drop_type(
               	   'mfp_note',
               	   't',
              Index: openacs-4/packages/acs-core-docs/www/tutorial-debug.html
              ===================================================================
              RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-debug.html,v
              diff -u -N -r1.12 -r1.13
              --- openacs-4/packages/acs-core-docs/www/tutorial-debug.html	5 Nov 2003 14:46:52 -0000	1.12
              +++ openacs-4/packages/acs-core-docs/www/tutorial-debug.html	11 Nov 2003 10:28:27 -0000	1.13
              @@ -1,8 +1,8 @@
              -Debugging and Automated Testing

              Debugging and Automated Testing

              Important

              This section is a work in progress.

              +Debugging and Automated Testing

              Debugging and Automated Testing

              Important

              This section is a work in progress.

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

              Debugging

              Developer Support.�The Developer Support package adds several goodies: debug +

              Debugging

              Developer Support.�The Developer Support package adds several goodies: debug information for every page; the ability to log comments to the page instead of the error log, and fast user switching so that you can test pages as anonymous and as dummy users without logging @@ -24,17 +24,17 @@ ?�searches�backward�
              /�searches�forward.�
              ����������

              -

              Manual testing

              Make a list of basic tests to make sure it works

              Test NumActionExpected Result
              001Browse to the index page while not logged in and +

              Manual testing

              Make a list of basic tests to make sure it works

              Test NumActionExpected Result
              001Browse to the index page while not logged in and while one or more notes exist.No edit or delete or add links should appear.
              002Browse to the index page while logged in. An Edit link should appear. Click on it. Fill out the form and click Submit.The text added in the form should be visible on the index page.

              Other things to test: try to delete someone else's note. Try to delete your own note. Edit your own note. - Search for a note.

              Write automated tests

              + Search for a note.

              Write automated tests

              by Simon Carstensen
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

              It seems to me that a lot of +

              It seems to me that a lot of people have been asking for some guidelines on how to write automated tests. I've done several tests by now and have found the process to be extremely easy and useful. It's a joy to work with automated testing Index: openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 5 Nov 2003 14:46:52 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,8 +1,8 @@ -Creating a Package

              Creating a Package

              +Creating a Package

              Creating a Package

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

              The basic coding model

              ...

              Overview

              To start developing new code in OpenACS, we build a new +

              The intended page map

              ...

              Overview

              To start developing new code in OpenACS, we build a new package. A package is a a discrete collection of web pages, tcl code, and database tables and procedures. A package with user interface is called an application; a package which provides @@ -13,13 +13,20 @@ minimum steps to create a useful package, including writing documentation, setting up database tables and procedures, writing web pages, debugging, and automatic regression testing. -

              In this tutorial, we will make an application package for +

              + This tutorial uses the content repository package. This + radically simplifies the database work, but forces us to work + around the content repository's limitations, including an + incomplete TCL API. So the tutorial is messier than we'd like + right now. Code that is temporary hackage is clearly marked. + +

              In this tutorial, we will make an application package for displaying a list of text notes. -

              Before you begin

              You will need:

              • A computer with a working installation of +

              Before you begin

              You will need:

              • A computer with a working installation of OpenACS. If you don't have this, see Chapter�2, Installation Overview.

              • Example files, which are included in the standard OpenACS 5.0.0a4 distribution. -

              Figure�7.1.�Assumptions in this section

              Fully qualified domain name of your serveryourserver.test
              URL of your serverhttp://yourserver.test:8000
              Name of development accountservice0
              New Package keymyfirstpackage

              Use the APM to initialize a new package

              We use the ACS Package Manager (APM) to add, remove, and +

              Figure�7.1.�Assumptions in this section

              Fully qualified domain name of your serveryourserver.test
              URL of your serverhttp://yourserver.test:8000
              Name of development accountservice0
              New Package keymyfirstpackage

              Use the APM to initialize a new package

              We use the ACS Package Manager (APM) to add, remove, and upgrade packages. It handles package meta-data, such as lists of files that belong in the package. Each package is uniquely identified by a package key. To start developing a new @@ -39,9 +46,6 @@

            • Package Plural: My First Package

            • - Auto-mount URI: - myfirstpackage -

            • Initial Version: 0.1d

            • Summary: @@ -51,7 +55,7 @@

            • This creates a package rooted at /var/lib/aolserver/service0/packages/myfirstpackage. This is the "home directory" of our new package, and all - files in the package will be within this directory.

              Mount the package in the site map

              In order to see your work in progress, you must create a + files in the package will be within this directory.

              Mount the package in the site map

              In order to see your work in progress, you must create a map between the URL space of incoming requests and the package. You do this by mounting the package in the Site Map. This creates a link between the incoming URL and an @@ -61,16 +65,6 @@ code and tables. This requires that a package be developed package-aware. You'll see how to do that in this tutorial.

              1. Browse to -http://yourserver.test:8000/admin/site-map/.

              2. Click the new sub - folder link on the top row in the - Site Map table.

              3. Type note -and click New.

              4. This creates a new row called -note. In the new row, click the new -application link

              5. Type My First Package where -it says -untitled, choose -My First Package from the drop-down list, and -click New. -

              By mounting the package, we've caused all requests to - http://yourserver.test:8000/myfirstpackage +http://yourserver.test:8000/admin/applications/application-add/.

            • Choose "My First Package" from the list and click OK (the other fields are optional).

            • By mounting the package, we've caused all requests to + http://yourserver.test:8000/my-first-package to be satisfied from the files at /var/lib/aolserver/service0/packages/myfirstpackage/www.

              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/tutorial-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-pages.html,v diff -u -N -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/tutorial-pages.html 5 Nov 2003 14:46:52 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/tutorial-pages.html 11 Nov 2003 10:28:27 -0000 1.13 @@ -1,190 +1,133 @@ -Creating Web Pages

              Creating Web Pages

              +Creating Web Pages

              Creating Web Pages

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. -

              Build the "Index" page

              Each user-visible page in your package has, typically, - three parts. The xql file contains any database queries, the - tcl file holds the procedural logic for the page and does things - like check permissions, invoke the database queries, and modify +

              Install some API

              As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files:

              +    
              cp /var/lib/aolserver/service1/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service1/packages/myfirstpackage/tcl/

              To make this file take effect, go to the APM and choose "Reload all files" for "MyFirstPackage".

              Build the "Index" page

              Each user-visible page in your package has, typically, + three parts. The tcl file + holds the procedural logic for the page, including TCL and + database-independent SQL code, and does things like + check permissions, invoke the database queries, and modify variables, and the adp page - holds html. The default page in any directory is + holds html. The -postgres.xql + and -oracle.xql files contains + database-specific SQL. The default page in any directory is index, so we'll build that - first, starting with the tcl file: -

              [service0@yourserver postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
              +      first, starting with the tcl file:

              [service0@yourserver postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
               [service0@yourserver www emacs index.tcl

              Paste this into the file.

              ad_page_contract {
                   This is the main page for the package.  It displays all of the Notes and provides links to edit them and to create new Notes.
               
              -    @author rhs@mit.edu
              -    @creation-date 2000-10-23
              +    @author Your Name (you@yourserver.test)
                   @cvs-id $Id$
              -    @param orderby indicates when the user clicks on a column to order by that \column
              -    @return table_html preformatting html table constructed by querying the sam\plenotes table
              -
              -} {
              -    {orderby:optional {title}}
              -} -properties {
              -    table_html
               }
              -# define the columns in the table
              -set table_def   {
              -    {title "Note"}
              -    {body "Contents"}
              -    {edit "" {} {<td><a href="note-edit?note_id=$note_id">Edit</a></td>}}
              -}
               
              -# construct an html table from the samplenotes database table
              -set table_html [ad_table -Torderby $orderby notes_query { *SQL* } $table_def]

              There are several things to -note about the file:

              • The page begins with an - ad_page_contract function. - This is where we declare the input and output variables and - their types and restrictions. It's also where we document the - page, including descriptions of the parameters and return. - (More information about TCL - pages and page contracts)

              • We have one input variable, - orderby, which is optional - and defaults to title.

              • We have one output variable, table_html

              • We populate the table_html variable with a function call, ad_table, which does most of the work of generating an html table from a database recordset. We pass it several parameters:

                -Torderby $orderby

                If the user has selected a column for sorting, this passes that information to the function.

                notes_query

                This is the name of the SQL query that we'll put in the xql file.

                { *SQL* }

                This is a dummy placeholder. It's possible to put sql directly in the tcl file, but this is deprecated because it's harder to make portable.

                $table_def

                Here we pass in the variable we just constructed; it contains a list of column names and display titles.

              Put the database query into a separate file. If the - database query is exactly the same for Oracle and PostgreSQL, it - can go into a file with the same name as the tcl file but an xql - extension, e.g., index.xql. If - it is database-specific, it goes in - index-oracle.xql or - index-postgresql.xql. The - format is the same in each case, an XML structure that contains - the SQL query. Create the file now.

              [service0@yourserver www]$ emacs index.xql

              Note that the - name parameter of the - fullquery tag exactly matches - the SQL query name specified in the - ad_table call. Also, the SQL query ends with a tcl function call that generates a SQL ORDER BY clause using several TCL variables.

              <?xml version="1.0"?>
              -<queryset>
              -  <fullquery name="notes_query">
              -    <querytext>
              -    select note_id,
              -           title,
              -           body
              -      from samplenote
              -    [ad_order_by_from_sort_spec $orderby $table_def]
              -    </querytext>
              -  </fullquery>
              -</queryset>

              Create the user-visible page.

              [service0@yourserver www]$ emacs index.adp

              The first line indicates that this page should be rendered within the the master template, which defaults to /web/service0/www/default-master. The second line passes a title variable to the master template. The third line inserts the contents of the variable table_html. The last line is a link to a page we haven't created yet.

              <master>
              -<property name="title">Sample Notes</property>
              -@table_html@
              -<p><a href="note-edit">Add a note</a></p>

              Making the APM load your files

              Before we can test these files, we have to notify the - package manager that they exist. (More precisely, the tcl and - adp will work fine as-is, but the xql file will not be - recognized until we tell the APM about it.).

              • Go to http://yourserver.test:8000/acs-admin/apm

              • Click on the samplenote link

              • Click Manage file information

              • - Check the values in the file type column for your files. A - question mark means the APM doesn't recognize the file - type and probably means you have mistyped a filename. -

              • - At the bottom of the file list page - click on the - watch all files link. - Unlike adp and tcl pages, xql pages get cached. (And new - xql files don't get loaded when they're watched or the - server is restarted.) Watching an xql file causes the APM - to load the contents of the XQL into memory so that it can - be used, and to reload it whenever the file is changed. - The watch will last until the server is restarted. -

              Now that the APM is aware of your files, check to make sure that the self-documenting code is working.

              • Browse to http://yourserver.test:8000/api-doc/

              • Click Notes 0.1d

              • Click Content Pages

              • Click index.tcl and examine the results.

              Test the index page

              Go to http://yourserver.test:8000/note/. You should see this:

              -Sample Notes
              -Your Workspace : Main Site : Sample Note 
              +set page_title [ad_conn instance_name]
              +set context [list]
               
              -No data found.
              +template::list::create \
              +    -name notes \
              +    -multirow notes \
              +    -actions { "Add a Note" note-edit} \
              +    -elements {
              +	edit {
              +	    link_url_col edit_url
              +	    display_template {
              +		<img src="/resources/acs-subsite/Edit16.gif" width="16" height="16" border="0">
              +	    }
              +	    sub_class narrow
              +	}
              +	title {
              +	    label "Title"
              +	}
              +	delete {
              +	    link_url_col delete_url 
              +	    display_template {
              +		<img src="/resources/acs-subsite/Delete16.gif" width="16" height="16" border="0">
              +	    }
              +	    sub_class narrow
              +	}
              +    }
               
              -Add a note.
              +db_multirow \
              +    -extend {
              +	edit_url
              +	delete_url
              +    } notes notes_select {
              +	select ci.item_id,
              +	       n.title
              +        from   cr_items ci,
              +               mfp_notesx n
              +        where  n.revision_id = ci.live_revision
              +    } {
              +	set edit_url [export_vars -base "note-edit" {item_id}]
              +	set delete_url [export_vars -base "note-delete" {item_id}]
              +    }
              +

              Now index.adp:

              +<master>
              +  <property name="title">@page_title;noquote@</property>
              +  <property name="context">@context;noquote@</property>
              +<listtemplate name="notes"></listtemplate>
              +    

              Now we create the add/edit page. If note_id is passed in, + it edits that note. Otherwise, it presents a form for adding + notes. Edit + note-edit.tcl:

              ad_page_contract {
              +    This is the main page for the package.  It displays all of the Notes and provides links to edit them and to create new Notes.
               
              -foo@yourserver.test
              -

              Since our table is empty, it's a pretty boring page. So next we'll make it possible to add records.

              If you get any other output, such as an error message, skip to Section�, “Debugging and Automated Testing”.

              Add the add/edit page

              We'll create a single page to handle both adding and - editing records. In this recursive approach, the same tcl - function can present a blank HTML form, present the same form - pre-loaded with an existing record, and handle the resulting - submission of either updated or new records. This recursive - approach reduces the total amount of code and files. First, - create the tcl:

              [service0@yourserver www]$ emacs note-edit.tcl

              Paste and save and edit:

              ad_page_contract {
              -        Simple add/edit form for samplenote.
              +    @author Your Name (you@yourserver.test)
              +    @cvs-id $Id$
              + 
              +    @param item_id If present, assume we are editing that note.  Otherwise, we are creating a new note.
               } {
              -    note_id:integer,optional
              +    item_id:integer,optional
               }
              -set user_id [ad_maybe_redirect_for_registration]
              -set title "Add a note"
               
              -if {[exists_and_not_null note_id]} {
              -    set title "Edit a note"
              -}
              -
               ad_form -name note -form {
              -    note_id:key
              -    {title:text
              -        {label "Title"}
              -    }
              -    {body:text(textarea)
              -        {label "Body"}
              -    }
              -} -select_query_name note_query -new_data {
              -db_1row do_insert { *SQL* }
              +    {item_id:key}
              +    {title:text {label Title}}
              +} -new_request {
              +    permission::require_permission -object_id [ad_conn package_id] -privilege create
              +    set page_title "Add a Note"
              +    set context [list $page_title]
              +} -edit_request {
              +    permission::require_write_permission -object_id $item_id
              +    mfp::note::get \
              +	-item_id $item_id \
              +	-array note_array 
              +
              +    set title $note_array(title)
              +
              +    set page_title "Edit a Note"
              +    set context [list $page_title]
              +} -new_data {
              +    mfp::note::add \
              +	-title $title
               } -edit_data {
              -db_dml do_update { *SQL* }
              +    mfp::note::edit \
              +	-item_id $item_id \
              +	-title $title
               } -after_submit {
              -ad_returnredirect "index"
              -}

              We use ad_form - to automate most of the work here. Ad_form is a wrapper for the - template - functions for creating HTML forms. These functions should - always be used for HTML forms; this promotes consistency and, - since all template functions use the same stylesheet system, makes it easy to change - the appearance of forms.

              The page takes a single, optional input parameter, - note_id. If it's present, ad_form will assume that we're editing - an existing record, look up that record, and pre-populate the - form. We'll also check and change the page title if necessary. We check user_id with ad_maybe_redirect_for_registration, - which will redirect to the login page (with an automatic return - path to bring them back after login or registration) if the - visitor isn't logged in. Then we call ad_form, specifying the - primary key of the table, the fields we want to edit, and - functions for insert and update.

              Next, we create the database functions.

              [service0@yourserver www]$ emacs note-edit.xql
              <?xml version="1.0"?>
              -<queryset>
              -  <fullquery name="do_insert">
              -    <querytext>
              -        select samplenote__new(null,:title, :body,null,:user_id,null,null)
              -    </querytext>
              -  </fullquery>
              -  <fullquery name="do_update">
              -    <querytext>
              -       update samplenote
              -          set title = :title,
              -              body = :body
              -        where note_id = :note_id
              -    </querytext>
              -  </fullquery>
              -  <fullquery name="note_query">
              -    <querytext>
              -      select title,
              -             body
              -        from samplenote
              -       where note_id = :note_id
              -    </querytext>
              -  </fullquery>
              -</queryset>

              Create the user-visible page:

              [service0@yourserver www]$ emacs note-edit.adp
              <master>
              -<property name="title">@title@</property>
              -<property name="context">{@title@}</property>
              -<formtemplate id="note"></formtemplate>
              -

              The property tags are passed to the master template, which - uses their values to set the page title and context bar - (breadcrumb trail). We use the same variable, - title, for both variables but - wrap it in curly brackets for context so that the spaces aren't - interpreted separators. The formtemplate tag outputs the form - html with the matching name.

              Go to the APM as before and reload. Then test all this by going to the package home page and adding and editing a few records.

              Adding files to cvs

              Put your new work into source control.

              [service0@yourserver www]$ cvs add *.adp *.tcl *.xql
              -cvs add: cannot add special file `CVS'; skipping
              -cvs add: doc/CVS already exists
              -cvs add: scheduling file `index.adp' for addition
              -cvs add: scheduling file `index.tcl' for addition
              -cvs add: scheduling file `index.xql' for addition
              -cvs add: scheduling file `note-edit.adp' for addition
              -cvs add: scheduling file `note-edit.tcl' for addition
              -cvs add: scheduling file `note-edit.xql' for addition
              -cvs add: use 'cvs commit' to add these files permanently
              -[service0@yourserver www]$  cvs commit -m "new work"
              -/cvsroot/service0/packages/samplenote/www/note-edit.xql~,v  <--  note-edit.xql
              -(many lines omitted)
              -initial revision: 1.1
              -done
              -[service0@yourserver www]$
              View comments on this page at openacs.org
              + ad_returnredirect "." + ad_script_abort +}

              And note-edit.adp:

              <master>
              +  <property name="title">@page_title;noquote@</property>
              +  <property name="context">@context;noquote@</property>
              +  <property name="focus">note.title</property>
              +  
              +<formtemplate id="note"></formtemplate>

              And the delete page. Since it has no UI, there is only a + tcl page, and no adp page. Edit +note-delete.tcl:

              ad_page_contract {
              +    This deletes a note
              +
              +    @author Your Name (you@yourserver.test)
              +    @cvs-id $Id$
              + 
              +    @param item_id The item_id of the note to delete
              +} {
              +    item_id:integer
              +}
              +
              +permission::require_write_permission -object_id $item_id
              +
              +mfp::note::delete -item_id $item_id
              +
              +ad_returnredirect "."
              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/tutorial.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial.html,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/tutorial.html 31 Oct 2003 10:54:20 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/tutorial.html 11 Nov 2003 10:28:27 -0000 1.7 @@ -1 +1 @@ -Chapter�7.�Development Tutorial
              View comments on this page at openacs.org
              +Chapter�7.�Development Tutorial
              View comments on this page at openacs.org
              Index: openacs-4/packages/acs-core-docs/www/unix-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/unix-installation.html,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/acs-core-docs/www/unix-installation.html 5 Nov 2003 14:46:52 -0000 1.5 +++ openacs-4/packages/acs-core-docs/www/unix-installation.html 11 Nov 2003 10:28:27 -0000 1.6 @@ -1,4 +1,4 @@ -Install Unix-like system and supporting software

              Install Unix-like system and supporting software

              +Install Unix-like system and supporting software

              Install Unix-like system and supporting software

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. Index: openacs-4/packages/acs-core-docs/www/upgrade-detail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/upgrade-detail.html,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/upgrade-detail.html 5 Nov 2003 14:46:52 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/upgrade-detail.html 11 Nov 2003 10:28:27 -0000 1.15 @@ -1,4 +1,4 @@ -Support for upgrades.

              Support for upgrades.

              +Support for upgrades.

              Support for upgrades.

              by Joel Aufrecht
              OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff. @@ -9,13 +9,13 @@ manual intervention should be required. If you are running OpenACS prior to 4.5, upgrading will require manual effort.

              Checklist

              The required platform for OpenACS 4.6 is the same as 4.5, with the excepion of OpenFTS. You now need OpenFTS 0.3.2, not 0.2. - OpenACS 4.6 does not support PostGreSQL 7.3.

              Overview

              OpenACS consists of files and a database schema. The files + OpenACS 4.6 does not support PostGreSQL 7.3.

              Overview

              OpenACS consists of files and a database schema. The files in the OpenACS 4.6 tarball include database upgrade scripts. To start the upgrade, replace your existing files with the new files and then restart the server. Then, browse to the APM, which will detect the new packages and offer to run the appropriate database upgrade scripts. After restarting the server again, the upgrade is - complete.

              Figure�5.1.�Assumptions in this section

              name of OpenACS usernsadmin
              OpenACS server nameopenacs-dev
              Root of OpenACS file tree/web/openacs-dev
              Database backup directory/backup/openacs/

              Upgrading on Linux/Unix

              1. Make a Backup.�Back up the database and file system (see Section�, “Snapshot backup and recovery”).

              2. OPTIONAL: Upgrade OpenFTS.�OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible - + complete.

                Figure�5.1.�Assumptions in this section

                name of OpenACS usernsadmin
                OpenACS server nameopenacs-dev
                Root of OpenACS file tree/web/openacs-dev
                Database backup directory/backup/openacs/

              Upgrading on Linux/Unix

              1. Make a Backup.�Back up the database and file system (see the section called “Snapshot backup and recovery”).

              2. OPTIONAL: Upgrade OpenFTS.�OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. If you have OpenFTS 0.2, you'll need to upgrade to to OpenFTS 0.3.2. This is backwards-compatible - completing this step will not break a working OpenFTS Engine from 4.5.

                1. Uninstall the old OpenFTS Engine

                  1. Browse to http://yourserver/openfts.

                  2. Click Administration.

                  3. Click Drop OpenFTS Engine

                2. Build and install the new OpenFTS driver and supporting tcl procedures. (This section of shell code is not fully documented; please exercise care.)

                  cd /usr/local/src/
                  Index: openacs-4/packages/acs-core-docs/www/upgrade.html
                  ===================================================================
                  RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade.html,v
                  diff -u -N -r1.9 -r1.10
                  --- openacs-4/packages/acs-core-docs/www/upgrade.html	31 Oct 2003 10:54:20 -0000	1.9
                  +++ openacs-4/packages/acs-core-docs/www/upgrade.html	11 Nov 2003 10:28:27 -0000	1.10
                  @@ -1 +1 @@
                  -Chapter�5.�Upgrading

                  Chapter�5.�Upgrading

                  Table of Contents

                  Support for upgrades.
                  View comments on this page at openacs.org
                  +Chapter�5.�Upgrading

                  Chapter�5.�Upgrading

                  Table of Contents

                  Support for upgrades.
                  View comments on this page at openacs.org
                  Index: openacs-4/packages/acs-core-docs/www/win2k-installation.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/win2k-installation.html,v diff -u -N -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/win2k-installation.html 5 Nov 2003 14:46:52 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/win2k-installation.html 11 Nov 2003 10:28:27 -0000 1.21 @@ -1,4 +1,4 @@ -OpenACS Installation Guide for Windows2000

                  OpenACS Installation Guide for Windows2000

                  By Matthew Burke and Curtis Galloway


                  +OpenACS Installation Guide for Windows2000

                  OpenACS Installation Guide for Windows2000

                  By Matthew Burke and Curtis Galloway


                  OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.

                  NOTE: These instructions were Index: openacs-4/packages/acs-core-docs/www/xml/openacs.xsl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/openacs.xsl,v diff -u -N -r1.11 -r1.12 --- openacs-4/packages/acs-core-docs/www/xml/openacs.xsl 14 Oct 2003 10:03:22 -0000 1.11 +++ openacs-4/packages/acs-core-docs/www/xml/openacs.xsl 11 Nov 2003 10:28:28 -0000 1.12 @@ -3,13 +3,12 @@ version="1.1" exclude-result-prefixes="doc"> - + + + Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml,v diff -u -N -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml 5 Nov 2003 11:48:11 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-db.xml 11 Nov 2003 10:28:28 -0000 1.7 @@ -73,6 +73,10 @@ 'note_id', -- id_column null -- name_method ); + +-- necessary to work around limitation of content repository: +select content_folder__register_content_type(-100,'mfp_note','t'); + The creation script calls a function, @@ -93,6 +97,8 @@ -- @author joel@aufrecht.org -- @cvs-id $Id:$ -- +select content_folder__unregister_content_type(-100,'mfp_note','t'); + select content_type__drop_type( 'mfp_note', 't', Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 5 Nov 2003 11:48:11 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 11 Nov 2003 10:28:28 -0000 1.5 @@ -12,307 +12,154 @@ + Install some API + As a workaround for missing content-repository functionality, copy a provided file into the directory for tcl files: + + cp /var/lib/aolserver/service1/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service1/packages/myfirstpackage/tcl/ + To make this file take effect, go to the APM and choose "Reload all files" for "MyFirstPackage". + + Build the "Index" page Each user-visible page in your package has, typically, - three parts. The xql file contains any database queries, the - tcl file holds the procedural logic for the page and does things - like check permissions, invoke the database queries, and modify + three parts. The tcl file + holds the procedural logic for the page, including TCL and + database-independent SQL code, and does things like + check permissions, invoke the database queries, and modify variables, and the adp page - holds html. The default page in any directory is + holds html. The -postgres.xql + and -oracle.xql files contains + database-specific SQL. The default page in any directory is index, so we'll build that - first, starting with the tcl file: - + first, starting with the tcl file: [service0@yourserver postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www [service0@yourserver www emacs index.tcl Paste this into the file. ad_page_contract { This is the main page for the package. It displays all of the Notes and provides links to edit them and to create new Notes. - @author rhs@mit.edu - @creation-date 2000-10-23 + @author Your Name (you@yourserver.test) @cvs-id $Id$ - @param orderby indicates when the user clicks on a column to order by that \column - @return table_html preformatting html table constructed by querying the sam\plenotes table - -} { - {orderby:optional {title}} -} -properties { - table_html } -# define the columns in the table -set table_def { - {title "Note"} - {body "Contents"} - {edit "" {} {<td><a href="note-edit?note_id=$note_id">Edit</a></td>}} -} -# construct an html table from the samplenotes database table -set table_html [ad_table -Torderby $orderby notes_query { *SQL* } $table_def] - There are several things to -note about the file: - - The page begins with an - ad_page_contract function. - This is where we declare the input and output variables and - their types and restrictions. It's also where we document the - page, including descriptions of the parameters and return. - (More information about TCL - pages and page contracts) - - - We have one input variable, - orderby, which is optional - and defaults to title. - - - We have one output variable, table_html - - - We populate the table_html variable with a function call, ad_table, which does most of the work of generating an html table from a database recordset. We pass it several parameters: - - - -Torderby $orderby - - If the user has selected a column for sorting, this passes that information to the function. - - - - notes_query - - This is the name of the SQL query that we'll put in the xql file. - - - - { *SQL* } - - This is a dummy placeholder. It's possible to put sql directly in the tcl file, but this is deprecated because it's harder to make portable. - - - - $table_def - - Here we pass in the variable we just constructed; it contains a list of column names and display titles. - - - - - - Put the database query into a separate file. If the - database query is exactly the same for Oracle and PostgreSQL, it - can go into a file with the same name as the tcl file but an xql - extension, e.g., index.xql. If - it is database-specific, it goes in - index-oracle.xql or - index-postgresql.xql. The - format is the same in each case, an XML structure that contains - the SQL query. Create the file now. - [service0@yourserver www]$ emacs index.xql - Note that the - name parameter of the - fullquery tag exactly matches - the SQL query name specified in the - ad_table call. Also, the SQL query ends with a tcl function call that generates a SQL ORDER BY clause using several TCL variables. - <?xml version="1.0"?> -<queryset> - <fullquery name="notes_query"> - <querytext> - select note_id, - title, - body - from samplenote - [ad_order_by_from_sort_spec $orderby $table_def] - </querytext> - </fullquery> -</queryset> - Create the user-visible page. - [service0@yourserver www]$ emacs index.adp - The first line indicates that this page should be rendered within the the master template, which defaults to /web/service0/www/default-master. The second line passes a title variable to the master template. The third line inserts the contents of the variable table_html. The last line is a link to a page we haven't created yet. - <master> -<property name="title">Sample Notes</property> -@table_html@ -<p><a href="note-edit">Add a note</a></p> - - - Making the APM load your files - Before we can test these files, we have to notify the - package manager that they exist. (More precisely, the tcl and - adp will work fine as-is, but the xql file will not be - recognized until we tell the APM about it.). - - Go to http://yourserver.test:8000/acs-admin/apm - - Click on the samplenote link - - Click Manage file information - - - - Check the values in the file type column for your files. A - question mark means the APM doesn't recognize the file - type and probably means you have mistyped a filename. - - +set page_title [ad_conn instance_name] +set context [list] - - - At the bottom of the file list page - click on the - watch all files link. - Unlike adp and tcl pages, xql pages get cached. (And new - xql files don't get loaded when they're watched or the - server is restarted.) Watching an xql file causes the APM - to load the contents of the XQL into memory so that it can - be used, and to reload it whenever the file is changed. - The watch will last until the server is restarted. - - +template::list::create \ + -name notes \ + -multirow notes \ + -actions { "Add a Note" note-edit} \ + -elements { + edit { + link_url_col edit_url + display_template { + <img src="/resources/acs-subsite/Edit16.gif" width="16" height="16" border="0"> + } + sub_class narrow + } + title { + label "Title" + } + delete { + link_url_col delete_url + display_template { + <img src="/resources/acs-subsite/Delete16.gif" width="16" height="16" border="0"> + } + sub_class narrow + } + } - - Now that the APM is aware of your files, check to make sure that the self-documenting code is working. - - Browse to http://yourserver.test:8000/api-doc/ - - Click Notes 0.1d - - Click Content Pages - - Click index.tcl and examine the results. - - - - - Test the index page - Go to http://yourserver.test:8000/note/. You should see this: - -Sample Notes -Your Workspace : Main Site : Sample Note +db_multirow \ + -extend { + edit_url + delete_url + } notes notes_select { + select ci.item_id, + n.title + from cr_items ci, + mfp_notesx n + where n.revision_id = ci.live_revision + } { + set edit_url [export_vars -base "note-edit" {item_id}] + set delete_url [export_vars -base "note-delete" {item_id}] + } + -No data found. + Now index.adp: + +<master> + <property name="title">@page_title;noquote@</property> + <property name="context">@context;noquote@</property> +<listtemplate name="notes"></listtemplate> + + Now we create the add/edit page. If note_id is passed in, + it edits that note. Otherwise, it presents a form for adding + notes. Edit + note-edit.tcl: + ad_page_contract { + This is the main page for the package. It displays all of the Notes and provides links to edit them and to create new Notes. -Add a note. - -foo@yourserver.test - - Since our table is empty, it's a pretty boring page. So next we'll make it possible to add records. - If you get any other output, such as an error message, skip to . - - - Add the add/edit page - We'll create a single page to handle both adding and - editing records. In this recursive approach, the same tcl - function can present a blank HTML form, present the same form - pre-loaded with an existing record, and handle the resulting - submission of either updated or new records. This recursive - approach reduces the total amount of code and files. First, - create the tcl: - - [service0@yourserver www]$ emacs note-edit.tcl - Paste and save and edit: - ad_page_contract { - Simple add/edit form for samplenote. + @author Your Name (you@yourserver.test) + @cvs-id $Id$ + + @param item_id If present, assume we are editing that note. Otherwise, we are creating a new note. } { - note_id:integer,optional + item_id:integer,optional } -set user_id [ad_maybe_redirect_for_registration] -set title "Add a note" -if {[exists_and_not_null note_id]} { - set title "Edit a note" -} - ad_form -name note -form { - note_id:key - {title:text - {label "Title"} - } - {body:text(textarea) - {label "Body"} - } -} -select_query_name note_query -new_data { -db_1row do_insert { *SQL* } + {item_id:key} + {title:text {label Title}} +} -new_request { + permission::require_permission -object_id [ad_conn package_id] -privilege create + set page_title "Add a Note" + set context [list $page_title] +} -edit_request { + permission::require_write_permission -object_id $item_id + mfp::note::get \ + -item_id $item_id \ + -array note_array + + set title $note_array(title) + + set page_title "Edit a Note" + set context [list $page_title] +} -new_data { + mfp::note::add \ + -title $title } -edit_data { -db_dml do_update { *SQL* } + mfp::note::edit \ + -item_id $item_id \ + -title $title } -after_submit { -ad_returnredirect "index" + ad_returnredirect "." + ad_script_abort } - We use ad_form - to automate most of the work here. Ad_form is a wrapper for the - template - functions for creating HTML forms. These functions should - always be used for HTML forms; this promotes consistency and, - since all template functions use the same stylesheet system, makes it easy to change - the appearance of forms. - The page takes a single, optional input parameter, - note_id. If it's present, ad_form will assume that we're editing - an existing record, look up that record, and pre-populate the - form. We'll also check and change the page title if necessary. We check user_id with ad_maybe_redirect_for_registration, - which will redirect to the login page (with an automatic return - path to bring them back after login or registration) if the - visitor isn't logged in. Then we call ad_form, specifying the - primary key of the table, the fields we want to edit, and - functions for insert and update. - Next, we create the database functions. - [service0@yourserver www]$ emacs note-edit.xql - <?xml version="1.0"?> -<queryset> - <fullquery name="do_insert"> - <querytext> - select samplenote__new(null,:title, :body,null,:user_id,null,null) - </querytext> - </fullquery> - <fullquery name="do_update"> - <querytext> - update samplenote - set title = :title, - body = :body - where note_id = :note_id - </querytext> - </fullquery> - <fullquery name="note_query"> - <querytext> - select title, - body - from samplenote - where note_id = :note_id - </querytext> - </fullquery> -</queryset> - Create the user-visible page: - [service0@yourserver www]$ emacs note-edit.adp - <master> -<property name="title">@title@</property> -<property name="context">{@title@}</property> -<formtemplate id="note"></formtemplate> - - The property tags are passed to the master template, which - uses their values to set the page title and context bar - (breadcrumb trail). We use the same variable, - title, for both variables but - wrap it in curly brackets for context so that the spaces aren't - interpreted separators. The formtemplate tag outputs the form - html with the matching name. - Go to the APM as before and reload. Then test all this by going to the package home page and adding and editing a few records. + And note-edit.adp: + <master> + <property name="title">@page_title;noquote@</property> + <property name="context">@context;noquote@</property> + <property name="focus">note.title</property> + +<formtemplate id="note"></formtemplate> + And the delete page. Since it has no UI, there is only a + tcl page, and no adp page. Edit +note-delete.tcl: + ad_page_contract { + This deletes a note + + @author Your Name (you@yourserver.test) + @cvs-id $Id$ + + @param item_id The item_id of the note to delete +} { + item_id:integer +} + +permission::require_write_permission -object_id $item_id + +mfp::note::delete -item_id $item_id + +ad_returnredirect "." - - Adding files to cvs - Put your new work into source control. - [service0@yourserver www]$ cvs add *.adp *.tcl *.xql -cvs add: cannot add special file `CVS'; skipping -cvs add: doc/CVS already exists -cvs add: scheduling file `index.adp' for addition -cvs add: scheduling file `index.tcl' for addition -cvs add: scheduling file `index.xql' for addition -cvs add: scheduling file `note-edit.adp' for addition -cvs add: scheduling file `note-edit.tcl' for addition -cvs add: scheduling file `note-edit.xql' for addition -cvs add: use 'cvs commit' to add these files permanently -[service0@yourserver www]$ cvs commit -m "new work" -/cvsroot/service0/packages/samplenote/www/note-edit.xql~,v <-- note-edit.xql -(many lines omitted) -initial revision: 1.1 -done -[service0@yourserver www]$ - Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial.xml,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial.xml 5 Nov 2003 11:48:11 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial.xml 11 Nov 2003 10:28:28 -0000 1.9 @@ -14,10 +14,10 @@ - The basic coding model + The intended page map ... - + @@ -35,8 +35,17 @@ minimum steps to create a useful package, including writing documentation, setting up database tables and procedures, writing web pages, debugging, and automatic regression testing. - + + + + This tutorial uses the content repository package. This + radically simplifies the database work, but forces us to work + around the content repository's limitations, including an + incomplete TCL API. So the tutorial is messier than we'd like + right now. Code that is temporary hackage is clearly marked. + + In this tutorial, we will make an application package for displaying a list of text notes. @@ -117,10 +126,6 @@ Package Plural: My First Package - Auto-mount URI: - myfirstpackage - - Initial Version: 0.1d @@ -155,27 +160,14 @@ Browse to http://yourserver.test:8000/admin/site-map/. + url="/admin/applications/application-add">/admin/applications/application-add/. - Click the new sub - folder link on the top row in the - Site Map table. + Choose "My First Package" from the list and click OK (the other fields are optional). - Type note -and click New. - This creates a new row called -note. In the new row, click the new -application link - Type My First Package where -it says -untitled, choose -My First Package from the drop-down list, and -click New. - By mounting the package, we've caused all requests to - http://yourserver.test:8000/myfirstpackage + http://yourserver.test:8000/my-first-package to be satisfied from the files at /var/lib/aolserver/service0/packages/myfirstpackage/www. Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 5 Nov 2003 11:48:12 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/aolserver.xml 11 Nov 2003 10:28:29 -0000 1.15 @@ -35,6 +35,7 @@ cd /usr/local/src wget --passive http://uptime.openacs.org/aolserver-openacs/aolserver3.3oacs1.tar.gz tar xzf aolserver3.3oacs1.tar.gz + This section also relies on some OpenACS files, which you can get with . @@ -69,7 +70,7 @@ conf-make should contain the name of the GNU Make command on your system. It defaults to - gmake. + gmake. Debian users: ln -s /usr/bin/make /usr/bin/gmake. Set an environment variable that the nspostgres driver Makefile needs to compile correctly and run conf, which compiles Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 5 Nov 2003 15:32:22 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 11 Nov 2003 10:28:29 -0000 1.15 @@ -89,7 +89,7 @@ unchanged at 127.0.0.1:8000. Run the file as root. [service0@yourserver service0]$ exit -[root@yourserver root]# ./home/service0/install/install.sh +[root@yourserver root]# sh /home/service0/install/install.sh /home/service0/install/install.sh: Starting installation with config_file /home/service0/install/install.tcl. Using serverroot=/var/lib/aolserver/ service0, server_url=http://0.0.0.0:8000, do_checkout=yes, do_install=yes, Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml 5 Nov 2003 15:32:22 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/other-software.xml 11 Nov 2003 10:28:29 -0000 1.9 @@ -27,6 +27,19 @@ [root@yourserver tmp]# tar xzf &tarballpath;.tgz cd /tmp tar xzf &tarballpath;.tgz + If you are installing from a different method and just need the configuration files, you can instead get them from CVS: +[root@yourserver root]# cd /tmp +[root@yourserver tmp]# cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/ +cvs checkout: warning: failed to open /root/.cvspass for reading: No such file or directory +cvs server: Updating openacs-4/packages/acs-core-docs/www/files +U openacs-4/packages/acs-core-docs/www/files/README.TXT +(many lines omitted) +U openacs-4/packages/acs-core-docs/www/files/template-ini.ini +U openacs-4/packages/acs-core-docs/www/files/winnsd.txt +[root@yourserver tmp]# mv openacs-4 &tarballpath; +cd /tmp +cvs -d :pserver:anonymous@openacs.org:/cvsroot co openacs-4/packages/acs-core-docs/www/files/ +mv openacs-4 openacs-5.0.0a4 Initialize CVS (OPTIONAL) @@ -58,6 +71,8 @@ [root@yourserver tmp]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs cp: overwrite `/etc/skel/.emacs'? y [root@yourserver tmp]# + Debian users: + apt-get install psgml @@ -86,7 +101,7 @@ [root@yourserver package]# cd admin/daemontools-0.76/ [root@yourserver daemontools-0.76]# package/install Linking ./src/* into ./compile... -(many lines omitted) + Creating /service... Adding svscanboot to inittab... init should start svscan now. @@ -124,8 +139,7 @@ [root@yourserver admin]# cd daemontools-0.76 [root@yourserver daemontools-0.76]# patch -p1 < ../daemontools-0.76.errno.patch [root@yourserver daemontools-0.76]# package/install -Linking ./src/* into ./compile... -(many lines omitted) +Linking ./src/* into ./compile...(many lines omitted) Creating /service... Adding svscanboot to inittab... init should start svscan now. @@ -195,8 +209,7 @@ [root@yourserver src]# cd ucspi-tcp-0.88 [root@yourserver ucspi-tcp-0.88]# make ( cat warn-auto.sh; \ -echo 'main="$1"; shift'; \ -(many lines omitted) +echo 'main="$1"; shift'; \(many lines omitted) ./compile instcheck.c ./load instcheck hier.o auto_home.o unix.a byte.a [root@yourserver ucspi-tcp-0.88]# make setup check @@ -284,8 +297,7 @@ [root@yourserver netqmail-1.04]# cd netqmail-1.04 [root@yourserver netqmail-1.04]# make setup check ( cat warn-auto.sh; \ -echo CC=\'`head -1 conf-cc`\'; \ -(many lines omitted) +echo CC=\'`head -1 conf-cc`\'; \(many lines omitted) ./install ./instcheck cd /usr/local/src @@ -460,8 +472,7 @@ [postgres@yourserver pgsql]$ cd /usr/local/src/postgresql-7.2.4/contrib/tsearch/ [postgres@yourserver tsearch]$ make sed 's,MODULE_PATHNAME,$libdir/tsearch,g' tsearch.sql.in >tsearch.sql -/usr/bin/flex -8 -Ptsearch_yy -o'parser.c' parser.l -(many lines omitted) +/usr/bin/flex -8 -Ptsearch_yy -o'parser.c' parser.l(many lines omitted) rm -f libtsearch.so ln -s libtsearch.so.0.0 libtsearch.so [postgres@yourserver tsearch]$ make install @@ -702,8 +713,7 @@ [root@yourserver nsopenssl-2.1]# cp https.tcl /usr/local/aolserver/modules/tcl/ [root@yourserver nsopenssl-2.1]# cd /usr/local/src/aolserver -wget --passive -http://www.scottg.net/download/nsopenssl-2.1.tar.gz +wget --passive http://www.scottg.net/download/nsopenssl-2.1.tar.gz tar xzf nsopenssl-2.1.tar.gz cd nsopenssl-2.1 make OPENSSL=/usr/local/ssl @@ -727,9 +737,8 @@ source, unpack it, and put it an appropriate place. As root: cd /tmp -wget http://prdownloads.sourceforge.net/tclwebtest/tclwebtest-0.3.tar.gz?use_mirror=unc tar xvzf tclwebtest-0.3.tar.gz -mv tclwebtest /usr/local/ +mv tclwebtest-0.3 /usr/local/ ln -s /usr/local/tclwebtest-0.3 /usr/local/tclwebtest ln -s /usr/local/tclwebtest/tclwebtest /usr/local/bin Index: openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 9 Nov 2003 16:36:21 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 11 Nov 2003 10:28:29 -0000 1.15 @@ -19,9 +19,23 @@ - + + Debian + + + Debian users can install the package and add some backwards-compatibility links: + apt-get install postgresql postgresql-dev postgresql-doc +ln -s /usr/include/postgresql/ /usr/include/pgsql +ln -s /var/lib/postgres /usr/local/pgsql +ln -s /usr/include/pgsql /usr/local/pgsql/include +su postgres -c "/usr/lib/postgresql/bin/createlang plpgsql template1" + and proceed to or to the + next section. + + + Using the Red Hat RPM - Red Hat users: If you install PostGreSQL 7.3.2 from the Red Hat 9 RPM, you + Red Hat users: If you install PostGreSQL 7.3.2 from the Red Hat 9 RPM, you can skip a few steps. These shell commands add some links for compatibility with the directories from a source-based install; start the service; create a new group for web service users, and modify the postgres user's environment (more @@ -388,7 +402,7 @@ - + Tune postgres. (OPTIONAL) The default values for PostGreSQL are very conservative; we can safely change some of them and improve performance. @@ -399,7 +413,7 @@ [root@yourserver root]# echo 134217728 >/proc/sys/kernel/shmmax [root@yourserver root]# Make that change permanent by editing - emacs /etc/sysctl.conf to + /etc/sysctl.conf to add these lines at the end: # increase shared memory limit for postgres kernel.shmmax = 134217728