[docs] xmldocs - docelic modified 8 files

docs at icdevgroup.org docs at icdevgroup.org
Sun Mar 12 17:12:35 EST 2006


User:      docelic
Date:      2006-03-12 22:12:35 GMT
Modified:  .        TODO
Modified:  refs     DatabaseDefault Locale
Added:     refs     MV_CURRENCY SetGroup TcpMap TcpPort
Added:              mv_credit_card_number
Log:
* Updates. Too bad I'm idle lately. My PC machines went broken, and
  I don't have a platform to run docbook on it

Revision  Changes    Path
1.82      +5 -1      xmldocs/TODO


rev 1.82, prev_rev 1.81
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- TODO	5 Feb 2006 13:17:14 -0000	1.81
+++ TODO	12 Mar 2006 22:12:35 -0000	1.82
@@ -1,4 +1,8 @@
-in iccattut, s/item-field/item-param/ at least on some places. 
+- in iccattut, s/item-field/item-param/ at least on some places. 
+- Make xmldocs tarball in ftp autoupdated
+- Fix file README, directly at the top it talks about prefixes, OUTPUT dir
+  etc without introducing it first.
+- Change -latest to version number in tarball download
 
 Outstanding:
 =======



1.3       +63 -1     xmldocs/refs/DatabaseDefault


rev 1.3, prev_rev 1.2
Index: DatabaseDefault
===================================================================
RCS file: /var/cvs/xmldocs/refs/DatabaseDefault,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DatabaseDefault	18 Nov 2005 23:15:02 -0000	1.2
+++ DatabaseDefault	12 Mar 2006 22:12:35 -0000	1.3
@@ -3,7 +3,57 @@
 __END__
 
 __NAME__ see also
-Database
+Database, Replace
+__END__
+
+__NAME__ description
+The directive defines default parameters for a database.
+</para><para>
+For a list of possible parameters (keys), see the &conf-Database; directive.
+</para><para>
+&conf-DatabaseDefault; accepts any scalar setting, which means all
+<emphasis role='bold'>except</emphasis>:
+
+<itemizedlist>
+<listitem><para>
+        ALTERNATE_*
+</para></listitem>
+<listitem><para>
+        BINARY
+</para></listitem>
+<listitem><para>
+        COLUMN_DEF
+</para></listitem>
+<listitem><para>
+        DEFAULT
+</para></listitem>
+<listitem><para>
+        FIELD_ALIAS
+</para></listitem>
+<listitem><para>
+        FILTER_*
+</para></listitem>
+<listitem><para>
+        NAME
+</para></listitem>
+<listitem><para>
+        NUMERIC
+</para></listitem>
+<listitem><para>
+        POSTCREATE
+</para></listitem>
+<listitem><para>
+        WRITE_CATALOG
+</para></listitem>
+</itemizedlist>
+__END__
+
+__NAME__ notes
+Those defaults settings are made when the table is initially defined, so explicit
+settings for the database itself override the defaults, of course.
+</para><para>
+The setting must be made <emphasis role='bold'>before</emphasis> the database is defined using the
+&conf-Database; directive. For a way to clear definitions, use the &conf-Replace; directive.
 __END__
 
 __NAME__ example: Specify default SQL connection username and password
@@ -16,3 +66,15 @@
 DatabaseDefault PASS nevairbe
 </programlisting>
 __END__ 
+
+
+__NAME__ example: Specifying WRITE_CONTROL and WRITE_TAGGED defaults
+<programlisting>
+DatabaseDefault      WRITE_CONTROL   1
+DatabaseDefault      WRITE_TAGGED    1
+</programlisting>
+__END__
+
+__NAME__ example: Clearing default values
+Replace DatabaseDefault
+__END__



1.9       +9 -0      xmldocs/refs/Locale


