[docs] docs - heins modified 10 files

docs at icdevgroup.org docs at icdevgroup.org
Tue Jul 8 20:13:00 EDT 2003


User:      heins
Date:      2003-07-08 19:12:59 GMT
Modified:  .        Makefile ic_ecommerce.sdf ic_howto_cvs.sdf
Modified:           icadvanced.sdf iccattut.sdf icconfig.sdf
Modified:           icdatabase.sdf icfaq.sdf ictable_editor.sdf
Modified:           ictags.sdf
Log:
* Integrate worthwhile input from Wiki into docs.

Revision  Changes    Path
1.55      +2 -2      docs/Makefile


rev 1.55, prev_rev 1.54
Index: Makefile
===================================================================
RCS file: /anon_cvs/repository/docs/Makefile,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- Makefile	30 Oct 2002 22:03:04 -0000	1.54
+++ Makefile	8 Jul 2003 19:12:58 -0000	1.55
@@ -1,4 +1,4 @@
-VERSION=4.8.6
+VERSION=4.9.3
 TARGETS=ic_ecommerce ic_howto_cvs ic_howto_forum ic_howto_qb icadvanced iccattut icconfig iccontent icdatabase icfaq icfoundation ic_i18n icprogrammer ictable_editor ictags ictemplates icupgrade
 SUFFIXES=txt html pdf pod 8
 MAXSUFFIXES=mif
@@ -9,7 +9,7 @@
 DOCDBNAME=documentation.txt
 PKGNAME=interchange-doc-$(VERSION)
 INSTALLDIR=/var/www/html/doc
-IMAGES=bullet.gif pdf.gif pod.gif rh-ic-logo.gif text.gif
+IMAGES=bullet.gif pdf.gif pod.gif iclogo.gif text.gif
 
 .SUFFIXES: .sdf .frames $(addprefix .,$(SUFFIXES))
 



1.23      +24 -23    docs/ic_ecommerce.sdf


rev 1.23, prev_rev 1.22
Index: ic_ecommerce.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/ic_ecommerce.sdf,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- ic_ecommerce.sdf	15 Jan 2003 13:49:31 -0000	1.22
+++ ic_ecommerce.sdf	8 Jul 2003 19:12:58 -0000	1.23
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: ic_ecommerce.sdf,v 1.22 2003/01/15 13:49:31 jon Exp $
+# $Id: ic_ecommerce.sdf,v 1.23 2003/07/08 19:12:58 mheins Exp $
 
 !define DOC_NAME "Interchange Ecommerce Functions"
 !define DOC_TYPE ""
 !define DOC_CODE "ic_ecommerce"
-!define DOC_VERSION substr('$Revision: 1.22 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.23 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/ic_ecommerce.html"
@@ -12,7 +12,7 @@
 
 
 
-=head1 THE ORDER PROCESS
+H1: THE ORDER PROCESS
 
 Interchange has a completely flexible order basket and checkout
 scheme. The C<foundation> demo presents a common use of this process,
@@ -41,7 +41,7 @@
 used on the page, and you may use multiple item lists if necessary.
 
 
-=head2 How to order an item
+H2: How to order an item
 
 Interchange can either use a form-based order or a link-based order to
 place an item in the shopping cart. The link-based order uses the
@@ -121,7 +121,7 @@
 I<How to set up an order button>).
 
 
-=head2 How to set up an order link
+H2: How to set up an order link
 
 On a product display page, use:
 
@@ -135,7 +135,7 @@
 Bear in mind that if you have not reached the page via a search or
 on-the-fly operation, C<[item-code]> means nothing and will cause an error.
 
-=head2 How to set up an order button
+H2: How to set up an order button
 
 Interchange can order via form submission as well. This allows you
 to order a product (or group of products) via a form button. In its
@@ -171,7 +171,7 @@
 C<[item-accessories size]> or C<[item-accessories size]> tag. See
 I<Item Attributes>.
 
-=head2 How to set up an on-the-fly item
+H2: How to set up an on-the-fly item
 
 If you enable the catalog directive I<OnFly>, setting it to the
 name of a subroutine (or possibly a UserTag) that can handle its calls, then
@@ -274,7 +274,7 @@
 >        <INPUT TYPE=submit VALUE="Order two different with a button">
 >    </FORM>
 
-=head2 Order Groups
+H2: Order Groups
 
 Interchange allows you to group items together, making a master item
 and sub-items. This can be used to delete accessories or options when
@@ -326,7 +326,7 @@
 value of C<mv_mi>. The attribute C<mv_si> is set to 0 if the item is
 a master item, and 1 if it is a sub-item.
 
-=head2 Basket display
+H2: Basket display
 
 The basket page(s) are where the items are tracked and adjusted by the
 customer. It is possible to have an unlimited number of basket pages.
@@ -379,7 +379,7 @@
 
 =back
 
-=head2 Multiple Shopping Carts
+H2: Multiple Shopping Carts
 
 Interchange allows you to define and maintain multiple shopping carts.
 One shopping cart -- main, by name -- is defined when the user session
@@ -449,7 +449,7 @@
 the use of a custom cart, see the section on I<PRODUCT PRICING> for 
 pricing methods and strategies.
 
-=head1 PRODUCT PRICING
+H1: PRODUCT PRICING
 
 Interchange maintains a price in its database for every product. The price
 field is the one required field in the product database -- it is necessary
@@ -459,7 +459,7 @@
 price at catalog configuration time. If you choose to change a directive
 that affects product pricing you must reconfigure the catalog.
 
-=head2 Simple pricing
+H2: Simple pricing
 
 The simplest method is flat pricing based on a fixed value in
 the C<products> database. If you put that price in a field named
@@ -637,7 +637,7 @@
 
 =back
 
-=head2 CommonAdjust Examples
+H2: CommonAdjust Examples
 
 Most examples below use an outboard database table named B<pricing>, but
 any valid table including the B<products> table can be used. We will refer
@@ -693,7 +693,7 @@
 to use as the default for a typical retail catalog that has items with
 colors and sizes.
 
-=head2 PriceBreaks, discounts, and PriceAdjustment
+H2: PriceBreaks, discounts, and PriceAdjustment
 
 There are several ways that Interchange can modify the price of a product during 
 normal catalog operation. Several of them require that the I<pricing.asc>
@@ -780,7 +780,7 @@
 The pricing information must always come from a database because
 of security.
 
-=head2 Item Attributes
+H2: Item Attributes
 
 Interchange allows item attributes to be set for each ordered item. This
 allows a size, color, or other modifier to be attached to a common
@@ -979,7 +979,7 @@
 order report, order receipt, or any other page containing an
 C<[item-list]>. 
 
-=head2 Product Discounts
+H2: Product Discounts
 
 Product discounts can be set upon display of any page. The discounts
 apply only to the customer receiving them, and are of one of three types:
@@ -1286,9 +1286,9 @@
     US/AZ   $0.00
 !endblock
 
-=head1 THE CHECKOUT PROCESS
+H1: THE CHECKOUT PROCESS
 
-=head2 Advanced Multi-level Order Pages
+H2: Advanced Multi-level Order Pages
 
 An unlimited number of order checking profiles can be defined with the
 I<OrderProfile> directive, or by defining order profiles in scratch
@@ -1581,7 +1581,7 @@
 display of form errors. The checkout page of the Foundation demo includes
 examples of this. 
 
-=head2 Simple Order Report File
+H2: Simple Order Report File
 
 The simple order report file, "report", defines the layout of the order
 report which gets mailed on the completion of the order. For example,
@@ -1601,7 +1601,7 @@
 Interchange defines some values for use in the search form -- they begin
 with C<mv_> and are automatically ignored.
 
-=head2 Fully-configurable Order Reports
+H2: Fully-configurable Order Reports
 
 You can specify a fully-configurable order report by setting the hidden
 field "mv_order_report" to a legal Interchange page. This page will be
@@ -1613,7 +1613,7 @@
 by many mailers, but you can choose to use standard ASCII format.
 An example report is provided in the demo file <pages/ord/report.html>.
 
-=head2 Order Receipts
+H2: Order Receipts
 
 The file can of course be configured with all Interchange tags, and
 will be interpolated for the ordered items before they are deleted from
@@ -1621,7 +1621,7 @@
 key in SpecialPage. If using order I<Route>s, as in the C<foundation> demo,
 you set it with the C<receipt> key to C<Route>.
 
-=head2 The Order Counter
+H2: The Order Counter
 
 An order counter can be enabled if the I<OrderCounter> directive
 is set to a file name. An incrementing count of all orders will be
