Index: openacs-4/packages/acs-authentication/www/doc/acs-authentication.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/www/doc/acs-authentication.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-authentication/www/doc/acs-authentication.adp 3 Sep 2024 15:37:30 -0000 1.2 +++ openacs-4/packages/acs-authentication/www/doc/acs-authentication.adp 21 Nov 2025 15:23:42 -0000 1.3 @@ -91,21 +91,17 @@ PAM):
Configure your Authority (RADIUS server, etc) to supply XML files to the URLs IncrementalURL and SnapshotURL. A typical set of -incremental file record looks like:
<?xml version="1.0" encoding="ISO-8859-1"?>
+incremental file record looks like:
+<?xml version="1.0" encoding="ISO-8859-1"?>
<enterprise>
<properties>
<datasource>FOO</datasource>
Index: openacs-4/packages/acs-authentication/www/doc/ext-auth-ldap-install.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-authentication/www/doc/ext-auth-ldap-install.adp,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/acs-authentication/www/doc/ext-auth-ldap-install.adp 3 Sep 2024 15:37:30 -0000 1.7
+++ openacs-4/packages/acs-authentication/www/doc/ext-auth-ldap-install.adp 21 Nov 2025 15:23:42 -0000 1.8
@@ -15,18 +15,18 @@
Using
LDAP/Active Directory with OpenACS
-ToDo: Add/verify information on on-demand
-sync, account registration, and batch synchronization. Add section
-on ldapsearch.
-Overview. You do not want to make users
-remember yet another password and username. If you can avoid it you
-do not want to store their passwords either. This document should
-help you set your system up so your users can seamlessly log in to
-your OpenACS instance using the password they are accustomed to
-using for other things at your institution.
-Background. The original OpenACS LDAP
-implementation (which has been deprecated by this package) treated
-the LDAP server as another data store similar to Oracle or
+ToDo: Add/verify information on
+on-demand sync, account registration, and batch synchronization.
+Add section on ldapsearch.
+Overview. You do not want to make
+users remember yet another password and username. If you can avoid
+it you do not want to store their passwords either. This document
+should help you set your system up so your users can seamlessly log
+in to your OpenACS instance using the password they are accustomed
+to using for other things at your institution.
+Background. The original OpenACS
+LDAP implementation (which has been deprecated by this package)
+treated the LDAP server as another data store similar to Oracle or
Postgresql. It opened a connection using a privileged account and
read or stored an encrypted password for the user in question. This
password was independent of the user's operating system or
@@ -50,8 +50,8 @@
Installing AOLserver LDAP support -(openldap and nsldap). Install openldap and nsldap -using the document Malte created Next, modify your config.tcl +(openldap and nsldap). Install openldap and +nsldap using the document Malte created Next, modify your config.tcl file as directed in the nsldap README. Here's what the relevant additions should look like:
# LDAP authentication
@@ -80,11 +80,12 @@
[10/Jan/2006:11:11:08][22553.3076437088][-main-] Debug: nsldap: Registering LDAPCheckPools (600)
-auth-ldap + driver installation. Next, -visit the software installation page in acs-admin and install the -auth-ldap package. Your OpenACS installation now has all the code -required to authenticate using nsldap, so now you need to configure -your site's authentication to take advantage of it. To add the +auth-ldap + driver +installation. Next, visit the software +installation page in acs-admin and install the auth-ldap package. +Your OpenACS installation now has all the code required to +authenticate using nsldap, so now you need to configure your +site's authentication to take advantage of it. To add the authentication driver to your OpenACS instance, go to: Main Site, Site-Wide Administration, and then AuthenticationHere's some sample Authentication Driver values:Name=Active Directory, Short @@ -134,19 +135,19 @@
-Troubleshooting. If you're having -trouble figuring out some the values for the ldapm, see this useful -page on setting up Active Directory integration with +Troubleshooting. If you're +having trouble figuring out some the values for the ldapm, see this +useful page on setting up Active Directory integration with Bugzilla. It explains how distinguished names are defined in Active Directory, and how to test that you have the correct values for connectivity and base DN using the OpenLDAP command-line utility ldapsearch.John had an issue where nsldap was not loading because AOLServer couldn't find the openldap client libraries, but he was able to fix it by adding the openldap libraries to his LD_LIBRARY_PATH (e.g. /usr/local/openldap/lib)
-Credits. Thanks to Malte Sussdorf for his -help and the Laboratory of Computer Science at Massachusetts General -Hospital for underwriting this work.
+Credits. Thanks to Malte Sussdorf +for his help and the Laboratory of Computer Science at Massachusetts +General Hospital for underwriting this work.-Add PAM support to AOLserver. OpenACS -supports PAM support via the PAM AOLserver module. PAM is system of -modular support, and can provide local (unix password), RADIUS, -LDAP (more information), and other forms of +Add PAM support to +AOLserver. OpenACS supports PAM support via +the PAM AOLserver module. PAM is system of modular support, and can +provide local (unix password), RADIUS, LDAP (more information), and other forms of authentication. Note that due to security issues, the AOLserver PAM module cannot be used for local password authentication.
Compile
and install ns_pam. Download the tarball to /tmp.
Debian users: first do apt-get
install libpam-dev
-
[root\@yourserver root]#cd /usr/local/src/aolserver++[root\@yourserver root]#cd /usr/local/src/aolserver[root\@yourserver aolserver]#tar xzf /tmp/ns_pam-0.1.tar.gz[root\@yourserver aolserver]#cd nspam[root\@yourserver nspam]#make@@ -55,18 +56,19 @@
-Set up a PAM domain. A PAM domain is a set -of rules for granting privileges based on other programs. Each -instance of AOLserver uses a domain; different aolserver instances -can use the same domain but one AOLserver instance cannot use two -domains. The domain describes which intermediate programs will be -used to check permissions. You may need to install software to -perform new types of authentication.
RADIUS in PAM.
Untar the pam_radius tarball and compile and install. (more -information)
[root\@yourserver root]#cd /usr/local/src/+information)+[root\@yourserver root]#cd /usr/local/src/[root\@yourserver src]#tar xf /tmp/pam_radius-1.3.16.tar[root\@yourserver src]#cd pam_radius-1.3.16[root\@yourserver pam_radius-1.3.16]#make@@ -89,12 +91,17 @@ domain configuration lines into a single file,/etc/pam.conf. On Red Hat, create the file/etc/pam.d/service0with these -contents:auth sufficient /lib/security/pam_radius_auth.so +contents:+auth sufficient /lib/security/pam_radius_auth.so
Modify the AOLserver configuration file to use this PAM domain. -Edit the line
ns_param PamDomain "service0"So that the value of the parameter matches the name (just the -filename, not the fully pathed name) of the domain file in
/etc/pam.d/+Edit the line
+ns_param PamDomain "service0"
+So that the value of the parameter matches the name (just the +filename, not the fully pathed name) of the domain file in
+/etc/pam.d/ +
@@ -104,7 +111,9 @@
Modify the AOLserver configuration file to support ns_pam.
In /var/lib/aolserver/service0/etc/config.tcl, enable
-the nspam module by uncommenting this line:
ns_param nspam ${bindir}/nspam.so
+the nspam module by uncommenting this line:
+ns_param nspam ${bindir}/nspam.so
+
@@ -113,9 +122,9 @@ restart the server.
Create an OpenACS -authority. OpenACS supports multiple authentication -authorities. The OpenACS server itself is the "Local -Authority," used by default.
Browse to the authentication administration page, http://yourserver/acs-admin/auth/
. Create and name an
authority (in the sitewide admin UI)
Set Authentication to PAM.
If the PAM domain defines a password command, you can set Password
Index: openacs-4/packages/acs-automated-testing/www/doc/requirements.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/requirements.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/acs-automated-testing/www/doc/requirements.adp 3 Sep 2024 15:37:30 -0000 1.5
+++ openacs-4/packages/acs-automated-testing/www/doc/requirements.adp 21 Nov 2025 15:28:03 -0000 1.6
@@ -109,7 +109,8 @@
with the standard category package. It uses an internal,
single-dimension category field. Should this eventually get
extended, a more complete list of categories to implement could
-be:
Testing Mode +be:+Testing Mode Regression Smoke Stress Index: openacs-4/packages/acs-automated-testing/www/doc/usage.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-automated-testing/www/doc/usage.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-automated-testing/www/doc/usage.adp 3 Sep 2024 15:37:30 -0000 1.5 +++ openacs-4/packages/acs-automated-testing/www/doc/usage.adp 21 Nov 2025 15:28:03 -0000 1.6 @@ -34,12 +34,17 @@
Suppose the first test server is service1. Set up a dedicated user and automated install script.
To run automated testing automatically each time the server is -rebuilt, add this to /home/service1/install/install.tcl:
set do_tclapi_testing "yes"+rebuilt, add this to /home/service1/install/install.tcl:
+ set do_tclapi_testing "yes" +
Get the results of the automated tests dumped where the master server can see them - in this example, the same directory as above, /var/log/openacs-install, by adding -this to install.tcl (requires 5.1):
set install_xml_file "/var/lib/aolserver/service0/packages/acs-core-docs/www/files/install-autotest.xml"
This will copy in the file install-autotest.xml:
<?xml version="1.0"?> +this to install.tcl (requires 5.1):+ set install_xml_file "/var/lib/aolserver/service0/packages/acs-core-docs/www/files/install-autotest.xml" +This will copy in the file install-autotest.xml:
+<?xml version="1.0"?> <!-- This is an install.xml which can be used to configure servers for reporting their automated test results. Requires acs-automated-testing 5.1.0b2 or better --> @@ -57,7 +62,8 @@
To enable the 'rebuild server' link, edit the file -/usr/local/bin/rebuild-server.sh:
#!/bin/sh +/usr/local/bin/rebuild-server.sh:+#!/bin/sh # script to trigger a server rebuild # hard-coding the valid server names here for some minimal security @@ -69,9 +75,12 @@ exit;; esac -sudo /home/$1/install/install.sh 2>&1and allow the master user to +sudo /home/$1/install/install.sh 2>&1 +
and allow the master user to execute this file as root (this is a limitation of the automatic -install script, which must be root). In /etc/sudoers, include a line:
master ALL = NOPASSWD: /usr/local/bin/rebuild-server.sh+install script, which must be root). In /etc/sudoers, include a line:
+master ALL = NOPASSWD: /usr/local/bin/rebuild-server.sh +
To load the XML parser, download and untar the distribution. Load the class package lib/xmlparserv2.jar into Oracle from a shell prompt:
-$ loadjava -user user/password xmlparserv2.jar+
+$ loadjava -user user/password xmlparserv2.jar +
Finally, load the SQLJ files in packages/acs-content-repository/java:
-$ loadjava -user user/password -resolve *.sqlj+
+$ loadjava -user user/password -resolve *.sqlj +
Installation of the data model and API should now be complete.
If you experience errors on a UNIX system, check the following:
+
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /ora8/m01/app/oracle/product/8.1.6)
(ENVS = LD_LIBRARY_PATH=/ora8/m01/app/oracle/product/8.1.6/lib:/usr/lib:/lib:/usr/openwin/lib:/ora8/m01/app/oracle/product/8.1.6/ctx/lib)
(PROGRAM = extproc)
)
-If your searches are still failing even after following these + +
If your searches are still failing even after following these instructions, try a simple test case to determine whether the problem has something to do with the -content repository data model itself.
Create a simple table to hold some test documents:
-create table cr_test_documents ( ++create table cr_test_documents ( doc_id integer primary key, author varchar2(30), format varchar2(30), title varchar2(256), doc blob -);+); +
Create an Intermedia preference to specify INSO filtering:
-begin
+
+begin
ctx_ddl.create_preference
(
preference_name => 'CONTENT_FILTER_PREF',
object_name => 'INSO_FILTER'
- );
+ );
+
If this preference has already been created, this step will cause an error that you can ignore.
Create an Intermedia index on the test table with INSO filtering:
-create index cr_test_documents_idx on cr_test_documents ( doc )
+
+create index cr_test_documents_idx on cr_test_documents ( doc )
indextype is ctxsys.context
- parameters ('FILTER content_filter_pref' );
+ parameters ('FILTER content_filter_pref' );
+
You can use SQL*Loader to load some documents into the test table. First create a control file named cr-test-docs.ctl:
-load data ++load data INFILE 'cr-test-docs.data' INTO TABLE cr_test_documents APPEND @@ -48,21 +55,26 @@ format, title, ext_fname FILLER CHAR(80), - doc LOBFILE(ext_fname) TERMINATED BY EOF)+ doc LOBFILE(ext_fname) TERMINATED BY EOF) +
Copy any number of documents (Microsoft Word, PDF, text, HTML, etc.) to the filesystem of your database server. Create a data file with an entry for each document you would like to load. This is simply a comma-separated text file:
-word, Simple Story,sample-docs/simple.doc, -excel, Simple Spreadsheet,sample-docs/simple.xls+
+word, Simple Story,sample-docs/simple.doc, +excel, Simple Spreadsheet,sample-docs/simple.xls +
Load the documents from the command line:
-$ sqlldr userid=cms/cms control=cr-test-docs.ctl log=cr-test-docs.log ++$ sqlldr userid=cms/cms control=cr-test-docs.ctl log=cr-test-docs.log SQL*Loader: Release 8.1.6.2.0 - Production on Thu Nov 9 13:36:56 2000 (c) Copyright 1999 Oracle Corporation. All rights reserved. -Commit point reached - logical record count 2+Commit point reached - logical record count 2 +
Once the documents have been loaded, rebuild the index and run some test queries:
@@ -79,5 +91,5 @@ karlg\@arsdigita.comFirst of all, let's get some terminology out of the way. Columns of a table are referred to as attributes in @@ -75,7 +76,8 @@ Title - want versions Description - want versions Task Number - do NOT want versions - + +
You will have two tables: one with versioned attributes, and one without versioned attributes.
@@ -102,7 +104,8 @@ description varchar(4000) ); - + +Unversioned portion:
create table pm_tasks (
@@ -116,7 +119,8 @@
task_number
integer
)
-
+
+
One thing you have to be careful of when creating these tables
is that there are no columns that have the same names as any of the
columns in the cr_items and cr_revisions
@@ -154,7 +158,8 @@
'task_id', -- id_column
'content_revision.revision_name'
);
-
+
+
You then need to add in all the attributes, so that the content repository can do some magic things behind the scenes. The content repository doesn't know about what's inside of the @@ -195,7 +200,8 @@ null, -- default value 'numeric' -- column_spec ); - + +
Side effect: once you've created the content type, the content repository creates a view for you called @@ -290,7 +296,8 @@ null, null, 'integer constraint pm_project_comp_fk references organizations' -); +); + I have no idea of whether or not that is supposed to be legal, but I believe it works. Jun was the one who originally talked about Index: openacs-4/packages/acs-content-repository/www/doc/api/extlink.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/extlink.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/www/doc/api/extlink.adp 3 Sep 2024 15:37:31 -0000 1.5 +++ openacs-4/packages/acs-content-repository/www/doc/api/extlink.adp 21 Nov 2025 15:28:03 -0000 1.6 @@ -15,17 +15,18 @@
-
External links are references to content pages on other web sites. They provide the basis for maintaining a hierarchy of "bookmarks" that may be managed in a manner analogous to other content items. In particular, external links may be tagged with keywords and related to the site's own content items.
-
-
-
Content folders contain related content items and allow content managers to group content as they see fit. Within a content folder, content items must have unique names since this is where they will @@ -25,10 +25,11 @@ from "/movies/terminator, "/movies/terminator2" respectively).
-
-
-
Content items store the overview of the content published on a website. The actual content is stored in content revisions. It is implemented this way so that there can be multiple versions of the @@ -26,10 +26,11 @@ exist at least one content revision pointing to this item with the actual review content.
-
-
-Last Modified: $Id: item.html,v 1.6.2.1 2019/08/10 18:09:52 gustafn -Exp $ +Last Modified: $Id: item.html,v 1.8 2024/09/11 06:15:47 gustafn Exp +$ Index: openacs-4/packages/acs-content-repository/www/doc/api/keyword.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/www/doc/api/keyword.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-content-repository/www/doc/api/keyword.adp 3 Sep 2024 15:37:31 -0000 1.5 +++ openacs-4/packages/acs-content-repository/www/doc/api/keyword.adp 21 Nov 2025 15:28:03 -0000 1.6 @@ -15,15 +15,16 @@
-
Keyword cassify a content_item. For example: If you have some press releases about dogs. You might want assigning the Keyword dog to every single content_item.
-
-
-
Permissions can be set to allow certain users certain things. - They can be compared with the Unix filesystem permission: read, write ...
-
-
-
Content revisions contain the data for content items. There is a many to one relationship between content revisions and content items. There is at most one "live" revision for every content item though. For example, there may be 5 revisions of the review for the movie "Terminator," yet only one of these may be live on the website at a given time.
-
-
-
Symlinks are pointers to items within the content repository. They are simply used to create links between content items.
-
-
-
Templates are a special class of text objects that are used for specifying the layout of a content item. They may be mapped to content types, meaning that every item of that type will display using that template unless a specific item overrides the default by mapping to a template itself.
-
-
-
This package is used to manipulate content types and attributes Content types represent the different kind of content displayed on a website. All content items should subclass a content type.
-
-
| Author: | Karl Goldstein | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-webmaster\@dev.arsdigita.com + +webmaster\@dev.arsdigita.com Last Modified: $Id: developer-support-example.html,v 1.2 2017/08/07 23:47:56 gustafn Exp $ Index: openacs-4/packages/acs-developer-support/www/doc/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-developer-support/www/doc/index.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-developer-support/www/doc/index.adp 3 Sep 2024 15:37:33 -0000 1.5 +++ openacs-4/packages/acs-developer-support/www/doc/index.adp 21 Nov 2025 15:28:03 -0000 1.6 @@ -54,7 +54,9 @@ grokking the error log to see what's wrong with your page? Use the ds_comment routine instead: -+ds_comment "Foo is $foo" Your comment will show up at the bottom of the page, beneath the Developer Information Index: openacs-4/packages/acs-lang/www/doc/i18n-design.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/doc/i18n-design.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-lang/www/doc/i18n-design.adp 3 Sep 2024 15:37:33 -0000 1.8 +++ openacs-4/packages/acs-lang/www/doc/i18n-design.adp 21 Nov 2025 15:28:03 -0000 1.9 @@ -517,19 +517,22 @@ (i.e. do nothing special):+ds_comment "Foo is $foo" +
<trn>Hello</trn>
-
+
+
Example 2: Assign the key key hello to the text string
Hello and display the translated string in the user's
preferred language:
<trn key="hello">Hello</trn>
-
+
+
Example 3: Specify that Bonjour needs to be registered as
the French translation for the key hello (in addition to
displaying the translation in the user's preferred language):
<trn key="hello" lang="fr">Bonjour</trn>
-
+
+
Example 4: Register the string and display it in the preferred
language of the current user. Note that the possible values for the
type parameter are determined by what has been
@@ -540,10 +543,12 @@
current web page.
<trn key="hello" type="user">Hello</trn>
- Example 5: Translates the string once at template compile time, + + Example 5: Translates the string once at template compile time, using the effective local of the page.
<trn key="hello" static>Hello</trn>
-
+
+
VII. Data Model DiscussionInternationalizing the Data ModelsIndex: openacs-4/packages/acs-messaging/www/doc/design.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-messaging/www/doc/design.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-messaging/www/doc/design.adp 3 Sep 2024 15:37:33 -0000 1.6 +++ openacs-4/packages/acs-messaging/www/doc/design.adp 21 Nov 2025 15:28:03 -0000 1.7 @@ -57,8 +57,7 @@ ACS Messaging provides theacs_messages_all
view as
the primary mechanism for message queries.
-+ + | + + | @@ -198,7 +202,8 @@ \@body\@ </blockquote> - |
+
+
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+" +
db_multirow item
news_items_select {
select news_item_id, title
@@ -296,7 +302,8 @@
and ( expiration_date is null
or expiration_date > sysdate)
}
- + +
<ul> @@ -329,7 +336,8 @@ security in place). </ul> -
packages/acs-core-ui/www/pvt/alerts.tclpackages/acs-core-ui/www/pvt/alerts.adpad_page_contract {
- \@cvs-id $Id: migration.html,v 1.4.2.2 2022/04/27 12:22:29 gustafn Exp $
+ \@cvs-id $Id: migration.html,v 1.6 2024/09/11 06:15:48 gustafn Exp $
} {
}
ad_page_contract {
- \@cvs-id $Id: migration.html,v 1.4.2.2 2022/04/27 12:22:29 gustafn Exp $
+ \@cvs-id $Id: migration.html,v 1.6 2024/09/11 06:15:48 gustafn Exp $
} {
} -properties {
header:onevalue
@@ -456,7 +464,8 @@
"
}
}
- + +
set discussion_forum_alert_p 0
if { [db_table_exists "bboard_email_alerts"] } {
@@ -501,7 +510,8 @@
}
- + +
@@ -554,7 +564,8 @@ </blockquote> </if> -
set form_vars [export_vars -form {var1 var2}]
-
+
+
The ADP will simply refer to the form_vars
variable:
@@ -91,7 +93,8 @@
\@form_vars\@ <!-- WRONG! Needs noquote -->
... real form stuff ...
</form>
-
+
+
This will no longer work as intended because form_vars
@@ -106,7 +109,8 @@
\@form_vars;noquote\@
... real form stuff ...
</form>
-
+
+
Snippets of HTML produced by Tcl code, aka
widgets
@@ -153,12 +157,14 @@
<h1>\@heading\@</h1>
<slave>
</body>
- slave: The exact same problems when the include statement
passes some text. Here is an example:
+
+
slave:
<master>
<property name="title">\@title\@</property>
<property name="heading">\@title\@</property>
...
-
+
+
The obvious intention of the master is to allow its slave templates
@@ -213,20 +219,23 @@
<property name="doc(title)">\@title;literal\@</property>
<property name="heading">\@title;literal\@</property>
...
-
+
+
Including template:
Here an include statement is used to include an HTML form widget
@@ -244,7 +253,8 @@
<include src="user-kick-form" id=\@kicked_id\@ reason=\@default_reason\@>
-
Included template:
+
+
Included template:
<form action="do-kick" method=POST>
Kick user \@name\@.<br>
Reason: <textarea name=reason>\@reason\@</textarea><br>
<input type="submit" value="Kick">
</form>
-
+
+
Including template, sans over-quoting:
<include src="user-kick-form" id=\@kicked_id;literal\@ reason=\@default_reason;literal\@>
-
+
+
Upgrade Overview.
Index: openacs-4/packages/acs-templating/www/doc/noquote.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/noquote.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-templating/www/doc/noquote.adp 3 Sep 2024 15:37:35 -0000 1.6
+++ openacs-4/packages/acs-templating/www/doc/noquote.adp 21 Nov 2025 15:28:03 -0000 1.7
@@ -137,8 +137,8 @@
templating still supports all the ADP features, including embedding
Tcl code in the template. Thus instead of referring to the multirow
variable with the \@forums.name\@ variable substitutions, we use
-<%= [ns_quotehtml \@forums.name\@] %>. This
-works correctly, but obviously breaks the abstraction barrier
+<%= [ns_quotehtml \@forums.name\@] %>.
+This works correctly, but obviously breaks the abstraction barrier
between ADP and Tcl syntaxes. The practical result of breaking the
abstraction is that every occurrence of Tcl code in an ADP template
will have to be painstakingly reviewed and converted once ADPs
@@ -152,7 +152,7 @@
radical but much more robust solution to the problem.
At the time when we came to realize how serious the quoting deficiencies of ACS 4.0 were, we were about two weeks away from the release of a project for the German Bank. There was simply no time Index: openacs-4/packages/acs-templating/www/doc/requirements.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/requirements.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/requirements.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/requirements.adp 21 Nov 2025 15:28:03 -0000 1.7 @@ -10,9 +10,10 @@ by Karl Goldstein , -Christian Brechbühler -, -Peter Su +Christian +Brechbühler +, Peter +Su , and Yonatan Feldman
Programmers and designers should only have to learn a single +10.0 A Common Solution
Programmers and designers should only have to learn a single system that serves as a UI substrate for all the functionally specific modules in the toolkit.
The system should not make any assumptions about how pages @@ -164,8 +164,8 @@
Programmers should be able to specify the page properties +20.0 Separation of Code and +Layout
Programmers should be able to specify the page properties independently of the markup used to present the data in the template. Markup authors should be to able to write templates that reference the page properties without further intervention from the @@ -177,26 +177,26 @@ be available through the standard ACS documentation facilities.
There should be provisions so that pages can be broken into discrete components to simplify maintenance of the markup code and allow for reuse in different contexts. Examples of common page components include a navigation bar, a search box, or a section of a report or story.
There should be a way to define one or more standard master templates used by most pages on a site, so that changes to the overall look and feel of a site can be made in one place.
Given that the same data may be presented in many different ways, there should be a general mechanism for selecting a specific presentation (including file format, layout, character set and language) for each page request, depending on characteristics such as user preference, location, browser type and/or device.
Programmers should be able to develop template specifications +60.0 Usability
Programmers should be able to develop template specifications using their standard tools for writing and maintaining code on the server. HTML authors should be able to access information about template specifications and work on templates remotely without @@ -207,15 +207,13 @@
The Templating System must be releasable as part of the ACS and +100.0 Distribution
The Templating System must be releasable as part of the ACS and
as a separate product. When distributed as part of the ACS all
documentation, examples, and source code must follow ACS standards.
This includes but is not limited to: using the db_api,
using ad_page_contract appropriately.
The Templating System must not cause any performance problems to +110.0 Performance
The Templating System must not cause any performance problems to a site. It must be fast and efficient, and it must not slow down page load speed by more than 10% versus a Tcl page with inline HTML.
@@ -228,7 +226,7 @@
- -110.0 -Performance
The Templating System must not cause any performance problems to +110.0 Performance
The Templating System must not cause any performance problems to a site. It must be fast and efficient, and it must not slow down page load speed by more than 10% versus a Tcl page with inline HTML.
@@ -83,7 +82,8 @@ end cut -d" " -f3 $i-1| cut -c2-| tr \? 0 > $i-2 end - + + The three resulting files, ending in -2, contain 18000 numbers, for 2 runs * 200 tries * 3 pages * 15 stages.- Group and sort times. The time one stage of processing @@ -145,7 +145,8 @@ (cd $i; gnuplot ../distrib.gplt > $i.gif) echo $i done. end - + +
IV. Results
- Index: openacs-4/packages/acs-templating/www/doc/TclDocs/doc__util.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/TclDocs/doc__util.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/TclDocs/doc__util.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/TclDocs/doc__util.adp 21 Nov 2025 15:28:03 -0000 1.6 @@ -19,7 +19,7 @@ Private Methods:
Using the Form Manager.
+ + + + + + + + + +
Description Data Template Compiled
TemplateOutput - A simple form + A simple form View View View View - A form with button groups + A form with button groups View +Simple
Gridded ++Simple
Gridded ++Simple
Gridded +- A form with Select widgets + A form with Select widgets View View View View - Custom validation of a request - - A form with the Date widget + Custom validation of a request View View View Inline Error +Message +Sitewide Error Page Valid +Request + A form with the Date widget View View View View - Editing: several pages in one + Editing: several pages in one View View View View - A form with a custom confirmation page + A form with a custom confirmation page View +Submit
Confirm ++Submit
Confirm +View - A form with display/edit modes + A form with display/edit modes View View View View - -A form with multiple submit buttons + A form with multiple submit buttons View View View View
- +
+
+ \ No newline at end of file Index: openacs-4/packages/acs-templating/www/doc/exercise/ats-for-designers.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/exercise/ats-for-designers.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/acs-templating/www/doc/exercise/ats-for-designers.adp 3 Sep 2024 15:37:35 -0000 1.8 +++ openacs-4/packages/acs-templating/www/doc/exercise/ats-for-designers.adp 21 Nov 2025 15:28:03 -0000 1.9 @@ -77,8 +77,7 @@ appearing once in the .adp file, are cycled repeatedly to show multiple sets of information when displayed inlist-and-var-sample.acs; example: -- <multiple name="your_multirow"> +@@ -285,7 +284,7 @@ book listing begins at a rownumber determined by the Tcl file code (check the .dat page)<multiple name="your_multirow"> <tr><td>\@your_multirow.first_names\@ \@your_multirow.last_name\@ </td> </tr> </multiple>- add navigation links to the address book so that users can move forward or back between row listings, or jump to the beginning or -end of their address book
+end of their address book
- each link should set the url variable that determines the first row of the set to be displayed
- the links should only appear when necessary, that is, a link pointing towards the next set of rows should not appear if the user Index: openacs-4/packages/acs-templating/www/doc/gen/proc-doc.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/gen/proc-doc.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/acs-templating/www/doc/gen/proc-doc.adp 3 Sep 2024 15:37:35 -0000 1.9 +++ openacs-4/packages/acs-templating/www/doc/gen/proc-doc.adp 21 Nov 2025 15:28:04 -0000 1.10 @@ -16,7 +16,6 @@ divisions has its own text marker(s). In the end, your Tcl file should look something like this:
- [------------------------------------------------------] [------ ignored text at beginning of file -----------] [------------------------------------------------------] @@ -114,8 +113,7 @@ will be marked as required if it is a parameter, or display no information if it is an option.For example: the fictional procedure grant_permission might be -preceded by these comments:
-# \@public grant_permission +preceded by these comments:+ +# \@public grant_permission # checks for whether or not a user has the privilege # to manipulate an object in a specific manner Index: openacs-4/packages/acs-templating/www/doc/guide/data.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/data.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/guide/data.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/guide/data.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -50,20 +50,24 @@The query procedure may be used as a convenient way to store the result of a one-row database query into an array:
-query name onerow " ++query name onerow " select first_name, last_name from users where - user_id = 123"+ user_id = 123" +You can embed references to column values of a onerow data source in a template with simple variable substitution.
onelist
onelist data sources are implemented by creating a Tcl list:
-set names [list "Walter" "Fred" "Susy" "Frieda"]++set names [list "Walter" "Fred" "Susy" "Frieda"] +The query procedure may be used to set a onelist data source based on a one-column database query:
query name onevalue "select name from users"@@ -74,18 +78,22 @@ multirow data sources are not represented by a single Tcl data structure. As such the templating system includes a special API for constructing and manipulating them. -multirow create cars make model year ++multirow create cars make model year multirow append cars "Toyota" "Camry" "1996" -multirow append cars "Volvo" "960" "1995"+multirow append cars "Volvo" "960" "1995" +The query procedure may be used as a convenient way to store the result of a multi-row, multi-column database query into a multirow data source:
-query name multirow " ++query name multirow " select make, model, year from - cars"+ cars" +You can iterate over a multirow data source in a template with the multiple tag.
Index: openacs-4/packages/acs-templating/www/doc/guide/document.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/document.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/guide/document.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/guide/document.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -39,23 +39,26 @@ # \@input birthday date birthdate w/ "MONTH DD YYYY" format # \@input gender radio # either "m" for male or "f" for female -A few formatting guidelines:
- all datasources (onevalues, onelists, multilists, multirows) are documented with the datasource directive, their name, the type -of datasource, and then necessary comments:
# \@datasource name <type of +of datasource, and then necessary comments:# \@datasource name <type of datasource> comments -- multirow datasources are followed with a series of column -directives, column names, and associated explanations:
# \@column namecomments -- forms are documented with the data_input directive, and are +
# \@column namecomments
+# \@data_input name form
+type of input widgets, and necessary comments:# \@data_input name form
comments # \@input name <type of form
entry> comments
Possible form entry types include text (or textentry), date,
-checkbox, radio, select, multiselect and textboxOnce the templates have been enabled, the designer can simply visit the URL from which the page will be served, substituting acs with the dat extension.
Index: openacs-4/packages/acs-templating/www/doc/guide/forms.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/forms.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/guide/forms.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/guide/forms.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -23,15 +23,19 @@ use it in the survey package.Use the form create command to initialize a form:
-form create add_user+
+form create add_user +
See the form API for optional parameters to this command.
Once the form is created, use the element create command to add elements to it:
-element create add_user first_name -datatype text \
+
+element create add_user first_name -datatype text \
-label "First Name" \
- -html { size 30 }
+ -html { size 30 }
+
In auto-generated forms, elements appear in the order they were created. See the element API for optional parameters to this command.
@@ -40,7 +44,8 @@ submission is currently being processed. If a request is being processed, then form elements may need to be initialized with their appropriate values. -if { [template::form is_request add_user] } {
+
+if { [template::form is_request add_user] } {
set db [ns_db gethandle]
@@ -50,7 +55,8 @@
ns_db releasehandle $db
template::element set_properties add_user user_id -value $user_id
-}
+}
+
This may also be done using the value option to element create. In this case the value is set separately to avoid the additional database query during a submission.
Index: openacs-4/packages/acs-templating/www/doc/guide/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/master.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/guide/master.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/guide/master.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -49,7 +49,8 @@A master template to implement the page layout shown above would have this basic structure:
-<html><body><table width="100%" cellspacing="0" cellpadding="0" border="0"> ++</table></body></html> ++<html><body><table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><!-- LOGO --></td> @@ -68,7 +69,8 @@ <tr><td colspan="3"><!-- FOOTER --></td></tr> -</table></body></html>
The only special feature of this master template is the slave tag, which marks the location of the content area. Note that the content is inserted into the master template as a @@ -80,13 +82,15 @@
A page template must include a master tag to specify that its output should be enclosed in a master template:
-<master src="/templates/master"> ++... ++<master src="/templates/master"> <!--Begin layout of page content--> <h3>\@title\@</h3> <p>by \@name\@</p> <p><b>\@byline\@</b>: \@text</p> -...
The master tag may be included anywhere in the body of the page template, although usually the top of the file is the best location for it.
@@ -97,26 +101,32 @@ user's name on every page to indicate that the site has been personalized. The Tcl script associated with the master template would include code like this: -+set user_name [your_procedure_to_get_the_current_user_name]
+set user_name [your_procedure_to_get_the_current_user_name] +
The template would have a section like this:
-<if \@user_name\@ nil> ++</else> ++<if \@user_name\@ nil> <a href="/register.acs">Register Now!</a> </if> <else> \@user_name\@ (<a href="/signout.acs">Sign Out</a>) -</else>
As mentioned above, in many cases the dynamic elements of the master template depend on whatever is appearing in the content area for a particular request. The property tag may be used in the page template to specify values that should be passed to the master template:
-<master src="/templates/master"> ++... ++<master src="/templates/master"> <property name="title">\@title\@</property> <!--Begin layout of page content--> -...
In this case, the property tag establishes title as a data source for the master template. Properties are set as regular Tcl variables prior to executing the Index: openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 3 Sep 2024 15:37:35 -0000 1.7 +++ openacs-4/packages/acs-templating/www/doc/guide/wizard-procs-doc.adp 21 Nov 2025 15:28:04 -0000 1.8 @@ -10,15 +10,17 @@
ex.
+
+ex.
template::wizard create -action "wizard" -name my_wizard -params {
my_param1 my_param2
} -steps {
1 -label "Step 1" -url "step1"
2 -label "Step 2" -url "step2"
3 -label "Step 3" -url "step3"
}
- ex.
+
+ex.
<include src="\@wizard:current_url\@">
-
+
+
template::wizard submit myform -buttons {back next}
-
+
+
On the last step you may want to use the following on step3.tcl
template::wizard submit myform -buttons {back next}
-
+
+
The following values are acceptable for the buttons: back, next and
finish. Back buttons are not rendered if the step is the first
step, like wise next buttons are not displayed if its the last
@@ -75,7 +81,8 @@
\@wizard.label\@ <br>
</else>
</multiple>
-
+
+
Use "template::wizard set_param myparam_name" to set it. Normally you place this in the steps of the wizard where the @@ -96,23 +103,27 @@ 2 -label "Step 2" -url "step2" 3 -label "Step 3" -url "step3" } - + + You can access my_param1 and/or my_param2 on any step1.tcl, step2.tcl, or step3.tcl by using "ad_page_contract" or "template::wizard get_param" -
ex.
+
+ex.
ad_page_contract {
gets the wizard params
} {
my_param1
my_param2
}
-
+
+
or
set my_param1 [template::wizard get_param my_param1]
set my_param2 [template::wizard get_param my_param2]
-
+
+
Note: "template::wizard get_param" has the advantage of
getting the param value during the response time. What does this
mean? It will properly get the current value of the param which was
@@ -131,7 +142,8 @@
\@wizard.label\@ <br>
</a>
</multiple>
-
+
+
Note: that this is not a very wise thing to do especially if the
latter steps will depend on the inputs from the earlier steps. You
can however do checking on each step.Use the wizard create command to initialize a wizard, declaring any wizard state variables in the -params option:
-wizard create make_sandwich -params { sandwich_id }
+
+wizard create make_sandwich -params { sandwich_id }
+
See the wizard API for optional parameters to this command.
Once the wizard is created, use the wizard create command to add steps to it:
-wizard add make_sandwich -label "Add the lettuce" -url "add-lettuce"+
+wizard add make_sandwich -label "Add the lettuce" -url "add-lettuce" +
In auto-generated wizards, the wizard steps appear in the order they were created. See the wizard API for optional parameters to this command. Alternatively, wizard steps can be created in the wizard create statement with the -steps option:
-wizard create make_sandwich -action "eat-sandwich.acs?sandwich_id=$sandwich_id" -params {
+
+wizard create make_sandwich -action "eat-sandwich.acs?sandwich_id=$sandwich_id" -params {
sandwich_id
} -steps {
1 -label "Add Meat" -url "add-meat" -repeat
@@ -46,7 +51,8 @@
statement. At any point in the wizard process, a state
variable's value can be updated using the wizard
set_param command.
-# check to see if a sandwich_id has been passed in by the wizard
+
+# check to see if a sandwich_id has been passed in by the wizard
request set_param sandwich_id -datatype integer -optional
# if not, then set the sandwich_id
@@ -66,18 +72,22 @@
In the .tcl file:
if { [wizard exists] } {
+In the .tcl file:
+if { [wizard exists] } {
wizard submit form_name -buttons {
{ previous "Back" } repeat { next "Continue" } { finish Save }
}
} else {
element create form_name submit -datatype keyword -widget submit
}
-In the .adp file:
<formtemplate id=\@form_name\@ style=wizard>
+In the .adp file:
+<formtemplate id=\@form_name\@ style=wizard> +
if { [wizard exists] } {
+
+if { [wizard exists] } {
# go to the next wizard step
wizard forward
} else {
Index: openacs-4/packages/acs-templating/www/doc/tagref/formgroup.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/formgroup.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/acs-templating/www/doc/tagref/formgroup.adp 3 Sep 2024 15:37:35 -0000 1.6
+++ openacs-4/packages/acs-templating/www/doc/tagref/formgroup.adp 21 Nov 2025 15:28:04 -0000 1.7
@@ -46,7 +46,9 @@
attributes in the input tags of each radio button or
check box in the group. Although possible, newer browser security
features such as CSP discourage the use of inline Javascript event
-handlers.<formgroup id="services" style="background-color:white;">
+handlers.
+<formgroup id="services" style="background-color:white;">
+
See the formtemplate and formwidget tags for more information on writing the body of a dynamic form Index: openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/tagref/formtemplate.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -38,7 +38,9 @@
If the body of the formtemplate is empty, the templating system will generate a form automatically based on the list of elements created in the Tcl script associated with the -template:
<formtemplate id="add_user" style="standard"></formtemplate>
The style attribute is optional. It may be used to +template:
+<formtemplate id="add_user" style="standard"></formtemplate> +
The style attribute is optional. It may be used to select a style template from /ats/templates/forms for determining the layout of the auto-generated form. The default style is defined in the DefaultFormStyle parameter on the @@ -49,7 +51,9 @@ formtemplate tag. The system will include all such attributes in the form tag of the rendered HTML form. Although possible, newer browser security features such as CSP -discourage the use of inline Javascript event handlers.
<formtemplate id="add_user" style="background-color:white;">
This will work for both autogenerated and explicitly formatted +discourage the use of inline Javascript event handlers.
+<formtemplate id="add_user" style="background-color:white;"> +
This will work for both autogenerated and explicitly formatted forms.
See the formwidget and formgroup tags for more Index: openacs-4/packages/acs-templating/www/doc/tagref/formwidget.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/formwidget.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/tagref/formwidget.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/tagref/formwidget.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -43,7 +43,9 @@ attributes in the input or select tag of the rendered HTML form. Although possible, newer browser security features such as CSP discourage the use of inline Javascript event -handlers.
<formwidget id="cc_number" style="background-color:white;">+handlers.
+<formwidget id="cc_number" style="background-color:white;"> +
See the formtemplate and formgroup tags for more information on writing the body of a dynamic form template.
<table> ++<table> <multiple name="shirts"> @@ -63,7 +64,8 @@ </multiple> -</table>+</table> +
[Note: Carsten added this feature during the Berlin Hackaton 2004-02-14]
The delimiter attribute will add a string after each Index: openacs-4/packages/acs-templating/www/doc/tagref/if.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/if.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/tagref/if.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/tagref/if.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -87,7 +87,8 @@
Any of these operators can be prefixed with
not to invert the outcome.
<if \@x\@ eq 5>True</if> ++<if \@x\@ eq 5>True</if> <if \@x\@ eq "Greta">True</if> <if \@x\@ ne 5>True</if> @@ -115,7 +116,8 @@ <if \@s\@ not nil>True</if> <if \@z\@ in "Greta" "Fred" "Sam">True</if> -<if \@z\@ not in "Greta" "Fred" "Sam">True</if>+<if \@z\@ not in "Greta" "Fred" "Sam">True</if> +
Any legal variables that may be referenced in the template may @@ -126,7 +128,8 @@ grouped correctly:
<if \@datasource.variable\@ eq "blue sky">
<td bgcolor="#0000ff">
- </if>
+ </if>
+
The elseif tag may be used following an if block to specify an alternate conditional template section.
@@ -138,7 +141,8 @@
</elseif>
<else>
<td bgcolor="#ffffff">
- </else>
+ </else>
+
The else tag may be used following an if block to specify an alternate template section when a condition is @@ -148,7 +152,8 @@ </if> <else> <td bgcolor="#ffffff"> - </else> + </else> +
Compound expressions can be created by combining terms with the and and or keywords, as illustrated above. Any number of statements may be connected in this fashion. There is Index: openacs-4/packages/acs-templating/www/doc/tagref/include.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/include.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/tagref/include.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/tagref/include.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -17,10 +17,14 @@ in the same fashion as any other dynamic template; the developer may associate data sources and other properties to them.
<include src="subtemplate" attribute="value" ...>+
+<include src="subtemplate" attribute="value" ...> +or -
<include src="/packages/packagename/www/lib/subtemplate" attribute="value" ...>+
+<include src="/packages/packagename/www/lib/subtemplate" attribute="value" ...> +
<include src="subtemplate" source_id="\@source_id\@" ...>+
+<include src="subtemplate" source_id="\@source_id\@" ...> +Note that passing an html string to a subtemplate via
\@var\@ will result in passing an html-escaped and
internationalized string. To prevent this, use
@@ -39,7 +45,9 @@
scope of the subtemplate. This variant is necessary for e.g.
passing a Tcl array like a templating datasource. To pass e.g.
users by reference, use this notation:
-<include src="subtemplate" &persons="users" ...>+
+<include src="subtemplate" &persons="users" ...> +This is particularly useful for passing onerow and multirow data sourced. Note that in this case, if the subtemplate modifies the value this will affect the includer. When the datasource in the Index: openacs-4/packages/acs-templating/www/doc/tagref/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/index.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/tagref/index.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/tagref/index.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -45,7 +45,8 @@ crowding the start and end tags like so:
<td><if %x% eq 5><img src="five.gif"></if> <else><img src="notfive.gif"></else></td> -
Note that this should not be done unless necessary, since it + +
Note that this should not be done unless necessary, since it reduces the legibility of the template to others who need to edit the template later.
The list tag is used to repeat a template section for each item in a list data source.
<list name="datasource">
+
+<list name="datasource">
<if \@datasource:rownum\@ ne \@datasource:rowcount\@>
\@datasource:item\@ :
@@ -24,7 +25,8 @@
<b>\@datasource:item\@</b>
</else>
-</list>
+</list>
+
The special variable Index: openacs-4/packages/acs-templating/www/doc/tagref/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/master.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/tagref/master.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/tagref/master.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -19,7 +19,8 @@ slave tag in the master template.
<master src="master"> ++<master src="master"> <property name="title">My Home Page</property> Index: openacs-4/packages/acs-templating/www/doc/tagref/multiple.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/multiple.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/tagref/multiple.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/tagref/multiple.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -17,7 +17,8 @@ with each repetition to the values of the next row of the data source.Usage
-<!-- Begin multiple layout, i.e. <table> --> ++<!-- Begin multiple layout, i.e. <table> --> <table> <multiple name="users"> @@ -42,7 +43,8 @@ </multiple> <!-- End multiple layout, i.e. </table> --> -</table>+</table> +Notes
<master src="master"> +Index: openacs-4/packages/acs-templating/www/doc/tagref/switch.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/switch.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/www/doc/tagref/switch.adp 3 Sep 2024 15:37:35 -0000 1.6 +++ openacs-4/packages/acs-templating/www/doc/tagref/switch.adp 21 Nov 2025 15:28:04 -0000 1.7 @@ -72,7 +72,8 @@ with spaces correctly results in an error.+<master src="master"> <property name="title">My Home Page</property> <p>Welcome to my home page!</p>x ... Index: openacs-4/packages/acs-templating/www/doc/tagref/slave.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/tagref/slave.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/doc/tagref/slave.adp 3 Sep 2024 15:37:35 -0000 1.5 +++ openacs-4/packages/acs-templating/www/doc/tagref/slave.adp 21 Nov 2025 15:28:04 -0000 1.6 @@ -15,15 +15,17 @@The slave tag is used to mark the position in the master template where the body template should be inserted.
Usage
-<html> ++<html> <head><title>\@title\@</title></head> <body> <h2>\@title\@</h2> <hr> <blockquote> <slave> </blockquote> -<hr>+<hr> +Note(s)
<case "{blue sky}">
<td bgcolor="#0000ff">
- </case>
+ </case>
+
Simple variables are referenced by surrounding the variable name with "commercial at" (\@) signs:
-<!-- simple variables --> -<b><i>\@first_name\@ \@last_name\@</b></i>+
+<!-- simple variables --> +<b><i>\@first_name\@ \@last_name\@</b></i> +
When processing this template, the server will look for variables named first_name and last_name and substitute their values in the output:
-<b><i>Fred Finkel</b></i>+
+<b><i>Fred Finkel</b></i> +
The columns of a row variable are referenced by separating the data source name and column with a period:
<!-- onerow or multirow data sources --> -<b><i>\@user.first_name\@ \@user.last_name\@</b></i>+<b><i>\@user.first_name\@ \@user.last_name\@</b></i> +
An attempt to reference a variable that does not exist will cause an error message to appear in the browser.
\@publish_title\@
\@publish_body\@
\@creator_link\@
+\@publish_title\@ +
+\@publish_body\@ +
+\@creator_link\@ +
To drop an instance of the News application correctly, follow
Index: openacs-4/packages/search/www/doc/guidelines.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/doc/guidelines.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/search/www/doc/guidelines.adp 3 Sep 2024 15:37:54 -0000 1.4
+++ openacs-4/packages/search/www/doc/guidelines.adp 21 Nov 2025 15:29:29 -0000 1.5
@@ -39,8 +39,7 @@
writing concrete functions that follow the specification. For
example, the implementation of datasource for the
object type note, looks like this:
-
-ad_proc notes__datasource {
+ad_proc notes__datasource {
object_id
} {
\@author Neophytos Demetriou
@@ -65,8 +64,7 @@
file which associates the implementation with a contract name. The
implementation of FtsContentProvider for the object
type note looks like:
-
-select acs_sc_impl__new(
+select acs_sc_impl__new(
'FtsContentProvider', -- impl_contract_name
'note', -- impl_name
'notes' -- impl_owner_name
@@ -79,8 +77,7 @@
FtsContentProvider and your concrete functions.
Here's how an association between an operation and a concrete
function looks like:
-
-select acs_sc_impl_alias__new(
+select acs_sc_impl_alias__new(
'FtsContentProvider', -- impl_contract_name
'note', -- impl_name
'datasource', -- impl_operation_name
@@ -100,8 +97,7 @@
We do this by adding triggers on the table that stores the content
items of your object type. Here's how that part looks like for
note.
-
-create function notes__itrg ()
+create function notes__itrg ()
returns opaque as $$
begin
perform search_observer__enqueue(new.note_id,'INSERT');
Index: openacs-4/packages/tsearch2-driver/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/tsearch2-driver/www/doc/index.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/tsearch2-driver/www/doc/index.adp 3 Sep 2024 15:37:54 -0000 1.4
+++ openacs-4/packages/tsearch2-driver/www/doc/index.adp 21 Nov 2025 15:29:29 -0000 1.5
@@ -104,7 +104,8 @@
insert into search_observer_queue (
select my_id, now(),'INSERT' from my_table
);
-
+
+
For forums and ETP this looks like:
insert into search_observer_queue (
Index: openacs-4/packages/attachments/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attachments/www/doc/index.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/attachments/www/doc/index.adp 3 Sep 2024 15:37:35 -0000 1.4
+++ openacs-4/packages/attachments/www/doc/index.adp 21 Nov 2025 15:31:53 -0000 1.5
@@ -95,26 +95,30 @@
attachments is not properly mounted. To do this, add the following
proc to your package's API and wrap all calls to the
attachments package with it:
- ad_proc -private attachments_enabled_p {} {
+
+ ad_proc -private attachments_enabled_p {} {
set package_id [site_node_apm_integration::child_package_exists_p \
-package_key attachments
]
- }
+ }
+
1.2.3.2 Get the
attachment Url
When you want to set up the link that the user can click on to
attach something to an object, use the
attachments::add_attachment_url proc, which will return the correct
Url into the attachments package mounted under your package.
- if {$attachments_enabled_p} {
+
+ if {$attachments_enabled_p} {
if {$attach_p} {
set redirect_url [attachments::add_attachment_url \
-object_id $message_id \
-return_url $redirect_url \
-pretty_name "$subject"]
}
- }
+ }
+
forums redirects the user to the redirect_url, if the user chose
to add an attachment to their posting.
Index: openacs-4/packages/calendar/www/doc/requirements.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/calendar/www/doc/requirements.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/calendar/www/doc/requirements.adp 3 Sep 2024 15:37:36 -0000 1.5
+++ openacs-4/packages/calendar/www/doc/requirements.adp 21 Nov 2025 15:31:53 -0000 1.6
@@ -556,8 +556,8 @@
50.20.70 Provide a function to generate the
HTML for the complete calendar.
VII. Revision History
-
-
+
+
Document Revision # Action Taken, Notes When? By Whom?
@@ -577,8 +577,9 @@
0.7 Further Revisions 2000/12/06 Joshua Finkler and Gary Jin
-
+
+
+
gjin\@arsdigita.com
and smeeks\@arsdigita.com
-
Index: openacs-4/packages/categories/www/doc/design.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/categories/www/doc/design.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/categories/www/doc/design.adp 3 Sep 2024 15:37:36 -0000 1.4
+++ openacs-4/packages/categories/www/doc/design.adp 21 Nov 2025 15:31:54 -0000 1.5
@@ -202,7 +202,8 @@
Alternatively, you can include the following in your adp:
- <include src="/packages/categories/www/include/widget" object_id=\@object_id\@ package_id=\@package_id\@>
+ <include src="/packages/categories/www/include/widget" object_id=\@object_id\@ package_id=\@package_id\@>
+
In the processing part of ad_form use:
Index: openacs-4/packages/file-storage/www/doc/design.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/doc/design.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/file-storage/www/doc/design.adp 3 Sep 2024 15:37:38 -0000 1.5
+++ openacs-4/packages/file-storage/www/doc/design.adp 21 Nov 2025 15:31:54 -0000 1.6
@@ -177,95 +177,104 @@
Tcl API
-children_have_permission_p
children_have_permission_p [ -user_id user_id ] item_idprivilege
+children_have_permission_p
+children_have_permission_p [ -user_id user_id ] item_idprivilege
This procedure, given a content item and a privilege,
checks to see if there are any children of the item on which the
user does not have that privilege.
-- Switches:
-
+
- Switches:
-
-user_id (optional)
- - Parameters:
-
+
- Parameters:
-
item_id
privilege
-fs_context_bar_list
fs_context_bar_list [ -final final ] item_id
+fs_context_bar_list
+fs_context_bar_list [ -final final ] item_id
Constructs the list to be fed to ad_context_bar
appropriate for item_id. If -final is specified, that string will
be the last item in the context bar. Otherwise, the name
corresponding to item_id will be used.
-- Switches:
-
+
- Switches:
-
-final (optional)
- - Parameters:
-
+
- Parameters:
-
item_id
-fs_file_downloader
fs_file_downloader connkey
+fs_file_downloader
+fs_file_downloader connkey
Sends the requested file to the user. Note that the
path has the original file name, so the browser will have a
sensible name if you save the file. Version downloads are supported
by looking for the form variable version_id. We don't actually
check that the version_id matches the path, we just serve it up.
-- Parameters:
-
+
- Parameters:
-
conn
key
-fs_file_p
fs_file_p file_id
+fs_file_p
+fs_file_p file_id
Returns 1 if the file_id corresponds to a file in the
file-storage system. Returns 0 otherwise.
-- Parameters:
-
+
- Parameters:
-
file_id
-fs_folder_p
fs_folder_p folder_id
+fs_folder_p
+fs_folder_p folder_id
Returns 1 if the folder_id corresponds to a folder in
the file-storage system. Returns 0 otherwise.
-- Parameters:
-
+
- Parameters:
-
folder_id
-fs_get_folder_name
fs_get_folder_name folder_id
+fs_get_folder_name
+fs_get_folder_name folder_id
Returns the name of a folder.
-- Parameters:
-
+
- Parameters:
-
folder_id
-fs_root_folder
fs_root_folder [ -package_id package_id ]
Returns the root folder for the file storage system.
+fs_root_folder
+fs_root_folder [ -package_id package_id ]
+
Returns the root folder for the file storage system.
-- Switches:
-
+
- Switches:
-
-package_id (optional)
-fs_version_p
fs_version_p version_id
+fs_version_p
+fs_version_p version_id
Returns 1 if the version_id corresponds to a version in
the file-storage system. Returns 0 otherwise.
-- Parameters:
-
+
- Parameters:
-
version_id
@@ -382,19 +391,21 @@
the canonical long form of a MIME type.
XI. Authors
-- System creator:
3.x : David Hill
+- System creator:
+
+3.x : David Hill
and Aurelius Prochazka
4.x : Kevin
Scaldeferri
-
-- System owner
+
+- System owner
Kevin
Scaldeferri
- - Documentation author
+
- Documentation author
Kevin
Scaldeferri
-
-XII. Revision History
+XII. Revision History
+
Document Revision # Action Taken, Notes When? By Whom?
@@ -404,5 +415,6 @@
0.2 Revised after review by Josh 11/16/2000 Kevin Scaldeferri, Josh Finkler
-
kevin\@arsdigita.com
-
+
+
+kevin\@arsdigita.com
Index: openacs-4/packages/file-storage/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/doc/index.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/file-storage/www/doc/index.adp 3 Sep 2024 15:37:38 -0000 1.4
+++ openacs-4/packages/file-storage/www/doc/index.adp 21 Nov 2025 15:31:54 -0000 1.5
@@ -13,4 +13,5 @@
Release Notes
Please file bugs in the Bug Tracker.
-kevin\@arsdigita.com
+
+kevin\@arsdigita.com
Index: openacs-4/packages/general-comments/www/doc/design.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/general-comments/www/doc/design.adp,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/general-comments/www/doc/design.adp 3 Sep 2024 15:37:39 -0000 1.5
+++ openacs-4/packages/general-comments/www/doc/design.adp 21 Nov 2025 15:31:54 -0000 1.6
@@ -170,7 +170,7 @@
0.1 Creation 10/26/2000 Phong Nguyen
-
Last modified: $Id: design.html,v 1.3.2.1 2019/08/15 10:31:02 +
Last modified: $Id: design.html,v 1.5 2024/09/11 06:15:51 gustafn Exp $