Permalink
Browse files

* Updates. Too bad I'm idle lately. My PC machines went broken, and

  I don't have a platform to run docbook on it
  • Loading branch information...
1 parent 62f0a61 commit b8bc221f5c7f725c17fd3c9b2eb40e6e6ac10484 @docelic docelic committed Mar 12, 2006
Showing with 269 additions and 2 deletions.
  1. +5 −1 TODO
  2. +63 −1 refs/DatabaseDefault
  3. +9 −0 refs/Locale
  4. +27 −0 refs/MV_CURRENCY
  5. +44 −0 refs/SetGroup
  6. +94 −0 refs/TcpMap
  7. +9 −0 refs/TcpPort
  8. +18 −0 refs/mv_credit_card_number
View
6 TODO
@@ -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:
=======
View
64 refs/DatabaseDefault
@@ -3,7 +3,57 @@ specify default settings for Database directives
__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 USER interchange
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__
View
9 refs/Locale
@@ -83,6 +83,15 @@ The description doesn't seem to match the description of the same variable when
__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
View
27 refs/MV_CURRENCY
@@ -0,0 +1,27 @@
+__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__
View
44 refs/SetGroup
@@ -0,0 +1,44 @@
+__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__
View
94 refs/TcpMap
@@ -0,0 +1,94 @@
+__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__
+
+
View
9 refs/TcpPort
@@ -0,0 +1,9 @@
+__NAME__ purpose
+(obsolete)
+__END__
+
+
+__NAME__ see also
+TcpHost, TcpMap
+__END__
+
View
18 refs/mv_credit_card_number
@@ -0,0 +1,18 @@
+
+.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.

0 comments on commit b8bc221

Please sign in to comment.