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 -r1.22 -r1.23 --- openacs-4/packages/acs-core-docs/www/acs-admin.html 4 Feb 2004 16:47:32 -0000 1.22 +++ openacs-4/packages/acs-core-docs/www/acs-admin.html 12 Feb 2004 13:51:40 -0000 1.23 @@ -1 +1 @@ -Part�II.�Administrator's Guide

Administrator's Guide

Table of Contents

2. Installation Overview
Basic Steps
Prerequisite Software
1. Complete Installation
Install a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 3.3oacs1
Install AOLserver 4
Install OpenACS
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
1. Configuring a new OpenACS Site
How Do I?
2. Upgrading
Overview
Upgrading OpenACS
Upgrading the OpenACS files
Upgrading Platform components
1. Maintenance
Running OpenACS in Production Environments
Database Management
Backup and Recovery
Diagnosing Performance Problems
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.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
A. 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 a Unix-like system and supporting software
Install Oracle 8.1.7
Install PostgreSQL
Install AOLserver 3.3oacs1
Install AOLserver 4
Install OpenACS 5.0.1d1
OpenACS Installation Guide for Windows2000
OpenACS Installation Guide for Mac OS X
4. Configuring a new OpenACS Site
How Do I?
5. Upgrading
Overview
Upgrading OpenACS
Upgrading the OpenACS files
Upgrading Platform components
6. Maintenance
Running OpenACS in Production Environments
Database Management
Backup and Recovery
Diagnosing Performance Problems
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.
Install PHP for use in AOLserver
Install Squirrelmail for use as a webmail system for OpenACS
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 -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/acs-package-dev.html 4 Feb 2004 16:47:32 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/acs-package-dev.html 12 Feb 2004 13:51:40 -0000 1.13 @@ -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 -r1.13 -r1.14 --- openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 4 Feb 2004 16:47:32 -0000 1.13 +++ openacs-4/packages/acs-core-docs/www/acs-plat-dev.html 12 Feb 2004 13:51:40 -0000 1.14 @@ -1 +1 @@ -Part�IV.�For OpenACS Platform Developers

For OpenACS Platform Developers

Table of Contents

11. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Internationalization
Security Requirements
Security Design
Security Notes
Request Processor Requirements
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

12. Kernel Documentation
Overview
Object Model Requirements
Object Model Design
Permissions Requirements
Permissions Design
Groups Requirements
Groups Design
Subsites Requirements
Subsites Design Document
Package Manager Requirements
Package Manager Design
Database Access API
OpenACS Internationalization Requirements
Internationalization
Security Requirements
Security Design
Security Notes
Request Processor Requirements
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 -r1.8 -r1.9 --- openacs-4/packages/acs-core-docs/www/analog-install.html 4 Feb 2004 16:47:32 -0000 1.8 +++ openacs-4/packages/acs-core-docs/www/analog-install.html 12 Feb 2004 13:51:40 -0000 1.9 @@ -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 aolserver]# cd /usr/local/src
 [root src]# tar xzf /tmp/analog-5.32.tar.gz
 [root src]# cd analog-5.32
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 -r1.26 -r1.27
--- openacs-4/packages/acs-core-docs/www/aolserver.html	4 Feb 2004 16:47:32 -0000	1.26
+++ openacs-4/packages/acs-core-docs/www/aolserver.html	12 Feb 2004 13:51:40 -0000	1.27
@@ -1,4 +1,4 @@
-Install AOLserver 3.3oacs1

Install AOLserver 3.3oacs1

by Vinod Kurup

