Index: openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml,v
diff -u -N -r1.52 -r1.53
--- openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 27 Jun 2015 17:19:13 -0000 1.52
+++ openacs-4/packages/acs-core-docs/www/xml/developers-guide/tutorial-advanced.xml 7 Aug 2017 23:47:54 -0000 1.53
@@ -12,14 +12,14 @@
This tutorial covers topics which are not essential to
creating a minimal working package. Each section can be used
independently of all of the others; all sections assume that
- you've completed the basic tutorial.
+ you've completed the basic tutorial.
Write the Requirements and Design Specs
Before you get started you should make yourself familiar with
the tags that are used to write your documentation. For tips on
editing SGML files in emacs, see .
- It's time to document. For the tutorial we'll use
+ It's time to document. For the tutorial we'll use
pre-written documentation. When creating a package
from scratch, start by copying the documentation template from
/var/lib/aolserver/openacs-dev/packages/acs-core-docs/xml/docs/xml/package-documentation-template.xml
@@ -82,7 +82,7 @@
Add the new package to CVS
Before you do any more work, make sure that your work is
protected by putting it all into cvs. The cvs
- add command is not recursive, so you'll have to
+ add command is not recursive, so you'll have to
traverse the directory tree manually and add as you go. (More on
CVS)
@@ -181,7 +181,7 @@
In this problem set you will familiarise yourself with the templating system in openacs. This will be achieved through customising an existing edit-this-page application template.
- Before proceeding, it is strongly advised to read the templating documentation on your openacs installation (http://localhost:8000/doc/acs-templating). The documentation lists the special tags available for ADP files.
+ Before proceeding, it is strongly advised to read the templating documentation on your OpenACS installation (http://localhost:8000/doc/acs-templating). The documentation lists the special tags available for ADP files.
@@ -327,7 +327,7 @@
Who Wrote This and When
- This problem set was originally written by Nick Carroll in August 2004 for the University of Sydney Course EBUS5002.
+ This problem set was originally written by Nick Carroll in August 2004 for the University of Sydney Course EBUS5002.
This material is copyright 2004 by Nick Carroll. It may be copied, reused, and modified, provided credit is given to the original author.
($Id$)
@@ -336,7 +336,7 @@
@@ -1434,7 +1434,7 @@
} ...
- You must not give your your form the same name that your page has. Otherwise HTMLArea won't load.
+ You must not give your your form the same name that your page has. Otherwise HTMLArea won't load.
Convert your textarea widget to a richtext widget and enable htmlarea.
The htmlarea_p
-flag can be used to prevent
@@ -1455,7 +1455,7 @@
ad_form
or you will have problems
displaying the content or handling the data manipulation correctly.
Depending on the data model of your package you either support a content format
- or don't. If you don't you can assume "text/html"
or
+ or don't. If you don't you can assume "text/html"
or
"text/richtext"
or "text/enhanced"
.
The relevant parts in your ad_form
definition are the
switches -new_data
, -edit_data
,
@@ -1474,7 +1474,7 @@
Now the correct values for my_input_field_2
and
format
are passed to the -new_data
and
- -edit_data
blocks which don't need to get touched.
+ -edit_data
blocks which don't need to get touched.
To make HTMLArea optional per package instance define a string parameter
UseWysiwygP
which defaults 0
for your
package using the APM.
@@ -1494,34 +1494,34 @@
All you need now is a configuration page where the user can change this setting. Create a
configure.tcl
file:
- ad_page_contract {
+ad_page_contract {
- This page allows a faq admin to change the UseWysiwygP setting
+ This page allows a faq admin to change the UseWysiwygP setting
- } {
- {return_url ""}
- }
+} {
+ {return_url ""}
+}
- set title "Should we support WYSIWYG?"
- set context [list $title]
+ set title "Should we support WYSIWYG?"
+ set context [list $title]
- set use_wysiwyg_p
+ set use_wysiwyg_p
- ad_form -name categories_mode -form {
- {enabled_p:text(radio)
- {label "Enable WYSIWYG"}
- {options {{Yes t} {No f}}}
- {value $use_wysiwyg_p}
- }
- {return_url:text(hidden) {value $return_url}}
- {submit:text(submit) {label "Change"}}
- } -on_submit {
- parameter::set_value -parameter "UseWysiwygP" -value $enabled_p
- if {$return_url ne ""} {
- ns_returnredirect $return_url
- }
- }
-
+ ad_form -name categories_mode -form {
+ {enabled_p:text(radio)
+ {label "Enable WYSIWYG"}
+ {options {{Yes t} {No f}}}
+ {value $use_wysiwyg_p}
+ }
+ {return_url:text(hidden) {value $return_url}}
+ {submit:text(submit) {label "Change"}}
+ } -on_submit {
+ parameter::set_value -parameter "UseWysiwygP" -value $enabled_p
+ if {$return_url ne ""} {
+ ns_returnredirect $return_url
+ }
+ }
+
In the corresponding ADP file write
<master>
@@ -1555,7 +1555,7 @@
Under the Manage section, click on Parameters
- It's fairly self-explanatory at this point. Create the
+ It's fairly self-explanatory at this point. Create the
parameters you want, and then access them in your code using the
parameter::get procedure.
@@ -1596,7 +1596,7 @@
legacy.
- Modify config.tcl to accomodate the legacy database, and to
+ Modify config.tcl to accommodate the legacy database, and to
ensure that the legacy database is not used for standard
OpenACS queries:
ns_section ns/db/pools
@@ -1659,7 +1659,7 @@
db_
API calls. For
example, suppose there is a table called "foo" in the legacy
system, with a field "bar". List "bar" for all records with
- this tcl file:
+ this Tcl file:
db_foreach -dbn legacy get_bar_query {
select bar from foo
limit 10
@@ -1674,7 +1674,7 @@
Future Topics
- How to enforce security so that users can't
+ How to enforce security so that users can't
change other users records
How to use the content management tables so that
@@ -1683,9 +1683,9 @@
Builder HTML forms.
How to make your package searchable with OpenFTS/Oracle
How to prepare pagelets for inclusion in other pages
- How and when to put procedures in a tcl procedure library
+ How and when to put procedures in a Tcl procedure library
More on ad_form - data validation, other stuff.
- (plan to draw from Jon Griffin's doc)
+ (plan to draw from Jon Griffin's doc)
partialquery in xql
How to use the html/text entry widget to get the
"does this look right" confirm page