Index: openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html,v diff -u -r1.48.2.12 -r1.48.2.13 --- openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 19 Nov 2016 09:21:53 -0000 1.48.2.12 +++ openacs-4/packages/acs-core-docs/www/eng-standards-filenaming.html 6 Jan 2017 09:18:41 -0000 1.48.2.13 @@ -14,11 +14,11 @@
For naming files that enable a specific action on an object, use this format:
object-verb.extension
-For example, the page to erase a user's portrait from the database is
+For example, the page to erase a user's portrait from the database is
/admin/users/portrait-erase.tcl
.
However, modules typically deal with only one primary type of object -
e.g.,
-the Bookmarks module deals mainly with bookmarks - and so action-type files in modules don't need to be specified by the object they act on. Example: the user pages
+the Bookmarks module deals mainly with bookmarks - and so action-type files in modules don't need to be specified by the object they act on. Example: the user pages
for the Bookmarks module live in the /bookmarks/
directory, and so there is no need to name the bookmark editing page with a redundant url: /bookmarks/bookmark-edit.tcl
. Instead, we omit the object type, and use this convention:
@@ -104,9 +104,9 @@ # www/register/user-login-2.tcl ad_page_contract { - Verify the user's password and issue the cookie. + Verify the user's password and issue the cookie. - @param user_id The user's id in users table. + @param user_id The user's id in users table. @param password_from_from The password the user entered. @param return_url What url to return to after successful login. @param persistent_cookie_p Specifies whether a cookie should be set to keep the user logged in forever. @@ -128,7 +128,7 @@ e.g.
foo:integer,multiple,trim
. In particular,multiple
andarray
are the flags that correspond to the oldad_page_variables
flags.There are new flags:
trim
,notnull
and -optional
. They do what you'd expect; values will not be +optional
. They do what you'd expect; values will not be trimmed, unless you mark them for it; empty strings are valid input, unless you specify notnull; and a specified variable will be considered required, unless you declare it optional.
ad_page_contract
can do validation for you: the flagsinteger
@@ -144,7 +144,7 @@ For shared Tcl library files, usead_library
after the file path comment. Its only argument is a doc_string in the standard (javadoc-style) format, like -ad_page_contract
. Don't forget to put the @cvs-id in +ad_page_contract
. Don't forget to put the @cvs-id in there. Here is an example of using ad_library:# tcl/wp-defs.tcl @@ -160,7 +160,7 @@-- path relative to the ACS root directory -- --- brief description of the file's purpose +-- brief description of the file's purpose -- -- author -- created @@ -206,7 +206,7 @@ resource (namely, a database handle) for an unpredictable amount of time while sending packets back to the browser, and so it should be avoided in most cases. (On the other hand, for a page that requires an -expensive database query, it's better to call +expensive database query, it's better to callad_return_top_of_page