View · Index

Weblog

Showing 41 - 50 of 691 Postings (summary)

Install OpenACS on debian unstable / Ubuntu 7.10

Created by David Arroyo Menéndez, last modified by Gustaf Neumann 26 May 2021, at 12:20 PM

 

This page is mostly obsolete. There are now Debian packages for all OpenACS requirements, and OpenACS (.LRN) itself, and a fairly general installer from scratch naviserver-openacs.

See The debian wiki page

The rest of this page is superseded by the debian wiki page.

You can also use the en:OpenACSDebianInstallGuide quicksheet.

Install tcl 8.4

apt-get install tcl8.4 tcl8.4-dev tcl8.4-doc

Install PostgreSQL 8.2

(from ubuntu repository or debian etch) for PG 8.2 I had to add this line to the /etc/apt/sources.list (under debian etch) 

deb http://www.backports.org/debian etch-backports main contrib non-free 

Install with apt

apt-get install postgresql-8.2 postgresql-client postgresql-dev postgresql-doc 

under debian-etch I did this to avoid downloading some 7.4-packages

apt-get install postgresql-8.2 postgresql-client-8.2 postgresql-dev postgresql-doc-8.2 

Config the postgresql 8.x

from How_to_install_in_Postgres_8.x
/etc/postgresql/8.2/main/postgresql.conf

add_missing_from = on
regex_flavor = extended
default_with_oids = on

On debian you could need to change the postgresql port number to 5432, see /etc/postgresql/8.2/main/postgresql.conf

Create the database


 

su postgres -c "/usr/lib/postgresql/8.2/bin/createlang plpgsql template1"
su postgres -c "createuser service"

Shall the new user be allowed to create
    databases? (y/n) y
  Shall the new user be allowed to create
    more new users? (y/n) y
  CREATE USER
su postgres -c "createdb -E UNICODE service"

Install AOLserver

(AOLserver 4.5 for now only from debian unstable)
# Note: on ubuntu maybe more better install AOLserver 4.0 and you can download it from debian stable

  1. Add the next lines to /etc/apt/sources.list
    deb http://http.us.debian.org/debian stable main contrib non-free
    deb http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
    deb http://security.debian.org stable/updates main contrib non-free
    
  2. Update
    apt-get update
    
    # If you have any trouble with gpg keys, then you must read: http://www.davidam.com/debian/debian-gpg
     
  3. Install wit apt
    
     

    apt-get install -t unstable aolserver4 aolserver4-nscache aolserver4-nsopenssl aolserver4-nspostgres aolserver4-nssha1 aolserver4-dev aolserver4-doc daemontools-installer cvs

    *note: unpack the https.gz from aolserver4-nsopenssl and copy it over to the tcl directory of aolserver4, if not the api with https such as ns_httpspost will not be available.

    https.gz is normally found at /usr/share/doc/aolserver4-nsopenssl/examples/

    The tcl directory for aolserver4 is normally found at /usr/lib/aolserver4/modules/tcl/

  4. Install tdom from cvs
    # Sometimes cvs.tdom.org is down, if you have problems you can download with
    wget http://cognovis.de/file-storage/view/aolserver45.tar.bz2 
    cd /usr/lib/aolserver4
    sudo ln -s /usr/include/aolserver4 include
    mkdir /usr/local/src/aolserver4
    cd /usr/local/src/aolserver4
    sudo cvs -z3 -d:pserver:anonymous@cvs.tdom.org:/usr/local/pubcvs co tdom
    cd tdom/unix  
    ../configure --enable-threads --disable-tdomalloc --with-aolserver=/usr/lib/aolserver4 --prefix=/usr/lib/aolserver4 --with-tcl=/usr/lib/tcl8.4
    sudo make install
    
  5. Install XOTcl
    cd /usr/local/src
    sudo wget http://media.wu-wien.ac.at/download/xotcl-1.6.7.tar.gz
    sudo tar xvfz xotcl-1.6.7.tar.gz
    cd xotcl-1.6.7/
    export CC=gcc
    sudo ./configure --enable-threads --enable-symbols --prefix=/usr/lib/aolserver4 --exec-prefix=/usr/lib/aolserver4 --with-tcl=/usr/lib/tcl8.4
    sudo make
    sudo make install-aol
  6. Install TclLib
    cd /usr/local/src
    sudo wget http://kent.dl.sourceforge.net/sourceforge/tcllib/tcllib-1.10.tar.gz
    sudo tar xvzf tcllib-1.10.tar.gz
    cd tcllib-1.10
    sudo ./configure --prefix=/usr/lib/aolserver4
    sudo make install
    