@@ -1633,7 +1633,7 @@
 available (as a part of the fine libwww modules) at the same place you
 got Interchange. It is included with the distribution.
 
-=head2 Customer Input Fields
+H2: Customer Input Fields
 
 On the order (or shopping basket) page, by default order.html, you will
 have a number of input fields allowing the customer to enter information
@@ -1672,4 +1672,5 @@
 Line:
 
 N:Copyright 2001-2002 Red Hat, Inc. Freely redistributable under terms of the GNU General Public License.
+
 N:Copyright 2002 ICDEVGROUP. Freely redistributable under terms of the GNU General Public License.



1.14      +25 -18    docs/ic_howto_cvs.sdf


rev 1.14, prev_rev 1.13
Index: ic_howto_cvs.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/ic_howto_cvs.sdf,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ic_howto_cvs.sdf	4 Jun 2003 08:54:44 -0000	1.13
+++ ic_howto_cvs.sdf	8 Jul 2003 19:12:58 -0000	1.14
@@ -1,24 +1,24 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: ic_howto_cvs.sdf,v 1.13 2003/06/04 08:54:44 danb Exp $
+# $Id: ic_howto_cvs.sdf,v 1.14 2003/07/08 19:12:58 mheins Exp $
 
 !define DOC_NAME "Interchange + CVS HOWTO"
 !define DOC_TYPE ""
 !define DOC_CODE "ic_howto_cvs"
-!define DOC_VERSION substr('$Revision: 1.13 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.14 $', 11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/ic_howto_cvs.html"
 !define DOC_OWNER "2001 Dan Browning E<lt>{{EMAIL:dan.browning at kavod.com}}E<gt>"
 !build_title
 
-H1:Introduction
+H1: Introduction
 
-H2:Preamble
+H2: Preamble
 
 N:Copyright 2001-2003 Dan Browning <dan.browning at kavod.com>.  This document is
 freely redistributable under terms of the GNU General Public License. 
 
-H2:Purpose
+H2: Purpose
 
 N:The purpose of this document is to help others take advantage of CVS and
 Interchange together to increase the quality of their programming, whether they
@@ -27,7 +27,7 @@
 it is geared toward the average developer using Interchange to implement an
 e-commerce website.     
 
-H2:Audience
+H2: Audience
 
 N:I intend for this document to be useful to those who are not yet familiar
 with CVS as well as those who are.  If you already know how to setup a pserver
@@ -39,7 +39,7 @@
 already has setup Interchange and the template catalog (e.g. Foundation) is
 working correctly.    
 
-H2:Contact the author
+H2: Contact the author
 
 N:If you find any spelling errors, technical slip-ups, mistakes, subliminal 
 messages, or if you wish to send feedback, critique, remarks, comments, or if
@@ -52,7 +52,7 @@
 
 N:Dan Browning {{EMAIL:dan.browning at kavod.com}}
 
-H2:The advantages of using CVS
+H2: The advantages of using CVS
 
 N:CVS is a very useful tool and can help you in your development, no matter if
 you are an independant developer or are part of a team of developers.  
@@ -89,7 +89,7 @@
 release managers repackage CVS commit logs into WHATSNEW, HISTORY, and/or NEWS
 files).  
 
-H2:How to use this document
+H2: How to use this document
 
 N:There are many potential uses of CVS as it applies to Interchange.  In fact,
 there are as many unique ways to use CVS as there are unique developers.  This
@@ -119,9 +119,9 @@
 medium, and hopefully give you the background you need if you decide to setup
 your own complex development environment.  
 
-H1:Setup CVS
+H1: Setup CVS
 
-H2:Assumptions
+H2: Assumptions
 
 N:Here are some of the assumptions that I make that apply to various parts of
 the rest of this document: 
@@ -141,7 +141,7 @@
 for the most part the same as 7.x, except for the difference of using inetd
 instead of xinetd to setup pserver.
 
-H2:Install CVS
+H2: Install CVS
 
 N:This is the easy part.  For Red Hat Linux systems, download the CVS rpms and 
 install them.  You can search for rpms for your system using 
@@ -157,7 +157,7 @@
 latter portion of this document will require that the CVS user can write to the
 catalog directory.       
 
-H2:Create the CVS repository directory
+H2: Create the CVS repository directory
 
 N:You will need to create a repository directory such as 
 {{F:/home/interch/rep}}, which is used here and in the rest of the 
@@ -168,7 +168,7 @@
 	mkdir /home/interch/rep
 !endblock
 