rev 1.9, prev_rev 1.8
Index: Locale
===================================================================
RCS file: /var/cvs/xmldocs/refs/Locale,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Locale	5 Feb 2006 13:17:15 -0000	1.8
+++ Locale	12 Mar 2006 22:12:35 -0000	1.9
@@ -83,6 +83,15 @@
 __END__
 
 
+Example of POSIX setlocale for France, if properly aliased:
+
+!block example
+Locale     fr
+!endblock
+
+ee C<setlocale(3)> for more information. If embedded Perl code is used to sort search returns, the C<setlocale()> will carry through to string collation.
+
+
 
 
 LI1: price_picture



1.1                  xmldocs/refs/MV_CURRENCY


rev 1.1, prev_rev 1.0
Index: MV_CURRENCY
===================================================================
__NAME__ purpose
contains the current locale for currency display
__END__

__NAME__ synopsis
<literal>@@MV_CURRENCY@@</literal><sbr/>
<literal>@@CURRENCY@@</literal>
__END__

__NAME__ see also
MV_LANG
__END__

__NAME__ description
This variable contains the current &glos-locale; for currency and price
display.
The variable is not set in the configuration files, but is
manipulated by the Interchange daemon while it is runnning.
__END__


__NAME__ example: Reading value of MV_CURRENCY
Add the following to a test Interchange page:
<programlisting><![CDATA[
Currency: @@MV_CURRENCY@@
]]></programlisting>
__END__



1.1                  xmldocs/refs/SetGroup


rev 1.1, prev_rev 1.0
Index: SetGroup
===================================================================
__NAME__ purpose
specify primary Unix group to switch to, after catalog to invoke is determined
__END__


__NAME__ synopsis
<group choice='req'>
	<arg choice='plain'><replaceable>group</replaceable></arg>
</group>
__END__


__NAME__ description
By default, the &IC; server and the individual catalogs it serves
run under the same Unix user ID and user group (UID and GID).
</para><para>
This directive allows you to switch group at the catalog level.
However, this approach has its drawbacks. First of all, the &IC; user
must already be a member of the target group, that is &mdash; have the
target group in its list of secondary groups. Verify that using the
<command>id <replaceable>USERNAME</replaceable></command> command.
Another, related problem is of a more technical nature. Namely, most
operating systems limit the number of secondary groups per user;
on Linux, this limit is <literal>32</literal> groups (run 
<command>grep -r NGROUPS_MAX /usr/include/</command> to verify).
This means that you cannot develop a generic site scheme based on
&conf-SetGroup; if you plan to serve more than 30 catalogs, or
switch between more than 30 groups.
</para><para>
One viable solution is to either run separate &IC; daemons (each 
serving 30 catalogs), or give each catalog user it's own &IC;
server. The latter is beneficial in terms of tighter access control and
greater user freedom, and is a generally acceptable approach.
__END__

__NAME__ example: Defining SetGroup
<programlisting>
SetGroup catuser1
</programlisting>
__END__

__NAME__ see also
ReadPermission,WritePermission
__END__



1.1                  xmldocs/refs/TcpMap


rev 1.1, prev_rev 1.0
Index: TcpMap
===================================================================
__NAME__ purpose
specify which ports should Interchange server running in Inet mode listen on
__END__


__NAME__ see also
TcpHost, &glos-configuration;, Catalog
__END__

__NAME__ synopsis
<arg choice='plain' rep='repeat'>
<replaceable>host_and_port_specification</replaceable>
<replaceable>catalog_specification</replaceable>
</arg>
__END__