Download and config OpenACS 5.4

  1. Create the directory where we can install OpenACS
    adduser service
    su - service
    mkdir aolserver
    cd aolserver
  2. Copy the two config files aolserver.nsadmin and nsadmin.tcl there:
    wget http://www.davidam.com/debian/aolserver.nsadmin
    wget http://www.davidam.com/debian/nsadmin.tcl
  3. Change nsadmin to service
    mv aolserver.nsadmin aolserver.service
    mv nsadmin.tcl service.tcl
    
    sed -i "s/nsadmin/service/g" aolserver.service service.tcl
    
  4. Download OpenACS from cvs
    cvs -z3 -d :pserver:anonymous@cvs.openacs.org:/cvsroot co -r oacs-5-4 openacs-4
    mv openacs-4 service 
    chmod 774 aolserver.service
    

     # create log directory (if needed)

     

    mkdir service/log 
  5. Start AOLserver
    ./aolserver.service start
    Some minutes after that, it must be running on http://localhost:8000

Installing OpenACS on Mac OS X

Created by OpenACS community, last modified by Gustaf Neumann 26 May 2021, at 12:18 PM

See one of these:

Should you decide to install OpenACS from source using general en:openacs-system-install instructions, refer to these notes for changes:

Installing PostgreSQL

OS X conventions

On Mac OS X type sudo su - to become root.

Use curl -L -O instead of wget

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. Note: if you're installing PG on an Intel Mac, you'll need to install 8.x; 7.4.x won't compile because of a lack of "native spinlock support" -- and this is something that the PG maintainers aren't inclined to fix. See this. PG 8.0.x installs fine, as does PG 8.1 or 8.2.

Creating postgres user

Do this instead:

First make sure the gids and uids below are available (change them if they are not). To list taken uids and gids:

nireport / /groups name gid | grep "[0-9][0-9][0-9]"
nireport / /users name uid | grep "[0-9][0-9][0-9]"

Now you can install the users

sudo niutil -create / /groups/web
sudo niutil -createprop / /groups/web gid 201
sudo niutil -create / /users/postgres
sudo niutil -createprop / /users/postgres gid 201
sudo niutil -createprop / /users/postgres uid 502
sudo niutil -createprop / /users/postgres home /usr/local/pgsql
sudo niutil -create / /users/$OPENACS_SERVICE_NAME
sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME gid  201
sudo niutil -createprop / /users/$OPENACS_SERVICE_NAME uid 201
mkdir -p /usr/local/pgsql
chown -R postgres:web /usr/local/pgsql /usr/local/src/postgresql-7.4.7
chmod 750 /usr/local/pgsql

Compile and install PostgreSQL

If you're using Fink:

Append --with-includes=/sw/include/ --with-libraries=/sw/lib flags to ./configure.

./configure --with-includes=/sw/include/ --with-libraries=/sw/lib

Set PostgreSQL to start on boot

cd /Library/StartupItems/
tar xfz /var/lib/aolserver/$OPENACS_SERVICE_NAME/packages/acs-core-docs/www/files/osx-postgres-startup-item.tgz

Alternatively, one can use an XML file like the following to start PostgreSQL via launchd (specifying the postgres binary directory and database directory)

For Mac OS X Tiger (10.4.*), use:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>GroupName</key>
	<string>nsadmin</string>
	<key>Label</key>
	<string>org.postgresql.PostgreSQL</string>
	<key>OnDemand</key>
	<false/>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/pg820/bin/pg_ctl</string>
		<string>-D</string>
		<string>/usr/local/pg820/data</string>
		<string>-l</string>
		<string>/usr/local/pg820/data/server.log</string>
		<string>start</string>
	</array>
	<key>ServiceDescription</key>
	<string>PostgreSQL Server</string>
	<key>UserName</key>
	<string>postgres</string>