+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.
  1. Unpack the Aolserver tarball.�Download the aolserver tarball and unpack it.

    [root root]# cd /usr/local/src
    @@ -74,17 +74,17 @@
     	  communicate with the database.  There is one script each for
     	  Oracle and PostgreSQL.  They don't conflict, so if you plan
     	  to use both databases, install both.

    • Oracle

      [root aolserver]# cd /usr/local/aolserver/bin
      -[root bin]# cp /tmp//packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +[root bin]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
       [root bin]# chmod 750 nsd-oracle
       [root bin]#
       cd /usr/local/aolserver/bin
      -cp /tmp//packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
      +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
       chmod 750 nsd-oracle
    • PostgreSQL

      [root aolserver]# cd /usr/local/aolserver/bin
      -[root bin]# cp /tmp//packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +[root bin]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
       [root bin]# chmod 755 nsd-postgres
       [root bin]#
       cd /usr/local/aolserver/bin
      -cp /tmp//packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
      +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
       chmod 755 nsd-postgres
  2. Install tDOM.�Download the tDOM tarball, unpack it, adjust the configuration file to match our patched distribution of aolserver, and compile it.

    [root root]# cd /usr/local/src
    Index: openacs-4/packages/acs-core-docs/www/aolserver4.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/aolserver4.html,v
    diff -u -r1.2 -r1.3
    --- openacs-4/packages/acs-core-docs/www/aolserver4.html	4 Feb 2004 16:47:32 -0000	1.2
    +++ openacs-4/packages/acs-core-docs/www/aolserver4.html	12 Feb 2004 13:51:40 -0000	1.3
    @@ -1,4 +1,4 @@
    -Install AOLserver 4

    Install AOLserver 4

    by Malte Sussdorff

    +Install AOLserver 4

    Install AOLserver 4

    by Malte Sussdorff

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    1. Retrieve TCL 8.4 (or higher).�Download and install TCL 8.4

      If you have not installed TCL already, download the latest TCL version from Sourceforge

      [root root]# cd /usr/local/src
      @@ -66,15 +66,15 @@
       	  communicate with the database.  There is one script each for
       	  Oracle and PostgreSQL.  They don't conflict, so if you plan
       	  to use both databases, install both.

      • Oracle

        [root aolserver]# cd /usr/local/aolserver/bin
        -[root bin]# cp /tmp//packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
        +[root bin]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
         [root bin]# chmod 750 nsd-oracle
         [root bin]#
         cd /usr/local/aolserver/bin
        -cp /tmp//packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
        +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-oracle.txt ./nsd-oracle
         chmod 750 nsd-oracle
      • PostgreSQL

        [root aolserver]# cd /usr/local/aolserver/bin
        -[root bin]# cp /tmp//packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
        +[root bin]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
         [root bin]# chmod 755 nsd-postgres
         [root bin]#
         cd /usr/local/aolserver/bin
        -cp /tmp//packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres
        -chmod 755 nsd-postgres
    2. Change startup script (optional).�If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

    3. Test AOLserver.

    ($Id$)
    View comments on this page at openacs.org
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/nsd-postgres.txt ./nsd-postgres +chmod 755 nsd-postgres
  • Change startup script (optional).�If you want to run AOLserver on a port below 1024 (normally, for a webserver you will use 80), you will have to change the /var/lib/aolserver/service0/etc/daemontools/run script according to the documentation found there (namely: Add the -b yourip:yourport switch)

  • Test AOLserver.

  • ($Id$)
    View comments on this page at openacs.org
    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 -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/apm-design.html 4 Feb 2004 16:47:32 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/apm-design.html 12 Feb 2004 13:51:40 -0000 1.25 @@ -1,4 +1,4 @@ -Package Manager Design

    Package Manager Design

    By Bryan Quinn

    +Package Manager Design

    Package Manager Design

    By Bryan Quinn

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

    Essentials

    • OpenACS Administrator directory

    • Package Manager Requirements

    • Packages

    • ER diagram

    • Tcl API

      An installation of the OpenACS includes the OpenACS Kernel, some services that extend the kernel's functionality, and some applications intended for end-users. Packages function as individual pieces of subsites. A subsite can contain multiple 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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/apm-requirements.html 4 Feb 2004 16:47:32 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/apm-requirements.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Package Manager Requirements

      Package Manager Requirements

      By Bryan Quinn and Todd Nightingale

      +Package Manager Requirements

      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.

      Introduction

      The following is a requirements document for the OpenACS Package Manager Index: openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 4 Feb 2004 16:47:32 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/automated-testing-best-practices.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -1,4 +1,4 @@ -Automated Testing

      Automated Testing

      By Jeff Davis

      +Automated Testing

      Automated Testing

      By Jeff Davis

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

      Best practices in writing OpenACS automated tests

      • Special characters in Tcl.� @@ -24,4 +24,4 @@ Make sure that if a duplicate name is entered that there is a reasonable error rather than a server error. Check for insert, move, copy, and rename. -

      ($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/backup-recovery.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/backup-recovery.html,v diff -u -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/backup-recovery.html 4 Feb 2004 16:47:32 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/backup-recovery.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Backup and Recovery

    Backup and Recovery

    By Don Baccus with additions +Backup and Recovery

    Backup and Recovery

    By Don Baccus with additions 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/bootstrap-acs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/bootstrap-acs.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/bootstrap-acs.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Bootstrapping OpenACS

    Bootstrapping OpenACS

    By Jon Salz

    +Bootstrapping OpenACS

    Bootstrapping OpenACS

    By Jon Salz

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    • Tcl code: /tcl/0-acs-init.tcl and /packages/acs-kernel/bootstrap.tcl

    This document describes the startup (bootstrapping) process for an AOLserver Index: openacs-4/packages/acs-core-docs/www/ch08s06.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/ch08s06.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/ch08s06.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,146 @@ +Categories

    Categories

    You can associate any ACS Object with one or more categories. + In this tutorial we'll show how to equip your application with user + interface to take advantage of the Categories service. +

    + We'll start by installing the Categories service. Go to + /acs/admin and install it. This step + won't be necessary for the users of your applications because you'll create + a dependency with the Package Manager which will take care that the + Categories service always gets installed when your application gets + installed. +

    + Now that we have installed the Categories service we can proceed to + modifying our application so that it can take advantage of it. We'll do it + in three steps: +

    1. + The Categories service provides a mechanism to associate one or + more category trees that are relevant to + a particular application instance. One example of such tree is a tree of + geographical locations. Continents are on the top of such tree, + each continent containing countries etc. Another tree might + contain market segments etc. Before users of your application + can take advantage of the Categories service there needs to be a + way for administrators of your application to choose which + category trees are applicable for the application.

      + The way to achieve this is is to provide a link + to the Category Management pages. Add the following snippet to your + /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl + file: +

      +set category_map_url [export_vars -base \
      +    "[site_node::get_package_url -package_key categories]cadmin/one-object" \
      +        { { object_id $package_id } }]
      +          

      + and the following snippet to your + /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp + file: +

      +<li><a href="@category_map_url@"
      +      class="action_link">Site-Wide Categories</a>
      +          

      The link created by the above code will take the admin to the generic + admin UI where he can pick category trees that make sense for this + application. The same UI also includes facilities to build and edit + category trees. Notice that the only parameter in this example is + package_id so that category trees + will be associated with the object identified by this + package_id. The categorization + service is actually more general than that: instead of + package_id you could use an ID of + some other object that serves as a "container" in your application. + For example, if your discussion forums application supports multiple + forums you would use forum_id to + associate category trees with just that one forum rather than the + entire application instance. +

    2. + Once the category trees have been selected users need a way + to categorize items. The easiest way to do this is by adding the + category widget type of the + form builder to note-edit.tcl. + To achieve this we'll need to use the -extend + switch to the ad_form command. Here's the + note-edit.tcl page with added sections + emphasized. +

      ad_page_contract {
      +    This is the view-edit page for notes.
      +
      +    @author Your Name (you@example.com)
      +    @cvs-id $Id: ch08s06.html,v 1.1 2004/02/12 13:51:40 joela Exp $
      +
      +    @param item_id If present, assume we are editing that note.  Otherwise, we
      +    are creating a new note.
      +
      +} { 
      +    item_id:integer,optional
      +}
      +
      +ad_form -name note -form {
      +    {item_id:key}
      +    {title:text {label Title}}
      +}
      +
      +category::ad_form::add_widgets \
      +  -form_name note \
      +  -container_object_id [ad_conn package_id] \
      +  -categorized_object_id [value_if_exists item_id]
      +
      +ad_form -extend -name note \ 
      +  -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]
      +} -on_submit {
      +    set category_ids [category::ad_form::get_categories \
      +      -container_object_id [ad_conn package_id]]
      +} -new_data {
      +    mfp::note::add \
      +    -title $title \
      +    -item_id $item_id
      +
      +    category::map_object \
      +      -remove_old \
      +      -object_id $item_id \
      +       $category_ids
      +
      +    set message "Note $title added"
      +} -edit_data {
      +    mfp::note::edit \
      +    -item_id $item_id \
      +    -title $title
      +
      +    category::map_object \
      +      -remove_old \
      +      -object_id $item_id \
      +       $category_ids
      +
      +
      +     set message "Note $title changed"
      +} -after_submit {
      +    ad_returnredirect -message $message "."
      +    ad_script_abort
      +}

      +

      + Note how we have replaced what was a single + ad_form invocation with two. The + -extend flag is used to build a form + incrementally. We had to do it so that we can insert the call to + category::ad_form::add_widgets. This + procedure will add as many category widgets as there are trees associated with + our package_id. The complementary proc + category::ad_form::get_categories will take + care of collecting the values after the form has been submitted. The block + -on_submit will get executed at this time, + followed by execution of either -new_data or + -edit_data, depending on whether we are adding + a new note or editing an existing one. +

      +

    View comments on this page at openacs.org
    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 -r1.7 -r1.8 --- openacs-4/packages/acs-core-docs/www/complete-install.html 4 Feb 2004 16:47:32 -0000 1.7 +++ openacs-4/packages/acs-core-docs/www/complete-install.html 12 Feb 2004 13:51:40 -0000 1.8 @@ -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
    Fisheye: Tag 1.8 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/configure.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/configuring-new-site.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/configuring-new-site.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/configuring-new-site.html 4 Feb 2004 16:47:32 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/configuring-new-site.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -Chapter�4.�Configuring a new OpenACS Site

    Chapter�4.�Configuring a new OpenACS Site

    Table of Contents

    How Do I?

    by Joel Aufrecht

    +Chapter�4.�Configuring a new OpenACS Site

    Chapter�4.�Configuring a new OpenACS Site

    Table of Contents

    How Do I?

    by Joel Aufrecht

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

    In this chapter, Configuring refers to making changes to a new OpenACS site through the web interface. In crude terms, these changes happen in the database, and are upgrade-safe. Customizing refers to changes that touch the file system, and require some planning if easy upgradability is to be maintained.

    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 -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/credits.html 4 Feb 2004 16:47:32 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/credits.html 12 Feb 2004 13:51:40 -0000 1.25 @@ -1,4 +1,4 @@ -Appendix�C.�Credits

    Appendix�C.�Credits

    By Vinod Kurup

    +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.

    Vinod Kurup put 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 -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/cvs-tips.html 4 Feb 2004 16:47:32 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/cvs-tips.html 12 Feb 2004 13:51:40 -0000 1.10 @@ -1,13 +1,13 @@ -Appendix�D.�Using CVS with an OpenACS Site

    Appendix�D.�Using CVS with an OpenACS Site

    By Joel Aufrecht

    +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. -

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

    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 root]# mkdir /cvsroot/service0
      -[root root]# chown service0.web /cvsroot/service0
      +[root root]# chown service0.service0 /cvsroot/service0
       [root root]#
       mkdir /cvsroot/service0
      -chown service0.web /cvsroot/service0
    2. Add the repository location to the user environment.

      [root root]# su - service0
      +chown service0.service0 /cvsroot/service0
    3. Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc.

      [root root]# su - service0
       [service0 service0]$ emacs .bashrc

      Put this string into /home/service0/.bashrc:

      export CVSROOT=/cvsroot
      [service0 service0]$ exit
       logout
       
      @@ -20,34 +20,43 @@
                   plus this string,
                   i.e.
                   /cvsroot/service0.
      -            "OpenACS" is the vendor tag, and "" is the
      +            "OpenACS" is the vendor tag, and "oacs-5-0-1" is the
                   release tag.  These tags will be useful in upgrading and
                   branching.  -m sets the version comment.

      [root root]# su - service0
      -[service0 service0]$ cd /web/service0
      -[service0 service0]$ cvs import -m "initial install" service0 OpenACS 
      +[service0 service0]$ cd /var/lib/aolserver/service0
      +[service0 service0]$ cvs import -m "initial install" service0 OpenACS oacs-5-0-1
       N service0/license.txt
       N service0/readme.txt
       (many lines omitted)
       N service0/www/SYSTEM/flush-memoized-statement.tcl
       
       No conflicts created by this import
       
      -[service0 service0]$
      +[service0 service0]$ exit
      +[root root]#
       su - service0
      -cd /web/service0
      -cvs import -m "initial install" service0 OpenACS 

      Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files.

      [service0 service0]$ cd ..
      -[service0 web]$ mv service0 service0.orig
      -[service0 web]$ cvs checkout service0
      +cd /var/lib/aolserver/service0
      +cvs import -m "initial install" service0 OpenACS oacs-5-0-1
      +exit

      Move the original directory to a temporary location, and check out the cvs repository in its place.

      [root root]# mv /var/lib/aolserver/service0 /var/tmp
      +[root root]# mkdir /var/lib/aolserver/service0
      +[root root]# chown service0.service0 /var/lib/aolserver/service0
      +[root root]# su - service0
      +[service0 service0]$ cd /var/lib/aolserver
      +[service0 aolserver]$ cvs checkout service0
       cvs checkout: Updating service0
       U service0/license.txt
       (many lines omitted)
       U service0/www/SYSTEM/dbtest.tcl
       U service0/www/SYSTEM/flush-memoized-statement.tcl
      -[service0 web]$ exit
      +[service0 aolserver]$ exit
       logout
       
      -[root web]#
      -cd ..
      -mv service0 service0.orig
      +[root root]#
      +
      +mv /var/lib/aolserver/service0 /var/tmp
      +mkdir /var/lib/aolserver/service0
      +chown service0.service0 /var/lib/aolserver/service0
      +su - service0
      +cd /var/lib/aolserver
       cvs checkout service0
      -exit
    View comments on this page at openacs.org
    +exit
  • If the service starts correctly, come back and remove the temporary copy of the uploaded files.

  • View comments on this page at openacs.org
    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 -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/database-management.html 4 Feb 2004 16:47:32 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/database-management.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1,4 +1,4 @@ -Database Management

    Database Management

    By Joel Aufrecht

    +Database Management

    Database Management

    By Joel Aufrecht

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

    Running a PostgreSQL database on another server

    To run a database on a different machine than the 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/db-api-detailed.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/db-api-detailed.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Database Access API

    Database Access API

    By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

    +Database Access API

    Database Access API

    By Jon Salz. Revised and expanded by Roberto Mello (rmello at fslc dot usu dot edu), July 2002.

    OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
    • Tcl procedures: /packages/acs-kernel/10-database-procs.tcl

    • Tcl initialization: /packages/acs-kernel/database-init.tcl

    The Big Picture

    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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/db-api.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/db-api.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -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.

    Overview

    One of OpenACS's great strengths is that code written for it is 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 -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/dev-guide.html 4 Feb 2004 16:47:32 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/dev-guide.html 12 Feb 2004 13:51:40 -0000 1.21 @@ -1 +1 @@ -Chapter�8.�Development Reference

    View comments on this page at openacs.org
    +Chapter�9.�Development Reference
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/doc-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/doc-standards.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/doc-standards.html 4 Feb 2004 16:47:32 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/doc-standards.html 12 Feb 2004 13:51:40 -0000 1.4 @@ -1 +1 @@ -Chapter�10.�Documentation Standards
    View comments on this page at openacs.org
    +Chapter�11.�Documentation Standards
    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 -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/docbook-primer.html 4 Feb 2004 16:47:32 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/docbook-primer.html 12 Feb 2004 13:51:40 -0000 1.27 @@ -1,4 +1,4 @@ -OpenACS Documentation Guide

    OpenACS Documentation Guide

    +OpenACS Documentation Guide

    OpenACS Documentation Guide

    By Claus Rasmussen, with additions by Roberto Mello and the OpenACS Community

    Overview of OpenACS Documentation

    @@ -36,7 +36,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. @@ -57,7 +57,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 @@ -106,7 +106,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
      @@ -130,20 +130,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 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.

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

    - + Inside this container your document will be split up into <sect2>'s, each with the same requirements - id and xreflabel @@ -167,7 +167,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>. @@ -177,12 +177,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:

    Put this in your XML:

    +	  

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

    Put this in your XML:

     - Find information about creating a package in
     <xref linkend="packages-making-a-package"></xref>.
     

    And the output is:

    @@ -206,7 +206,7 @@
     	    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 @@ -227,7 +227,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>, @@ -253,7 +253,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 @@ -298,7 +298,7 @@ </variablelist>

    Tables

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

    Emphasis

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

    @@ -413,4 +413,4 @@ 8/3/2002Vinod Kurup0.3 Added OpenACS information, updated tools, added extra links and added info to the Publishing section. - 12/24/2001Roberto Mello0.2Changed recommendation from <phrase> to <emphasis role="strong">01/19/2000Claus Rasmussen0.1Creation12/2000Claus Rasmussen

    View comments on this page at openacs.org
    + 12/24/2001Roberto Mello0.2Changed recommendation from <phrase> to <emphasis role="strong">01/19/2000Claus Rasmussen0.1Creation12/2000Claus Rasmussen
    View comments on this page at openacs.org
    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 -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 4 Feb 2004 16:47:32 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/eng-standards-constraint-naming.html 12 Feb 2004 13:51:40 -0000 1.25 @@ -1,4 +1,4 @@ -Constraint naming standard

    Constraint naming standard

    By Michael Bryzek

    +Constraint naming standard

    Constraint naming standard

    By Michael Bryzek

    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 -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 4 Feb 2004 16:47:32 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 12 Feb 2004 13:51:40 -0000 1.25 @@ -1,4 +1,4 @@ -ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By Michael Yoon and Aurelius Prochazka

    +ACS File Naming and Formatting Standards

    ACS File Naming and Formatting Standards

    By Michael Yoon and Aurelius Prochazka

    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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/eng-standards-plsql.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -PL/SQL Standards

    PL/SQL Standards

    +PL/SQL Standards

    PL/SQL Standards

    By Richard Li and Yon Feldman

    OpenACS docs are written by the named authors, and may be edited 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/eng-standards-versioning.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Release Version Numbering

    Release Version Numbering

    By Ron Henderson

    Revised by Joel Aufrecht

    +Release Version Numbering

    Release Version Numbering

    By Ron Henderson

    Revised 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/eng-standards.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards.html,v diff -u -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/eng-standards.html 4 Feb 2004 16:47:32 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/eng-standards.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1 +1 @@ -Chapter�9.�Engineering Standards

    View comments on this page at openacs.org
    +Chapter�10.�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 -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 4 Feb 2004 16:47:32 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/ext-auth-requirements.html 12 Feb 2004 13:51:40 -0000 1.15 @@ -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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/filename.html 4 Feb 2004 16:47:32 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/filename.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -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 @@ -114,7 +114,7 @@ within the OpenACS, this section's details are likely to shift from UI specifics to template interface specifics.

    Configuration/Parameters

    - Under OpenACS , parameters are set at two levels: at the global level by + Under OpenACS 5.0.1d1, parameters are set at two levels: at the global level by the OpenACS-admin, and at the subsite level by a sub-admin. In this section, list and discuss both levels of parameters.

    Future Improvements/Areas of Likely Change

    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 -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/for-everyone.html 4 Feb 2004 16:47:32 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/for-everyone.html 12 Feb 2004 13:51:40 -0000 1.16 @@ -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/form-builder.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/form-builder.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/form-builder.html 4 Feb 2004 16:47:32 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/form-builder.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -1,4 +1,4 @@ -Using HTML Forms

    Using HTML Forms

    Overview

    Multi-part Elements

    Some elements have more than one choice, or can submit more than one value.

    SELECT elements

    1. Creating the form element.�Populate a list of lists with values for the option list.

      set foo_options [db_list_of_lists foo_option_list "
      +Using HTML Forms

      Using HTML Forms

      Overview

      Multi-part Elements

      Some elements have more than one choice, or can submit more than one value.

      SELECT elements

      1. Creating the form element.�Populate a list of lists with values for the option list.

        set foo_options [db_list_of_lists foo_option_list "
             select foo,
                    foo_id
               from foos
        @@ -10,5 +10,5 @@
             }

        This will result in a single name/value pair coming back in the submitted form. Handle this within the same ad_form structure, in the -new_data and -edit_data. In the example, it is available as $foo

      See also the W3C spec for "The SELECT, OPTGROUP, and OPTION elements".

      Common Errors

      Here are some common errors and what to do when you - encounter them:

      Error when selecting values

      This generally happens when there is an error in your - query.

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

      Error when selecting values

      This generally happens when there is an error in your + query.

    ($Id$)
    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 -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/general-documents.html 4 Feb 2004 16:47:32 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/general-documents.html 12 Feb 2004 13:51:40 -0000 1.16 @@ -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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/groups-design.html 4 Feb 2004 16:47:32 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/groups-design.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Groups Design

    Groups Design

    By Rafael H. Schloming and Mark Thomas

    +Groups Design

    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.

    Essentials

    • User directory

    • Sitewide administrator directory

    • Subsite administrator directory

    • TCL script directory

    • OpenACS 4 Groups Requirements

    • Data model

    • PL/SQL file

      • 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/groups-requirements.html 4 Feb 2004 16:47:32 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/groups-requirements.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Groups Requirements

        Groups Requirements

        By Rafael H. Schloming, Mark Thomas

        +Groups Requirements

        Groups Requirements

        By Rafael H. Schloming, Mark Thomas

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

        Introduction

        Almost all database-backed websites have users, and need to model the Index: openacs-4/packages/acs-core-docs/www/how-do-I.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/how-do-I.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/how-do-I.html 4 Feb 2004 16:47:32 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/how-do-I.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,6 +1,6 @@ -How Do I?

        How Do I?

        How do I edit the front page of a new site through a web interface?

        The easiest way is to install the Edit-This-Page package.

        1. Log in to the web site as an administrator.

        2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

        3. +How Do I?

          How Do I?

          How do I edit the front page of a new site through a web interface?

          The easiest way is to install the Edit-This-Page package.

          1. Log in to the web site as an administrator.

          2. Click on Admin > Install Software > Install from OpenACS Repository / Install new application

          3. Choose Edit This Page and install -
          4. Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

          How do I let anybody who registers post to a weblog?

          Go to /admin/permissions and grant Create to Registered Users

          How do I replace the front page of a new site with the front page of an application on that site

          Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

          1. On the front page, click the Admin button.

          2. On the administration page, click Parameters link.

          3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

          How do I put custom functionality on front page of a new site?

          Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/service0/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

          1. cp /var/lib/aolserver/service0/packages/acs-subsite/www/index* /var/lib/aolserver/service0/www
          2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

          How do I change the site-wide style?

          Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

          • +

          • Follow the instructions within Edit This Page (the link will only work after Edit This Page is installed).

        How do I let anybody who registers post to a weblog?

        Go to /admin/permissions and grant Create to Registered Users

        How do I replace the front page of a new site with the front page of an application on that site

        Suppose you install a new site and install Weblogger, and you want all visitors to see weblogger automatically.

        1. On the front page, click the Admin button.

        2. On the administration page, click Parameters link.

        3. Change the parameter IndexRedirectUrl to be the URI of the desired application. For a default weblogger installation, this would be weblogger/. Note the trailing slash.

        How do I put custom functionality on front page of a new site?

        Every page within an OpenACS site is part of a subsite More information). The home page of the entire site is the front page is a special, default instance of a subsite, served from /var/lib/aolserver/service0/www. If an index page is not found there, the default index page for all subsites is used. To customize the code on the front page, copy the default index page from the Subsite package to the Main site and edit it:

        1. cp /var/lib/aolserver/service0/packages/acs-subsite/www/index* /var/lib/aolserver/service0/www
        2. Edit the new index.adp to change the text; you shouldn't need to edit index.tcl unless you are adding new functionality.

        How do I change the site-wide style?

        Almost all pages on an OpenACS site use ACS Templating, and so their appearance is driven by a layer of different files. Let's examine how this works:

        • A templated page uses an ADP/TCL pair. The first line in the ADP file is usually:

          <master>

          If it appears exactly like this, without any arguments, the template processer uses default-master for that subsite. For pages in /var/lib/aolserver/service0/www, this is /var/lib/aolserver/service0/www/default-master.adp and the associated .tcl file. -

        • The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/service0/www/site-master.adp and .tcl)

        • The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/service0/www/blank-master.adp and .tcl).

        • Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

        Figure�4.1.�Site Templates

        Site Templates
        View comments on this page at openacs.org
        +

      • The default-master is itself a normal ADP page. It draws the subsite navigation elements and invokes site-master (/var/lib/aolserver/service0/www/site-master.adp and .tcl)

      • The site-master draws site-wide navigation elements and invokes blank-master (/var/lib/aolserver/service0/www/blank-master.adp and .tcl).

      • Blank-master does HTML housekeeping and provides a framework for special sitewide navigation "meta" elements such as Translator widgets and Admin widgets.

      Figure�4.1.�Site Templates

      Site Templates
    View comments on this page at openacs.org
    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 -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/i18n-requirements.html 4 Feb 2004 16:47:32 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/i18n-requirements.html 12 Feb 2004 13:51:40 -0000 1.10 @@ -1,4 +1,4 @@ -OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    by Henry Minsky, +OpenACS Internationalization Requirements

    OpenACS Internationalization Requirements

    by Henry Minsky, Yon Feldman, Lars Pind, Peter Marklund, 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 -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/i18n.html 4 Feb 2004 16:47:32 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/i18n.html 12 Feb 2004 13:51:40 -0000 1.17 @@ -1,4 +1,4 @@ -Internationalization

    Internationalization

    +Internationalization

    Internationalization

    By Peter Marklund and Lars Pind

    @@ -48,7 +48,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 @@ -263,15 +263,15 @@ 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 Internationalization, then Convert ADP, Tcl, and SQL files to using the - message catalog..

    Internationalize Package Parameters with visible messages

    + message catalog..

    Internationalize Package Parameters with visible messages

    See ??? -

    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 -r1.27 -r1.28 --- openacs-4/packages/acs-core-docs/www/index.html 6 Feb 2004 18:55:21 -0000 1.27 +++ openacs-4/packages/acs-core-docs/www/index.html 12 Feb 2004 13:51:40 -0000 1.28 @@ -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 a Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostgreSQL
      Install AOLserver 3.3oacs1
      Install AOLserver 4
      Install OpenACS 5.0.1d1
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a new OpenACS Site
      How Do I?
      5. Upgrading
      Overview
      Upgrading OpenACS
      Upgrading the OpenACS files
      Upgrading Platform components
      6. Maintenance
      Running OpenACS in Production Environments
      Database Management
      Backup and Recovery
      Diagnosing Performance Problems
      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.
      Install PHP for use in AOLserver
      Install Squirrelmail for use as a webmail system for OpenACS
      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 Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS
      Groups, Context, Permissions
      Writing OpenACS Application Pages
      Parties in OpenACS
      OpenACS Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      Using HTML Forms
      9. Engineering Standards
      OpenACS Style Guide
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      Variables
      Automated Testing
      10. Documentation Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Using nXML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      D. Using CVS with an OpenACS Site
      E. How to package and release OpenACS
      How to Update the OpenACS.org repository
      How to Update the translations
      IV. For OpenACS Platform Developers
      11. Kernel Documentation
      Overview
      Object Model Requirements
      Object Model Design
      Permissions Requirements
      Permissions Design
      Groups Requirements
      Groups Design
      Subsites Requirements
      Subsites Design Document
      Package Manager Requirements
      Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      Security Requirements
      Security Design
      Security Notes
      Request Processor Requirements
      Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements
      Index
      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 a Unix-like system and supporting software
      Install Oracle 8.1.7
      Install PostgreSQL
      Install AOLserver 3.3oacs1
      Install AOLserver 4
      Install OpenACS 5.0.1d1
      OpenACS Installation Guide for Windows2000
      OpenACS Installation Guide for Mac OS X
      4. Configuring a new OpenACS Site
      How Do I?
      5. Upgrading
      Overview
      Upgrading OpenACS
      Upgrading the OpenACS files
      Upgrading Platform components
      6. Maintenance
      Running OpenACS in Production Environments
      Database Management
      Backup and Recovery
      Diagnosing Performance Problems
      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.
      Install PHP for use in AOLserver
      Install Squirrelmail for use as a webmail system for OpenACS
      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
      8. Advanced Topics
      Write the Requirements and Design Specs
      Add the new package to CVS
      Adding Comments
      Admin Pages
      Categories
      Categories
      Prepare the package for distribution.
      Notifications
      Using .vuh files for pretty urls
      9. Development Reference
      OpenACS Packages
      OpenACS Data Models and the Object System
      The Request Processor
      The OpenACS Database Access API
      Using Templates in OpenACS
      Groups, Context, Permissions
      Writing OpenACS Application Pages
      Parties in OpenACS
      OpenACS Permissions Tediously Explained
      Object Identity
      Programming with AOLserver
      Using HTML Forms
      10. Engineering Standards
      OpenACS Style Guide
      Release Version Numbering
      Constraint naming standard
      ACS File Naming and Formatting Standards
      PL/SQL Standards
      Variables
      Automated Testing
      11. Documentation Standards
      OpenACS Documentation Guide
      Using PSGML mode in Emacs
      Using nXML mode in Emacs
      Detailed Design Documentation Template
      System/Application Requirements Template
      D. Using CVS with an OpenACS Site
      E. How to package and release OpenACS
      How to Update the OpenACS.org repository
      How to Update the translations
      IV. For OpenACS Platform Developers
      12. Kernel Documentation
      Overview
      Object Model Requirements
      Object Model Design
      Permissions Requirements
      Permissions Design
      Groups Requirements
      Groups Design
      Subsites Requirements
      Subsites Design Document
      Package Manager Requirements
      Package Manager Design
      Database Access API
      OpenACS Internationalization Requirements
      Internationalization
      Security Requirements
      Security Design
      Security Notes
      Request Processor Requirements
      Request Processor Design
      Documenting Tcl Files: Page Contracts and Libraries
      Bootstrapping OpenACS
      External Authentication Requirements
      Index
      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 -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/individual-programs.html 4 Feb 2004 16:47:32 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/individual-programs.html 12 Feb 2004 13:51:40 -0000 1.17 @@ -1,12 +1,12 @@ -Prerequisite Software

      Prerequisite Software

      by Joel Aufrecht

      +Prerequisite Software

      Prerequisite Software

      by Joel Aufrecht

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

      OpenACS requires, at a minimum, an operating system, database, and webserver. Many additional programs, such as a Mail Transport Agent and source control system, are also needed for a fully effective instance. -

      Table�2.2.�Version Compatibility Matrix

      OpenACS Version3.2.5 4.5 4.6 4.6.14.6.24.6.35.0.0
      AOLserver3YesNo
      3.3+ad13MaybeYes
      3.3oacs1MaybeYes
      3.4.2No
      3.4.2oacs1MaybeYesMaybe
      3.5.5MaybeYesNo
      4.0MaybeYes
      PostgreSQL7.0YesNo
      7.2.xYesNo
      7.3.2 - 7.3.4NoYes
      7.4NoMaybe
      Oracle8.1.6MaybeYes
      8.1.7MaybeYes
      9iNoYes
      • OpenACS .�The OpenACS tarball comprises the core packages and +

        Table�2.2.�Version Compatibility Matrix

        OpenACS Version3.2.5 4.5 4.6 4.6.14.6.24.6.35.0.0
        AOLserver3YesNo
        3.3+ad13MaybeYes
        3.3oacs1MaybeYes
        3.4.2No
        3.4.2oacs1MaybeYesMaybe
        3.5.5MaybeYesNo
        4.0MaybeYes
        PostgreSQL7.0YesNo
        7.2.xYesNo
        7.3.2 - 7.3.4NoYes
        7.4NoMaybe
        Oracle8.1.6MaybeYes
        8.1.7MaybeYes
        9iNoYes
        • OpenACS 5.0.1d1.�The OpenACS tarball comprises the core packages and many useful additional packages. This includes a full set of documentation. The tarball works with both PostgreSQL and Oracle.

        • Operating System.�OpenACS is designed for a Unix-like system. It is @@ -38,7 +38,7 @@ distributions.

        • TCL 8.3 development headers and libraries, OPTIONAL.� The site-wide-search service, OpenFTS, requires these to compile. (Debian users: apt-get install tcl8.3-dev). You need this - to install OpenFTS.

      • tDOM, REQUIRED.�OpenACS stores + to install OpenFTS.

    4. tDOM, REQUIRED.�OpenACS 5.0.1d1 stores queries in XML files, so we use an AOLserver module called tDOM to parse these files. (This replaces libxml2, which was used prior to 4.6.4.) tDOM is available from http://www.tdom.org).

    5. tclwebtest, OPTIONAL.�tclwebtest 0.3 is a tool for testing web interfaces @@ -49,7 +49,7 @@ running Apache with mod_nsd - see this post.

      • AOLserver 3.3oacs1, REQUIRED.�Mat Kovach's source distribution of AOLserver, including all of the patches listed below.

        Mat Kovach is graciously maintaining an AOLserver distribution that - includes all the patches and modules needed to run OpenACS . These + includes all the patches and modules needed to run OpenACS 5.0.1d1. These instructions will describe how to install using his source distribution. He also has binaries for SuSE 7.3 and OpenBSD 2.8 (and perhaps more to come), currently located at uptime.openacs.org. 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 -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/install-cvs.html 4 Feb 2004 16:47:32 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/install-cvs.html 12 Feb 2004 13:51:40 -0000 1.16 @@ -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 tmp]# mkdir /cvsroot
         [root tmp]# cvs -d /cvsroot init
         [root 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 -r1.16 -r1.17
        --- openacs-4/packages/acs-core-docs/www/install-daemontools.html	4 Feb 2004 16:47:32 -0000	1.16
        +++ openacs-4/packages/acs-core-docs/www/install-daemontools.html	12 Feb 2004 13:51:40 -0000	1.17
        @@ -1,9 +1,9 @@
        -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 root]# mkdir -p /package
            +      services.

            1. Install Daemontools

              download daemontools and install it.

              • Red Hat 8

                [root root]# mkdir -p /package
                 [root root]# chmod 1755 /package/
                 [root root]# cd /package/
                 [root package]# tar xzf /tmp/daemontools-0.76.tar.gz
                @@ -61,7 +61,7 @@
                 root     13294  0.0  0.1  1352  272 ?        S    09:51   0:00 svscan /service
                 root     13295  0.0  0.0  1304  208 ?        S    09:51   0:00 readproctitle service errors: .......................................
                 [root root]#
              • Install a script to grant non-root users permission to - control daemontools services.

                [root root]# cp /tmp//packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
                +        control daemontools services.

                [root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup
                 [root root]# chmod 755 /usr/local/bin/svgroup
                -cp /tmp//packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup 
                +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/svgroup.txt /usr/local/bin/svgroup 
                 chmod 755 /usr/local/bin/svgroup
          View comments on this page at openacs.org
          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 -r1.14 -r1.15 --- openacs-4/packages/acs-core-docs/www/install-full-text-search.html 4 Feb 2004 16:47:32 -0000 1.14 +++ openacs-4/packages/acs-core-docs/www/install-full-text-search.html 12 Feb 2004 13:51:40 -0000 1.15 @@ -1,7 +1,7 @@ -Install Full Text Search

          Install Full Text Search

          By Joel Aufrecht and Malte Sussdorff

          +Install Full Text Search

          Install Full Text Search

          By Joel Aufrecht and Malte Sussdorff

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

          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 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 root]# su - postgres
            @@ -76,7 +76,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 service0]$ /usr/local/pgsql/bin/psql service0 -f /usr/local/src/postgresql-7.3.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 -r1.8 -r1.9
    --- openacs-4/packages/acs-core-docs/www/install-more-software.html	4 Feb 2004 16:47:32 -0000	1.8
    +++ openacs-4/packages/acs-core-docs/www/install-more-software.html	12 Feb 2004 13:51:40 -0000	1.9
    @@ -1,4 +1,4 @@
    -Appendix�B.�Install additional supporting software

    Appendix�B.�Install additional supporting software

    By Joel Aufrecht

    +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.

    This section assumes that the source tarballs for supporting 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 -r1.10 -r1.11 --- openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 4 Feb 2004 16:47:32 -0000 1.10 +++ openacs-4/packages/acs-core-docs/www/install-nsopenssl.html 12 Feb 2004 13:51:40 -0000 1.11 @@ -1,4 +1,4 @@ -Install nsopenssl

    Install nsopenssl

    By Joel Aufrecht and Malte Sussdorff

    +Install nsopenssl

    Install nsopenssl

    By Joel Aufrecht and Malte Sussdorff

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

    This AOLserver module is required if you want people to connect to your site via 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 -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-nspam.html 4 Feb 2004 16:47:32 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-nspam.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -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 -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-origins.html 4 Feb 2004 16:47:32 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-origins.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -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 -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/install-overview.html 4 Feb 2004 16:47:33 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/install-overview.html 12 Feb 2004 13:51:40 -0000 1.21 @@ -1,4 +1,4 @@ -Chapter�2.�Installation Overview

    Chapter�2.�Installation Overview

    by Vinod Kurup

    +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.
    View comments on this page at openacs.org
    Index: openacs-4/packages/acs-core-docs/www/install-php.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-php.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-php.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-php.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -Install PHP for use in AOLserver

    Install PHP for use in AOLserver

    By Malte Sussdorff

    +Install PHP for use in AOLserver

    Install PHP for use in AOLserver

    By Malte Sussdorff

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

    To be able to use PHP software with AOLserver (and OpenACS), you have to install PHP with AOLserver support. Get the latest version from www.php.net. For convenience we get version 4.3.4 from a mirror

    [root root]# cd /usr/local/src
    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 -r1.16 -r1.17
    --- openacs-4/packages/acs-core-docs/www/install-qmail.html	4 Feb 2004 16:47:33 -0000	1.16
    +++ openacs-4/packages/acs-core-docs/www/install-qmail.html	12 Feb 2004 13:51:40 -0000	1.17
    @@ -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 @@ -29,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 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 @@ -40,10 +40,10 @@ Unless this mail is addressed to the same machine, qmail thinks that it's an attempt to relay mail, and rejects it. So these two commands set up an exception so that any mail sent from 127.0.0.1 is allowed to -send outgoing mail.

    [root ucspi-tcp-0.88]# cp /tmp//packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
    +send outgoing mail.

    [root ucspi-tcp-0.88]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/tcp.smtp.txt /etc/tcp.smtp
     [root ucspi-tcp-0.88]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
    -cp /tmp//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, +cp /tmp/openacs-5.0.1d1/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, set up the standard supporting users and build the binaries:

    [root root]# cd /usr/local/src
     [root src]# wget http://www.qmail.org/netqmail-1.04.tar.gz
     [root src]# tar xzf netqmail-1.04.tar.gz
    @@ -102,7 +102,7 @@
     cd netqmail-1.04
     ./collate.sh
     cd netqmail-1.04
    -make setup check

    Replace sendmail with qmail's wrapper.

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

    Replace sendmail with qmail's wrapper.

    [root qmail-1.03]# rm -f /usr/bin/sendmail /usr/sbin/sendmail
     [root qmail-1.03]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail
     [root qmail-1.03]#
     rm -f /usr/bin/sendmail /usr/sbin/sendmail
    @@ -124,13 +124,13 @@
     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 alias]# echo "./Maildir" > /var/qmail/bin/.qmail
    -[root alias]# cp /tmp//packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
    +[root alias]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc
     [root alias]# chmod 755 /var/qmail/rc
     [root alias]# 
     echo "./Maildir" > /var/qmail/bin/.qmail 
    -cp /tmp//packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc 
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail.rc.txt /var/qmail/rc 
     chmod 755 /var/qmail/rc 
     

    Set up the skeleton directory so that new users will be configured for qmail.

    [root root]# /var/qmail/bin/maildirmake /etc/skel/Maildir
    @@ -142,13 +142,13 @@
     [root root]# mkdir -p /var/qmail/supervise/qmail-smtpd/log
     [root root]# mkdir /var/log/qmail
     [root root]# chown qmaill /var/log/qmail
    -[root root]# cp /tmp//packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
    +[root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
     [root root]# chmod 755 /var/qmail/bin/qmailctl
     [root root]# ln -s /var/qmail/bin/qmailctl /usr/bin
    -[root root]# cp /tmp//packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run 
    -[root root]# cp /tmp//packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
    -[root root]# cp /tmp//packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
    -[root root]# cp /tmp//packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
    +[root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run 
    +[root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
    +[root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
    +[root root]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
     [root root]# chmod 755 /var/qmail/supervise/qmail-send/run
     [root root]# chmod 755 /var/qmail/supervise/qmail-send/log/run
     [root root]# chmod 755 /var/qmail/supervise/qmail-smtpd/run
    @@ -159,13 +159,13 @@
     mkdir -p /var/qmail/supervise/qmail-smtpd/log
     mkdir /var/log/qmail
     chown qmaill /var/log/qmail
    -cp /tmp//packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmailctl.txt /var/qmail/bin/qmailctl
     chmod 755 /var/qmail/bin/qmailctl
     ln -s /var/qmail/bin/qmailctl /usr/bin
    -cp /tmp//packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run
    -cp /tmp//packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
    -cp /tmp//packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
    -cp /tmp//packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-send-run.txt /var/qmail/supervise/qmail-send/run
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-send-log-run.txt /var/qmail/supervise/qmail-send/log/run
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-smtpd-run.txt /var/qmail/supervise/qmail-smtpd/run
    +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/qmail-smtpd-log-run.txt /var/qmail/supervise/qmail-smtpd/log/run
     chmod 755 /var/qmail/supervise/qmail-send/run
     chmod 755 /var/qmail/supervise/qmail-send/log/run
     chmod 755 /var/qmail/supervise/qmail-smtpd/run
    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 -r1.16 -r1.17
    --- openacs-4/packages/acs-core-docs/www/install-redhat.html	4 Feb 2004 16:47:33 -0000	1.16
    +++ openacs-4/packages/acs-core-docs/www/install-redhat.html	12 Feb 2004 13:51:40 -0000	1.17
    @@ -1,4 +1,4 @@
    -Appendix�A.�Install Red Hat 8/9

    Appendix�A.�Install Red Hat 8/9

    by Joel Aufrecht

    +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.

    This section takes a blank PC and sets up some supporting @@ -26,7 +26,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 @@ -54,7 +54,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 @@ -75,7 +75,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 @@ -87,13 +87,13 @@ 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),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. +

    check Editors (this installs emacs),
    click Details next to Text-based Internet, check lynx, and click OK;
    check Authoring and Publishing (this installs docbook),
    uncheck Server Configuration Tools,
    uncheck Web Server,
    uncheck Windows File Server,
    check SQL Database Server (this installs PostgreSQL),
    check Development Tools (this installs gmake and other build tools),
    uncheck Administration Tools, and
    uncheck Printing Support.

    At the bottom, check Select Individual Packages and click Next

  • We need to fine-tune the exact list of packages. The same rules apply as in the last step - you can add more stuff, but you shouldn't remove anything the guide adds. We're going to go through all the packages in one big list, so select 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,
    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),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination +list of packages will appear.

    uncheck apmd (monitors power, not very useful for servers),
    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),
    uncheck pam-devel (I don't remember why, but we don't want this),
    uncheck portmap,
    uncheck postfix (this is an MTA, but we're going to install qmail later),
    check postgresql-devel,
    uncheck rsh (rsh is a security hole),
    uncheck sendmail (sendmail is an insecure MTA; we're going to install qmail instead later),
    check tcl (we need tcl), and
    uncheck xinetd (xinetd handles incoming tcp connections. We'll install a different, more secure program, ucspi-tcp).
    Click Next
  • Red Hat isn't completely happy with the combination of packages we've selected, and wants to satisfy some dependencies. Don't let it. On the next screen, choose Ignore Package @@ -119,7 +119,7 @@ upgrading all of that. Since you are upgrading the kernel, reboot after this step.

  • 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 -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/install-resources.html 4 Feb 2004 16:47:33 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/install-resources.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -1,4 +1,4 @@ -Resources

      Resources

      +Resources

      Resources

      Here are some resources that OpenACS users have found useful.

      Books

      • Index: openacs-4/packages/acs-core-docs/www/install-squirrelmail.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-squirrelmail.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/install-squirrelmail.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/install-squirrelmail.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -Install Squirrelmail for use as a webmail system for OpenACS

        Install Squirrelmail for use as a webmail system for OpenACS

        By Malte Sussdorff

        +Install Squirrelmail for use as a webmail system for OpenACS

        Install Squirrelmail for use as a webmail system for OpenACS

        By Malte Sussdorff

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

        This section is work in progress. It will detail how you can install Squirrelmail as a webmail frontend for OpenACS, thereby neglecting the need to have a seperate webmail package within OpenACS

        [service0 service0]# cd www
        Index: openacs-4/packages/acs-core-docs/www/install-steps.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/install-steps.html,v
        diff -u -r1.9 -r1.10
        --- openacs-4/packages/acs-core-docs/www/install-steps.html	4 Feb 2004 16:47:33 -0000	1.9
        +++ openacs-4/packages/acs-core-docs/www/install-steps.html	12 Feb 2004 13:51:40 -0000	1.10
        @@ -1,10 +1,10 @@
        -Basic Steps

        Basic Steps

        +Basic Steps

        Basic Steps

        The basic steps for getting OpenACS installed are:

        1. Install an OS and supporting software (see Install a Unix-like OS or Appendix�A, Install Red Hat 8/9 for more details).

        2. Install a database (see Install Oracle or Install PostgreSQL).

        3. Install AOLserver (see Install AOLserver 3.3oacs1).

        4. Create a unique database and system user. Install the OpenACS tarball, start and AOLserver instance, and use the OpenACS web pages to complete installation - (see Install OpenACS ).

        There are specific instructions available for Mac OS X and + (see Install OpenACS 5.0.1d1).

    There are specific instructions available for Mac OS X and Windows2000 available (see the section called “OpenACS Installation Guide for Mac OS X” or the section called “OpenACS Installation Guide for Windows2000” for those).

    Binaries and other shortcuts

    1. The patched version of AOLserver we use is not currently available in a precompiled binary.

    2. @@ -37,9 +37,9 @@ su - service0 svc -d /service/service0 dropdb service0 -createdb service0

    Paths and Users

    Table�2.1.�Default directories for a standard install

    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 (SERVERROOT)/var/lib/aolserver/service0
    Location of source code tarballs for new software/tmp
    The OpenACS tarball contains some files which +createdb service0

    Paths and Users

    Table�2.1.�Default directories for a standard install

    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 (SERVERROOT)/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//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

    + files are located at:

    /tmp/openacs-5.0.1d1/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 the values that we've chosen. The values that you'll probably want to change, such as service name, are 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 -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 4 Feb 2004 16:47:33 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/install-tclwebtest.html 12 Feb 2004 13:51:40 -0000 1.7 @@ -1,4 +1,4 @@ -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
     tar xvzf tclwebtest-0.3.tar.gz
    Index: openacs-4/packages/acs-core-docs/www/ix01.html
    ===================================================================
    RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/ix01.html,v
    diff -u -r1.4 -r1.5
    --- openacs-4/packages/acs-core-docs/www/ix01.html	4 Feb 2004 16:47:33 -0000	1.4
    +++ openacs-4/packages/acs-core-docs/www/ix01.html	12 Feb 2004 13:51:40 -0000	1.5
    @@ -1,2 +1,2 @@
    -Index

    Index

    A

    AOLserver
    configuration, Install from tarball
    Automated tests, Write automated tests

    C

    computeroutput
    code, Code
    cvs
    initializing, Initialize CVS (OPTIONAL)
    setup, Using CVS with an OpenACS Site

    D

    daemontools
    installation, Install Daemontools (OPTIONAL)
    docbook
    installation, Install Red Hat 8/9
    DocBook
    DTD, Why DocBook?
    emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
    Document structure, Document Structure

    E

    emacs
    installation, Install Red Hat 8/9
    emphasis
    bold, italics, Emphasis

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

    language
    installation, Install Red Hat 8/9
    Linking, Links
    lists, Lists

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Install from tarball

    Q

    qmail
    installation, Install qmail (OPTIONAL)
    Maildir, Install qmail (OPTIONAL)
    rcpthosts error message, Install qmail (OPTIONAL)

    T

    The publish point for new packages should be - fixed., Prepare the package for distribution.

    U

    ulink, Links
    Unicode
    in PostgreSQL, Install PostgreSQL
    upgrade
    OpenACS 4.5 to 4.6.x
    Linux/Unix, Upgrading 4.5 or higher to 4.6.3

    X

    XML guidelines, Why DocBook?
    xref
    linkend, Links
    xreflabel, Headlines, Sections
    View comments on this page at openacs.org
    +Index

    Index

    A

    AOLserver
    configuration, Install from tarball
    Automated tests, Write automated tests

    C

    computeroutput
    code, Code
    cvs
    initializing, Initialize CVS (OPTIONAL)
    setup, Using CVS with an OpenACS Site

    D

    daemontools
    installation, Install Daemontools (OPTIONAL)
    docbook
    installation, Install Red Hat 8/9
    DocBook
    DTD, Why DocBook?
    emacs configuration for, Add PSGML commands to emacs init file (OPTIONAL)
    Document structure, Document Structure

    E

    emacs
    installation, Install Red Hat 8/9
    emphasis
    bold, italics, Emphasis

    G

    Graphics
    Images, Graphics

    I

    informaltable
    table, Tables

    L

    language
    installation, Install Red Hat 8/9
    Linking, Links
    lists, Lists

    O

    OpenACS Package, What a Package Looks Like

    P

    photo-album
    installation (see ImageMagick)
    Postgres
    Vacuuming, Install from tarball

    Q

    qmail
    installation, Install qmail (OPTIONAL)
    Maildir, Install qmail (OPTIONAL)
    rcpthosts error message, Install qmail (OPTIONAL)

    T

    The publish point for new packages should be + fixed., Prepare the package for distribution.

    U

    ulink, Links
    Unicode
    in PostgreSQL, Install PostgreSQL
    upgrade
    OpenACS 4.5 to 4.6.x
    Linux/Unix, Upgrading 4.5 or higher to 4.6.3

    X

    XML guidelines, Why DocBook?
    xref
    linkend, Links
    xreflabel, Headlines, Sections
    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 -r1.20 -r1.21 --- openacs-4/packages/acs-core-docs/www/kernel-doc.html 4 Feb 2004 16:47:33 -0000 1.20 +++ openacs-4/packages/acs-core-docs/www/kernel-doc.html 12 Feb 2004 13:51:40 -0000 1.21 @@ -1 +1 @@ -Chapter�11.�Kernel Documentation
    View comments on this page at openacs.org
    +Chapter�12.�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 -r1.15 -r1.16 --- openacs-4/packages/acs-core-docs/www/kernel-overview.html 4 Feb 2004 16:47:33 -0000 1.15 +++ openacs-4/packages/acs-core-docs/www/kernel-overview.html 12 Feb 2004 13:51:40 -0000 1.16 @@ -1,4 +1,4 @@ -Overview

    Overview

    View comments on this page at openacs.org
    Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ld-id2855573.html'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.2 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/ld-id2947100.html'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/mac-installation.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/mac-installation.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -OpenACS Installation Guide for Mac OS X

    OpenACS Installation Guide for Mac OS X

    Prerequisites.�Install readline:

    1. Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src

    2. Extract readline in /usr/local/src, configure, compile, and install:

      su - root
      +OpenACS Installation Guide for Mac OS X

      OpenACS Installation Guide for Mac OS X

      Prerequisites.�Install readline:

      1. Download readline from http://ftp.gnu.org/pub/gnu/readline/readline-4.3.tar.gz into /usr/local/src

      2. Extract readline in /usr/local/src, configure, compile, and install:

        su - root
         cd /usr/local/src
         tar xvfz readline-4.3.tar.gz
         readline-4.3
        Index: openacs-4/packages/acs-core-docs/www/maint-performance.html
        ===================================================================
        RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/maint-performance.html,v
        diff -u -r1.4 -r1.5
        --- openacs-4/packages/acs-core-docs/www/maint-performance.html	4 Feb 2004 16:47:33 -0000	1.4
        +++ openacs-4/packages/acs-core-docs/www/maint-performance.html	12 Feb 2004 13:51:40 -0000	1.5
        @@ -1,7 +1,7 @@
        -Diagnosing Performance Problems

        Diagnosing Performance Problems

        • Did performance problems happen overnight, or did they sneak up on +Diagnosing Performance Problems

          Diagnosing Performance Problems

          • Did performance problems happen overnight, or did they sneak up on you? Any clue what caused the performance problems (e.g. loading 20K users into .LRN)

          • Is the file system out of space? Is the machine swapping to disk constantly?

          • Isolating and solving database problems.

            • Without daily internal maintenance, most databases slowly degrade in performance. For PostGreSQL, see the section called “Vacuum Postgres nightly”. For Oracle, use exec dbms_stats.gather_schema_stats('SCHEMA_NAME') (Andrew Piskorski's Oracle notes).

            • You can track the exact amount of time each database query on a page takes:

              1. Go to Main Site : Site-Wide Administration : Install Software

              2. Click on "Install New Application" in "Install from OpenACS Repository"

              3. Choose "ACS Developer Support">

              4. After install is complete, restart the server.

              5. Browse to Developer Support, which is automatically mounted at /ds. -

              6. Turn on Database statistics

              7. Browse directly to a slow page and click "Request Information" at the bottom of the page.

              8. This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

                Figure�6.1.�Query Analysis example

                Query Analysis example
            • Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

              Log in to SQL*Plus as the admin:

              [service0 ~]$ svrmgrl
              +              

            • Turn on Database statistics

            • Browse directly to a slow page and click "Request Information" at the bottom of the page.

            • This should return a list of database queries on the page, including the exact query (so it can be cut-paste into psql or oracle) and the time each query took.

              Figure�6.1.�Query Analysis example

              Query Analysis example
    3. Identify a runaway Oracle query: first, use ps aux or top to get the UNIX process ID of a runaway Oracle process.

      Log in to SQL*Plus as the admin:

      [service0 ~]$ svrmgrl
       
       Oracle Server Manager Release 3.1.7.0.0 - Production
       
      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 -r1.17 -r1.18
      --- openacs-4/packages/acs-core-docs/www/maintenance-web.html	4 Feb 2004 16:47:33 -0000	1.17
      +++ openacs-4/packages/acs-core-docs/www/maintenance-web.html	12 Feb 2004 13:51:40 -0000	1.18
      @@ -1,4 +1,4 @@
      -Running OpenACS in Production Environments

      Running OpenACS in Production Environments

      By Joel Aufrecht

      +Running OpenACS in Production Environments

      Running OpenACS in Production Environments

      By Joel Aufrecht

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

      Maintenance tasks, optional software, and alternate configurations for AOLserver.

      Starting and Stopping an OpenACS instance.

      The simplest way to start and stop and OpenACS site is to run the startup shell script provided, /var/lib/aolserver/service0/etc/daemontools/run. This runs as a regular task, and logs to the logfile. To stop the site, kill the script.

      A more stable way to run OpenACS is with a "keepalive" mechanism of some sort, so that whenever the server halts or is stopped for a reset, it restarts automatically. This is recommended for development and production servers.

      The Reference Platform uses Daemontools to control AOLserver. A simpler method, using init, is here.

      1. Daemontools must already be installed. If not, install it.

      2. Each service controlled by daemontools must have a @@ -159,7 +159,7 @@ able to exploit your web server to execute a command on your server, they would not be able to gain root access.

      Running multiple services on one machine

      Services on different ports.�To run a different service on another port but the same - ip, simply repeat Install OpenACS replacing + ip, simply repeat Install OpenACS 5.0.1d1 replacing service0, and change the

      set httpport              8000
       set httpsport             8443 

      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 -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/maintenance.html 4 Feb 2004 16:47:33 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/maintenance.html 12 Feb 2004 13:51:40 -0000 1.13 @@ -1 +1 @@ -Chapter�6.�Maintenance

      View comments on this page at openacs.org
      +Chapter�6.�Maintenance
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/nxml-mode.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/nxml-mode.html,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-core-docs/www/nxml-mode.html 4 Feb 2004 16:47:33 -0000 1.3 +++ openacs-4/packages/acs-core-docs/www/nxml-mode.html 12 Feb 2004 13:51:40 -0000 1.4 @@ -1,4 +1,4 @@ -Using nXML mode in Emacs

      Using nXML mode in Emacs

      By Jeff Davis

      +Using nXML mode in Emacs

      Using nXML mode in Emacs

      By Jeff Davis

      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-identity.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/object-identity.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/object-identity.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/object-identity.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,18 +1,18 @@ -Object Identity

      Object Identity

      By Rafael H. Schloming

      +Object Identity

      Object Identity

      By Rafael H. Schloming

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

      One of the major design features of OpenACS is the explicit representation +

      One of the major design features of OpenACS 5.0.1d1 is the explicit representation of object identity. The reason I say "explicit representation" is because the concept of object identity has been around forever. It is inherent to our problem domain. Consider the example of 3.x style scoping. The 3.x data models use the triple (user_id, group_id, -scope) to identify an object. In the data model this +scope) to identify an object. In the 5.0.1d1 data model this object is explicitly represented by a single party_id.

      Another good example of this is can be found in the user groups data model. The 3.x user groups data model contains another example of an implied identity. Every mapping between a user and a group could have an arbitrary number of attached values (user_group_member_fields, etc.). In this case it is the pair (group_id, user_id) that implicitly refers to an -object (the person's membership in a group). In the data model this +object (the person's membership in a group). In the 5.0.1d1 data model this object identity is made explicit by adding an integer primary key to the table that maps users to groups.

      Coming from a purely relational world, this might seem slightly weird at first. The pair (group_id, user_id) is sufficient to uniquely identify the 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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/object-system-design.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/object-system-design.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Object Model Design

      Object Model Design

      By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

      +Object Model Design

      Object Model Design

      By Pete Su, Michael Yoon, Richard Li, Rafael Schloming

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

      Essentials

      Data Model

      • 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/object-system-requirements.html 4 Feb 2004 16:47:33 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/object-system-requirements.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Object Model Requirements

        Object Model Requirements

        By Pete Su

        +Object Model Requirements

        Object Model Requirements

        By Pete Su

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

        I. Introduction

        A major goal in OpenACS 4 is to unify and normalize many of the core services 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 -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/objects.html 4 Feb 2004 16:47:33 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/objects.html 12 Feb 2004 13:51:40 -0000 1.27 @@ -1,8 +1,8 @@ -OpenACS Data Models and the Object System

        OpenACS Data Models and the Object System

        By Pete Su

        +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 by OpenACS documentation staff.

        Overview

        -Developing data models in OpenACS is much like developing data models +Developing data models in OpenACS 5.0.1d1 is much like developing data models for OpenACS 3, save for the implementation. As usual, you need to examine how to model the information that the application must store and manipulate, and define a suitable set of SQL tables. In our Notes @@ -78,7 +78,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  
        @@ -138,7 +138,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 @@ -163,7 +163,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: @@ -211,7 +211,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 @@ -314,7 +314,7 @@ models that are meant to be integrated with the OpenACS object system.

        -There are two basic rules you should follow when designing OpenACS data +There are two basic rules you should follow when designing OpenACS 5.0.1d1 data models: @@ -369,7 +369,7 @@ requires a good amount of thought at design time even for simple applications.

        Summary

        -Hooking into the OpenACS object system brings the application developer +Hooking into the OpenACS 5.0.1d1 object system brings the application developer numerous benefits, and doing it involves only four easy steps: 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 -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/openacs-overview.html 4 Feb 2004 16:47:33 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/openacs-overview.html 12 Feb 2004 13:51:40 -0000 1.17 @@ -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 -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/openacs-unpack.html 4 Feb 2004 16:47:33 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/openacs-unpack.html 12 Feb 2004 13:51:40 -0000 1.13 @@ -1,17 +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 root]# cd /tmp
        -[root tmp]# tar xzf .tgz
        +[root tmp]# tar xzf openacs-5.0.1d1.tgz
         cd /tmp
        -tar xzf .tgz

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

        [root root]# cd /tmp
        +tar xzf openacs-5.0.1d1.tgz

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

        [root root]# cd /tmp
         [root 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 tmp]# mv openacs-4 
        +[root tmp]# mv openacs-4 openacs-5.0.1d1
         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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/openacs.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/openacs.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Install OpenACS

        Install OpenACS

        by Vinod Kurup

        +Install OpenACS 5.0.1d1

        Install OpenACS 5.0.1d1

        by Vinod Kurup

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

        Set up the file system for one or more OpenACS Sites

        For Linux Standard Base compliance and ease of backup, @@ -69,9 +69,10 @@ tarball and save it in /tmp and proceed:

        1. Unpack the OpenACS tarball and rename it to service0. Secure the directory so that only the owner can access it. Check the permissions by listing the directory.

          [root root]# su - service0
           [service0 service0]$ cd /var/lib/aolserver
          -[service0 aolserver]$ tar xzf /tmp/.tgz
          -[service0 aolserver]$ mv  service0
          -[service0 aolserver]$ chmod -R 700 service0
          +[service0 aolserver]$ tar xzf /tmp/openacs-5.0.1d1.tgz
          +[service0 aolserver]$ mv openacs-5.0.1d1 service0
          +[service0 aolserver]$ chmod -R 775 service0
          +[service0 aolserver]$ chown -R service0.service0 service0
           [service0 aolserver]$ ls -al
           total 3
           drwxrwx---    3 root     web          1024 Mar 29 16:41 .
          @@ -82,9 +83,10 @@
           [root root]#
           su - service0
           cd /var/lib/aolserver
          -tar xzf /tmp/.tgz
          -mv  service0
          -chmod -R 700 service0/
          +tar xzf /tmp/openacs-5.0.1d1.tgz
          +mv openacs-5.0.1d1 service0
          +chmod -R 755 service0
          +chgrp -R service0.service0 service0
           exit
        2. Add the Service to CVS (OPTIONAL)

        3. Prepare the database

          • Prepare Oracle for OpenACS.�If you won't be using Oracle, skip to Prepare PostgreSQL for an OpenACS Service

            You should be sure that your user account (e.g. service0) is in the @@ -218,15 +220,15 @@ CREATE DATABASE [service0 service0]$ su - service0 -createdb -E UNICODE service0

    4. 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. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

      [service0 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-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0
      +createdb -E UNICODE service0
    5. 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. Recommended: VACUUM ANALYZE every hour and VACUUM FULL ANALYZE every day.

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

      Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. 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, and every (*) day of month, month, and day of week. Type man 5 crontab for more information.

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

    7. At this point the database should be ready for installing OpenACS.

  • Configure an AOLserver Service for OpenACS.�

    1. The AOLserver architecture lets you run an arbitrary number of virtual servers. A virtual server is an HTTP service running on a specific port, e.g. port 80. In order for OpenACS to work, you 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 root]# su - service0
      +	   Open it in an editor to adjust the parameters.

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

      @@ -253,20 +255,16 @@

    2. Enable OpenFTS Full Text Search (OPTIONAL)

    3. Install nsopenssl for SSL support. (OPTIONAL)

  • Verify AOLserver startup.�

    1. Kill any current running AOLserver processes and start a new - one. If you are using Oracle, rather than PostgreSQL, replace - nsd-postgres with - nsd-oracle).

      If you want to use port 80, there are complications. - First, AOLserver must be root to use system ports such as - 80, but refuses to run as root for security reasons. Thus - you must start as root and specify a non-root user ID and + one. The recommended way to start an AOLserver process is by running the included script, /var/lib/aolserver/service0/packages/etc/daemontools/run. If you are not using the default file paths and names, you will need to edit run.

      If you want to use port 80, there are complications. AOLserver must be root to use system ports such as + 80, but refuses to run as root for security reasons. So, we call the run script as root and specify a non-root user ID and Group ID which AOLserver will switch to after claiming the port. To do so, find the UID and GID of the service0 user via grep service0 /etc/passwd and then put those numbers into the command line via -u 501 -g - 502. Second, if you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep + 502. In AOLserver 4, you must also send a -b flag. Do this by editing the run file as indicated in the comments.

      If you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep nsd and selectively kill by job number.

      [service0 etc]$ killall nsd
       nsd: no process killed
       [service0 service0]$ /usr/local/aolserver/bin/nsd-postgres -t /var/lib/aolserver/service0/etc/config.tcl
      @@ -291,7 +289,7 @@
               AOLserver keepalive (OPTIONAL)

  • Configure a Service with the OpenACS Installer.� Now that you've got AOLserver up and running, let's install OpenACS - . + 5.0.1d1.

    • You should see a page from the webserver titled OpenACS Installation: @@ -347,15 +345,15 @@ Give the server a few minutes to start up. Then reload the final page above. You should see the front page, with an area to login near the upper right. Congratulations, OpenACS - is now up and running! + 5.0.1d1 is now up and running!

  • Next Steps

    • Use daemontools supervice and svc, or inittab, to automate server startup and shutdown.

    • Install Full Text Search (OPTIONAL). If you have installed OpenFTS and enabled OpenFTS, you can now install the OpenFTS Driver package and Full Text Search Engine package in the OpenACS service.

    • This is a good time to make a backup of your service. If this is a production site, you should set up automatic nightly backups.

    • If you want traffic reports, set up analog or another log processing program.

    • Follow the instruction on the home page to change the appearance of your service or add more - packages. (more information)

    • Proceed to the tutorial to learn how to develop your own packages.

    • Set up database environment variables for the site - user. These settings are necessary for working with the + packages. (more information)

    • Proceed to the tutorial to learn how to develop your own packages.

    • Set up database environment variables for the site + user. Depending on how you installed Oracle or PostGreSQL, these settings may be necessary for working with the database while logged in as the service user. They do not directly affect the service's run-time connection with the database, because those environmental variables are set by the 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/oracle.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/oracle.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,10 +1,10 @@ -Install Oracle 8.1.7

      Install Oracle 8.1.7

      By Vinod Kurup

      +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.

      Note

      Skip this section if you're not interested in Oracle.

      - OpenACS will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues. + OpenACS 5.0.1d1 will install with Oracle 9i but has not been extensively tested so may still have bugs or tuning issues.

      This document assumes that you'll be installing Oracle on the same 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 -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/os-install.html 4 Feb 2004 16:47:33 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/os-install.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -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 -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/os-security.html 4 Feb 2004 16:47:33 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/os-security.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/packages.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/packages.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -OpenACS Packages

        OpenACS Packages

        By Pete Su and Bryan Quinn

        +OpenACS Packages

        OpenACS Packages

        By Pete Su and Bryan Quinn

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

        Overview

        @@ -56,7 +56,7 @@ the pieces of each module are strewn all over the tree in at least 3 or 4 different areas.

        - Here is how an OpenACS server is laid out: + Here is how an OpenACS 5.0.1d1 server is laid out:

         ROOT/
             bin/
        @@ -123,7 +123,7 @@
               sends to our server to the right page in the appropriate
               package. While we're at it, this tool should also automate
               package installation, dependency checking, upgrades, and package
        -      removal. In OpenACS , this tool is called the APM.
        +      removal. In OpenACS 5.0.1d1, this tool is called the APM.
             

        The APM

        The APM is used to create, maintain, and install packages. It takes care of copying all of the files and registering the package in the @@ -145,7 +145,7 @@

        The following sections will show you how to make a package for the Notes application. In addition, they will discuss some new site - management features in OpenACS that take advantage of the APM's package + management features in OpenACS 5.0.1d1 that take advantage of the APM's package instance model. The two most important of these are subsites, and the site map tool, which can be used to map applications to one or more arbitrary URLs in a running site. @@ -433,7 +433,7 @@ map content that lived outside the page root into the site, and it was also hard to map mulitiple URLs to the same place in the file system.

        - In OpenACS , administrators can define an arbitrary mapping between the + In OpenACS 5.0.1d1, administrators can define an arbitrary mapping between the URLs the user types and the actual file in the file system that is served. This mapping is called the site map and entries in the site map are called site nodes. Each site node maps a URL to an @@ -491,4 +491,4 @@

      • Writes out package distribution files for other people to download and install. We'll cover this later. -

      View comments on this page at openacs.org
      +

    View comments on this page at openacs.org
    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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/parties.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/parties.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Parties in OpenACS

    Parties in OpenACS

    By Rafael H. Schloming

    +Parties in OpenACS

    Parties in OpenACS

    By Rafael H. Schloming

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

    Introduction

    While many applications must deal with individuals and many applications 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/permissions-design.html 4 Feb 2004 16:47:33 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/permissions-design.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Permissions Design

    Permissions Design

    By John Prevost and Rafael H. Schloming

    +Permissions Design

    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.

    Essentials

    • Tcl in packages/acs-kernel

    • OpenACS 4 Permissions Requirements

    • 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/permissions-requirements.html 4 Feb 2004 16:47:33 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/permissions-requirements.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Permissions Requirements

      Permissions Requirements

      By John McClary Prevost

      +Permissions Requirements

      Permissions Requirements

      By John McClary Prevost

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

      Introduction

      This document records requirements for the OpenACS 4 Permissions system, a 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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/permissions-tediously-explained.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -OpenACS Permissions Tediously Explained

      OpenACS Permissions Tediously Explained

      +OpenACS Permissions Tediously Explained

      OpenACS Permissions Tediously Explained

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

      The code has been modified since this document was written so it is now out of date. See this forum thread.

      Overview

      The general permissions system has a relatively complex data model in OpenACS. @@ -100,7 +100,7 @@

      Context Hierarchy

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

      Table�8.1.�Context Hierarchy Example

      A

      +

      Table�9.1.�Context Hierarchy Example

      A

      object_id=10

      B

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

      Table�8.2.�acs_objects example data

      object_idcontext_id
      2010
      3010
      4020
      5020
      6030

      +

      Table�9.2.�acs_objects example data

      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, 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/permissions.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/permissions.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,8 +1,8 @@ -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

      -The OpenACS Permissions system allows developers and administrators to +The OpenACS 5.0.1d1 Permissions system allows developers and administrators to set access control policies at the object level, that is, any application or system object represented by a row in the acs_objects table can be access-controlled via a simple @@ -13,7 +13,7 @@ Although this may all sound easy and wonderful, no developer or administrator would want to explicitly set access control rights for every user and every object on a -site. Therefore, OpenACS has two auxiliary mechanisms for making this +site. Therefore, OpenACS 5.0.1d1 has two auxiliary mechanisms for making this easier: First, the Groups system allows users to be grouped together in flexible ways. Second, the object model defines a notion of object context, which allows applications to group objects @@ -25,7 +25,7 @@ define simple groupings of users. Each group had a human readable name and unique ID, and there was a single mapping table that mapped users to groups. (The actual data model was more complicated because it -contained a meta-data system much like the OpenACS object type system, +contained a meta-data system much like the OpenACS 5.0.1d1 object type system, but that's not relevant right now.)

      The 3.x groups system, while very useful, was limited in few ways. The @@ -47,7 +47,7 @@ member of Greenpeace, its members are not necessarily members of Greenpeace.

      -OpenACS solves both of these modeling problems by introducing a new +OpenACS 5.0.1d1 solves both of these modeling problems by introducing a new abstraction called a party. Parties have a recursive definition, and we can illustrate how it works with the following simplified data model. First, we define the parties @@ -113,18 +113,18 @@ already know what parties and objects are, but we don't know what privileges are.

      -In OpenACS , a privilege models the right to perform some operation on +In OpenACS 5.0.1d1, a privilege models the right to perform some operation on some object. They are the basic units out of which we build access control policies. For example, in the Unix filesystem we typically implement access control by granting users some combination of -read. write or execute privileges on files and directories. In OpenACS , +read. write or execute privileges on files and directories. In OpenACS 5.0.1d1, the table of privileges is organized hierarchically so that developers can define privileges that aggregate some set of privileges together. For example, if we have read, write, create and delete privileges, it might be convenient to combine them into a new privilege called "admin". Then if we grant a user this privilege she is automatically granted all the child privileges that the privilege -contains. The OpenACS kernel data model actually defines these +contains. The OpenACS 5.0.1d1 kernel data model actually defines these privileges as follows:

       
      @@ -164,7 +164,7 @@
       permissions to large groups of objects in the site, all at once. We
       use contexts to achieve this goal.
       

      Object Context

      -In OpenACS , an object context is a generalization of the scoping +In OpenACS 5.0.1d1, an object context is a generalization of the scoping mechanism introduced in OpenACS 3.x. "Scoping" and "scope" are terms best explained by example: consider some hypothetical rows in the address_book table: @@ -179,7 +179,7 @@ person or a group of people or the general public (itself a group of people).

      -In OpenACS , rather than breaking the world into a limited set of scopes, +In OpenACS 5.0.1d1, rather than breaking the world into a limited set of scopes, every object lives in a single context. A context is just an another object that represents the security domain to which the object belongs. By convention, if an object A doesn't have any permissions @@ -196,7 +196,7 @@ application. With only row-level permissions it is not obvious how to reasonably initialize the access control list when creating a message. At best, we have to explicitly grant various read and write -privileges whenever we create a message, which is tedious. In OpenACS , +privileges whenever we create a message, which is tedious. In OpenACS 5.0.1d1, a reasonable thing to do is to create an object representing a forum, and point the context_id field of a new message at the forum. Then, suppose we grant every user in the system read-access to @@ -328,7 +328,7 @@

      This displays the title of the note as either a link or plain text depending on whether or not we have write privileges on the object. -The if tag is something that the OpenACS template system +The if tag is something that the OpenACS 5.0.1d1 template system defines for you to support conditional presentation. The templates developer guide provides more information about this.

      If you study the rest of the system, you will also notice that the @@ -342,7 +342,7 @@ permissions to notes that she wanted to make public or whatever. But that's beyond the scope of this example.

      Summary

      -OpenACS defines three separate mechanisms for specifying access control +OpenACS 5.0.1d1 defines three separate mechanisms for specifying access control in applications. The Groups data model allows you to define hierarchical organizations of users and groups of users. The Permissions data model allows you to define a hierarchy of user rights. Finally, 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 -r1.24 -r1.25 --- openacs-4/packages/acs-core-docs/www/postgres.html 4 Feb 2004 16:47:33 -0000 1.24 +++ openacs-4/packages/acs-core-docs/www/postgres.html 12 Feb 2004 13:51:40 -0000 1.25 @@ -1,12 +1,12 @@ -Install PostgreSQL

      Install PostgreSQL

      by Vinod Kurup

      +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 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. PostgreSQL 7.4 has been verified.

      • Mac OS X.�If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.2.x or 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.

      • Debian.�

        Debian users, especially Debian stable users, should install PostGreSQL from source as detailed below. Debian unstable users: the following process has been known to work:

        apt-get install postgresql postgresql-dev postgresql-doc
        +        

      Skip this section if you will run only Oracle.

      See Table�2.2, “Version Compatibility Matrix” for version compatibility.

      • Special notes for Mac OS X.�If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4.

      • Special Notes for Debian.�

        Debian users, especially Debian stable users, should install PostGreSQL from source as detailed below. Debian unstable users: the following process has been known to work:

        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 + next section.

      • Special Notes for Red Hat.�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 @@ -31,7 +31,7 @@ echo "export LD_LIBRARY_PATH=/usr/local/pgsql/lib" >> ~postgres/.bash_profile echo "export PATH=$PATH:/usr/local/pgsql/bin" >> ~postgres/.bash_profile groupadd web -su - postgres

        ... and then skip to 6. Something similar may work for other binary packages as well.

      1. Unpack PostgreSQL.�If you have not downloaded the postgresql tarball to +su - postgres

        ... and then skip to 6. Something similar may work for other binary packages as well.

      2. Safe approach: install from source

        1. Unpack PostgreSQL.�If you have not downloaded the postgresql tarball to /tmp/postgresql-7.3.4.tar.gz, get it.

          [root root]# cd /usr/local/src
           [root src]# tar xzf /tmp/postgresql-7.3.4.tar.gz
          @@ -52,7 +52,7 @@
           useradd -g web -d /usr/local/pgsql postgres
           mkdir -p /usr/local/pgsql
           chown -R postgres.web /usr/local/pgsql /usr/local/src/postgresql-7.3.4
          -chmod 750 /usr/local/pgsql
          • Mac OS X: Do instead:

            sudo niutil -create / /groups/web
            +chmod 750 /usr/local/pgsql
            • Mac OS X: Do instead:

              sudo niutil -create / /groups/web
               sudo niutil - list / /groups

              The second command returns a list of groups. The last entry should include the gid of the group web, which you will need in the next sequence:

              sudo niutil -create / /users/postgres
               sudo niutil -createprop / /users/postgres gid web's gid_number
               sudo niutil -createprop / /users/postgres home /usr/local/pgsql
              @@ -73,8 +73,8 @@
               	  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.
              -	

              [root src]# su - postgres
              +	  Unicode support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help.
              +	

              On debian woody (stable, 3.0), do ./configure --without-readline --without-zlib.

              [root src]# su - postgres
               [postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4
               [postgres postgresql-7.3.4]$ ./configure
               creating cache ./config.cache
              @@ -102,15 +102,15 @@
               	  The initdb command initializes the
               	  database. pg_ctl is used to start up
               	  PostgreSQL.
              -	

              [postgres tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
              +	

              [postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
               The files belonging to this database system will be owned by user "postgres".
               This user must also own the server process.
               (17 lines omitted)
               or
                   /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start
              -[postgres tsearch]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
              +[postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start
               postmaster successfully started
              -[postgres tsearch]$
              +[postgres postgresql-7.3.4]$
               /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
               /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start

              PostgreSQL errors will be logged in @@ -119,15 +119,15 @@ access. Plpgsql is a PL/SQL-like language. We add it to template1, which is the template from which all new databases are created. We can verify that it was created - with the createlang command in list mode.

              [postgres pgsql]$ createlang plpgsql template1
              +	  with the createlang command in list mode.

              [postgres postgresql-7.3.4]$ createlang plpgsql template1
               [postgres pgsql]$ createlang -l template1
               Procedural languages
                 Name   | Trusted?
               ---------+----------
                plpgsql | t
               (1 row)
               
              -[postgres pgsql]$
              +[postgres pgsql-7.3.4]$
               createlang plpgsql template1
               createlang -l template1
            • Test PostgreSQL (OPTIONAL).�Create a database and try some simple commands. The output should be as shown.

              [postgres pgsql]$ createdb mytestdb
              @@ -168,13 +168,13 @@
                       bunch of symlinks that ensure that, when the operating system
                       changes runlevels, postgresql goes to the appropriate
                       state. Red Hat and Debian and SuSE each work a little
              -        differently.
              -	

              • Red Hat RPM:

                The init script is already installed; just turn it on for the appropriate run levels.

                [root root]# chkconfig --level 345 postgresql on
                -[root root]# 
              • Red Hat from source:

                [root src]# cp /tmp//packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                +        differently.  If you haven't  untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file.
                +	

                • Red Hat RPM:

                  The init script is already installed; just turn it on for the appropriate run levels.

                  [root root]# chkconfig --level 345 postgresql on
                  +[root root]# 
                • Red Hat from source:

                  [root src]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                   [root src]# chown root.root /etc/rc.d/init.d/postgresql
                   [root src]# chmod 755 /etc/rc.d/init.d/postgresql
                   [root src]# 
                  -cp /tmp//packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                  +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                   chown root.root /etc/rc.d/init.d/postgresql
                   chmod 755 /etc/rc.d/init.d/postgresql

                  Test the script.

                  [root root]# service postgresql stop
                   Stopping PostgreSQL: ok
                  @@ -193,11 +193,11 @@
                   chkconfig --add postgresql
                   chkconfig --level 345 postgresql on
                   chkconfig --list postgresql
                  -service postgresql start
                • Debian:

                  [root ~]# cp /tmp//packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                  +service postgresql start
                • Debian:

                  [root ~]# cp /tmp/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                   [root ~]# chown root.root /etc/init.d/postgresql
                   [root ~]# chmod 755 /etc/init.d/postgresql
                   [root ~]# 
                  -cp /tmp//packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                  +cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql
                   chown root.root /etc/init.d/postgresql
                   chmod 755 /etc/init.d/postgresql

                  Test the script

                  [root ~]# /etc/init.d/postgresql stop
                   Stopping PostgreSQL: ok
                  @@ -225,7 +225,7 @@
                               rc.d/ part in each of the
                               following commands.
                   
                  -          

                [root ~]# cp /tmp//packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
                +          

              [root ~]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/postgresql.txt /etc/rc.d/init.d/postgresql
               [root ~]# chown root.root /etc/rc.d/init.d/postgresql
               [root ~]# chmod 755 /etc/rc.d/init.d/postgresql

              @@ -286,7 +286,7 @@ # Write-ahead log (WAL) # checkpoint_segments = 3 # in logfile segments (16MB each), min 1 -

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

      more information about PostgreSQL

      • +

        Restart postgres (Redhat: service postgresql restart. Many other systems: <computertext>/etc/init.d/postgresql restart</computertext>) so that the changes take effect.

      more information about PostgreSQL

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

    • + Tuning PostgreSQL for performance

    • ($Id$)
      View comments on this page at openacs.org
      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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/programming-with-aolserver.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Programming with AOLserver

      Programming with AOLserver

      By Michael Yoon, Jon Salz and Lars Pind.

      +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 by OpenACS documentation staff.

      The global command

      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 -r1.16 -r1.17 --- openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 4 Feb 2004 16:47:33 -0000 1.16 +++ openacs-4/packages/acs-core-docs/www/psgml-for-emacs.html 12 Feb 2004 13:51:40 -0000 1.17 @@ -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 tmp]# cp /tmp//packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
      +      terminals.

      [root tmp]# cp /tmp/openacs-5.0.1d1/packages/acs-core-docs/www/files/emacs.txt /etc/skel/.emacs
       cp: overwrite `/etc/skel/.emacs'? y
       [root tmp]# 

      Debian users:

      apt-get install psgml

      Note: The new nxml mode for emacs, when used in combination with psgml, provides a pretty good set of functionality that makes DocBook editing much less painless. In particular, nxml does syntax testing in real-time so that you can see syntax errors immediately instead of in the output of the xsltproc hours or days later. For debian, apt-get install nxml.

      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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/psgml-mode.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/psgml-mode.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Using PSGML mode in Emacs

      Using PSGML mode in Emacs

      By David Lutterkort

      +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.

      Note: nxml mode replaces and/or complements psgml mode. More information.

      What it is

      PSGML Mode is a mode for editing, umm, SGML and XML documents in emacs. It 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 -r1.29 -r1.30 --- openacs-4/packages/acs-core-docs/www/release-notes.html 4 Feb 2004 16:47:33 -0000 1.29 +++ openacs-4/packages/acs-core-docs/www/release-notes.html 12 Feb 2004 13:51:40 -0000 1.30 @@ -1,4 +1,4 @@ -OpenACS Release Notes

      OpenACS Release Notes

      Version 5.0.0

      +OpenACS Release Notes

      OpenACS Release Notes

      Version 5.0.0

      This is OpenACS 5.0.0. This version contains no known security, data loss, or crashing bugs, nor any bugs judged release blockers. This version has received manual testing. It has passed current automated testing, which is not comprehensive. This release contains work done on the translation server http://translate.openacs.org through 3 Nov 2003.

      Please report bugs using our @@ -7,7 +7,7 @@

      You may want to begin by reading our installation documentation for the section called “a Unix-like system”. Note that the Windows documentation is - not current for OpenACS , but an alternative is to use John + not current for OpenACS 5.0.1d1, but an alternative is to use John Sequeira's Oasis VM project.

      @@ -95,4 +95,4 @@

    • Serving backup files and files from the CVS directories is turned off by default via the acs-kernel parameter ExcludedFiles in section request-processor (The variable provides a string match glob list of files and is defaulted to "*/CVS/* *~") -

    • ($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 -r1.10 -r1.11 --- openacs-4/packages/acs-core-docs/www/releasing-openacs.html 4 Feb 2004 16:47:33 -0000 1.10 +++ openacs-4/packages/acs-core-docs/www/releasing-openacs.html 12 Feb 2004 13:51:40 -0000 1.11 @@ -1,4 +1,4 @@ -Appendix�E.�How to package and release OpenACS

      Appendix�E.�How to package and release OpenACS

      1. Update documentation version numbers:

        1. Update /packages/acs-core-docs/www/xml/variables.ent with the new version number and regenerate all HTML docs +Appendix�E.�How to package and release OpenACS

          Appendix�E.�How to package and release OpenACS

          1. Update documentation version numbers:

            1. Update /packages/acs-core-docs/www/xml/variables.ent with the new version number and regenerate all HTML docs

            2. Update /readme.txt with the new version number

            3. Commit changes

          2. Check out the whole cvs tree. The files must be checked 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/request-processor.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/request-processor.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,12 +1,12 @@ -The Request Processor

            The Request Processor

            By Pete Su

            +The Request Processor

            The Request Processor

            By Pete Su

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

            Overview

            -This document is a brief introduction to the OpenACS Request Processor; +This document is a brief introduction to the OpenACS 5.0.1d1 Request Processor; more details can be found in the OpenACS 4 Request Processor Design. Here we cover the high level concepts behind the system, and implications and usage for the application developer.

            Request Processor

            -The Request Processor is a global filter and set of Tcl procs that +The 5.0.1d1 Request Processor is a global filter and set of Tcl procs that respond to every incoming URL reaching the server. The following diagram summarizes the stages of the request processor assuming a URL request like http://someserver.com/notes/somepage.adp. @@ -35,7 +35,7 @@ extracts or sets up new session tokens for the user.

            Stage 3: Authorization

            Next, the Request Processor checks if the user has appropriate access -privileges to the requested part of the site. In OpenACS , access control +privileges to the requested part of the site. In OpenACS 5.0.1d1, access control is dictated by the permissions system. In this case, the RP checks if the user has "read" priviledges on the object in the site map specified by the URL. This object is typically 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/requirements-template.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/requirements-template.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/rp-design.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/rp-design.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Request Processor Design

            Request Processor Design

            By Rafael H. Schloming

            +Request Processor Design

            Request Processor Design

            By Rafael H. Schloming

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

            Essentials

            • OpenACS 4 Request Processor Requirements

            • 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 -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/rp-requirements.html 4 Feb 2004 16:47:33 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/rp-requirements.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1,4 +1,4 @@ -Request Processor Requirements

              Request Processor Requirements

              By Rafael H. Schloming

              +Request Processor Requirements

              Request Processor Requirements

              By Rafael H. Schloming

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

              Introduction

              The following is a requirements document for the OpenACS 4.0 request 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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/security-design.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/security-design.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Security Design

              Security Design

              By Richard Li and Archit Shah

              +Security Design

              Security Design

              By Richard Li and Archit Shah

              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/security-notes.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/security-notes.html,v diff -u -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/security-notes.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/security-notes.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Security Notes

              Security Notes

              By Richard Li

              +Security Notes

              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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/security-requirements.html 4 Feb 2004 16:47:33 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/security-requirements.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Security Requirements

              Security Requirements

              By Richard Li

              +Security Requirements

              Security Requirements

              By Richard Li

              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/style-guide.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/style-guide.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/style-guide.html 4 Feb 2004 16:47:33 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/style-guide.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -1,4 +1,4 @@ -OpenACS Style Guide

              OpenACS Style Guide

              +OpenACS Style Guide

              OpenACS Style Guide

              By Jeff Davis

              Motivation

              Why have coding standards for OpenACS? And if the code works why change it to @@ -87,4 +87,4 @@

            • Solicit code reviews.� Ask others to look over your code and provide feedback and do the same for others. -

          Revision History

          Document Revision #Action Taken, NotesWhen?By Whom?
          0.1Creation12/2003Jeff Davis
          ($Id$)
        View comments on this page at openacs.org
        +

      Revision History

      Document Revision #Action Taken, NotesWhen?By Whom?
      0.1Creation12/2003Jeff Davis
      ($Id$)
      View comments on this page at openacs.org
      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 -r1.19 -r1.20 --- openacs-4/packages/acs-core-docs/www/subsites-design.html 4 Feb 2004 16:47:33 -0000 1.19 +++ openacs-4/packages/acs-core-docs/www/subsites-design.html 12 Feb 2004 13:51:40 -0000 1.20 @@ -1,4 +1,4 @@ -Subsites Design Document

      Subsites Design Document

      By Rafael H. Schloming

      +Subsites Design Document

      Subsites Design Document

      By Rafael H. Schloming

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

      *Note* This document has not gone through the any of the 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/subsites-requirements.html 4 Feb 2004 16:47:33 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/subsites-requirements.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,4 +1,4 @@ -Subsites Requirements

      Subsites Requirements

      By Rafael H. Schloming and Dennis Gregorovic

      +Subsites Requirements

      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.

      Introduction

      The following is a requirements document for OpenACS 4 Subsites, part of the 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/subsites.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/subsites.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Writing OpenACS Application Pages

      Writing OpenACS Application Pages

      By Rafael H. Schloming and Pete Su

      +Writing OpenACS Application Pages

      Writing OpenACS Application Pages

      By Rafael H. Schloming and Pete Su

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

      Overview

      @@ -253,15 +253,15 @@ visible to that user. The end result is a site where users can come and write notes to themselves.

      -This is a good example of the leverage available in the OpenACS +This is a good example of the leverage available in the OpenACS 5.0.1d1 system. The code that we have written for Notes is not at all more complex than a similar application without access control or site map awareness. By adding a small amount of code, we have taken a small, simple, and special purpose application to something that has the potential to be a very useful, general-purpose tool, complete with multi-user features, access control, and centralized administration.

      Summary

      -In OpenACS , application pages and scripts can be aware of the package +In OpenACS 5.0.1d1, application pages and scripts can be aware of the package instance, or subsite in which they are executing. This is a powerful general purpose mechanism that can be used to structure web services in very flexible ways. 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 -r1.26 -r1.27 --- openacs-4/packages/acs-core-docs/www/tcl-doc.html 4 Feb 2004 16:47:33 -0000 1.26 +++ openacs-4/packages/acs-core-docs/www/tcl-doc.html 12 Feb 2004 13:51:40 -0000 1.27 @@ -1,4 +1,4 @@ -Documenting Tcl Files: Page Contracts and Libraries

      Documenting Tcl Files: Page Contracts and Libraries

      By Jon Salz on 3 July 2000

      +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 by OpenACS documentation staff.
      • Tcl procedures: /packages/acs-kernel/tcl-documentation-procs.tcl

      The Big Picture

      In versions of the OpenACS prior to 3.4, the standard 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 -r1.25 -r1.26 --- openacs-4/packages/acs-core-docs/www/templates.html 4 Feb 2004 16:47:33 -0000 1.25 +++ openacs-4/packages/acs-core-docs/www/templates.html 12 Feb 2004 13:51:40 -0000 1.26 @@ -1,4 +1,4 @@ -Using Templates in OpenACS

      Using Templates in OpenACS

      By Pete Su

      +Using Templates in OpenACS

      Using Templates in OpenACS

      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-admin-pages.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-admin-pages.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,78 @@ +Admin Pages

      Admin Pages

      + There are at least two flavors of admin user interface: +

      • Admins use same pages as all other users, except + that they are offered admin links and buttons where appropriate. + For example, if admins have privilege to bulk-delete items you + could provide checkboxes next to every item seen on a list and the + Delete Selected button on the bottom of the list. +

      • Dedicated admin pages. If you want admins to have + access to data that users aren't interested in or aren't allowed + to see you will need dedicated admin pages. The conventional + place to put those dedicated admin pages is in the + /var/lib/aolserver/service0/packages/myfirstpackage/www/admin + directory. +

        [service0 www]$ mkdir admin
        [service0 www]$ cd admin

        + Even if your application doesn't need any admin pages of its own you will + usually need at least one simple page with a bunch of links to existing + administration UI such as Category Management or standard Parameters UI. + Adding the link to Category Management is described in the section on + categories. The listing below adds a link to the Parameters UI of our + package. +

        [service0 admin]$ vi index.adp
        +<master>
        +<property name="title">@title;noquote@</property>
        +<property name="context">@context;noquote@</property>
        +
        +<ul class="action-links">
        +  <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
        +</ul>
        +
        [service0 admin]$ vi index.tcl
        +ad_page_contract {} {
        +} -properties {
        +    context_bar
        +}
        +
        +set package_id [ad_conn package_id]
        +
        +set admin_p [ad_require_permission $package_id admin]
        +
        +set context [list]
        +
        +set title "Administration"
        +
        +set parameters_url [export_vars -base "/shared/parameters" {
        +  package_id { return_url [ad_return_url] }
        +}]
        +
        +

        +Now that you have the first admin page it would be nice to have a link to it +somewhere in the system so that admins don't have to type in the +/admin every time they need to reach it. You +could put a static link to the toplevel +index.adp but that might be distracting for +people who are not admins. Besides, some people consider it impolite to first +offer a link and then display a nasty "You don't have permission to access this +page" message. +

        +In order to display the link to the admin page only to users that have admin +privileges add the following code near the top of +/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl: +

        +
        +set package_id [ad_conn package_id]
        +
        +set admin_p [permission::permission_p -object_id $package_id \
        +  -privilege admin -party_id [ad_conn untrusted_user_id]]
        +
        +if { $admin_p } {
        +    set admin_url "admin"
        +    set admin_title Administration
        +}
        +

        +In +/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp put: +

        +<if @admin_p@ ne nil>
        +  <a href="@admin_url@">@admin_title@</a>
        +</if>
        +
      View comments on this page at openacs.org
      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 -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 4 Feb 2004 16:47:33 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/tutorial-advanced.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1,677 +1,7 @@ -Advanced Topics

      Advanced Topics

      by Joel Aufrecht

      +Chapter�8.�Advanced Topics

      Chapter�8.�Advanced Topics

      by Joel Aufrecht

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

      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.

      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 - to - myfirstpackage/www/docs/xml/index.xml.

      You then edit that file with emacs to write the - requirements and design sections, generate the html, and start - coding. Store any supporting files, like page maps or schema - diagrams, in the www/doc/xml - directory, and store png or jpg versions of supporting files in the - www/doc directory.

      For this tutorial, you should instead install the - pre-written documentation files for the tutorial app. Log in - as service0, create the standard - directories, and copy the prepared documentation:

      [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/
      -[service0 myfirstpackage]$ mkdir -p www/doc/xml
      -[service0 myfirstpackage]$ cd www/doc/xml
      -[service0 xml]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/myfirstpackage/* .
      -[service0 xml]$

      OpenACS uses DocBook for documentation. DocBook is - an XML standard for semantic markup of documentation. That - means that the tags you use indicate meaning, not intended - appearance. The style sheet will determine appearance. You - will edit the text in an xml file, and then process the file - into html for reading.

      Open the file index.xml - in emacs. Examine the file. Find the version history (look for the tag - <revhistory>). Add a - new record to the document version history. Look for the - <authorgroup> tag and - add yourself as a second author. Save and exit. For tips on - editing SGML files in emacs, see OpenACS Documentation Guide

      Process the xml file to create html documentation. The - html documentation, including supporting files such as pictures, - is stored in the www/docs/ - directory. A Makefile is provided to generate html from the xml, and copy all of the - supporting files. If Docbook is set up correctly, all you need - to do is:

      [service0 xml]$ make
      -cd .. ; /usr/bin/xsltproc ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml
      -Writing requirements-introduction.html for sect1(requirements-introduction)
      -Writing requirements-overview.html for sect1(requirements-overview)
      -Writing requirements-cases.html for sect1(requirements-cases)
      -Writing sample-data.html for sect1(sample-data)
      -Writing requirements.html for chapter(requirements)
      -Writing design-data-model.html for sect1(design-data-model)
      -Writing design-ui.html for sect1(design-ui)
      -Writing design-config.html for sect1(design-config)
      -Writing design-future.html for sect1(design-future)
      -Writing filename.html for chapter(filename)
      -Writing user-guide.html for chapter(user-guide)
      -Writing admin-guide.html for chapter(admin-guide)
      -Writing bi01.html for bibliography
      -Writing index.html for book
      -[service0 xml]$

      Verify that the documentation was generated and reflects - your changes by browsing to http://yoursite:8000/myfirstpackage/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 - CVS)

      [service0 xml]$ cd ..
      -[service0 doc]$ cd ..
      -[service0 www]$ cd ..
      -[service0 myfirstpackage]$ cd ..
      -[service0 packages]$ cvs add myfirstpackage/
      -Directory /cvsroot/service0/packages/myfirstpackage added to the repository
      -[service0 packages]$ cd myfirstpackage/
      -[service0 myfirstpackage]$ cvs add www
      -Directory /cvsroot/service0/packages/myfirstpackage/www added to the repository
      -[service0 myfirstpackage]$ cd www
      -[service0 www]$ cvs add doc
      -Directory /cvsroot/service0/packages/myfirstpackage/www/doc added to the repository
      -[service0 www]$ cd doc
      -[service0 doc]$ cvs add *
      -cvs add: cannot add special file `CVS'; skipping
      -cvs add: scheduling file `admin-guide.html' for addition
      -cvs add: scheduling file `bi01.html' for addition
      -cvs add: scheduling file `data-model.dia' for addition
      -cvs add: scheduling file `data-model.png' for addition
      -cvs add: scheduling file `design-config.html' for addition
      -cvs add: scheduling file `design-data-model.html' for addition
      -cvs add: scheduling file `design-future.html' for addition
      -cvs add: scheduling file `design-ui.html' for addition
      -cvs add: scheduling file `filename.html' for addition
      -cvs add: scheduling file `index.html' for addition
      -cvs add: scheduling file `page-map.dia' for addition
      -cvs add: scheduling file `page-map.png' for addition
      -cvs add: scheduling file `requirements-cases.html' for addition
      -cvs add: scheduling file `requirements-introduction.html' for addition
      -cvs add: scheduling file `requirements-overview.html' for addition
      -cvs add: scheduling file `requirements.html' for addition
      -cvs add: scheduling file `sample-data.html' for addition
      -cvs add: scheduling file `sample.png' for addition
      -cvs add: scheduling file `user-guide.html' for addition
      -cvs add: scheduling file `user-interface.dia' for addition
      -cvs add: scheduling file `user-interface.png' for addition
      -Directory /cvsroot/service0/packages/myfirstpackage/www/doc/xml added to the repository
      -cvs add: use 'cvs commit' to add these files permanently
      -[service0 doc]$ cd xml
      -[service0 xml]$ cvs add Makefile index.xml
      -cvs add: scheduling file `Makefile' for addition
      -cvs add: scheduling file `index.xml' for addition
      -cvs add: use 'cvs commit' to add these files permanently
      -[service0 xml]$ cd ../../..
      -[service0 myfirstpackage]$ cvs commit -m "new package"
      -cvs commit: Examining .
      -cvs commit: Examining www
      -cvs commit: Examining www/doc
      -cvs commit: Examining www/doc/xml
      -RCS file: /cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v
      -done
      -Checking in www/doc/admin-guide.html;
      -/cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v  <--  admin-guide.html
      -initial revision: 1.1
      -done
      -(many lines omitted)
      -[service0 myfirstpackage]$

      Adding Comments

      You can track comments for any ACS Object. Here we'll track - comments for notes. On the note-edit.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 - show them.

      First, we need to generate a url for adding comments. In note-edit.tcl:

      - set comment_add_url "[general_comments_package_url]comment-add?[export_vars {
      -  { object_id $note_id } 
      -  { object_name $title } 
      -  { return_url "[ad_conn url]?[ad_conn query]"} 
      - }]"
      - 

      This calls a global, public tcl function that the - general_comments package registered, to get its url. You then - embed in that url the id of the note and its title, and set the - return_url to the current url so that the user can return after - adding a comment.

      We need to create html that shows any existing comments. - We do this with another general_comments function:

      set comments_html [general_comments_get_comments
      -     -print_content_p 1 $note_id]

      First, we pass in an optional parameter that that says to actually - show the contents of the comments, instead of just the fact that - there are comments. Then you pass the note id, which is also the - acs_object id.

      We put our two new variables in the note-edit.adp - page.

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

      Admin Pages

      - There are at least two flavors of admin user interface: -

      • Admins use same pages as all other users, except - that they are offered admin links and buttons where appropriate. - For example, if admins have privilege to bulk-delete items you - could provide checkboxes next to every item seen on a list and the - Delete Selected button on the bottom of the list. -

      • Dedicated admin pages. If you want admins to have - access to data that users aren't interested in or aren't allowed - to see you will need dedicated admin pages. The conventional - place to put those dedicated admin pages is in the - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin - directory. -

        [service0 www]$ mkdir admin
        [service0 www]$ cd admin

        - Even if your application doesn't need any admin pages of its own you will - usually need at least one simple page with a bunch of links to existing - administration UI such as Category Management or standard Parameters UI. - Adding the link to Category Management is described in the section on - categories. The listing below adds a link to the Parameters UI of our - package. -

        [service0 admin]$ vi index.adp
        -<master>
        -<property name="title">@title;noquote@</property>
        -<property name="context">@context;noquote@</property>
        -
        -<ul class="action-links">
        -  <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
        -</ul>
        -
        [service0 admin]$ vi index.tcl
        -ad_page_contract {} {
        -} -properties {
        -    context_bar
        -}
        -
        -set package_id [ad_conn package_id]
        -
        -set admin_p [ad_require_permission $package_id admin]
        -
        -set context [list]
        -
        -set title "Administration"
        -
        -set parameters_url [export_vars -base "/shared/parameters" {
        -  package_id { return_url [ad_return_url] }
        -}]
        -
        -

        -Now that you have the first admin page it would be nice to have a link to it -somewhere in the system so that admins don't have to type in the -/admin every time they need to reach it. You -could put a static link to the toplevel -index.adp but that might be distracting for -people who are not admins. Besides, some people consider it impolite to first -offer a link and then display a nasty "You don't have permission to access this -page" message. -

        -In order to display the link to the admin page only to users that have admin -privileges add the following code near the top of -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl: -

        -
        -set package_id [ad_conn package_id]
        -
        -set admin_p [permission::permission_p -object_id $package_id \
        -  -privilege admin -party_id [ad_conn untrusted_user_id]]
        -
        -if { $admin_p } {
        -    set admin_url "admin"
        -    set admin_title Administration
        -}
        -

        -In -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp put: -

        -<if @admin_p@ ne nil>
        -  <a href="@admin_url@">@admin_title@</a>
        -</if>
        -

      Categories

      You can associate any ACS Object with one or more categories. - In this tutorial we'll show how to equip your application with user - interface to take advantage of the Categories service. -

      - We'll start by installing the Categories service. Go to - /acs/admin and install it. This step - won't be necessary for the users of your applications because you'll create - a dependency with the Package Manager which will take care that the - Categories service always gets installed when your application gets - installed. -

      - Now that we have installed the Categories service we can proceed to - modifying our application so that it can take advantage of it. We'll do it - in three steps: -

      1. - The Categories service provides a mechanism to associate one or - more category trees that are relevant to - your application. One example of such tree is a tree of - geographical locations. Continents are on the top of such tree, - each continent containing countries etc. Another tree might - contain market segments etc. Before users of your application - can take advantage of the Categories service there needs to be a - way for administrators of your application to choose which - category trees are applicable for the application. -

        - The way to achieve this is is to provide a link - to the Category Management pages. Add the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl - file: -

        -set category_map_url [export_vars -base \
        -    "[site_node::get_package_url -package_key categories]cadmin/one-object" \
        -        { { object_id $package_id } }]
        -          

        - and the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp - file: -

        -<li><a href="@category_map_url@"
        -      class="action_link">Site-Wide Categories</a>
        -          

        The link created by the above code will take the admin to the generic - admin UI where he can pick category trees that make sense for this - application. The same UI also includes facilities to build and edit - category trees. Notice that the only parameter in this example is - package_id so that category trees - will be associated with the object identified by this - package_id. The categorization - service is actually more general than that: instead of - package_id you could use an ID of - some other object that serves as a "container" in your application. - For example, if your discussion forums application supports multiple - forums you would use forum_id to - associate category trees with just that one forum rather than the - entire application instance. -

      2. - Once the category trees have been selected users need a way - to categorize items. The easiest way to do this is by adding the - category widget type of the - form builder to note-edit.tcl. - To achieve this we'll need to use the -extend - switch to the ad_form command. Here's the "meat" of the - note-edit.tcl page:

        -ad_form -name note -form {
        -    {item_id:key}
        -    {title:text {label Title}}
        -}
        -
        -set package_id [ad_conn package_id]
        -
        -set category_trees [category_tree::get_mapped_trees $package_id]
        -
        -foreach tree $category_trees {
        -    foreach { tree_id name subtree_id } $tree {}
        -    ad_form -extend -name note -form \
        -        [list [list category_id_${tree_id}:integer(category),optional \
        -                   {label $name} \
        -                   {html {single single}} \
        -                   {category_tree_id $tree_id} \
        -                   {category_subtree_id $subtree_id} \
        -                   {category_object_id {[value_if_exists entry_id]}}]]
        -}
        -
        -ad_form -extend \
        -  -name note \
        -  -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
        -} -after_submit {
        -    ad_returnredirect "."
        -    ad_script_abort
        -}

        This page requires a -note_id to determine which record -should be deleted. It also looks for a confirmation variable, which -should initially be absert. If it is absent, we create a form to -allow the user to confirm the deletion. Note that in -entry-edit.tcl we used ad_form to access the Form Template -commands; here, we call them directly because we don't need the extra -features of ad_form. The form calls itself, but -with hidden variables carrying both -note_id and -confirm_p. If confirm_p is present, -we delete the record, set redirection back to the index, and abort -script execution.

        The database commands:

        [service0@yourserver www]$ emacs note-delete.xql
        <?xml version="1.0"?>
        -<queryset>
        -  <fullquery name="do_delete">
        -    <querytext>
        -      select samplenote__delete(:note_id)
        -    </querytext>
        -  </fullquery>
        -  <fullquery name="get_name">
        -    <querytext>
        -      select samplenote__name(:note_id)
        -    </querytext>
        -  </fullquery>
        -</queryset>

        And the adp page:

        [service0@yourserver www]$ emacs note-delete.adp
        <master>
        -<property name="title">@title@</property>
        -<property name="context">{@title@}</property>
        -<h2>@title@</h2>
        -<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 - 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 - show them.

      First, we need to generate a url for adding comments. In notes.tcl:

      -set comment_add_url "[general_comments_package_url]comment-add?[export_vars {
      - { object_id $note_id } 
      - { object_name $title } 
      - { return_url "[ad_conn url]?[ad_conn query]"} 
      -}]"
      -

      This calls a global, public tcl function that the - general_comments package registered, to get its url. You then - embed in that url the id of the note and its title, and set the - return_url to the current url so that the user can return after - adding a comment.

      We need to create html that shows any existing comments. - We do this with another general_comments function:

      set comments_html [general_comments_get_comments
      -    -print_content_p 1 $note_id]

      First, we pass in an optional parameter that that says to actually - show the contents of the comments, instead of just the fact that - 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@

      Admin Pages

      - There are at least two flavors of admin user interface: -

      • Admins use same pages as all other users, except - that they are offered admin links and buttons where appropriate. - For example, if admins have privilege to bulk-delete items you - could provide checkboxes next to every item seen on a list and the - Delete Selected button on the bottom of the list. -

      • Dedicated admin pages. If you want admins to have - access to data that users aren't interested in or aren't allowed - to see you will need dedicated admin pages. The conventional - place to put those dedicated admin pages is in the -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin -directory. -

        [service0@yourserver www]$ mkdir admin
        [service0@yourserver www]$ cd admin

        - Even if your application doesn't need any admin pages of its own you will - usually need at least one simple page with a bunch of links to existing - administration UI such as Category Management or standard Parameters UI. - Adding the link to Category Management is described in the section on - categories. The listing below adds a link to the Parameters UI of our - package. -

        [service0@yourserver admin]$ vi index.adp
        -<master>
        -<property name="title">@title;noquote@</property>
        -<property name="context">@context;noquote@</property>
        -
        -<ul class="action-links">
        -  <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li>
        -</ul>
        -
        [service0@yourserver admin]$ vi index.tcl
        -ad_page_contract {} {
        -} -properties {
        -    context_bar
        -}
        -
        -set package_id [ad_conn package_id]
        -
        -set admin_p [ad_require_permission $package_id admin]
        -
        -set context [list]
        -
        -set title "Administration"
        -
        -set parameters_url [export_vars -base "/shared/parameters" {
        -  package_id { return_url [ad_return_url] }
        -}]
        -
        -

        -Now that you have the first admin page it would be nice to have a link to it -somewhere in the system so that admins don't have to type in the -/admin every time they need to reach it. You -could put a static link to the toplevel -index.adp but that might be distracting for -people who are not admins. Besides, some people consider it impolite to first -offer a link and then display a nasty "You don't have permission to access this -page" message. -

        -In order to display the link to the admin page only to users that have admin -privileges add the following code near the top of -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl: -

        -
        -set package_id [ad_conn package_id]
        -
        -set admin_p [permission::permission_p -object_id $package_id \
        -  -privilege admin -party_id [ad_conn untrusted_user_id]]
        -
        -if { $admin_p } {
        -    set admin_url "admin"
        -    set admin_title Administration
        -}
        -

        -In -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp put: -

        -<if @admin_p@ ne nil>
        -  <a href="@admin_url@">@admin_title@</a>
        -</if>
        -

      Categories

      You can associate any ACS Object with one or more categories. - In this tutorial we'll show how to equip your application with user - interface to take advantage of the Categories service. -

      - We'll start by installing the Categories service. Go to - /acs/admin and install it. This step - won't be necessary for the users of your applications because you'll create - a dependency with the Package Manager which will take care that the - Categories service always gets installed when your application gets - installed. -

      - Now that we have installed the Categories service we can proceed to - modifying our application so that it can take advantage of it. We'll do it - in three steps: -

      1. - The Categories service provides a mechanism to associate one or - more category trees that are relevant to - your application. One example of such tree is a tree of - geographical locations. Continents are on the top of such tree, - each continent containing countries etc. Another tree might - contain market segments etc. Before users of your application - can take advantage of the Categories service there needs to be a - way for administrators of your application to choose which - category trees are applicable for the application.

        - The way to achieve this is is to provide a link - to the Category Management pages. Add the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl - file: -

        -set category_map_url [export_vars -base \
        -    "[site_node::get_package_url -package_key categories]cadmin/one-object" \
        -        { { object_id $package_id } }]
        -          

        - and the following snippet to your - /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp - file: -

        -<li><a href="@category_map_url@"
        -      class="action_link">Site-Wide Categories</a>
        -          

        The link created by the above code will take the admin to the generic - admin UI where he can pick category trees that make sense for this - application. The same UI also includes facilities to build and edit - category trees. Notice that the only parameter in this example is - package_id so that category trees - will be associated with the object identified by this - package_id. The categorization - service is actually more general than that: instead of - package_id you could use an ID of - some other object that serves as a "container" in your application. - For example, if your discussion forums application supports multiple - forums you would use forum_id to - associate category trees with just that one forum rather than the - entire application instance. -

      2. - Once the category trees have been selected users need a way - to categorize items. The easiest way to do this is by adding the - category widget type of the - form builder to note-edit.tcl. - To achieve this we'll need to use the -extend - switch to the ad_form command. Here's the "meat" of the - note-edit.tcl page: -

        -ad_form -name note -form {
        -    {item_id:key}
        -    {title:text {label Title}}
        -}
        -
        -set package_id [ad_conn package_id]
        -
        -set category_trees [category_tree::get_mapped_trees $package_id]
        -
        -foreach tree $category_trees {
        -    foreach { tree_id name subtree_id } $tree {}
        -    ad_form -extend -name note -form \
        -        [list [list category_id_${tree_id}:integer(category),optional \
        -                   {label $name} \
        -                   {html {single single}} \
        -                   {category_tree_id $tree_id} \
        -                   {category_subtree_id $subtree_id} \
        -                   {category_object_id {[value_if_exists entry_id]}}]]
        -}
        -
        -ad_form -extend \
        -  -name note \
        -  -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
        -} -after_submit {
        -    ad_returnredirect "."
        -    ad_script_abort
        -}
        -          

        -

      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.

      -

      Notifications

      by David Bell and Simon Carstensen

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

      The notifications package allows you to send notifications through any - defined communications medium (e.g. email, sms) upon some event occuring within - the system.

      This tutorial steps through the process of integrating the notifications - package with your package.

      First step is to create the notification types. To do this a script similar - to the one below needs to be loaded into Postgresql. I create this script in a - package-name/sql/postgresql/package-name-notifications-init.sql file. I then load - this file from my create sql file. The following code snippet is taken from - Weblogger. It creates a lars_blogger_notif notification type (which was created - above).

      -    create function inline_0() returns integer as '
      -    declare
      -            impl_id integer;
      -            v_foo   integer;
      -    begin
      -        -- the notification type impl
      -        impl_id := acs_sc_impl__new (
      -                      ''NotificationType'',
      -                      ''lars_blogger_notif_type'',
      -                      ''lars-blogger''
      -        );
      -
      -        v_foo := acs_sc_impl_alias__new (
      -                    ''NotificationType'',
      -                    ''lars_blogger_notif_type'',
      -                    ''GetURL'',
      -                    ''lars_blogger::notification::get_url'',
      -                    ''TCL''
      -        );
      -
      -        v_foo := acs_sc_impl_alias__new (
      -                    ''NotificationType'',
      -                    ''lars_blogger_notif_type'',
      -                    ''ProcessReply'',
      -                    ''lars_blogger::notification::process_reply'',
      -                    ''TCL''
      -        );
      -
      -        PERFORM acs_sc_binding__new (
      -                    ''NotificationType'',
      -                    ''lars_blogger_notif_type''
      -        );
      -
      -        v_foo:= notification_type__new (
      -	        NULL,
      -                impl_id,
      -                ''lars_blogger_notif'',
      -                ''Blog Notification'',
      -                ''Notifications for Blog'',
      -		now(),
      -                NULL,
      -                NULL,
      -		NULL
      -        );
      -
      -        -- enable the various intervals and delivery methods
      -        insert into notification_types_intervals
      -        (type_id, interval_id)
      -        select v_foo, interval_id
      -        from notification_intervals where name in (''instant'',''hourly'',''daily'');
      -
      -        insert into notification_types_del_methods
      -        (type_id, delivery_method_id)
      -        select v_foo, delivery_method_id
      -        from notification_delivery_methods where short_name in (''email'');
      -
      -        return (0);
      -    end;
      -    ' language 'plpgsql';
      -
      -    select inline_0();
      -    drop function inline_0();
      -    

      The next step is to setup our notification creation. A new notification must - be added to the notification table for each blog entry added. We do this using the - notification::new procedure

      -        notification::new \
      -            -type_id [notification::type::get_type_id \
      -            -short_name lars_blogger_notif] \
      -            -object_id $blog(package_id) \
      -            -response_id $blog(entry_id) \
      -            -notif_subject $blog(title) \
      -            -notif_text $new_content
      -    

      This code is placed in the tcl procedure that creates blog entries, right after - the entry gets created in the code. The $blog(package_id) - is the OpenACS object_id of the Weblogger instance to which the entry has been posted to - and the $new_content is the content of the entry.

      The final step is to setup the notification subscription process. In this - example we want to let a user find out when a new entry has been posted to the blog. To - do this we put a link on the blog that allows them to subscribe to notifications of new - entries. The notifications/requests-new page is very handy in this situation.

      Such a link can be created using the notification::display::request_widget - proc:

      -    set notification_chunk [notification::display::request_widget \
      -        -type lars_blogger_notif \
      -        -object_id $package_id \
      -        -pretty_name [lars_blog_name] \
      -        -url [lars_blog_public_package_url] \
      -    ]
      -    

      which will return something like - -

      -    You may <a href="/notifications/request-new?...">request notification</a> for Weblogger.

      - - which can be readily put on the blog index page. The pretty_name - parameter is what appears at the end of the text returned (i.e. "... request notification</a> for pretty_name"), - The url parameter should be set to the address we want the user - to be redirected to after they have finished the subscription process.

      This should be all you need to implement a notification system. For more examples - look at the forums package.

      Future Topics:

      • 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 prepare pagelets for inclusion in other pages

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

      • 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

      See also the OpenACS Programming FAQ

      View comments on this page at openacs.org
      + you've completed the basic tutorial.

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-categories.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-categories.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-categories.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,138 @@ +Categories

      Categories

      You can associate any ACS Object with one or more categories. + In this tutorial we'll show how to equip your application with user + interface to take advantage of the Categories service. +

      + We'll start by installing the Categories service. Go to + /acs/admin and install it. This step + won't be necessary for the users of your applications because you'll create + a dependency with the Package Manager which will take care that the + Categories service always gets installed when your application gets + installed. +

      + Now that we have installed the Categories service we can proceed to + modifying our application so that it can take advantage of it. We'll do it + in three steps: +

      1. + The Categories service provides a mechanism to associate one or + more category trees that are relevant to + your application. One example of such tree is a tree of + geographical locations. Continents are on the top of such tree, + each continent containing countries etc. Another tree might + contain market segments etc. Before users of your application + can take advantage of the Categories service there needs to be a + way for administrators of your application to choose which + category trees are applicable for the application. +

        + The way to achieve this is is to provide a link + to the Category Management pages. Add the following snippet to your + /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl + file: +

        +set category_map_url [export_vars -base \
        +    "[site_node::get_package_url -package_key categories]cadmin/one-object" \
        +        { { object_id $package_id } }]
        +          

        + and the following snippet to your + /var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp + file: +

        +<li><a href="@category_map_url@"
        +      class="action_link">Site-Wide Categories</a>
        +          

        The link created by the above code will take the admin to the generic + admin UI where he can pick category trees that make sense for this + application. The same UI also includes facilities to build and edit + category trees. Notice that the only parameter in this example is + package_id so that category trees + will be associated with the object identified by this + package_id. The categorization + service is actually more general than that: instead of + package_id you could use an ID of + some other object that serves as a "container" in your application. + For example, if your discussion forums application supports multiple + forums you would use forum_id to + associate category trees with just that one forum rather than the + entire application instance. +

      2. + Once the category trees have been selected users need a way + to categorize items. The easiest way to do this is by adding the + category widget type of the + form builder to note-edit.tcl. + To achieve this we'll need to use the -extend + switch to the ad_form command. Here's the "meat" of the + note-edit.tcl page:

        +ad_form -name note -form {
        +    {item_id:key}
        +    {title:text {label Title}}
        +}
        +
        +set package_id [ad_conn package_id]
        +
        +set category_trees [category_tree::get_mapped_trees $package_id]
        +
        +foreach tree $category_trees {
        +    foreach { tree_id name subtree_id } $tree {}
        +    ad_form -extend -name note -form \
        +        [list [list category_id_${tree_id}:integer(category),optional \
        +                   {label $name} \
        +                   {html {single single}} \
        +                   {category_tree_id $tree_id} \
        +                   {category_subtree_id $subtree_id} \
        +                   {category_object_id {[value_if_exists entry_id]}}]]
        +}
        +
        +ad_form -extend \
        +  -name note \
        +  -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
        +} -after_submit {
        +    ad_returnredirect "."
        +    ad_script_abort
        +}

        This page requires a +note_id to determine which record +should be deleted. It also looks for a confirmation variable, which +should initially be absert. If it is absent, we create a form to +allow the user to confirm the deletion. Note that in +entry-edit.tcl we used ad_form to access the Form Template +commands; here, we call them directly because we don't need the extra +features of ad_form. The form calls itself, but +with hidden variables carrying both +note_id and +confirm_p. If confirm_p is present, +we delete the record, set redirection back to the index, and abort +script execution.

        The database commands:

        [service0@yourserver www]$ emacs note-delete.xql
        <?xml version="1.0"?>
        +<queryset>
        +  <fullquery name="do_delete">
        +    <querytext>
        +      select samplenote__delete(:note_id)
        +    </querytext>
        +  </fullquery>
        +  <fullquery name="get_name">
        +    <querytext>
        +      select samplenote__name(:note_id)
        +    </querytext>
        +  </fullquery>
        +</queryset>

        And the adp page:

        [service0@yourserver www]$ emacs note-delete.adp
        <master>
        +<property name="title">@title@</property>
        +<property name="context">{@title@}</property>
        +<h2>@title@</h2>
        +<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.

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-comments.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-comments.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-comments.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,22 @@ +Adding Comments

      Adding Comments

      You can track comments for any ACS Object. Here we'll track + comments for notes. On the note-edit.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 + show them.

      First, we need to generate a url for adding comments. In note-edit.tcl:

      + set comment_add_url "[general_comments_package_url]comment-add?[export_vars {
      +  { object_id $note_id } 
      +  { object_name $title } 
      +  { return_url "[ad_conn url]?[ad_conn query]"} 
      + }]"
      + 

      This calls a global, public tcl function that the + general_comments package registered, to get its url. You then + embed in that url the id of the note and its title, and set the + return_url to the current url so that the user can return after + adding a comment.

      We need to create html that shows any existing comments. + We do this with another general_comments function:

      set comments_html [general_comments_get_comments
      +     -print_content_p 1 $note_id]

      First, we pass in an optional parameter that that says to actually + show the contents of the comments, instead of just the fact that + there are comments. Then you pass the note id, which is also the + acs_object id.

      We put our two new variables in the note-edit.adp + page.

      <a href="@comment_add_url@">Add a comment</a>
      + @comments_html@
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-cvs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-cvs.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-cvs.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,61 @@ +Add the new package to CVS

      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 + CVS)

      [service0 xml]$ cd ..
      +[service0 doc]$ cd ..
      +[service0 www]$ cd ..
      +[service0 myfirstpackage]$ cd ..
      +[service0 packages]$ cvs add myfirstpackage/
      +Directory /cvsroot/service0/packages/myfirstpackage added to the repository
      +[service0 packages]$ cd myfirstpackage/
      +[service0 myfirstpackage]$ cvs add www
      +Directory /cvsroot/service0/packages/myfirstpackage/www added to the repository
      +[service0 myfirstpackage]$ cd www
      +[service0 www]$ cvs add doc
      +Directory /cvsroot/service0/packages/myfirstpackage/www/doc added to the repository
      +[service0 www]$ cd doc
      +[service0 doc]$ cvs add *
      +cvs add: cannot add special file `CVS'; skipping
      +cvs add: scheduling file `admin-guide.html' for addition
      +cvs add: scheduling file `bi01.html' for addition
      +cvs add: scheduling file `data-model.dia' for addition
      +cvs add: scheduling file `data-model.png' for addition
      +cvs add: scheduling file `design-config.html' for addition
      +cvs add: scheduling file `design-data-model.html' for addition
      +cvs add: scheduling file `design-future.html' for addition
      +cvs add: scheduling file `design-ui.html' for addition
      +cvs add: scheduling file `filename.html' for addition
      +cvs add: scheduling file `index.html' for addition
      +cvs add: scheduling file `page-map.dia' for addition
      +cvs add: scheduling file `page-map.png' for addition
      +cvs add: scheduling file `requirements-cases.html' for addition
      +cvs add: scheduling file `requirements-introduction.html' for addition
      +cvs add: scheduling file `requirements-overview.html' for addition
      +cvs add: scheduling file `requirements.html' for addition
      +cvs add: scheduling file `sample-data.html' for addition
      +cvs add: scheduling file `sample.png' for addition
      +cvs add: scheduling file `user-guide.html' for addition
      +cvs add: scheduling file `user-interface.dia' for addition
      +cvs add: scheduling file `user-interface.png' for addition
      +Directory /cvsroot/service0/packages/myfirstpackage/www/doc/xml added to the repository
      +cvs add: use 'cvs commit' to add these files permanently
      +[service0 doc]$ cd xml
      +[service0 xml]$ cvs add Makefile index.xml
      +cvs add: scheduling file `Makefile' for addition
      +cvs add: scheduling file `index.xml' for addition
      +cvs add: use 'cvs commit' to add these files permanently
      +[service0 xml]$ cd ../../..
      +[service0 myfirstpackage]$ cvs commit -m "new package"
      +cvs commit: Examining .
      +cvs commit: Examining www
      +cvs commit: Examining www/doc
      +cvs commit: Examining www/doc/xml
      +RCS file: /cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v
      +done
      +Checking in www/doc/admin-guide.html;
      +/cvsroot/service0/packages/myfirstpackage/www/doc/admin-guide.html,v  <--  admin-guide.html
      +initial revision: 1.1
      +done
      +(many lines omitted)
      +[service0 myfirstpackage]$
      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 -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/tutorial-database.html 4 Feb 2004 16:47:33 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/tutorial-database.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1,7 +1,7 @@ -Setting Up Database Objects

      Setting Up Database Objects

      by Joel Aufrecht

      +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 @@ -31,13 +31,13 @@ repository functions to simplify our database creation. (More information about ACS Objects. More information about the Content Repository.) -

      Figure�7.2.�Tutorial Data Model

      Tutorial Data Model

      The top of each sql file has some +

      Figure�7.2.�Tutorial Data Model

      Tutorial Data Model

      The top of each sql file has some standard comments, including doc tags such as @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 ~]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/sql/postgresql
      -[service0 postgresql]$ emacs myfirstpackage-create.sql

      Paste this into the file and save and close.

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

      -- creation script
      +[service0 postgresql]$ emacs myfirstpackage-create.sql

      Paste this into the file and save and close.

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

      -- creation script
       --
       -- @author joel@aufrecht.org
       -- @cvs-id &Id:$
      @@ -62,7 +62,7 @@
           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 postgresql]$ emacs myfirstpackage-drop.sql

      Figure�7.4.�Database deletion script

      -- drop script
      +[service0 postgresql]$ emacs myfirstpackage-drop.sql

      Figure�7.4.�Database deletion script

      -- drop script
       --
       -- @author joel@aufrecht.org
       -- @cvs-id &Id:$
      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 -r1.17 -r1.18
      --- openacs-4/packages/acs-core-docs/www/tutorial-debug.html	4 Feb 2004 16:47:33 -0000	1.17
      +++ openacs-4/packages/acs-core-docs/www/tutorial-debug.html	12 Feb 2004 13:51:40 -0000	1.18
      @@ -1,7 +1,7 @@
      -Debugging and Automated Testing

      Debugging and Automated Testing

      by Joel Aufrecht

      +Debugging and Automated Testing

      Debugging and Automated Testing

      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 @@ -22,16 +22,16 @@ ?�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.
      API-001Invoke mfp::note::create with a specific word as the title.Proc should return an object id.
      API-002Given an object id from API-001, invoke mfp::note::get.Proc should return the specific word in the title.
      API-003Given the object id from API-001, invoke mfp::note::delete.Proc should return 0 for success.

      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

      by Simon Carstensen and Joel Aufrecht

      + Search for a note.

      Write automated tests

      by Simon Carstensen and Joel Aufrecht

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

      +

      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 once you get the hang of it.

      Create the directory that will contain the test script and edit the script file. The directory location and file name are standards which are recognized by the automated testing package:

      [service0 www]$ mkdir /var/lib/aolserver/service0/packages/myfirstpackage/tcl/test
       [service0 www]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/tcl/test
      @@ -91,4 +91,4 @@
              }
       }
       
      -

      See also the section called “Automated Testing”.

      View comments on this page at openacs.org
      +

      See also the section called “Automated Testing”.

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-distribute.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-distribute.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-distribute.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,10 @@ +Prepare the package for distribution.

      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.

      +

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-future-topics.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,6 @@ +

      Future Topics:

      • 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 prepare pagelets for inclusion in other pages

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

      • 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

      See also the OpenACS Programming FAQ

      View comments on this page at openacs.org
      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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 11 Feb 2004 09:27:12 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/tutorial-newpackage.html 12 Feb 2004 13:51:40 -0000 1.19 @@ -1,7 +1,7 @@ -Creating a Package

      Creating a Package

      by Joel Aufrecht

      +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 intended page map

      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 @@ -21,11 +21,11 @@

      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 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 +standard OpenACS 5.0.1d1 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 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 @@ -54,7 +54,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 Index: openacs-4/packages/acs-core-docs/www/tutorial-notifications.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-notifications.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-notifications.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,108 @@ +Notifications

      Notifications

      by David Bell and Simon Carstensen

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

      The notifications package allows you to send notifications through any + defined communications medium (e.g. email, sms) upon some event occuring within + the system.

      This tutorial steps through the process of integrating the notifications + package with your package.

      First step is to create the notification types. To do this a script similar + to the one below needs to be loaded into Postgresql. I create this script in a + package-name/sql/postgresql/package-name-notifications-init.sql file. I then load + this file from my create sql file. The following code snippet is taken from + Weblogger. It creates a lars_blogger_notif notification type (which was created + above).

      +    create function inline_0() returns integer as '
      +    declare
      +            impl_id integer;
      +            v_foo   integer;
      +    begin
      +        -- the notification type impl
      +        impl_id := acs_sc_impl__new (
      +                      ''NotificationType'',
      +                      ''lars_blogger_notif_type'',
      +                      ''lars-blogger''
      +        );
      +
      +        v_foo := acs_sc_impl_alias__new (
      +                    ''NotificationType'',
      +                    ''lars_blogger_notif_type'',
      +                    ''GetURL'',
      +                    ''lars_blogger::notification::get_url'',
      +                    ''TCL''
      +        );
      +
      +        v_foo := acs_sc_impl_alias__new (
      +                    ''NotificationType'',
      +                    ''lars_blogger_notif_type'',
      +                    ''ProcessReply'',
      +                    ''lars_blogger::notification::process_reply'',
      +                    ''TCL''
      +        );
      +
      +        PERFORM acs_sc_binding__new (
      +                    ''NotificationType'',
      +                    ''lars_blogger_notif_type''
      +        );
      +
      +        v_foo:= notification_type__new (
      +	        NULL,
      +                impl_id,
      +                ''lars_blogger_notif'',
      +                ''Blog Notification'',
      +                ''Notifications for Blog'',
      +		now(),
      +                NULL,
      +                NULL,
      +		NULL
      +        );
      +
      +        -- enable the various intervals and delivery methods
      +        insert into notification_types_intervals
      +        (type_id, interval_id)
      +        select v_foo, interval_id
      +        from notification_intervals where name in (''instant'',''hourly'',''daily'');
      +
      +        insert into notification_types_del_methods
      +        (type_id, delivery_method_id)
      +        select v_foo, delivery_method_id
      +        from notification_delivery_methods where short_name in (''email'');
      +
      +        return (0);
      +    end;
      +    ' language 'plpgsql';
      +
      +    select inline_0();
      +    drop function inline_0();
      +    

      The next step is to setup our notification creation. A new notification must + be added to the notification table for each blog entry added. We do this using the + notification::new procedure

      +        notification::new \
      +            -type_id [notification::type::get_type_id \
      +            -short_name lars_blogger_notif] \
      +            -object_id $blog(package_id) \
      +            -response_id $blog(entry_id) \
      +            -notif_subject $blog(title) \
      +            -notif_text $new_content
      +    

      This code is placed in the tcl procedure that creates blog entries, right after + the entry gets created in the code. The $blog(package_id) + is the OpenACS object_id of the Weblogger instance to which the entry has been posted to + and the $new_content is the content of the entry.

      The final step is to setup the notification subscription process. In this + example we want to let a user find out when a new entry has been posted to the blog. To + do this we put a link on the blog that allows them to subscribe to notifications of new + entries. The notifications/requests-new page is very handy in this situation.

      Such a link can be created using the notification::display::request_widget + proc:

      +    set notification_chunk [notification::display::request_widget \
      +        -type lars_blogger_notif \
      +        -object_id $package_id \
      +        -pretty_name [lars_blog_name] \
      +        -url [lars_blog_public_package_url] \
      +    ]
      +    

      which will return something like + +

      +    You may <a href="/notifications/request-new?...">request notification</a> for Weblogger.

      + + which can be readily put on the blog index page. The pretty_name + parameter is what appears at the end of the text returned (i.e. "... request notification</a> for pretty_name"), + The url parameter should be set to the address we want the user + to be redirected to after they have finished the subscription process.

      This should be all you need to implement a notification system. For more examples + look at the forums package.

      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 -r1.17 -r1.18 --- openacs-4/packages/acs-core-docs/www/tutorial-pages.html 4 Feb 2004 16:47:33 -0000 1.17 +++ openacs-4/packages/acs-core-docs/www/tutorial-pages.html 12 Feb 2004 13:51:40 -0000 1.18 @@ -1,8 +1,8 @@ -Creating Web Pages

      Creating Web Pages

      by Joel Aufrecht

      +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. -

      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/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/

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

      Page Map

      Our package will have two visible pages. The first shows a list of all objects; the second shows a single object in view or edit mode, and can also be used to add an object. The index page will display the list, but since we might reuse the list later, we'll put it in a seperate file and include it on the index page.

      Figure�7.5.�Page Map

      Page Map

      Build the "Index" page

      Each user-visible page in your package has, typically, +

      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/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/

      To make this file take effect, go to the APM and choose "Reload changed" 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 @@ -12,7 +12,7 @@ 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 postgresql]$ cd /var/lib/aolserver/service0/packages/myfirstpackages/www
      +      first, starting with the tcl file:

      [service0 postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www
       [service0 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.
       
      @@ -21,12 +21,9 @@
       }
       
       set page_title [ad_conn instance_name]
      -set context [list]

      Now index.adp:

      <master>
      -  <property name="title">@page_title;noquote@</property>
      -  <property name="context">@context;noquote@</property>
      -<include src="/packages/myfirstpackage/lib/note-list">

      You can test your work by viewing the page.

      The index page includes the list page, which we put in /lib instead of /www to designate that it's available for reuse by other packages.

      [service0 www]$ mkdir /var/lib/aolserver/service0/packages/myfirstpackage/lib
      -[service0 www]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/lib
      -[service0 lib]$ emacs note-list.tcl
      template::list::create \
      +set context [list]
      +
      +template::list::create \
           -name notes \
           -multirow notes \
           -actions { "Add a Note" note-edit} \
      @@ -63,55 +60,64 @@
           } {
       	set edit_url [export_vars -base "note-edit" {item_id}]
       	set delete_url [export_vars -base "note-delete" {item_id}]
      -    }
      [service0 lib]$ emacs note-list.adp
      <listtemplate name="notes"></listtemplate>

      Create the add/edit page. If note_id is passed in, - it display that note, and can change to edit mode if appropriate. Otherwise, it presents a form for adding notes.

      [service0 lib]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www
      -[service0 www]$ emacs note-edit.tcl
      ad_page_contract {
      +    }
      +

      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 view-edit page for notes.
       
           @author Your Name (you@example.com)
           @cvs-id $Id$
      - 
      +
           @param item_id If present, assume we are editing that note.  Otherwise, we are creating a new note.
      -} {
      +} { 
           item_id:integer,optional
       }
       
       ad_form -name note -form {
           {item_id:key}
           {title:text {label Title}}
       } -new_request {
      -    auth::require_login
           permission::require_permission -object_id [ad_conn package_id] -privilege create
           set page_title "Add a Note"
           set context [list $page_title]
       } -edit_request {
      -    auth::require_login
           permission::require_write_permission -object_id $item_id
           mfp::note::get \
      -	-item_id $item_id \
      -	-array note_array 
      +    -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
      +    -title $title \
      +    -item_id $item_id
      +    set message "Note $title added"
       } -edit_data {
           mfp::note::edit \
      -	-item_id $item_id \
      -	-title $title
      +    -item_id $item_id \
      +    -title $title
      +     set message "Note $title changed"
       } -after_submit {
      -    ad_returnredirect "."
      +    ad_returnredirect -message $message "."
           ad_script_abort
      -}
      [service0 www]$ emacs note-edit.adp
      <master>
      +} 

      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.

      [service0 www]$ emacs note-delete.tcl
      ad_page_contract {
      +     tcl page, and no adp page.  Edit
      +note-delete.tcl:

      ad_page_contract {
           This deletes a note
       
           @author Your Name (you@example.com)
      @@ -125,8 +131,6 @@
       permission::require_write_permission -object_id $item_id
       set title [item::get_title $item_id]
       mfp::note::delete -item_id $item_id
      +ad_returnredirect -message "Item $title deleted." "."
       
      -ad_returnredirect "."
      -# stop running this code, since we're redirecting
      -abort
       
      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-specs.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-specs.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-specs.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,51 @@ +Write the Requirements and Design Specs

      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 + to + myfirstpackage/www/docs/xml/index.xml.

      You then edit that file with emacs to write the + requirements and design sections, generate the html, and start + coding. Store any supporting files, like page maps or schema + diagrams, in the www/doc/xml + directory, and store png or jpg versions of supporting files in the + www/doc directory.

      For this tutorial, you should instead install the + pre-written documentation files for the tutorial app. Log in + as service0, create the standard + directories, and copy the prepared documentation:

      [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/
      +[service0 myfirstpackage]$ mkdir -p www/doc/xml
      +[service0 myfirstpackage]$ cd www/doc/xml
      +[service0 xml]$ cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/myfirstpackage/* .
      +[service0 xml]$

      OpenACS uses DocBook for documentation. DocBook is + an XML standard for semantic markup of documentation. That + means that the tags you use indicate meaning, not intended + appearance. The style sheet will determine appearance. You + will edit the text in an xml file, and then process the file + into html for reading.

      Open the file index.xml + in emacs. Examine the file. Find the version history (look for the tag + <revhistory>). Add a + new record to the document version history. Look for the + <authorgroup> tag and + add yourself as a second author. Save and exit. For tips on + editing SGML files in emacs, see OpenACS Documentation Guide

      Process the xml file to create html documentation. The + html documentation, including supporting files such as pictures, + is stored in the www/docs/ + directory. A Makefile is provided to generate html from the xml, and copy all of the + supporting files. If Docbook is set up correctly, all you need + to do is:

      [service0 xml]$ make
      +cd .. ; /usr/bin/xsltproc ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml
      +Writing requirements-introduction.html for chapter(requirements-introduction)
      +Writing requirements-overview.html for chapter(requirements-overview)
      +Writing requirements-cases.html for chapter(requirements-cases)
      +Writing sample-data.html for chapter(sample-data)
      +Writing requirements.html for chapter(requirements)
      +Writing design-data-model.html for chapter(design-data-model)
      +Writing design-ui.html for chapter(design-ui)
      +Writing design-config.html for chapter(design-config)
      +Writing design-future.html for chapter(design-future)
      +Writing filename.html for chapter(filename)
      +Writing user-guide.html for chapter(user-guide)
      +Writing admin-guide.html for chapter(admin-guide)
      +Writing bi01.html for bibliography
      +Writing index.html for book
      +[service0 xml]$

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

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/tutorial-vuh.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/tutorial-vuh.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/tutorial-vuh.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,35 @@ +Using .vuh files for pretty urls

      Using .vuh files for pretty urls

      .Vuh files are special cases of .tcl files, used for rewriting incoming urls. We can use a vuh file to prettify the uri for our notes. Instead of note-edit?item_id=495, we can use note/495. To do this, we will need a new .vuh file for redirection and we will need to change the referring links in note-list. First, add the vuh:

      [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www
      +[service0 www]$ emacs note.vuh
      +

      Paste this into the file:

      # Transform requests of type: a/b
      +# into this internal request: A?c=b
      +# for example, note/495 > note-edit?item_id=496
      +# a: base name of this .vuh file
      +# b: from the request
      +# A: hard-coded
      +# C: hard-coded
      +
      +set query [ad_conn url]
      +
      +set request [string range $query [expr [string last / $query] + 1] end]
      +
      +rp_form_put item_id $request
      +
      +set internal_path "/packages/[ad_conn package_key]/www/note-edit"
      +
      +rp_internal_redirect $internal_path
      +

      We parse the incoming request and treat everything after the final / as the item id. Note that this simple redirection will lose any additional query parameters passed in. Many OpenACS objects maintain a pretty-name, which is a unique, human-readable string, usually derived from title, which makes an even better 'pretty url' than a numeric id; this requires that your display page be able to look up an item based on pretty id.

      We use rp_form_put to store the item id in the internal register that the next page is expecting, and then redirects the request in process internally (ie, without a browser refresh).

      Next, modify note-list so that its link is of the new form.:

      [service0 www]$ emacs ../lib/note-edit.tcl
      +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/$item_id"]
      +	set delete_url [export_vars -base "note-delete" {item_id}]
      +    }
      +
      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 -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/tutorial.html 4 Feb 2004 16:47:33 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/tutorial.html 12 Feb 2004 13:51:40 -0000 1.10 @@ -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
      Fisheye: Tag 1.13 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/unix-install.html'. Fisheye: No comparison available. Pass `N' to diff? 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 -r1.10 -r1.11 --- openacs-4/packages/acs-core-docs/www/unix-installation.html 4 Feb 2004 16:47:33 -0000 1.10 +++ openacs-4/packages/acs-core-docs/www/unix-installation.html 12 Feb 2004 13:51:40 -0000 1.11 @@ -1,4 +1,4 @@ -Install a Unix-like system and supporting software

      Install a Unix-like system and supporting software

      by Joel Aufrecht

      +Install a Unix-like system and supporting software

      Install a 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.

      a Unix-like system

      You will need a computer running a unix-like system with the following software installed:

      • tdom

      • tcl

      • gmake and the compile and build Index: openacs-4/packages/acs-core-docs/www/update-repository.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/update-repository.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/update-repository.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/update-repository.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -How to Update the OpenACS.org repository

        How to Update the OpenACS.org repository

        1. +How to Update the OpenACS.org repository

          How to Update the OpenACS.org repository

          1. Setup a local OpenACS server running 5.0 or better.

          2. Edit packages/acs-admin/www/apm/build-repository.tcl and adjust the Configuration Settings.

          3. @@ -13,4 +13,4 @@ The files will be stored on the server's hard drive in the directory specified by the 'repository_dir' variable in the page script, by default "[acs_root_dir]/www/repository/".

        2. If you're on openacs.org, everything should now be fine. Otherwise, you need to move the entire directory tree to openacs.org:/web/openacs/www/repository, replacing what was already there. -

        View comments on this page at openacs.org
        +

      View comments on this page at openacs.org
      Index: openacs-4/packages/acs-core-docs/www/update-translations.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/update-translations.html,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-core-docs/www/update-translations.html 12 Feb 2004 13:51:40 -0000 1.1 @@ -0,0 +1,6 @@ +How to Update the translations

      How to Update the translations

      1. + Update the translation server. (Approach 1: upgrade to the last release; approach 2: upgrade to head or to an alpha or beta release.) Use CVS up. +

      2. Go to ACS Lang admin page and click "Import All Messages"

      3. Resolve conflicts, if any, on the provided page, if any. +

      4. Back on the admin page, click the export link. If there are conflicts, the messages will be exported anyway and errors will be shown.

      5. + Run the acs-lang/bin/check-catalog.sh script. (This checks for keys no longer in use and some other things. Until it is rolled into the UI, do it manually and check the results and take whatever steps you can intuit you should do.) +

      6. CVS commit the catalog files. Done

      View comments on this page at openacs.org
      Fisheye: Tag 1.7 refers to a dead (removed) revision in file `openacs-4/packages/acs-core-docs/www/upgrade-4.5-to-4.6.html'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/upgrade-openacs-files.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -Upgrading the OpenACS files

      Upgrading the OpenACS files

      OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.

      Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

      • Upgrading files for a site which is not in a CVS repository.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

        [root root]# su - service0
        +Upgrading the OpenACS files

        Upgrading the OpenACS files

        OpenACS is distributed as a collection of files, available as one big tarball, via CVS, and via automatic download from within the APM. Upgrades work by first changing the file system (via any of the previous methods), and then using the APM to scan the file system, find upgrade scripts, and execute them. This section describes how to upgrade the file system. Starting with OpenACS 5.0, this section can generally be skipped because the OpenACS APM can directly download new files from the openacs.org repository.

        Many OpenACS site developers operate their own CVS repository to keep track of changes from the release OpenACS code. This part describes how to import the latest OpenACS version into your own repository. If you are using CVS, you will unpack the OpenACS 4.6 tarball into a working directory and then import that directory into cvs. If you have changed files in the core packages, cvs will attempt to merge your changes. You may have to manually merge some conflicts. When that's finished, you can update your normal development checkout directory and the new files will appear. If you aren't using CVS, you can unpack the tarball on top of your existing tree, but any customizations you've made to the kernel or core packages will be erased.

        • Upgrading files for a site which is not in a CVS repository.�Unpack the tarball into a new directory and copy its contents on top of your working directory.

          [root root]# su - service0
                   [service0 aolserver]$ cd /var/lib/aolserver
                   [service0 web]$ tar xzf /tmp/openacs-4-6.tgz
                   [service0 web]$ cp -r openacs-4-6/* openacs-4
          Index: openacs-4/packages/acs-core-docs/www/upgrade-openacs.html
          ===================================================================
          RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/Attic/upgrade-openacs.html,v
          diff -u -r1.2 -r1.3
          --- openacs-4/packages/acs-core-docs/www/upgrade-openacs.html	4 Feb 2004 16:47:33 -0000	1.2
          +++ openacs-4/packages/acs-core-docs/www/upgrade-openacs.html	12 Feb 2004 13:51:40 -0000	1.3
          @@ -1,4 +1,4 @@
          -Upgrading OpenACS

          Upgrading OpenACS

          Upgrading 4.5 or higher to 4.6.3

          The required platform for OpenACS 4.6 is the same as +Upgrading OpenACS

          Upgrading OpenACS

          Upgrading 4.5 or higher to 4.6.3

          The required platform for OpenACS 4.6 is the same as 4.5, with the exception of OpenFTS. OpenACS 4.6 and later require OpenFTS 0.3.2 for full text search on PostGreSQL. If you have OpenFTS 0.2, you'll need to upgrade.

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

          2. OPTIONAL: Upgrade OpenFTS.�the section called “Upgrading OpenFTS from 0.2 to 0.3.2”

          3. Stop the server

            [root root]# svc -d /service/service0
          4. Upgrade the file system.�the section called “Upgrading the OpenACS files”

          5. @@ -8,7 +8,7 @@ upgrade, plus any new packages you want. It's safest to upgrade the kernel by itself, and then come back and upgrade the rest of the - desired packages in a second pass.

          6. On the next screen, click Install Packages

          7. When prompted, restart the server:

            [root root]# restart-aolserver service0
          8. Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

          9. Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is .

        • Rollback.�If anything goes wrong, roll back to the backup snapshot.

        Upgrading OpenACS 4.6.3 to 5.0

        • Oracle.�Not yet documented. It should be possible to upgrade via the APM just as when upgrading to 4.6.3.

        • PostGreSQL.�You must use PostGreSQL 7.3.x or newer to upgrade OpenACS beyond 4.6.3. See Upgrade PostGreSQL to 7.3; Table�2.2, “Version Compatibility Matrix” + desired packages in a second pass.

        • On the next screen, click Install Packages

        • When prompted, restart the server:

          [root root]# restart-aolserver service0
        • Wait a minute, then browse to the package manager, http://yourserver/acs-admin/apm.

        • Check that the kernel upgrade worked by clicking All and making sure that acs-kernel version is 5.0.1d1.

      • Rollback.�If anything goes wrong, roll back to the backup snapshot.

      Upgrading OpenACS 4.6.3 to 5.0

      • Oracle.�Not yet documented. It should be possible to upgrade via the APM just as when upgrading to 4.6.3.

      • PostGreSQL.�You must use PostGreSQL 7.3.x or newer to upgrade OpenACS beyond 4.6.3. See Upgrade PostGreSQL to 7.3; Table�2.2, “Version Compatibility Matrix”

        1. Back up the database and file system.

        2. Upgrade the file system for packages/acs-kernel.�the section called “Upgrading the OpenACS files”

        3. Upgrade the kernel manually. (There is a script to do most of the rest: /contrib/misc/upgrade_4.6_to_5.0.sh on HEAD). You'll still have to do a lot of stuff manually, but automated trial and error is much more fun.)

          [root root]# su - service0
           [service0 aolserver]$ cd /var/lib/aolserver/ service0/packages/acs-kernel/sql/postgresql/upgrade

          Manually execute each of the upgrade scripts in sequence, either from within psql or from the command line with commands such as psql -f upgrade-4.6.3-4.6.4.sql service0. Run the scripts in this order (order is tentative, not verified): Index: openacs-4/packages/acs-core-docs/www/upgrade-overview.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-overview.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/upgrade-overview.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/upgrade-overview.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,9 +1,9 @@ -Overview

          Overview

          Starting with Version 4.5, all OpenACS core packages support +Overview

          Overview

          Starting with Version 4.5, all OpenACS core packages support automatic upgrade. That means that, if you have OpenACS 4.5 or better, you should always be able to upgrade all of your core packages automatically. If you haven't changed anything, no manual intervention should be required. If you are running OpenACS prior to 4.5, upgrading will require manual effort.

          It's always a good idea to precede an upgrade attempt with a snapshot backup.

          OpenACS consists of files and a database schema. The files in a new tarball include database upgrade scripts. To start the upgrade, replace your existing files with the new files and 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.

          Table�5.1.�Assumptions in this section

          name of OpenACS userservice0
          OpenACS server nameservice0
          Root of OpenACS file tree/var/lib/aolserver/service0
          Database backup directory/var/lib/aolserver/service0/database-backup
          View comments on this page at openacs.org
          + complete.

          Table�5.1.�Assumptions in this section

          name of OpenACS userservice0
          OpenACS server nameservice0
          Root of OpenACS file tree/var/lib/aolserver/service0
          Database backup directory/var/lib/aolserver/service0/database-backup
          View comments on this page at openacs.org
          Index: openacs-4/packages/acs-core-docs/www/upgrade-supporting.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/upgrade-supporting.html,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 4 Feb 2004 16:47:33 -0000 1.2 +++ openacs-4/packages/acs-core-docs/www/upgrade-supporting.html 12 Feb 2004 13:51:40 -0000 1.3 @@ -1,4 +1,4 @@ -Upgrading Platform components

          Upgrading Platform components

          Upgrading OpenFTS from 0.2 to 0.3.2

          OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

          1. Uninstall the old OpenFTS Engine from the service0 database.

            1. Browse to http://yourserver/openfts. +Upgrading Platform components

              Upgrading Platform components

              Upgrading OpenFTS from 0.2 to 0.3.2

              OpenACS Full Text Search requires several pieces: the OpenFTS code, some database functions, and the OpenFTS Engine. This section describes how to upgrade OpenFTS from 0.2 to 0.3.2 and upgrade the search engine on an OpenACS site at the same time.

              1. Uninstall the old OpenFTS Engine from the service0 database.

                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/
                           tar xzf /tmp/Search-OpenFTS-tcl-0.3.2.tar.gz
                           chown -R root.root Search-OpenFTS-tcl-0.3.2/
                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 -r1.13 -r1.14
                --- openacs-4/packages/acs-core-docs/www/upgrade.html	4 Feb 2004 16:47:33 -0000	1.13
                +++ openacs-4/packages/acs-core-docs/www/upgrade.html	12 Feb 2004 13:51:40 -0000	1.14
                @@ -1,4 +1,4 @@
                -Chapter�5.�Upgrading

                Chapter�5.�Upgrading

                by Joel Aufrecht

                +Chapter�5.�Upgrading

                Chapter�5.�Upgrading

                by Joel Aufrecht

                OpenACS docs are written by the named authors, and may be edited by OpenACS documentation staff.
                View comments on this page at openacs.org
                Index: openacs-4/packages/acs-core-docs/www/variables.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/variables.html,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-core-docs/www/variables.html 4 Feb 2004 16:47:33 -0000 1.4 +++ openacs-4/packages/acs-core-docs/www/variables.html 12 Feb 2004 13:51:40 -0000 1.5 @@ -1,9 +1,9 @@ -Variables

                Variables

                By joel@aufrecht.org

                +Variables

                Variables

                By joel@aufrecht.org

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

                Date and Time Variables

                Starting with OpenACS 5.0 and the introduction of acs-lang, we recommend retrieving date/time information from the database in - ANSI format and then using lc_time_fmt to format it for display.

                Example�9.1.�Getting datetime from the database ANSI-style

                db_multirow -extend { mydate_pretty } {
                +    ANSI format and then using lc_time_fmt to format it for display.

                Example�10.1.�Getting datetime from the database ANSI-style

                db_multirow -extend { mydate_pretty } {
                     select to_char(mydate, 'YYYY-MM-DD HH24:MI:SS') as mydate_ansi,
                           ...
                     ...
                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 -r1.25 -r1.26
                --- openacs-4/packages/acs-core-docs/www/win2k-installation.html	4 Feb 2004 16:47:33 -0000	1.25
                +++ openacs-4/packages/acs-core-docs/www/win2k-installation.html	12 Feb 2004 13:51:40 -0000	1.26
                @@ -1,11 +1,11 @@
                -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 valid for ACS v4, but have not been tested with OpenACS and the ArsDigita binary distributions are no longer available. Currently - (10/2003), the best option to get OpenACS running on Windows + (10/2003), the best option to get OpenACS 5.0.1d1 running on Windows is to use VMware and John Sequeira's Oasis VM distribution @@ -249,4 +249,4 @@

                In the services control panel you should see two services: AOLserver-lintcollectors and AOLserver-iguanasdirect. -

                ($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/xml/index.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/index.xml,v diff -u -r1.23 -r1.24 --- openacs-4/packages/acs-core-docs/www/xml/index.xml 4 Feb 2004 16:47:34 -0000 1.23 +++ openacs-4/packages/acs-core-docs/www/xml/index.xml 12 Feb 2004 13:51:42 -0000 1.24 @@ -208,10 +208,10 @@ Section missing - - Section missing - + + Section missing + Development Reference Index: openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml 4 Feb 2004 16:47:34 -0000 1.9 +++ openacs-4/packages/acs-core-docs/www/xml/releasing-openacs.xml 12 Feb 2004 13:51:42 -0000 1.10 @@ -195,4 +195,33 @@ +
                + How to Update the translations + + + + Update the translation server. (Approach 1: upgrade to the last release; approach 2: upgrade to head or to an alpha or beta release.) Use CVS up. + + + + Go to ACS Lang admin page and click "Import All Messages" + + + Resolve conflicts, if any, on the provided page, if any. + + + + Back on the admin page, click the export link. If there are conflicts, the messages will be exported anyway and errors will be shown. + + + + Run the acs-lang/bin/check-catalog.sh script. (This checks for keys no longer in use and some other things. Until it is rolled into the UI, do it manually and check the results and take whatever steps you can intuit you should do.) + + + + CVS commit the catalog files. Done + + +
                + \ No newline at end of file Index: openacs-4/packages/acs-core-docs/www/xml/variables.ent =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/variables.ent,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-core-docs/www/xml/variables.ent 4 Feb 2004 16:47:34 -0000 1.7 +++ openacs-4/packages/acs-core-docs/www/xml/variables.ent 12 Feb 2004 13:51:42 -0000 1.8 @@ -1,5 +1,5 @@ - + Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml 26 Jan 2004 15:39:44 -0000 1.6 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/cvs.xml 12 Feb 2004 13:51:42 -0000 1.7 @@ -24,13 +24,13 @@ Create and set permissions on a subdirectory in the local cvs repository. [root root]# mkdir /cvsroot/service0 -[root root]# chown service0.web /cvsroot/service0 +[root root]# chown service0.service0 /cvsroot/service0 [root root]# mkdir /cvsroot/service0 -chown service0.web /cvsroot/service0 +chown service0.service0 /cvsroot/service0 - Add the repository location to the user environment. + Add the repository location to the user environment. On some systems, you may get better results with .bash_profile instead of .bashrc. [root root]# su - service0 [service0 service0]$ emacs .bashrc Put this string into /home/service0/.bashrc: @@ -54,7 +54,7 @@ release tag. These tags will be useful in upgrading and branching. -m sets the version comment. [root root]# su - service0 -[service0 service0]$ cd /web/service0 +[service0 service0]$ cd /var/lib/aolserver/service0 [service0 service0]$ cvs import -m "initial install" service0 OpenACS &cvsversiontag; N service0/license.txt N service0/readme.txt @@ -63,29 +63,40 @@ No conflicts created by this import -[service0 service0]$ +[service0 service0]$ exit +[root root]# su - service0 -cd /web/service0 -cvs import -m "initial install" service0 OpenACS &cvsversiontag; - Move the original directory to a temporary location, and check out the cvs repository in its place. If the service starts correctly, come back and remove the temporary copy of the uploaded files. - [service0 service0]$ cd .. -[service0 web]$ mv service0 service0.orig -[service0 web]$ cvs checkout service0 +cd /var/lib/aolserver/service0 +cvs import -m "initial install" service0 OpenACS &cvsversiontag; +exit + Move the original directory to a temporary location, and check out the cvs repository in its place. + [root root]# mv /var/lib/aolserver/service0 /var/tmp +[root root]# mkdir /var/lib/aolserver/service0 +[root root]# chown service0.service0 /var/lib/aolserver/service0 +[root root]# su - service0 +[service0 service0]$ cd /var/lib/aolserver +[service0 aolserver]$ cvs checkout service0 cvs checkout: Updating service0 U service0/license.txt (many lines omitted) U service0/www/SYSTEM/dbtest.tcl U service0/www/SYSTEM/flush-memoized-statement.tcl -[service0 web]$ exit +[service0 aolserver]$ exit logout -[root web]# -cd .. -mv service0 service0.orig +[root root]# + +mv /var/lib/aolserver/service0 /var/tmp +mkdir /var/lib/aolserver/service0 +chown service0.service0 /var/lib/aolserver/service0 +su - service0 +cd /var/lib/aolserver cvs checkout service0 exit - + + If the service starts correctly, come back and remove the temporary copy of the uploaded files. + Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 9 Feb 2004 14:38:43 -0000 1.12 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 12 Feb 2004 13:51:42 -0000 1.13 @@ -1,10 +1,10 @@ - %myvars; ]> - + Advanced Topics by Joel Aufrecht @@ -13,7 +13,7 @@ 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. - + Write the Requirements and Design Specs It's time to document. For the tutorial we'll use pre-written documentation. When creating a package @@ -58,15 +58,15 @@ to do is: [service0 xml]$ make cd .. ; /usr/bin/xsltproc ../../../acs-core-docs/www/xml/openacs.xsl xml/index.xml -Writing requirements-introduction.html for sect1(requirements-introduction) -Writing requirements-overview.html for sect1(requirements-overview) -Writing requirements-cases.html for sect1(requirements-cases) -Writing sample-data.html for sect1(sample-data) +Writing requirements-introduction.html for chapter(requirements-introduction) +Writing requirements-overview.html for chapter(requirements-overview) +Writing requirements-cases.html for chapter(requirements-cases) +Writing sample-data.html for chapter(sample-data) Writing requirements.html for chapter(requirements) -Writing design-data-model.html for sect1(design-data-model) -Writing design-ui.html for sect1(design-ui) -Writing design-config.html for sect1(design-config) -Writing design-future.html for sect1(design-future) +Writing design-data-model.html for chapter(design-data-model) +Writing design-ui.html for chapter(design-ui) +Writing design-config.html for chapter(design-config) +Writing design-future.html for chapter(design-future) Writing filename.html for chapter(filename) Writing user-guide.html for chapter(user-guide) Writing admin-guide.html for chapter(admin-guide) @@ -75,8 +75,8 @@ [service0 xml]$ Verify that the documentation was generated and reflects your changes by browsing to http://yoursite:8000/myfirstpackage/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 @@ -141,8 +141,8 @@ done (many lines omitted) [service0 myfirstpackage]$ - - + + Adding Comments You can track comments for any ACS Object. Here we'll track comments for notes. On the note-edit.tcl/adp pair, which is used to @@ -174,8 +174,8 @@ page. <a href="@comment_add_url@">Add a comment</a> @comments_html@ - - + + Admin Pages There are at least two flavors of admin user interface: @@ -275,9 +275,9 @@ - + - + Categories You can associate any ACS Object with one or more categories. @@ -440,143 +440,8 @@ 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 - show them. - First, we need to generate a url for adding comments. In notes.tcl: - -set comment_add_url "[general_comments_package_url]comment-add?[export_vars { - { object_id $note_id } - { object_name $title } - { return_url "[ad_conn url]?[ad_conn query]"} -}]" - - This calls a global, public tcl function that the - general_comments package registered, to get its url. You then - embed in that url the id of the note and its title, and set the - return_url to the current url so that the user can return after - adding a comment. - We need to create html that shows any existing comments. - We do this with another general_comments function: - set comments_html [general_comments_get_comments - -print_content_p 1 $note_id] - First, we pass in an optional parameter that that says to actually - show the contents of the comments, instead of just the fact that - 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@ - - - Admin Pages - - There are at least two flavors of admin user interface: - - - Admins use same pages as all other users, except - that they are offered admin links and buttons where appropriate. - For example, if admins have privilege to bulk-delete items you - could provide checkboxes next to every item seen on a list and the - Delete Selected button on the bottom of the list. - - Dedicated admin pages. If you want admins to have - access to data that users aren't interested in or aren't allowed - to see you will need dedicated admin pages. The conventional - place to put those dedicated admin pages is in the -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin -directory. - -[service0@yourserver www]$ mkdir admin -[service0@yourserver www]$ cd admin - - Even if your application doesn't need any admin pages of its own you will - usually need at least one simple page with a bunch of links to existing - administration UI such as Category Management or standard Parameters UI. - Adding the link to Category Management is described in the section on - categories. The listing below adds a link to the Parameters UI of our - package. - -[service0@yourserver admin]$ vi index.adp - -<master> -<property name="title">@title;noquote@</property> -<property name="context">@context;noquote@</property> - -<ul class="action-links"> - <li><a href="@parameters_url@" title="Set parameters" class="action_link">Set parameters</a></li> -</ul> - -[service0@yourserver admin]$ vi index.tcl - -ad_page_contract {} { -} -properties { - context_bar -} - -set package_id [ad_conn package_id] - -set admin_p [ad_require_permission $package_id admin] - -set context [list] - -set title "Administration" - -set parameters_url [export_vars -base "/shared/parameters" { - package_id { return_url [ad_return_url] } -}] - - - - -Now that you have the first admin page it would be nice to have a link to it -somewhere in the system so that admins don't have to type in the -/admin every time they need to reach it. You -could put a static link to the toplevel -index.adp but that might be distracting for -people who are not admins. Besides, some people consider it impolite to first -offer a link and then display a nasty "You don't have permission to access this -page" message. - - -In order to display the link to the admin page only to users that have admin -privileges add the following code near the top of -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.tcl: - - - -set package_id [ad_conn package_id] - -set admin_p [permission::permission_p -object_id $package_id \ - -privilege admin -party_id [ad_conn untrusted_user_id]] - -if { $admin_p } { - set admin_url "admin" - set admin_title Administration -} - - -In -/var/lib/aolserver/service0/packages/myfirstpackage/www/admin/index.adp put: - - -<if @admin_p@ ne nil> - <a href="@admin_url@">@admin_title@</a> -</if> - - - - - - - - + + Categories You can associate any ACS Object with one or more categories. @@ -736,9 +601,9 @@ - + - + Prepare the package for distribution. Browse to the package manager. Click on tutorialapp. @@ -756,9 +621,9 @@ fixed. - + - + Notifications by David Bell and Simon Carstensen @@ -889,8 +754,39 @@ This should be all you need to implement a notification system. For more examples look at the forums package. - + + + Using .vuh files for pretty urls + .Vuh files are special cases of .tcl files, used for rewriting incoming urls. We can use a vuh file to prettify the uri for our notes. Instead of note-edit?item_id=495, we can use note/495. To do this, we will need a new .vuh file for redirection and we will need to change the referring links in note-list. First, add the vuh: + [service0 service0]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www +[service0 www]$ emacs note.vuh + + Paste this into the file: + example missing + We parse the incoming request and treat everything after the final / as the item id. Note that this simple redirection will lose any additional query parameters passed in. Many OpenACS objects maintain a pretty-name, which is a unique, human-readable string, usually derived from title, which makes an even better 'pretty url' than a numeric id; this requires that your display page be able to look up an item based on pretty id. + We use rp_form_put to store the item id in the internal register that the next page is expecting, and then redirects the request in process internally (ie, without a browser refresh). + Next, modify note-list so that its link is of the new form.: + [service0 www]$ emacs ../lib/note-edit.tcl + +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/$item_id"] + set delete_url [export_vars -base "note-delete" {item_id}] + } + + + + Future Topics: How to enforce security so that users can't @@ -912,4 +808,5 @@ APM package dependencies See also the OpenACS Programming FAQ - + +
                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 -r1.10 -r1.11 --- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 4 Feb 2004 16:47:34 -0000 1.10 +++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-pages.xml 12 Feb 2004 13:51:42 -0000 1.11 @@ -15,22 +15,10 @@ 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/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/ + cp /var/lib/aolserver/service0/packages/acs-core-docs/www/files/note-procs.tcl /var/lib/aolserver/service0/packages/myfirstpackage/tcl/ To make this file take effect, go to the APM and choose "Reload changed" for "MyFirstPackage". - Page Map - Our package will have two visible pages. The first shows a list of all objects; the second shows a single object in view or edit mode, and can also be used to add an object. The index page will display the list, but since we might reuse the list later, we'll put it in a seperate file and include it on the index page. -
                - Page Map - - - - - -
                -
                - Build the "Index" page Each user-visible page in your package has, typically, three parts. The tcl file @@ -43,32 +31,139 @@ database-specific SQL. The default page in any directory is index, so we'll build that first, starting with the tcl file: - [service0 postgresql]$ cd /var/lib/aolserver/service0/packages/myfirstpackages/www + [service0 postgresql]$ cd /var/lib/aolserver/service0/myfirstpackages/www [service0 www]$ emacs index.tcl Paste this into the file. - example missing + 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 Your Name (you@example.com) + @cvs-id $Id$ +} + +set page_title [ad_conn instance_name] +set context [list] + +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 + } + } + +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: - example missing - You can test your work by viewing the page. - The index page includes the list page, which we put in /lib instead of /www to designate that it's available for reuse by other packages. - [service0 www]$ mkdir /var/lib/aolserver/service0/packages/myfirstpackage/lib -[service0 www]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/lib -[service0 lib]$ emacs note-list.tcl - example missing -[service0 lib]$ emacs note-list.adp -example missing - Create the add/edit page. If note_id is passed in, - it display that note, and can change to edit mode if appropriate. Otherwise, it presents a form for adding notes. - [service0 lib]$ cd /var/lib/aolserver/service0/packages/myfirstpackage/www -[service0 www]$ emacs note-edit.tcl - example missing -[service0 www]$ emacs note-edit.adp - example missing + +<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 view-edit page for notes. + @author Your Name (you@example.com) + @cvs-id $Id$ + + @param item_id If present, assume we are editing that note. Otherwise, we are creating a new note. +} { + item_id:integer,optional +} + +ad_form -name note -form { + {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 \ + -item_id $item_id + set message "Note $title added" +} -edit_data { + mfp::note::edit \ + -item_id $item_id \ + -title $title + set message "Note $title changed" +} -after_submit { + ad_returnredirect -message $message "." + 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. -[service0 www]$ emacs note-delete.tcl - example missing + tcl page, and no adp page. Edit +note-delete.tcl: + ad_page_contract { + This deletes a note + + @author Your Name (you@example.com) + @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 +set title [item::get_title $item_id] +mfp::note::delete -item_id $item_id +ad_returnredirect -message "Item $title deleted." "." + + 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 4 Feb 2004 16:47:35 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/openacs.xml 12 Feb 2004 13:51:43 -0000 1.19 @@ -112,7 +112,8 @@ [service0 service0]$ cd /var/lib/aolserver [service0 aolserver]$ tar xzf /tmp/&tarballpath;.tgz [service0 aolserver]$ mv &tarballpath; service0 -[service0 aolserver]$ chmod -R 700 service0 +[service0 aolserver]$ chmod -R 775 service0 +[service0 aolserver]$ chown -R service0.service0 service0 [service0 aolserver]$ ls -al total 3 drwxrwx--- 3 root web 1024 Mar 29 16:41 . @@ -125,7 +126,8 @@ cd /var/lib/aolserver tar xzf /tmp/&tarballpath;.tgz mv &tarballpath; service0 -chmod -R 700 service0/ +chmod -R 755 service0 +chgrp -R service0.service0 service0 exit @@ -333,8 +335,8 @@ Vacuuming [service0 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-23 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0 + Add these lines to the file. The vacuum command cleans up temporary structures within a PostGreSQL database, and can improve performance. We vacuum gently every hour and completely every day. 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, and every (*) day of month, month, and day of week. Type man 5 crontab for more information. + 0 1-23 * * * /usr/local/pgsql/bin/vacuumdb --analyze service0 0 0 * * * /usr/local/pgsql/bin/vacuumdb --full --analyze service0 @@ -442,21 +444,18 @@ Kill any current running AOLserver processes and start a new - one. If you are using Oracle, rather than PostgreSQL, replace - nsd-postgres with - nsd-oracle). - If you want to use port 80, there are complications. - First, AOLserver must be root to use system ports such as - 80, but refuses to run as root for security reasons. Thus - you must start as root and specify a non-root user ID and + one. The recommended way to start an AOLserver process is by running the included script, /var/lib/aolserver/service0/packages/etc/daemontools/run. If you are not using the default file paths and names, you will need to edit run. + If you want to use port 80, there are complications. AOLserver must be root to use system ports such as + 80, but refuses to run as root for security reasons. So, we call the run script as root and specify a non-root user ID and Group ID which AOLserver will switch to after claiming the port. To do so, find the UID and GID of the service0 user via grep service0 /etc/passwd and then put those numbers into the command line via -u 501 -g - 502. Second, if you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep + 502. In AOLserver 4, you must also send a -b flag. Do this by editing the run file as indicated in the comments. + If you are root then killall will affect all OpenACS services on the machine, so if there's more than one you'll have to do ps -auxw | grep nsd and selectively kill by job number. [service0 etc]$ killall nsd nsd: no process killed @@ -617,7 +616,7 @@ Set up database environment variables for the site - user. These settings are necessary for working with the + user. Depending on how you installed Oracle or PostGreSQL, these settings may be necessary for working with the database while logged in as the service user. They do not directly affect the service's run-time connection with the database, because those environmental variables are set by the 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 -r1.18 -r1.19 --- openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 4 Feb 2004 16:47:35 -0000 1.18 +++ openacs-4/packages/acs-core-docs/www/xml/install-guide/postgres.xml 12 Feb 2004 13:51:43 -0000 1.19 @@ -1,5 +1,5 @@ - %myvars; @@ -14,18 +14,18 @@ Skip this section if you will run only Oracle. - OpenACS &version; 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. PostgreSQL 7.4 has been verified. + See for version compatibility. - Mac OS X - If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.2.x or 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4. + Special notes for Mac OS X + If you are running Mac OS X prior to 10.3, you should be able to install and use PostGreSQL 7.3.x. Mac OS X 10.3 requires PostGreSQL 7.4. - Debian + Special Notes for Debian Debian users, especially Debian stable users, should install PostGreSQL from source as detailed below. Debian unstable users: the following process has been known to work: @@ -39,7 +39,7 @@ - Using the Red Hat RPM + Special Notes for Red Hat 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 @@ -70,7 +70,8 @@ su - postgres ... and then skip to . Something similar may work for other binary packages as well. - + + Safe approach: install from source @@ -153,6 +154,7 @@ UnicodeUnicodein PostgreSQL support, add the flags --enable-locale and --enable-multibyte. If you want to see what the other possibilities are, run ./configure --help. + On debian woody (stable, 3.0), do ./configure --without-readline --without-zlib. [root src]# su - postgres [postgres pgsql]$ cd /usr/local/src/postgresql-7.3.4 [postgres postgresql-7.3.4]$ ./configure @@ -188,15 +190,15 @@ PostgreSQL. - [postgres tsearch]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data + [postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data The files belonging to this database system will be owned by user "postgres". This user must also own the server process. (17 lines omitted) or /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start -[postgres tsearch]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start +[postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start postmaster successfully started -[postgres tsearch]$ +[postgres postgresql-7.3.4]$ /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l /usr/local/pgsql/data/server.log start @@ -213,15 +215,15 @@ databases are created. We can verify that it was created with the createlang command in list mode. - [postgres pgsql]$ createlang plpgsql template1 + [postgres postgresql-7.3.4]$ createlang plpgsql template1 [postgres pgsql]$ createlang -l template1 Procedural languages Name | Trusted? ---------+---------- plpgsql | t (1 row) -[postgres pgsql]$ +[postgres pgsql-7.3.4]$ createlang plpgsql template1 createlang -l template1 @@ -272,7 +274,7 @@ bunch of symlinks that ensure that, when the operating system changes runlevels, postgresql goes to the appropriate state. Red Hat and Debian and SuSE each work a little - differently. + differently. If you haven't untarred the OpenACS tarball, you will need to do so now to access the postgresql.txt file. Red Hat RPM: @@ -316,7 +318,7 @@ service postgresql start Debian: - [root ~]# cp /tmp/&tarballpath;/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql + [root ~]# cp /tmp/packages/acs-core-docs/www/files/postgresql.txt /etc/init.d/postgresql [root ~]# chown root.root /etc/init.d/postgresql [root ~]# chmod 755 /etc/init.d/postgresql [root ~]# @@ -467,12 +469,13 @@ # checkpoint_segments = 3 # in logfile segments (16MB each), min 1 - Restart postgres (service postgresql restart) so that the changes take effect. + Restart postgres (Redhat: service postgresql restart. Many other systems: /etc/init.d/postgresql restart) so that the changes take effect. + + - - + more information about PostgreSQL @@ -508,7 +511,10 @@ Performance Tuning - + + + Tuning PostgreSQL for performance + ($Id$)