__NAME__ description
The &conf-TcpMap; directive defines a list of host addresses and ports that
the &IC; server should listen on (when running in Inet mode using 
<literal>tlink</literal> &glos-link-program;, of course).
</para><para>
In the past, &IC; had its own built-in Web server which also allowed 
for binding of specific catalogs to specific ports. Since this built-in
server is long gone now, its behavior was replaced by a combination of
aliases on the real Web server and &IC; catalog definitions.
See <xref linkend="TcpMap_examples"/> for clarification.
</para><para>
By default, &IC; listens on all IP addresses, on port <literal>7786</literal>. 
The port number comes from the ASCII values of letters <literal>M</literal> and
<literal>V</literal>, which stood for "<literal>MiniVend</literal>"
(see <ulink url="http://www.icdevgroup.org/i/dev/about">Interchange
About and History page</ulink> for more background information).
</para><para>
<literal>host_and_port_specification</literal> defines hostnames and
ports to bind to. Self-explanatory examples include <literal>7786</literal>,
<literal>*:7786</literal>, <literal>127.0.0.1:7786</literal> or
<literal>&def-hostname;:7786</literal>.
</para><para>
<literal>catalog_specification</literal> is the name of the catalog to 
offer on selected hostname and port. Since there is no more built-in
Web server in &IC;, the only sensible definition is "<literal>-</literal>".
__END__

__NAME__ example: Defining TcpMap
The following makes &IC; listen on three ports.
<programlisting><![CDATA[
TcpMap 7786 - 7787 - 7788 -
]]></programlisting>
__END__

__NAME__ example: Mass-defining TcpMap
To define a large number of ports, the "here document"
capability of Interchange &glos-configuration; engine can be used:
<programlisting>
TcpMap &lt;&lt;EOD
  *:7786   -
  127.0.0.1:7787   -
  &def-hostname;:7788   -
  *:7789   -
EOD
</programlisting>
__END__


__NAME__ example: Offerning specific catalogs on specific ports
Even though the internal Web server in &IC; is gone, 
<literal>tlink</literal> (Inet &glos-link-program;) still relies only on
the <envar>SCRIPT_PATH</envar> environment variable to determine which
catalog was requested. This means that the
functional equivalent of catalogs bound to ports can still be achieved,
by use of Web server location aliases and &IC; script path aliases. Actually, 
you'd probably want to do this just to reduce the length of
&glos-HTML; links.
</para><para>
Here's an example of needed &APACHE; Web server configuration:
<programlisting><![CDATA[
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /CATALOG_NAME /usr/lib/cgi-bin/ic/CATALOG_NAME
<Directory "/usr/lib/cgi-bin">
  AllowOverride None
  Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
  Order allow,deny
  Allow from all
</Directory>
]]></programlisting>
</para><para>
And here's the appropriate catalog definition in &gcf;:
<programlisting><![CDATA[
Catalog CATALOG_NAME /PATH/TO/CATALOG/CATALOG_NAME /cgi-bin/ic/CATALOG_NAME /CATALOG_NAME
]]></programlisting>
__END__





1.1                  xmldocs/refs/TcpPort


rev 1.1, prev_rev 1.0
Index: TcpPort
===================================================================
__NAME__ purpose
(obsolete)
__END__


__NAME__ see also
TcpHost, TcpMap
__END__




1.1                  xmldocs/refs/mv_credit_card_number


rev 1.1, prev_rev 1.0
Index: mv_credit_card_number
===================================================================

.If the user has sent a cookie to Interchange (meaning the second page they access), and the scratch value C<mv_no_session_id> is set in their session, the session ID will not be appended to the URL. If the scratch value C<mv_no_count> is set, then the page count will not be appended. This is not dependent on cookies. So, if placed in the initial page:

!block example; listitem=2
[set mv_no_session_id]1[/set]
[set mv_no_count]1[/set]
[set mv_add_dot_html]1[/set]
!endblock

.or put in C<catalog.cfg>:

!block example; listitem=2
ScratchDefault  mv_no_session_id  1
ScratchDefault  mv_no_count       1
ScratchDefault  mv_add_dot_html   1
!endblock

.No session ID or count will be shown. That makes the URL shown above to be http://machine.company.com/cgi-bin/vlink/shirts.html. Once again, this is on the second page the user accesses, if they are taking and sending cookies. If the user has a pre-existing C<MV_SESSION_ID> or C<MV_USERNAME> cookie from a prior session, the effect will be immediate.








More information about the docs mailing list