</dict>
</plist>

For Mac OS X Leopard (10.5.*), use:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>org.postgresql.PostgreSQL</string>
	<key>UserName</key>
	<string>postgres</string>
	<key>GroupName</key>
	<string>nsadmin</string>
	<key>OnDemand</key>
	<false/>
	<key>ProgramArguments</key>
	<array>
		<string>/usr/local/pg820/bin/postmaster</string>
		<string>-D</string>
		<string>/usr/local/pg820/data</string>
		<string>-c</string>
		<string>log_connections=YES</string>
	</array>
</dict>
</plist>

Save the above files as /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist and postgres will be started automatically on the next boot of the system. One can use launchctl to start the service for testing;

 

launchctl % load /Library/LaunchDaemons/org.postgresql.PostgreSQL.plist % start org.postgresql.PostgreSQL % ^D

To get Tcl to build on Leopard or newer

for compiling under Mac OS X Leopard or newer, use the following flags to compile Tcl:

./configure --prefix=/opt/aolserver --enable-threads --disable-corefoundation --enable-symbols

 

To get tDOM to build on tiger

  1. Download and install/update to the latest version of xcode tools (version2.2) from http://developer.apple.com/tools/xcode which updates the gcc compiler.
     
  2. Then make some additional changes to the unix/CONFIG file (after modifying the unix/CONFIG file according to instructions at en:aolserver-install, uncomment:
    'CC=gcc; export CC'
  3. add a new line, somewhere after the first line:
    export CPP="/usr/bin/cpp"

When versions of AOLservers different to AOLserver 4.5 (head, including changes from Mar 22, 2008) are used, AOLserver is likely to segfault on startup due to recent changes in the Mac OS X System libraries. To avoid this, use

ulimit -n 256

in the startup script (don't use unlimited).

Dynamic Object Types and Attributes

Created by Malte Sussdorff, last modified by Gustaf Neumann 26 May 2021, at 12:17 PM

The goal of this page is to come up with a generic specification for an OpenACS core package that allows us to create object types using a WebUI and assign attributes to it. Furthermore, using this interface it should be possible to extend any other existing object type and seamlessly have it work in the respective pages without many changes needed.

 At the moment three different approaches exist to tackle (part) of this problem. This needs to be modified so we only get one version out of it. The three approaches are:

 AMS

ams is used by contacts as its primary storage for attributes. It's primary focus is to easily extend existing object types with attributes.

AMS stores the additional attributes in a meta table system from which it retrieves the values again. This allows flexibility as you can reuse attributes easily and you do not have to create database statements when you want to extend and object type. Additionally you do not need one table per object type and you are not limited by the number of rows a table can have as a maximum.

Dynamic Types

Dynamic Types is used by project manager to enhance the tasks and the project attributes. It is furthermore used in custom applications by cognovís, Solution Grove and xarg Ltd. 

(DAVEB) In general, Lee and I also want to support,

  • Multiple storage models (generic, type-specific table)
  • Defining forms for multiple objects on one "page"
  • Defining forms that are not associated with an object

So I think we have the same ideas. This is where I think the form definition framework needs to be separate from the object type, so we can define a form and where the data goes, whether it is one object, multiple objects, or no object. We definitely should extend, and improve the existing acs_attributes table and features to support what we need. 

Dynfields

Dynfields (formerly known as flexbase) is the dynamic attribute system used by ]po[ (formerly known as Project/Open) and based of AMS while trying to get the good things from dynamic types in it as well. 

XoDynfields

This package is based on the xotcl object relational mapping and adds the the ability to create objects with dynamic slots. This also figures out multi-values and uses a relational database table for the storage of the multi-values (so not serialized in the id column).

The reason for this is that we need to run queries against the multi values on a regular basis like "show me all persons that are have the following car", where car is a multivalue (as persons can have more than one car, albeit with todays gazoline prices ....).

If we instantiate all persons from the database upon server start, how quick is XoTCL in searching for objects where a slot has a certain value, even if multi-valued. Additionally the question is, if I can quickly search for objects whose slot is a specific other object (assume car was not a multiple choice value, but multi-valued reference to the car class).

Storage

The attribute definition should be strored in AMS (AMS or ACS? DAVEB) attributes and the object types should be acs object types to make it easier and reuse existing functionality. Once we agree on a single system, the need for extension of ams_attributes tables done by the exisiting packages won't be needed anymore, as we could generically extend ams_attributes.

As for the attributes itself, we have two storage options. BOTH should be implemented and defined in the Attribute generation where it is actually stored.

Metadata Storage

 This is the way AMS stores it's data. You have ams tables that hold the attributes and depending on the settings of the attribute the options (if multiple choice) or the plain value. Additionally support for address and telephone number object type exists. As you can see this actually allows a hierarchy of object types (an object type can exist out of multiple other object types and not only the ones provided by the database).

Plus

 

  • On the plus side is it's flexibility (no need to make changes to the database tables) and the ability to use subtypes.
  • Additionally you can quickly add and remove options from a multiple choice attribute.

 

Minus

 

  • A major drawback of this approach is the fact that the metadata tables can grow very large if you store all attributes in them (although in our CRM settings this so far was not an issue, knock on wood).
  • Additionally adding the attributes into database selects can take it's time (as the stored PL/SQL functions to retrieve an attribute are slower than just querying a field in a database table). On the other hand, if used with the caching mechanisms provided in AMS and using template::multirow::sort instead of having listbuilder sort in the database, things get considerably sped up.

 

Table( extension)s

Dynamic Types stores the attributes in the object_types table as defined in acs_object_types. Alternatively you could specify a different table to use for the storing of the attribute, although this will delute one of the main benefits of DT, the fast access to the data.

Plus

See AMS minus 

Minus 

See AMS plus :-). 

 

API

The api should provide you with procedures to

 

  • Create a new object type
  • Extend an existing object type with attributes
  • For each attribute let you define where you want to store it and of what type the attribute is
  • Choose the widget for displaying the attribute
  • Retrieve the attributes value both in Tcl and pl/sql
  • Extend ad_from and template::list so that it automatically allows you to display all attributes
  • Support pages / ams_lists, to limit the display in ad_form and template::list to the attributes in the list
  • Save all attributes of an object_type at once (needed when we deal with subtypes)
  • Support for alternative storage areas for subtypes. E.g. postal-addresses is stored in the postal_address table. Same for ]po[ attributes.
  • Support for external storage areas. Especially in the corporate world they have their own applications storing data. Instead of synchronizing it manually, have acs-attributes use the external storage.

Pages

A page in the context here (and please change it if you have a better idea) is what AMS calls lists. It allows you to group multiple attributes per object type so they can be entered in one go. As an example in contacts you can use pages for each group a person (object_type) belongs in, so depending on the group membership, only certain attributes can be edited or displayed. Additionally permissions can be granted on a page basis, therefore allowing only admins to enter admin relevant data. Though in contacts we do have need to provide permissions on a per page/object level (e.g all users can edit their own data except for attributes xyz stored in the pages abc), I don't think this is useful in a general way.

A second use case are projects, where you can have additional attributes depending on the project type. Combined with workflow this gives you a powerful tool where you can have a project undergo various stages and in each stage other attributes are relevant to be filled out, though the project itself is never losing the value of one of it's attributes in the process.

Furthermore, pages should support headings and allow the setting of required and default values for attributes (so the required tag and the default value can differ for an attribute, depending on which page it is used).

Additionally we should think about support for using display, template::list and form templates for each page, so we could modify how a page of attributes is displayed to a user.

Last but not least, we might want to have pages support display and editing of attributes from multiple object_types on the same page.

User Interface

A user interface needs to exist so you can easily create a new object type and add attributes to existing object types. Furthermore support for creating pages needs to be there so you can limit the number of attributes displayed in a form/list and define the order in which they are displayed (form_entry_order, form_display_order, list_display_order, default_list_sort_order).

Template::list

Listbuilder would need to change so we could (optional setting in page) allow the user to define which elements of a page he wants to have in his list. Furthermore, the sort order needs to take into account that we might have to sort by an attribute that is stored in metadata storage, so we would have to sort the list e.g.with template::list::sort. Last but not least, to make it easy for users, we should not have to rewrite every template::list statement to allow the display of additional attributes, so dynamic attribute support should hopefully come out of the box. Okay, this might just be too much of a goal, especially taking into account that lists usually combine multiple object types into one.

ad_form

ad_form would need to be amended so it supports pages, meaning if called with a page name it will display all the attribute of the page. This is in addition to any elements already defined on the page, though for obvious reasons it should not display the same page name twice. If called with multiple pages, display the attributes of each page, beginning with the first in the list and making sure that you are not displaying a page twice. This is useful if you have in contacts a person in multiple groups (which relates to multiple pages) but you want to edit the attributes of all the pages of the groups he is a member in at the same time 

Cookbook

Created by Dave Bauer, last modified by Gustaf Neumann 26 May 2021, at 12:10 PM

The OpenACS Cookbook. This is the place to link OpenACS tips and tricks, code fragments, etc.

Accessing LTI services from OpenACS

Created by Gustaf Neumann, last modified by Gustaf Neumann 02 May 2021, at 12:35 PM

The package xooauth supports the use of OpenACS as “Tool Consumer” via LTI. This integration is in regular use at WU for integrating BigBlueButton, Zoom and Jupyter inside the learning platform of the university.

The package implements Basic LTI which is a common denominator for most LTI „Tool Providers“. This package can be used to launch requests from a community (learning) environment (e.g. OpenACS, DotLRN) to some external service (Tool provider) via plain HTTP calls. The service is typically used via an iframe or via window (LTI property “presentation_document_target”).

The LTI interface requires in a first step to register the external tool by providing the following information

  • launch_url: URL to which the LTI Launch request is to be sent
  • oauth_consumer_key: identifies which application is making the request
  • shared_secret: key used for singing the request

In general, this information can be provided via the OpenACS configuration file, or it can be be programmatically hardwired in a web-page via calls to the provided API. The relevant section in the configuration OpenACS configuration file might look like the following:

    ns_section ns/server/$server/lti {
        #
        # Common information for the tool consumer instance
        #
        ns_param tool_consumer_info_product_family_code "LEARN"
        ns_param tool_consumer_instance_guid  "learn.wu.ac.at"
        ns_param tool_consumer_instance_name  "WU Wien"
    }

    ns_section ns/server/$server/lti/bbb {
        ns_param launch_url         "https://demo.bigbluebutton.org/lti/rooms/messages/blti"
        ns_param oauth_consumer_key "bbb"
        ns_param shared_secret      "..."
    }


Once this is configured, one can create a launch button e.g. in an xowiki page via the includelet "launch-bigbluebutton" like in the following example

    Join Online Session via BigBlueButton: {{launch-bigbluebutton}}

When the interface should be used outside the xowiki environment, one can use the API like in the following example:

#
# Create LTI object
#
set lti [::xo::lti::LTI new \
        -launch_url         https://demo.bigbluebutton.org/lti/rooms/messages/blti \
        -oauth_consumer_key "bbb" \
        -shared_secret      "..." ]
set d [$lti form_render]
$lti destroy
#
# Render the form button
#
set HTML [subst {
      <button class="btn btn-primary" title="Click to join"
       type="submit" form="[dict get $d form_name]">Join Meeting</button>
       [dict get $d HTML]
}]

First an LTI object is created, based on the three essential parameters described above, A call to "form_render" returns a dict containing the HTML form and form names. The last command provides the markup for a launch button with a bootstrap styling.

The xooauth package provided pre-configured subclasses of ::xo::lti::LTI for big blue button (::xo::lti::BBB), Zoom (::xo::lti::Zoom) and Jupyter (::xo::lti::Jupyter). These subclasses will pick up the configured parameters from the configuration file and provide means for application specific configurations.

 

How to tune cache sizes

Created by Gustaf Neumann, last modified by Gustaf Neumann 03 Feb 2021, at 10:22 AM

OpenACS maintains many caches, which can be adjusted by different means depending on the version of OpenACS. Most important is the setting of the sizes via configuration files or package parameters (see e.g. [[https://github.com/openacs/openacs-core/blob/master/packages/acs-tcl/tcl/community-core-init.tcl#L1|acs-tcl/tcl/community-core-init.tcl]).

But what are good sizes? For managing the caches, using the NaviServer module nsstats is recommended. This module consists of a single file and is therefore easy installable,  but note that the newest features of the newest versions require often recent versions of NaviServer as well. To be on the safe side, use the nsstats version contained in the modules tar file for every release version of NaviServer (see e.g. NaviServer releases). The install script naviserver-openacs installs nsstats automatically under /admin.

The nsstats module provides among many other things an overview of the used caches with various usage statistics.

Cache overview

If one clicks on a single cache, a detail view is provided. The newest version of the detail view of a cache in nsstats contains now as well estimates for a good cache size. Useful cache entries are entries which were reused at least once. So, when a cache with 1MB size has e.g. a utilization of 50%, and only half of the used entries are reused, then effectively, the calculation suggests that 250KB + 10% are sufficient.

The only memory waste are actually the entries in the cache without any reuse, since the cache size is a max-size, the space which is not used does not cost memory.

The graphic shows, that only 5% of the size of the cache at openacs.org are actually useful, less than 2% has a reuse of 5 or better. Certainly, the reading are only useful after running the server for a while.

Detail view

Another dimension for cache tuning is cache partitioning as supported in OpenACS 5.10, which is important for highly busy sites in case the cache lock times go up. More about this later.

 

 

Naming Conventions

Created by Rocael Hernández Rizzardini, last modified by Héctor Romojaro 27 Jan 2021, at 03:47 PM

Files

  • Use always lowercase: file.tcl
  • Separate names with dash “-“:  my-file.tcl
  • Use English for naming (at least if you plan to contribute to the community)
  • Use generic names, such as:
    • my-page-add-edit.tcl
    • my-page-delete.tcl
    • index.tcl
  • Follow the object-action naming convention
    • my-page-delete.tcl
    • NOT delete-my-page.tcl

Procedures (Tcl functions)

  • Usually in lowercase (only in proc callbacks or service contracts you will use TheFirstLetterOfEachWord as uppercase)
  • Separate words with “_”: my_proc
  • Use names that indicate what the proc does, usually not too long
    • my_package::user::add_to_class
  • Always use namespaces
    • The namespace must be the same as the package-key, just that with “_” if applies
      • If package-key is: my-package
      • Then: my_package::add_user
    • Follow the package_key::object::action convention, use
      • my_package::user::add_to_class
      • NOT my_package::add_to_class::user
    • If you have only one action on users you might also use:
      • my_package::add_user_to_class

SQL Statements

  • Lowercase
  • Separate words with "_": select_users_in_class
  • Use names that indicate what the SQL statement does, or what it returns
    • db_list list_of_unregistered_user_ids {}
    • db_1row user_info {}
    • db_dml update_user_biography {}
  • Preferably, in db_multirow calls, keep your statement name the same as the multirow name
  • For PL/SQL look here

SQL constraints

  • Read the document behind the link
  • All constraints have to be named
  • The naming convention for constraints is as follows:
    • Primary Key: tablename_pk (acs_mail_lite_queue_pk)
    • Unique: tablename_columnname1_columnname2_un
    • Foreign Key: tablename_columnname_fk ( acs_mail_lite_queue_pck_fk)
    • Check: tablename_column_name_ck (acs_mail_lite_co_qu_use_sender_p_ck)
  • Column names can be abbreviated (e.g. pck instead of package_id)

Variables

  • Lowercase
  • Separate words with "_": user_id
  • Use names that indicate what the variable contains. If this matches with a database column, use the same name as used for the column in the database.
  • Use the following conventions for variables containing
    • IDs: Append "_id" at the end, like "user_id"
    • Booleans: Append "_p" at the end, like "employee_p" to define if the user is an employee
    • Arrays: Append "_arr" at the end, like "employee_arr". This way you can immediately detect arrays in the code. 

Package Parameters

  • Use camel case, start with uppercase character
  • Example "IndexRedirectUrl"

Contacts Lite

Created by Gustaf Neumann, last modified by Gustaf Neumann 23 Jan 2021, at 01:07 AM

Package Specification Summary for Package: contacts-lite

Summary:
Description: This package is unknown (not available at this site)
Maturity: 0
This package depends on: None
Packages that depend on contacts-lite: None
Package parameters: None

Bug Tracker Summary for Package: contacts-lite

Open Bugs: 0
All Tracked Issues: 2
Latest Bug Opened: This package has no open bugs.
Latest Bug Fixed: 2021-01-23 Expressions like {value {<i>$contact_info</i>}}} do not work.
Top Bug Submitters: Maurizio Martignano (2)
Top Bug Fixers: Gustaf Neumann (2)

Code Metrics Summary for Package: contacts-lite

# Tcl Procs 0
# Tcl Lines 0
# Tcl Blank Lines 1
# Tcl Comment Lines 0
# Automated Tests 0
# Stored Procedures PG: 0 ORA: 0
# SQL Lines PG: 0 (blank 1 comments 0) ORA: 0 (blank 1 comments 0)
# ADP pages 0
# ADP lines 0
# Include pages (contacts-lite/lib/) 0
# Documentation pages 0
# Documentation lines 0
Browse Source Not installed
Github Repository: https://github.com/openacs/contacts-lite/tree/oacs-5-10

 

 

SQL - XQL

Created by Malte Sussdorff, last modified by Poor Yorick 27 Oct 2020, at 01:35 PM

By convention, OpenACS stores all its SQL code in .xql files, which facilitates support for OpenACS on multiple databases.  Though this adds an extra burden to the development, please adhere to this convention.

  • Keep SQL scripts out of .tcl or .adp files, unless they conform to SQL99.  See details below.
  • Assign a name to each db_statement.  see Naming Conventions.
  • Database-specific SQL statements, i.e. statements not conforming to SQL99, belongs in a -database.xql file:
    • select content_item__new() => content-item-postgresql.xql
    • select item_id from content_items => content-item.xql
  • Do not spread pieces of an SQL statement into multiple places, e.g. inline in Tcl, generic .xql, database-specific .xql.
  • If in doubt, be conservative and add SQL scripts into the database-specific file of the database you are working with.
  • Format each SQL script properly.  E.g. break each statement into multiple lines as appropriate to make it more readable.  See code-formatting

To make changes to a .xql file take effect, reload the file.

As an exception to the rule about keeping SQL out of Tcl scripts, pieces of an SQL script that is dynamically generated may be placed in a Tcl script if they conform to the SQL 99 standard.  This is often the case for "where_clause" of listbuilder.

 

Creation of tables in PostgreSQL:

  • Do not use the "SERIAL" datatype.  SERIAL is an ugly hack meant to make it easier to port Sybase scripts to PostgreSQL.  We have a standard way of defining integer primary keys and giving values to them: Integer with a sequence.
  • When creating a sequence use the CREATE VIEW hack so sequence queries can be shared between PG and Oracle without any extra work.  Otherwise, do the work to make the sequence work both in -oracle.xql as well as -postgresql.xql

How to manage/upgrade CKEditor versions

Created by Gustaf Neumann, last modified by Gustaf Neumann 27 Aug 2020, at 07:46 PM

As of this writing (oacs-5-10), OpenACS supports CKEditor 4, which is kept as a separate package.

Per default, the CKEditor is used via CDN. If you prefer to install CKEditor locally, then go to /acs-admin/, click on the "Richtext CKeditor4" package on the link under site-wide admin. The pages show, how CKEditor is currently used, and offer a link for downloading and installing (gzipped, brotli if available).

Since upgrading to a newer version of CKEditor means often a different user experience.So, many site are reluctant to upgrade automatically to different versions. In these cases, one can configure the version of CKEditor in the NaviServer configuration file.

    ns_section ns/server/${server}/acs/richtext-ckeditor
           ns_param CKEditorVersion   4.14.1
           ns_param CKEditorPackage   standard
           ns_param CKFinderURL       /acs-content-repository/ckfinder
           ns_param StandardPlugins   uploadimage

A version specified in the configuration file override version numbers in the richtext package. When there is no such entry, then the version from the package is used.

 

Next Page
previous June 2024
Sun Mon Tue Wed Thu Fri Sat
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 1 2 3 4 5 6

Popular tags

17 , 5.10 , 5.10.0 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map , hstore
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org