-H2:Setup environment variables & .cvsrc
+H2: Setup environment variables
 
 N:The CVSROOT environment variable can be setup for your user (in {{F:~/.bashrc}} or {{F:~/.profile}}, or for all users in {{F:/etc/profile}}.
 
@@ -199,7 +199,7 @@
 
 Note:You will need to logout/login for the profile changes to take effect. 
 
-H2:Initialize the repository
+H2: Initialize the repository
 
 N:Initialize the repository as the CVS user, which is {{EX:interch}} for this
 document. 
@@ -208,7 +208,7 @@
 	cvs -d /home/interch/rep init
 !endblock
 
-H2:CVS Authentication
+H2: CVS Authentication
 
 H3:Background
 
@@ -240,7 +240,7 @@
 ({{touch $CVSROOT/CVSROOT/passwd, touch $CVSROOT/CVSROOT/users}}), 
 and execute {{EX:cvsadmin add <usernames>}}.
 
-H2:Setup CVS modules
+H2: Setup CVS modules
 
 Note:From this point on, assume that all commands are executed as the CVS user 
 (e.g. interch), unless otherwise specified.
@@ -271,7 +271,14 @@
 
 E:foundation	foundation
 
-H2:Setup binary file types
+H3:Create the module directory
+
+N: This is the directory that is referred to in the {{F:CVSROOT/modules}} file
+we just modified. 
+
+E:mkdir /rep/foundation
+
+H2: Setup binary file types
 
 N:This isn't necessary if you aren't going to manage any binary files (e.g. if
 you plan on excluding your images/ directory).  But I recommend including it.



1.14      +4 -36     docs/icadvanced.sdf


rev 1.14, prev_rev 1.13
Index: icadvanced.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/icadvanced.sdf,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- icadvanced.sdf	15 Jan 2003 04:05:18 -0000	1.13
+++ icadvanced.sdf	8 Jul 2003 19:12:58 -0000	1.14
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: icadvanced.sdf,v 1.13 2003/01/15 04:05:18 kwalsh Exp $
+# $Id: icadvanced.sdf,v 1.14 2003/07/08 19:12:58 mheins Exp $
 
 !define DOC_NAME "Advanced Interchange Topics"
 !define DOC_TYPE ""
 !define DOC_CODE "icadvanced"
-!define DOC_VERSION substr('$Revision: 1.13 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.14 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/icadvanced.html"
@@ -467,8 +467,8 @@
 
 The mv_metadata table is scanned for the following keys:
 
-.products::category::os28007
-.products::category
+> products::category::os28007
+> products::category
 
 If a row is found with one of those keys, then the information in the row is used to set the display widget. If no row is found, an INPUT TYPE=TEXT widget is displayed. If the data is all digits, a size of 8 is used, otherwise the size is 60.
 
@@ -541,38 +541,6 @@
 
 
 H1: Admin Tool Database Tables
-
-
-H2:icmenu.txt
-
-Used for back-office administration UI menus and wizards.
-
-!block example
-    code
-		Arbitrary primary key
-    mgroup
-		Menu group (for grouping searches)
-    msort
-		Sort order within the group
-    next_line
-		Set to 1 if submenu
-    indicator
-    exclude_on
-    depends_on
-    page
-    form
-    name
-    super
-    inactive
-    special
-    help_name
-	img_dn
-	img_up
-	img_sel
-	img_icon
-	url
-!endblock
-
 
 H2:mv_metadata.asc
 



1.21      +19 -15    docs/iccattut.sdf


rev 1.21, prev_rev 1.20
Index: iccattut.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/iccattut.sdf,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- iccattut.sdf	30 Jun 2003 22:42:01 -0000	1.20
+++ iccattut.sdf	8 Jul 2003 19:12:58 -0000	1.21
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: iccattut.sdf,v 1.20 2003/06/30 22:42:01 mheins Exp $
+# $Id: iccattut.sdf,v 1.21 2003/07/08 19:12:58 mheins Exp $
 
 !define DOC_NAME "Catalog-Building Tutorial"
 !define DOC_TYPE ""
 !define DOC_CODE "iccattut"
-!define DOC_VERSION substr('$Revision: 1.20 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.21 $', 11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/iccattut.html"
@@ -13,7 +13,7 @@
 
 H1:Purpose
 
-N:The purpose of this document is to guide you through constructing a simple Interchange catalog from scratch. The demo catalog that ships with Interchange is quite complex since it highlights some of the many capabilities that Interchange offers. As a template for your own catalog, the demo can either be an intimidating place to start.
+N:The purpose of this document is to guide you through constructing a simple Interchange catalog from scratch. The demo catalog that ships with Interchange is quite complex since it highlights some of the many capabilities that Interchange offers. As a template for your own catalog, the demo can be an intimidating place to start if your purpose is to learn.
 
 The simple catalog you create using this tutorial should give you a feel for the basic Interchange system. It should also be considered a stepping stone to a more complete and functional e-commerce system built with Interchange. The tutorial relies as much as possible on default settings to accentuate how Interchange works. It will use as few of Interchange's capabilities as possible, while still building a usable store. The resulting site will be simple but usable. The value of this tutorial is in the instruction that occurs along the way.
 
@@ -664,6 +664,10 @@
   OrderProfile etc/profiles.order
 !endblock
 
+Watch for white space in front of the __NAME__ pragma, it can cause your
+profile to be ignored. Rember to restart Interchange for any changes to
+take effect.
+
 H2:special_pages/needfield.html
 
 N:If the submitted form lacks a required field, Interchange will display an error page. The default location is {{FILE:special_pages/needfield.html}}. To create this page, type the following text and save it as {{FILE:special_pages/needfield.html}}.
@@ -867,18 +871,18 @@
 +    lr=1
 +    option=mv_credit_card_exp_month
 +    list="
-+ 1	01 - January
-+ 2	02 - February
-+ 3	03 - March
-+ 4	04 - April
-+ 5	05 - May
-+ 6	06 - June
-+ 7	07 - July
-+ 8	08 - August
-+ 9	09 - September
-+ 10	10 - October
-+ 11	11 - November
-+ 12	12 - December"]
++ 1     01 - January
++ 2     02 - February
++ 3     03 - March
++ 4     04 - April
++ 5     05 - May
++ 6     06 - June
++ 7     07 - July
++ 8     08 - August
++ 9     09 - September
++ 10    10 - October
++ 11    11 - November
++ 12    12 - December"]
 + <option value="[loop-code]">[loop-pos 1]
 + [/loop]
 + </select>



1.80      +4 -4      docs/icconfig.sdf


rev 1.80, prev_rev 1.79
Index: icconfig.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/icconfig.sdf,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -r1.79 -r1.80
--- icconfig.sdf	7 Jul 2003 00:30:44 -0000	1.79
+++ icconfig.sdf	8 Jul 2003 19:12:58 -0000	1.80
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: icconfig.sdf,v 1.79 2003/07/07 00:30:44 mheins Exp $
+# $Id: icconfig.sdf,v 1.80 2003/07/08 19:12:58 mheins Exp $
 
 !define DOC_NAME "Configuration Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "icconfig"
-!define DOC_VERSION substr('$Revision: 1.79 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.80 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/icconfig.html"
@@ -1715,7 +1715,7 @@
 E<lbracket>{{CMD[jump="ictags.html#filter"]filter}}]
 tag on the page if the filter is only going to be used in a few places.
 See the E<lbracket>{{CMD[jump="ictags.html#filter"]filter}}]
-tag documentation for more information and a list of filters.
+tag documentation (wiki FilterTag) for more information and a list of filters.
 
 H2: FormAction
 
@@ -2797,7 +2797,7 @@
 where C<default> or C<admin> is the name of the profile to set. These can
 be overriden if passed in the tag:
 
-	[userdb userminlen=6 new-account=1]
+>   [userdb userminlen=6 new-account=1]
 
 H2: UserTag
 



1.56      +81 -22    docs/icdatabase.sdf


rev 1.56, prev_rev 1.55
Index: icdatabase.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/icdatabase.sdf,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- icdatabase.sdf	7 Jul 2003 17:40:15 -0000	1.55
+++ icdatabase.sdf	8 Jul 2003 19:12:59 -0000	1.56
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: icdatabase.sdf,v 1.55 2003/07/07 17:40:15 mheins Exp $
+# $Id: icdatabase.sdf,v 1.56 2003/07/08 19:12:59 mheins Exp $
 
 !define DOC_NAME "Interchange Databases"
 !define DOC_TYPE ""
 !define DOC_CODE "icdatabase"
-!define DOC_VERSION substr('$Revision: 1.55 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.56 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/icdatabase.html"
@@ -500,7 +500,7 @@
 to be reinitialized at every connect. Use it for smaller tables that
 will be frequently accessed.
 
-The MEMORY modifier forces IMPORT_ONCE.
+Memory tables are read only -- the MEMORY modifier forces IMPORT_ONCE.
 
 H2:  IMPORT_ONCE
 
@@ -525,6 +525,15 @@
 IMPORT_ONCE is always in effect for MEMORY databases. A catalog
 reconfiguration is required to force a change.
 
+H2: MIRROR
+
+Additionally, you can have two tables, the regular table and the memory
+table by adding to the definition files:
+
+>	Database country_memory country_memory.txt TAB
+>	Database country_memory MIRROR          country
+>	Database country_memory MEMORY          1
+
 H2: Importing in a Page
 
 To add a data record to a database as a result of an order or other
@@ -751,6 +760,39 @@
 An Interchange SQL database can be accessed with the same tags as any of
 the other databases can. Arbitrary SQL queries can be passed with the C<[query sql="SQL STATEMENT"]> ITL tag.
 
+!block example
+    [query
+        ml=10
+        more=1
+        type=list
+        sp="@@MV_PAGE@@"
+        sql=|
+            SELECT  sku, description
+            FROM    products
+            WHERE   somecol
+                                        BETWEEN '[filter sql][cgi from][/filter]'
+                                        AND '[filter sql][cgi to][/filter]'
+            AND     someothercol = '[filter sql][cgi whatever][/filter]'
+            ORDER BY sku
+        |]
+        [list]
+            sku=[sql-code] - desc=[sql-param description]<br>
+        [/list]
+        [on-match]
+            Something was found<br>
+        [/on-match]
+        [no-match]
+            Nothing was found<br>
+        [/no-match]
+        [more-list]
+                <br>[matches]<br>
+        [/more-list]
+    [/query]
+!endblock
+
+Not the filter for E<lbracket>cgi foo] values, which prevent single
+quotes (C<'>) from destroying the query.
+
 H2: Importing from an ASCII File
 
 When importing a file for SQL, Interchange by default uses the first column of the ASCII file as the primary key, with a C<char(16)> type, and assigns all other columns a C<char (128)> definition. These definitions can be changed by placing the proper definitions in COLUMN_DEF Database directive attribute:
@@ -1166,12 +1208,12 @@
 > CodeDef find_mirrored SearchOp
 > CodeDef find_mirrored Routine <<EOR
 > sub {
-> 	my ($self, $i, $pat) = @_;
-> 	$pat = reverse $pat;
-> 	return sub {
-> 		my $string = shift;
-> 		$string =~ /$pat/io;
-> 	};
+>       my ($self, $i, $pat) = @_;
+>       $pat = reverse $pat;
+>       return sub {
+>               my $string = shift;
+>               $string =~ /$pat/io;
+>       };
 > }
 > EOR
 
@@ -2067,16 +2109,14 @@
      Next       <IMG SRC="next.gif" Border=0>
 !endblock
 
-.To set custom text for the "Previous" and "Next" usually used, define
-the C<next_img>, C<prev_img>, and C<page_img> with
-C<[next-anchor][/next-anchor]>, C<[prev-anchor][/prev-anchor]> and
-C<[page-anchor][/page-anchor]>. The string $PAGE$ will be replaced with
-the page number in the latter. The same example:
+.To set custom text for the "Previous" and "Next" usually used, define the C<next_img>, C<prev_img>, and C<page_img> with C<[next-anchor][/next-anchor]>, C<[prev-anchor][/prev-anchor]>, C<[first-anchor][/first-anchor]>, C<[last-anchor][/last-anchor]> and C<[page-anchor][/page-anchor]>. The string $PAGE$ will be replaced with the page number in the latter. The same example:
 
 !block example; listitem=2
     [more-list]
+    [first-anchor] First [/first-anchor]
     [next-anchor] Forward | [/next-anchor]
     [prev-anchor] Back [/prev-anchor]
+    [last-anchor] Last [/last-anchor]
     [page-anchor] Page $PAGE$ (matches $MINPAGE$-$MAXPAGE$) | [/page-anchor]
     [more]
     [/more-list]
@@ -2603,7 +2643,12 @@
     Database  Ground  Ground.csv  CSV
 !endblock
 
-.A simple shipping cost qualification can be appended to a UPS lookup. If any additional parameters are present after the five usual ones used for UPS lookup, they will be interpreted as a Perl subroutine call. The syntax is the same as if it was encased in the tag C<[perl sub] [/perl]>, but the following substitutions are made prior to the call:
+A simple shipping cost qualification can be appended to a UPS lookup.
+If any additional parameters are present after the five usual ones
+used for UPS lookup, they will be interpreted as a Perl subroutine
+call. The syntax is the same as if it was encased in the
+tag E<lbracket>perl] E<lbracket>/perl], but the following substitutions
+are made prior to the call:
 
 !block example; listitem=2
     @@COST@@  is replaced with whatever the UPS lookup returned
@@ -2613,13 +2658,22 @@
     @@TOTAL@@ is replaced with the total weight
 !endblock
 
-.The example above also illustrates geographic qualification. If the value of the form variable state on the checkout form is AK or HI, the U.S. states Alaska and Hawaii, a $10.00 additional charge (over and above the normal $2.00 handling charge) is made.  This can also be used to select on country, product type, or any other qualification that can be encoded in the file.
+.The example above also illustrates geographic qualification. If the
+value of the form variable state on the checkout form is AK or HI, the
+U.S. states Alaska and Hawaii, a $10.00 additional charge (over and
+above the normal $2.00 handling charge) is made. This can also be used
+to select on country, product type, or any other qualification that can
+be encoded in the file.
 
 LI1: upsca
 
 .The next entry is just like the UPS definition except it defines a different lookup zone file (C<products/can.csv>) and uses a different database, C<upsca>. It also disables the global PriceDivide option for itself only, not allowing currency conversion. Otherwise, the process is the same.
 
-.Up to 27 different lookup zones can be defined in the same fashion. If one of the cost lines (the last field) in the C<shipping.asc> file begins with a C<c>, it configures another lookup zone which must be lettered from C<A to Z>.  It takes the format:
+Up to 27 different lookup zones can be defined in the same fashion,
+allowing for multiple zone files. If one of the cost lines (the last
+field) in the C<shipping.asc> file begins with a C<c>, it configures
+another lookup zone which must be lettered from C<A to Z>. It takes
+the format:
 
 !block example; listitem=2
     c X name file* length* multiplier*
@@ -2653,11 +2707,11 @@
 
 The first operative row of the zone file (one without leading quotes) is used to determine the zone column name. In the US, it looks something like:
 
-Dest. ZIP,Ground,3 Day Select,2nd Day Air,2nd Day Air A.M.,Next Day Air Saver,Next Day Air
+> Dest. ZIP,Ground,3 Day Select,2nd Day Air,2nd Day Air A.M.,Next Day Air Saver,Next Day Air
 
 Interchange strips all non-alpha characters and comes up with:
 
-DestZIP,Ground,3DaySelect,2ndDayAir,2ndDayAirAM,NextDayAirSaver,NextDayAir
+> DestZIP,Ground,3DaySelect,2ndDayAir,2ndDayAirAM,NextDayAirSaver,NextDayAir
 
 Therefore, the zone column (shipping type) that would be used for UPS ground would be "Ground," and that is what the database should be named. To support the above, use a C<shipping.asc> line that reads:
 
@@ -3605,9 +3659,10 @@
 others, perhaps for FAX to a fulfillment house.
 
 L1: cascade
-.A list of routes which should be pushed on the stack of routes to
-run, I<after all currently scheduled routes are done>. NOTE: cascades
-can cause endless loops, so only one setting is recommended, that being the
+
+A list of routes which should be pushed on the stack of routes to
+run, I<after all currently scheduled routes are done>. NOTE: cascades can
+cause endless loops, so only one setting is recommended, that being the
 main route.
 
 LI1: commit
@@ -3636,6 +3691,10 @@
 LI1: email
 .The email address(es) where the order should be sent. Set just like the
 C<MailOrderTo> directive, which is also the default.
+
+LI1: empty
+
+This should be set if neither attach or email is set.
 
 LI1: encrypt
 .Whether the entire order should be encrypted with the B<encrypt_program>.



1.21      +220 -213  docs/icfaq.sdf


rev 1.21, prev_rev 1.20
Index: icfaq.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/icfaq.sdf,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- icfaq.sdf	30 Oct 2002 17:24:00 -0000	1.20
+++ icfaq.sdf	8 Jul 2003 19:12:59 -0000	1.21
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: icfaq.sdf,v 1.20 2002/10/30 17:24:00 mheins Exp $
+# $Id: icfaq.sdf,v 1.21 2003/07/08 19:12:59 mheins Exp $
 
 !define DOC_NAME "Frequently Asked Questions"
 !define DOC_TYPE ""
 !define DOC_CODE "icfaq"
-!define DOC_VERSION substr('$Revision: 1.20 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.21 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/icfaq.html"
@@ -884,6 +884,13 @@
 That is because it is a demo. It is not intended to be a finished catalog, just
 a starting point.
 
+That being said, you should think long and hard before abandoning the
+checkout schema. Years of experience have led to the production of the
+userdb, transactions, and orderline tables, and the structure of the
+checkout page. Any changes to the data structure should be thoroughly
+tested before deployment, as obscure errors can cause major problems in
+order logging.
+
 H2: How can I trace the source of a purchase and run a partners program?
 
 Interchange has a facility that adds a parameter called I<source> to the session database for that user. You should give your partners a source code, which must contain at least one letter character (A-Za-z only). It is placed in the sourcing URL as a query string of:
@@ -949,39 +956,39 @@
 H3: Empty shopping cart
 !block example
 [calc]
-	@{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();
+        @{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();
 [/calc]
 !endblock
 
 H3: Empty shopping cart
 !block example
 [set clear_basket]
-	[calc]
-		@{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();
-	[/calc]
+        [calc]
+                @{$Carts->{$CGI->{mv_cartname} || 'main'}} = ();
+        [/calc]
 [/set]
 
 [button
-	text="Clear Basket"
-	src="clear_basket.gif"
-	hidetext=1
-	form=basket
-	]
-		mv_todo=refresh
-		mv_click=clear_basket
+        text="Clear Basket"
+        src="clear_basket.gif"
+        hidetext=1
+        form=basket
+        ]
+                mv_todo=refresh
+                mv_click=clear_basket
 [/button]
 !endblock
 
 H3: Erase the user session (includes shopping cart)
 !block example
 [button
-	text="Clear Basket"
-	src="clear_basket.gif"
-	hidetext=1
-	form=basket
-	]
-		mv_todo=cancel
-		mv_nextpage=index
+        text="Clear Basket"
+        src="clear_basket.gif"
+        hidetext=1
+        form=basket
+        ]
+                mv_todo=cancel
+                mv_nextpage=index
 [/button]
 !endblock
 
@@ -998,17 +1005,17 @@
 Interchange has the facility to handle multiple addresses.
 See the {{C[jump="icdatabase.html#User Database Functions"]User Database Functions}}
 section of the Interchange Database manual.
-	
+        
 H2:How do I change the order number from TEST0001, TEST0002 to something else?
 
 (Answered by Aaron Hazelton & Paul Jordan)
 
-	* Go to the IC admin and click on "Administration"
-	then click on the 'last order' which will be something
-	like "TEST00001".  It will bring up a page which will allow
-	you to change it to whatever you want.
-	
-	* Or, modify the CATROOT/etc/order.number
+        * Go to the IC admin and click on "Administration"
+        then click on the 'last order' which will be something
+        like "TEST00001".  It will bring up a page which will allow
+        you to change it to whatever you want.
+        
+        * Or, modify the CATROOT/etc/order.number
 
 H2: How do I move a catalog from a test server to a production server?
 
@@ -1172,29 +1179,29 @@
 
 !block example
  [if value save_cart eq 'recurring']
-    	    <FORM ACTION="[process-target]" METHOD=POST>
-    	    To save this recurring order, give it a nickname, then press 'Save Cart'.<br>
-    	    Nickname:
-    	    <INPUT TYPE=TEXT NAME="c_nickname" SIZE=11 VALUE="[scratch just_nickname]">
-    	    <input type=hidden name=mv_session_id value="[data session id]">
-			<INPUT TYPE=HIDDEN NAME="c_recurring" VALUE="1">
-    	    <INPUT TYPE=HIDDEN NAME="save_cart" VALUE="recurring">
-    	    <INPUT TYPE=HIDDEN NAME="mv_todo" VALUE="return">
-    	    <INPUT TYPE=HIDDEN NAME="mv_check" VALUE="Save Cart">
-    	    <INPUT TYPE=SUBMIT VALUE="Save Cart">
-    	    </FORM>
+            <FORM ACTION="[process-target]" METHOD=POST>
+            To save this recurring order, give it a nickname, then press 'Save Cart'.<br>
+            Nickname:
+            <INPUT TYPE=TEXT NAME="c_nickname" SIZE=11 VALUE="[scratch just_nickname]">
+            <input type=hidden name=mv_session_id value="[data session id]">
+                        <INPUT TYPE=HIDDEN NAME="c_recurring" VALUE="1">
+            <INPUT TYPE=HIDDEN NAME="save_cart" VALUE="recurring">
+            <INPUT TYPE=HIDDEN NAME="mv_todo" VALUE="return">
+            <INPUT TYPE=HIDDEN NAME="mv_check" VALUE="Save Cart">
+            <INPUT TYPE=SUBMIT VALUE="Save Cart">
+            </FORM>
   [elsif value save_cart eq 'cart']
-    	    <FORM ACTION="[process-target]" METHOD=POST>
-    	    To save this cart, give it a nickname, then press 'Save Cart'.<br>
-    	    Nickname:
-    	    <INPUT TYPE=TEXT NAME="c_nickname" SIZE=11 VALUE="[scratch just_nickname]">
-    	    <INPUT TYPE=HIDDEN NAME="c_recurring" VALUE="0">
-    	    <INPUT TYPE=HIDDEN NAME="save_cart" VALUE="cart">
-    	    <INPUT TYPE=HIDDEN NAME="mv_todo" VALUE="return">
-    	    <INPUT TYPE=HIDDEN NAME="mv_check" VALUE="Save Cart">
-			<input type=hidden name=mv_session_id vlaue="[data session id]">
-    	    <INPUT TYPE=SUBMIT VALUE="Save Cart">
-	    </FORM>
+            <FORM ACTION="[process-target]" METHOD=POST>
+            To save this cart, give it a nickname, then press 'Save Cart'.<br>
+            Nickname:
+            <INPUT TYPE=TEXT NAME="c_nickname" SIZE=11 VALUE="[scratch just_nickname]">
+            <INPUT TYPE=HIDDEN NAME="c_recurring" VALUE="0">
+            <INPUT TYPE=HIDDEN NAME="save_cart" VALUE="cart">
+            <INPUT TYPE=HIDDEN NAME="mv_todo" VALUE="return">
+            <INPUT TYPE=HIDDEN NAME="mv_check" VALUE="Save Cart">
+                        <input type=hidden name=mv_session_id vlaue="[data session id]">
+            <INPUT TYPE=SUBMIT VALUE="Save Cart">
+            </FORM>
   [/elsif]
 !endblock  
 
@@ -1299,7 +1306,7 @@
 SQL database seems to do that a bit differently. Even then, you can try
 Interchange's COLUMN_DEF parameter:
 
-	Database  products  COLUMN_DEF  code=char(16) PRIMARY KEY
+        Database  products  COLUMN_DEF  code=char(16) PRIMARY KEY
 
 This will at least index the C<code> field for MySQL. Other databases differ.
 
@@ -1554,13 +1561,13 @@
 Then at the beginning of the code to check, call
 
 !block example
-	[benchmark start=1]
+        [benchmark start=1]
 !endblock
 
 to start the measurement. At the end
 
 !block example
-	[benchmark]
+        [benchmark]
 !endblock
 
 will display the time used. Bear in mind that it is not precise, and
@@ -1570,7 +1577,7 @@
 To see the system/user breakdown, do:
 
 !block example
-	[benchmark verbose=1]
+        [benchmark verbose=1]
 !endblock
 
 In general, "user" time measures Interchange processing time and and
@@ -1582,17 +1589,17 @@
 * [PREFIX-tag] is faster than [parsed-tag]
 
 !block example
-		[loop prefix=foo search="ra=yes"]
+                [loop prefix=foo search="ra=yes"]
 
-			[foo-data products image]
-				is slightly faster than
-			[foo-field image]
-				which is MUCH faster than
-			[data products image [foo-code]]
-				which is faster than
-			[data table=products column=image key="[foo-code]"]
+                        [foo-data products image]
+                                is slightly faster than
+                        [foo-field image]
+                                which is MUCH faster than
+                        [data products image [foo-code]]
+                                which is faster than
+                        [data table=products column=image key="[foo-code]"]
 
-		[/loop]
+                [/loop]
 !endblock
 
 The loop tags are interpreted by means of fast regular expression
@@ -1615,15 +1622,15 @@
 The following are equivalent:
 
 !block example
-	Benchmark loop-field list: [benchmark start=1]
-	<!-- [loop search="ra=yes/st=db"]
-		[loop-code] price: [loop-field price] [/loop] -->
-	TIME: [benchmark]
-
-	Benchmark loop-param list: [benchmark start=1]
-	<!-- [loop search="ra=yes/st=db/rf=sku,price"]
-		[loop-code] price: [loop-param price] [/loop] -->
-	TIME: [benchmark]
+        Benchmark loop-field list: [benchmark start=1]
+        <!-- [loop search="ra=yes/st=db"]
+                [loop-code] price: [loop-field price] [/loop] -->
+        TIME: [benchmark]
+
+        Benchmark loop-param list: [benchmark start=1]
+        <!-- [loop search="ra=yes/st=db/rf=sku,price"]
+                [loop-code] price: [loop-param price] [/loop] -->
+        TIME: [benchmark]
 !endblock
 
 but the second is much, much faster.
@@ -1634,42 +1641,42 @@
 row or data containers. I see a lot of:
 
 !block example
-	[loop search="ra=yes"]
-	[calc] return '<TR>' if [loop-increment] == 1; return[/calc]
-	[calc] return '' if [loop-increment] % 3; return '</TR>' [/calc]
-	[/loop]
+        [loop search="ra=yes"]
+        [calc] return '<TR>' if [loop-increment] == 1; return[/calc]
+        [calc] return '' if [loop-increment] % 3; return '</TR>' [/calc]
+        [/loop]
 !endblock
 
 Much faster, by a few orders of magnitude, is:
 
 !block example
-	[loop search="ra=yes"]
-	[loop-change 1][condition]1[/condition]<TR>[/loop-change 1]
-	[loop-alternate 3]</TR>[/loop-alternate]
-	[/loop]
-
-	If you think you need to close the final row by checking the
-	final count, look at this:
-
-	[loop search="ra=yes"]
-	[on-match]
-		<TABLE>
-		<TR>
-	[/on-match]
-
-	[list]
-			<TD>[loop-code]</TD>
-		[loop-alternate 3]</TR><TR>[/loop-alternate]
-	[/list]
-
-	[on-match]
-		</TR>
-		</TABLE>
-	[/on-match]
-
-	[no-match]
-		No match, sorry.
-	[/no-match]
+        [loop search="ra=yes"]
+        [loop-change 1][condition]1[/condition]<TR>[/loop-change 1]
+        [loop-alternate 3]</TR>[/loop-alternate]
+        [/loop]
+
+        If you think you need to close the final row by checking the
+        final count, look at this:
+
+        [loop search="ra=yes"]
+        [on-match]
+                <TABLE>
+                <TR>
+        [/on-match]
+
+        [list]
+                        <TD>[loop-code]</TD>
+                [loop-alternate 3]</TR><TR>[/loop-alternate]
+        [/list]
+
+        [on-match]
+                </TR>
+                </TABLE>
+        [/on-match]
+
+        [no-match]
+                No match, sorry.
+        [/no-match]
 
 [/loop]
 !endblock
@@ -1682,13 +1689,13 @@
 Consider these two snippets:
 
 !block example
-	[if scratch|value|cgi key] THEN [/if]
+        [if scratch|value|cgi key] THEN [/if]
 !endblock
 
 and:
 
 !block example
-	[if scratch|value|cgi key == '1'] THEN [/if]
+        [if scratch|value|cgi key == '1'] THEN [/if]
 !endblock
 
 The first one doesn't require Perl evaluation. It simply checks to see
@@ -1699,49 +1706,49 @@
 Try it on the foundation demo:
 
 !block example
-	---- begin test ---
+        ---- begin test ---
 
-	Overhead: 
-	[benchmark start=1]
-		<!-- [loop search="ra=yes"][set cert][loop-field gift_cert][/set][/loop] -->
-	[benchmark]
-	<P>
-
-
-	if scratch compare: 
-	[benchmark start=1]
-		<!--
-		[loop search="ra=yes"]
-		[set cert][loop-field gift_cert][/set]
-		[loop-code] [if scratch cert] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert] YES [else] NO [/else][/if]
-		[/loop]
-		-->
-
-	[benchmark]
-	<P>
-
-	if scratch compare eq 1: 
-	[benchmark start=1]
-		<!--
-		[loop search="ra=yes"]
-		[set cert][loop-field gift_cert][/set]
-		[loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
-		[loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
-		[/loop]
-		-->
-	[benchmark]
-	<P>
+        Overhead: 
+        [benchmark start=1]
+                <!-- [loop search="ra=yes"][set cert][loop-field gift_cert][/set][/loop] -->
+        [benchmark]
+        <P>
+
+
+        if scratch compare: 
+        [benchmark start=1]
+                <!--
+                [loop search="ra=yes"]
+                [set cert][loop-field gift_cert][/set]
+                [loop-code] [if scratch cert] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert] YES [else] NO [/else][/if]
+                [/loop]
+                -->
+
+        [benchmark]
+        <P>
+
+        if scratch compare eq 1: 
+        [benchmark start=1]
+                <!--
+                [loop search="ra=yes"]
+                [set cert][loop-field gift_cert][/set]
+                [loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
+                [loop-code] [if scratch cert == 1] YES [else] NO [/else][/if]
+                [/loop]
+                -->
+        [benchmark]
+        <P>
 
-	[page @@MV_PAGE@@]Again</a>
+        [page @@MV_PAGE@@]Again</a>
 
-	---- end test ---
+        ---- end test ---
 !endblock
 
 * Use [PREFIX-calc] instead of [calc] or [perl]
@@ -1758,7 +1765,7 @@
 available for access inside of it, just do:
 
 !block example
-	[perl tables="products pricing"] [/perl]
+        [perl tables="products pricing"] [/perl]
 !endblock
 
 prior to list start. Now you can do something like:
@@ -1792,34 +1799,34 @@
 .Example:
 
 !block example
-	[benchmark start=1]
-	loop-calc:
-	  <!--
-	  	[loop search="st=db/fi=country/ra=yes/ml=1000"]
-		[loop-calc]
-			my $code = q{[loop-code]};
-			return "code '$code' reversed is " . reverse($code);
-		[/loop-calc]
-		[/loop]
-	  -->
-			
-	[benchmark]
-
-	<P>
-
-	[benchmark start=1]
-	loop-sub and loop-exec:
-	  <!--
-	  	[loop search="st=db/fi=country/ra=yes/ml=1000"]
-		[loop-sub country_compare]
-			my $code = shift;
-			return "code '$code' reversed is " . reverse($code);
-		[/loop-sub]
-		[loop-exec country_compare][loop-code][/loop-exec]
-		[/loop]
-	  -->
-			
-	[benchmark]
+        [benchmark start=1]
+        loop-calc:
+          <!--
+                [loop search="st=db/fi=country/ra=yes/ml=1000"]
+                [loop-calc]
+                        my $code = q{[loop-code]};
+                        return "code '$code' reversed is " . reverse($code);
+                [/loop-calc]
+                [/loop]
+          -->
+                        
+        [benchmark]
+
+        <P>
+
+        [benchmark start=1]
+        loop-sub and loop-exec:
+          <!--
+                [loop search="st=db/fi=country/ra=yes/ml=1000"]
+                [loop-sub country_compare]
+                        my $code = shift;
+                        return "code '$code' reversed is " . reverse($code);
+                [/loop-sub]
+                [loop-exec country_compare][loop-code][/loop-exec]
+                [/loop]
+          -->
+                        
+        [benchmark]
 !endblock
 
 * ADVANCED: Execute and save with [query ...], then use an embedded Perl
@@ -1835,42 +1842,42 @@
 .Observe:
 
 !block example
-	--- begin test code ---
-	[set waiting_for]os28004[/set]
+        --- begin test code ---
+        [set waiting_for]os28004[/set]
 
-	[benchmark start=1] Embedded Perl
-	<!--
-	[query arrayref=myref sql="select sku, price, description from products"]
-		<!-- make query, this container text is not used. -->
-	[/query]
-
-	[perl]
-		# Get the query results, has multiple fields
-		my $ary = $Tmp->{myref};
-		my $out = '';
-		foreach $line (@$ary) {
-			my ($sku, $price, $desc) = @$line;
-			if($sku eq $Scratch->{waiting_for}) {
-				$out .= "We were waiting for this one!!!!\n";
-			}
-			$out .= "sku: $sku price: $price description: $desc\n";
-		}
-		return $out;
-	[/perl]
-	-->
-	TIME: [benchmark]
-
-	[benchmark start=1] All loop
-	<!--
-	[query list=1 sql="select sku, price, description from products"]
-		[if scratch waiting_for eq '[sql-code]']We were waiting for this one!!!!
-		[/if] sku: [sql-code]price: [sql-param price] desc: [sql-param description]  
-	[/query]
-	-->
+        [benchmark start=1] Embedded Perl
+        <!--
+        [query arrayref=myref sql="select sku, price, description from products"]
+                <!-- make query, this container text is not used. -->
+        [/query]
+
+        [perl]
+                # Get the query results, has multiple fields
+                my $ary = $Tmp->{myref};
+                my $out = '';
+                foreach $line (@$ary) {
+                        my ($sku, $price, $desc) = @$line;
+                        if($sku eq $Scratch->{waiting_for}) {
+                                $out .= "We were waiting for this one!!!!\n";
+                        }
+                        $out .= "sku: $sku price: $price description: $desc\n";
+                }
+                return $out;
+        [/perl]
+        -->
+        TIME: [benchmark]
+
+        [benchmark start=1] All loop
+        <!--
+        [query list=1 sql="select sku, price, description from products"]
+                [if scratch waiting_for eq '[sql-code]']We were waiting for this one!!!!
+                [/if] sku: [sql-code]price: [sql-param price] desc: [sql-param description]  
+        [/query]
+        -->
 
-	TIME: [benchmark]
+        TIME: [benchmark]
 
-	--- end test code ---
+        --- end test code ---
 !endblock
 
 * Other things that help:
@@ -2099,11 +2106,11 @@
 =over 4
 
 =item * PGP for various platforms:
-	
+        
 {{URL:http://www.pgpi.org/products/pgp/versions/freeware/}}  
-	
+        
 =item * WinPT (Windows Privacy Tray)
-	
+        
 {{URL:http://www.winpt.org}}
 
 A universal encrypt/decrypt program that operates 
@@ -2111,11 +2118,11 @@
 there is also an Outlook Express plugin.  It comes with GPG (below).
 
 =item * GPG Windows version
-	
-{{URL:http://www.gnupg.org/download.html}}	
+        
+{{URL:http://www.gnupg.org/download.html}}      
 
 =item * MIT distribution of PGP 
-	
+        
 {{URL:http://web.mit.edu/network/pgp.html}}
 
 Only for US and Canada for non-commercial use. There may also 
@@ -2129,7 +2136,7 @@
 
 They are just there as examples and are not used in the demo. If you
 don't use them, you can delete them.
-	
+        
 Line:
 
 N:Copyright 2001-2002 Red Hat, Inc. Freely redistributable under terms of the GNU General Public License.



1.5       +17 -2     docs/ictable_editor.sdf


rev 1.5, prev_rev 1.4
Index: ictable_editor.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/ictable_editor.sdf,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ictable_editor.sdf	28 Sep 2002 15:23:48 -0000	1.4
+++ ictable_editor.sdf	8 Jul 2003 19:12:59 -0000	1.5
@@ -1,9 +1,9 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual"
-# $Id: ictable_editor.sdf,v 1.4 2002/09/28 15:23:48 mheins Exp $
+# $Id: ictable_editor.sdf,v 1.5 2003/07/08 19:12:59 mheins Exp $
 !define DOC_NAME "Configuration Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "icconfig"
-!define DOC_VERSION substr('$Revision: 1.4 $',11, -2)
+!define DOC_VERSION substr('$Revision: 1.5 $',11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/ictable_editor.html"
@@ -965,6 +965,9 @@
 LI1: mv_blob_pointer
 LI1: mv_blob_title
 LI1: mv_cancelpage
+
+Specifies the destination page if you hit the cancel-button.
+
 LI1: mv_data_auto_number
 LI1: mv_data_fields
 LI1: mv_data_function
@@ -973,6 +976,13 @@
 LI1: mv_nextpage
 LI1: mv_prevpage
 LI1: next_text
+
+You can customze an alternative text for the OK/Next button.
+
+Note! If your alternative text is long, and you get the text chopped, be
+sure to specify a wider button with the ok_button_style setting (eg.
+ok_button_style=|font-weight: bold; width: 80px; text-align: center|)
+
 LI1: no_bottom
 LI1: no_meta
 LI1: no_table_meta
@@ -1029,6 +1039,11 @@
 LI1: ui_data_key_name
 LI1: ui_display_only
 LI1: ui_hide_key
+
+Hides the key-field in the form. Remember that if you use the B<fields>
+option, then you have to include the key-column in that
+list. Otherwise the form will fail to update the record.
+
 LI1: ui_meta_specific
 LI1: ui_meta_view
 LI1: ui_new_item



1.111     +204 -72   docs/ictags.sdf


rev 1.111, prev_rev 1.110
Index: ictags.sdf
===================================================================
RCS file: /anon_cvs/repository/docs/ictags.sdf,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- ictags.sdf	7 Jul 2003 17:40:15 -0000	1.110
+++ ictags.sdf	8 Jul 2003 19:12:59 -0000	1.111
@@ -1,10 +1,10 @@
 !init OPT_LOOK="icdevgroup"; OPT_STYLE="manual" 
-# $Id: ictags.sdf,v 1.110 2003/07/07 17:40:15 mheins Exp $
+# $Id: ictags.sdf,v 1.111 2003/07/08 19:12:59 mheins Exp $
 
 !define DOC_NAME "Interchange Tags Reference"
 !define DOC_TYPE ""
 !define DOC_CODE "ictags"
-!define DOC_VERSION substr('$Revision: 1.110 $', 11, -2)
+!define DOC_VERSION substr('$Revision: 1.111 $', 11, -2)
 !define DOC_STATUS "Draft"
 !define DOC_PROJECT "Interchange"
 !define DOC_URL "http://www.icdevgroup.org/doc/ictags.html"
@@ -763,6 +763,19 @@
 parameter and becomes the code for this row.
 Another synonym is E<lbracket>{{C[jump="#PREFIX-pos"]prefix-pos}} 0].
 
+Mixed case field names in your SQL tables will be forced to lower case in the E<lbracket>prefix-param name] tag if the underlying Database does that (as with most
+SQL types).  For example if your query is
+
+>    [query prefix=prefix sql="select Foo, Bar from baz where Foo='buz'"]
+
+then you must use:
+
+>    [prefix-param foo] and [prefix-param bar] 
+
+to display your results, rather than:
+
+>    [prefix-param Foo] and [prefix-param Bar] 
+
 Note that the following code is invalid:
 
 >    [query prefix=prefix sql=|
@@ -5586,7 +5599,7 @@
 
 Must pass named parameter interpolate=1 to cause interpolation.
 
-This is a container tag, i.e. [filter] FOO [/filter].
+This is a container tag, i.e. E<lbracket>filter] FOO E<lbracket>/filter].
 \Nesting: NO
 
 Invalidates cache: B<no>
@@ -5638,9 +5651,12 @@
 B<Tag expansion example:>
 
 !block example
-    [filter op]
----
-    TODO: (tag result)
+    [filter lc]UPPER CASE YOU WANT TO SEE AS LOWER CASE[/filter]
+
+    Produces:
+
+		upper case you want to see as lower case
+
 !endblock
 
 
@@ -5784,7 +5800,7 @@
 Looks up an item in a database based on the passed table and
 column. Call would be:
 
->    [filter op="uc lookup.country.name"]us[/filter]
+>    [filter op="uc lookup.country.name"]US[/filter]
 
 This would be the equivalent of [data table=country column=name key=US].
 
@@ -8581,15 +8597,6 @@
 !endblock
 
 
-B<Tag expansion example:>
-
-!block example
-    [mail to]
----
-    TODO: (tag result)
-!endblock
-
-
 B<ASP-like Perl call:>
 
 !block example; lang="Perl"
@@ -10413,6 +10420,7 @@
       [/list]
 
       [more_list]
+        Matches [matches] of [match-count] shown.<BR>
         [more]
       [/more_list]
     [/query]
@@ -10548,7 +10556,17 @@
     # $Vend::Interpolate::Tmp->{my_results} == $hash_results
     # $Vend::Interpolate::Tmp->{''} == $results == $same_results
 
-    return $Tag->uneval( $results );
+    my $out = "The returned structure is\n";
+	$out .= $Tag->uneval( $results );
+    
+    #loop through each row & display the fields
+    foreach my $row (@$hash_results) {
+       $out .= '<p>sku: ' . $row->{sku}
+	   $out .= '<br>price: ' . $row->{price};
+	   $out .= '<br>description: ' . $row->{description};
+    }
+    return $out;
+
 !endblock
 >  [/perl]
 
@@ -10820,6 +10838,35 @@
 E<lbracket>{{C[jump="#perl"]perl}}] tag. Note that it does not force
 list context if you call $Tag->query in scalar context.
 
+Here is another example of the use of the array references, from a UserTag:
+
+!block example
+    my $sku = 'os28044';
+    my $sql = qq{select description, price from products where sku = '$sku'};
+    my $table = 'products';
+
+    my ($results, $col_name_hashref, $col_name_arrayref) = $Tag->query({
+            wantarray => 1,
+            sql => "$sql",
+            table => "$table"});
+
+    my $out;
+
+    # this will get the first field (description)..
+    $out = 'description: ' . $results->[0]->[0];
+
+    # and this the second field (price)..
+    $out .= '<br>price: ' . $results->[0]->[1];
+
+    # this will tell us the position in the $results array of the price field..
+    $out .= '<br>position of price field: ' . $col_name_hashref->{price};
+    return $out;
+!endblock
+
+If the [query] returns more than one row, the second row's description field would be:
+
+>    $results->[1]->[0]
+
 Technical noteE<nbspace>E<emdash> the ordinary
 E<lbracket>C<query>E<nbspace>...]E<nbspace>...E<nbspace>E<lbracket>C</query>]
 usage forces scalar context on the
@@ -10829,6 +10876,64 @@
 tag. The wantarray option is needed because global subs and usertags
 are also affected by this unless you set wantarray.
 
+Example of a nested query:
+
+!block example
+    [query
+        ml=99
+        type=list
+        sp="@@MV_PAGE@@"
+        sql=|
+            SELECT  foo1, foo2, foo3
+            FROM    bar
+            WHERE   someothercol = 'bang'
+        |]
+        [list]
+
+            Here is [sql-param foo1] from outer <br>
+
+
+           [query
+               prefix=usr
+               list_prefix=detail
+               ml=1
+               type=list
+               sp="@@MV_PAGE@@"
+               sql=|
+                SELECT  flip
+                FROM    flap
+                WHERE   flog = 'flan'
+              |]
+
+             [usr-on-match]
+                something was found in the inner!
+             [/usr-on-match]
+
+             [detail]
+
+                Here is [usr-param flip] from inner <br>
+
+                Here is [sql-param foo2] from outer!! <br>
+
+             [/detail]
+           [/query]
+
+            Here is [sql-param foo3] from outer!!! <br>
+
+        [/list]
+        [on-match]
+            Something was found in the outer query<br>
+        [/on-match]
+        [no-match]
+            Nothing was found in the outer query<br>
+        [/no-match]
+        [more-list]
+		<br>[matches] in the outer query<br>
+        [/more-list]
+    [/query]
+!endblock
+
+Notice the use of 'prefix' and 'list_prefix' on subsequent inner queries.
 
 H2: read-cookie
 
@@ -11900,13 +12005,26 @@
 H4:  {{CMD[id="set_cookie_expire"]expire}}
 
 Persistent cookies (that outlive a browser session) require an
-expiration date. The date must be a string of the N<form:>
+expiration date. There are two ways to set it -- relative times
+and absolute times.
+
+LI2: absolute
+
+The date must be a string of the N<form:>
 
 . "Wdy,E<nbspace>DD-Mon-YYYYE<nbspace>HH:MM:SSE<nbspace>GMT"
 
 and the timezone must be GMT.
 
-If you do not supply a date, the cookie will disappear when the user
+LI2: relative
+
+Supply a period in the form C<NN> C<sec|min|hours|days|weeks>.
+
+\Example:
+
+> [set-cookie name=THE_COOKIE value=foo expire="7 days"]
+
+If you do not supply a date (either absolute or relative), the cookie will disappear when the user
 closes the browser.
 
 H4:  {{CMD[id="set_cookie_domain"]domain}}
@@ -11929,6 +12047,21 @@
 This ensures that the cookie will be visible regardless of how the end
 user returns to your catalog. 
 
+H3: Tips
+
+You can use the time tag in conjunction with the set-cookie tag to set
+the expiration date to an absolute date.
+
+>   [set-cookie
+>     name=mycookie
+>     value="the value"
+>     expire="[time gmt=1 adjust='+2190']%a, %m-%b-%Y %H:%M:%S GMT[/time]"
+>   ]
+
+In the example above, the adjustment of +2190 will set a cookie
+expiration of 2190 hours forward from the current date.
+
+You can use the 
 
 H2: seti
 
@@ -15053,28 +15186,28 @@
 each of the pages. The results of this code for page2 are shown below.
 
 !block example
-	<table><tr>
-	[bar-button page=page1]
-	<TD><A HREF="[area page1]">PAGE-1</A></TD>
-	[selected]
-	<TD bgcolor="red"><A HREF="[area page1]"><B>PAGE-1-selected</B></A></TD>
-	[/selected]
-	[/bar-button]
-	[bar-button page=page2]
-	<TD><A HREF="[area page2]">PAGE-2</A></TD>
-	[selected]
-	<TD bgcolor="red"><A HREF="[area page2]"><B>PAGE-2-selected</B></A></TD>
-	[/selected]
-	[/bar-button]
-	[bar-button page=page3]
-	<TD><A HREF="[area page3]">PAGE-3</A></TD>
-	[selected]
-	<TD bgcolor="red"><A HREF="[area page3]"><B>PAGE-3-selected</B></A></TD>
-	[/selected]
-	[/bar-button]
-	</tr></table>
+        <table><tr>
+        [bar-button page=page1]
+        <TD><A HREF="[area page1]">PAGE-1</A></TD>
+        [selected]
+        <TD bgcolor="red"><A HREF="[area page1]"><B>PAGE-1-selected</B></A></TD>
+        [/selected]
+        [/bar-button]
+        [bar-button page=page2]
+        <TD><A HREF="[area page2]">PAGE-2</A></TD>
+        [selected]
+        <TD bgcolor="red"><A HREF="[area page2]"><B>PAGE-2-selected</B></A></TD>
+        [/selected]
+        [/bar-button]
+        [bar-button page=page3]
+        <TD><A HREF="[area page3]">PAGE-3</A></TD>
+        [selected]
+        <TD bgcolor="red"><A HREF="[area page3]"><B>PAGE-3-selected</B></A></TD>
+        [/selected]
+        [/bar-button]
+        </tr></table>
 ---
-	PAGE-1    PAGE-2-selected    PAGE-3
+        PAGE-1    PAGE-2-selected    PAGE-3
 !endblock
 
 
@@ -15188,7 +15321,7 @@
 
 !block example; lang="Perl"
     $Tag->convert_date( { days => 1 } );
-					   
+                                           
     $Tag->convert_date( { body => "2001-05-19 15:35",
                        format => "%d-%m-%Y %H:%M", } );
 !endblock
@@ -15556,10 +15689,9 @@
 !block table; colvaligns="TTT"; format="262"
 Parameters|Description|Default
 {{CMD[jump="#get_url_url"]url}}|<<
-Must be a valid URL. Meaning, you have to supply the protocol. 
-. Example 
-** http://demo.akopia.com/
-** ftp://ftp.akopia.com/
+Must be a valid URL. Meaning, you have to supply the protocol.  Example 
+** http://demo.icdevgroup.org/
+** ftp://ftp.icdevgroup.org/
 >>|I<none>
 !endblock
 
@@ -15579,23 +15711,23 @@
 B<Tag expansion example:>
 
 !block example
-    [get-url http://demo.akopia.com/]
-    [get-url url="http://demo.akopia.com/" strip=1]
+    [get-url http://demo.icdevgroup.org/]
+    [get-url url="http://demo.icdevgroup.org/" strip=1]
 !endblock
 
 B<ASP-like Perl call:>
 
 !block example; lang="Perl"
-    $Tag->get_url( { url => "http://demo.akopia.com/", } );
-					   
-    $Tag->get_url( { url => "http://demo.akopia.com/",
+    $Tag->get_url( { url => "http://demo.icdevgroup.org/", } );
+                                           
+    $Tag->get_url( { url => "http://demo.icdevgroup.org/",
                    strip => 1, } );
 !endblock
 
 or similarly with positional parameters,
 
 !block example; lang="Perl"
-    $Tag->get_url( "http://demo.akopia.com/" );
+    $Tag->get_url( "http://demo.icdevgroup.org/" );
 !endblock
 
 H3: Description
@@ -15832,7 +15964,7 @@
 !block example; lang="Perl"
     $Tag->summary( { amount => 10.5,
                        hide => 1, } );
-					   
+                                           
     $Tag->summary( { amount => 25,
                        name => mytotal,
                    currency => 1, } );
@@ -15901,12 +16033,12 @@
 
 !block example;
     [B<table-organize> cols* I<other_named_attributes>]
-	     [loop ....] <td> [loop-tags] </td> [/loop]
-	[/table-organize]
-	
+             [loop ....] <td> [loop-tags] </td> [/loop]
+        [/table-organize]
+        
     [B<table-organize> cols=n* I<other_named_attributes>]
-	     [loop ....] <td> [loop-tags] </td> [/loop]
-	[/table-organize]
+             [loop ....] <td> [loop-tags] </td> [/loop]
+        [/table-organize]
 !endblock
 
 !block note; label="Positional parameters: "
@@ -16162,7 +16294,7 @@
 
 !block example; lang="Perl"
     $Tag->title_bar( { body => "My Title", } );
-					   
+                                           
     $Tag->title_bar( { width => 400,
                        color => "#0000ff",
                         body => "My title", } );
@@ -16263,8 +16395,8 @@
              attributes="date" 
                    date="[tag time]%d-%b-%Y[/tag]"
            toplevel_tag=products
-    ]code	description	price
-        [query list=1 sql="select sku, description, price from products" prefix=xml][xml-code]	[xml-param description]	[xml-param price]
+    ]code       description     price
+        [query list=1 sql="select sku, description, price from products" prefix=xml][xml-code]  [xml-param description] [xml-param price]
         [/query]
     [/xml-generator]
 ---
@@ -16287,8 +16419,8 @@
 
 !block example; lang="Perl"
     $Tag->xml_generator( {type => delimited,
-	              toplevel_tag => apex,  }, $BODY );
-					   
+                      toplevel_tag => apex,  }, $BODY );
+                                           
 !endblock
 
 or similarly with positional parameters,
@@ -16417,19 +16549,19 @@
             <record_tag key="value of first field-1">
                 <field_tag name="fieldname1">fieldvalue1</field_tag>
                 <field_tag name="fieldname2">fieldvalue2</field_tag>
-			</record_tag>
+                        </record_tag>
             <record_tag key="value of first field-2">
                 <field_tag name="fieldname1">fieldvalue1</field_tag>
                 <field_tag name="fieldname2">fieldvalue2</field_tag>
-			</record_tag>
-		</toplevel_tag>
+                        </record_tag>
+                </toplevel_tag>
         <toplevel_tag name="tablename2">
             <record_tag key="value of first field-1">
                 <field_tag name="fieldname1">fieldvalue1</field_tag>
                 <field_tag name="fieldname2">fieldvalue2</field_tag>
-			</record_tag>
-		</toplevel_tag>
-	</database>
+                        </record_tag>
+                </toplevel_tag>
+        </database>
 !endblock
 
 B<Important note:> All tables are read into memory. So be warned, this
@@ -16456,10 +16588,10 @@
 Another way of providing the field names would be:
 
 !block example
-    [xml-generator .....]fieldname-1	fieldname-2	fieldname-3
-	[field value list 
-	 delimited by option delimiter and 
-	 separated by option separator][/xml-generator]
+    [xml-generator .....]fieldname-1    fieldname-2     fieldname-3
+        [field value list 
+         delimited by option delimiter and 
+         separated by option separator][/xml-generator]
 !endblock
 
 Note: Field name list B<must> be tab delimited. 







More information about the docs mailing list