[interchange-docs] xmldocs - docelic modified 10 files

docs at icdevgroup.org docs at icdevgroup.org
Sat Nov 10 17:25:03 EST 2007


User:      docelic
Date:      2007-11-10 22:25:03 GMT
Modified:  .        TODO
Modified:  files/infobot interchange.fact
Modified:  glossary UserDB
Added:     files/userdb login.txt userdatabase.txt userdb.mysql
Added:              userdb.pgsql
Added:     refs     DebugTemplate space_to_nbsp.filter
Removed:   files/various userdatabase.txt
Log:
* UserDB glossary entry and supporting files
* DebugTemplate, space_to_nbsp

Revision  Changes    Path
1.106     +1 -0      xmldocs/TODO


rev 1.106, prev_rev 1.105
Index: TODO
===================================================================
RCS file: /var/cvs/xmldocs/TODO,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- TODO	10 Nov 2007 18:28:14 -0000	1.105
+++ TODO	10 Nov 2007 22:25:02 -0000	1.106
@@ -1,6 +1,7 @@
 Bugs:
 -textarea widget is hidden as it is found in text.widget file
 -check if really linking between widgets is not working
+-sort keys in infobot file so that they don't end up in different order each time and look like a file to commit
 - search doc se nevidi jer je search neki actionmap
 - on online docs, mention that obsolete examples are obsolete, 
   provide search box, provide static files for download, 



1.5       +16 -2     xmldocs/files/infobot/interchange.fact


rev 1.5, prev_rev 1.4
Index: interchange.fact
===================================================================
RCS file: /var/cvs/xmldocs/files/infobot/interchange.fact,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- interchange.fact	5 Nov 2007 18:34:02 -0000	1.4
+++ interchange.fact	10 Nov 2007 22:25:02 -0000	1.5
@@ -13,7 +13,6 @@
 DNSBL => Config directive: http://www.icdevgroup.org/xmldocs/confs/DNSBL.html
 unique => Ordercheck: http://www.icdevgroup.org/xmldocs/orderchecks/unique.html
 ShowTimes => Config directive: http://www.icdevgroup.org/xmldocs/confs/ShowTimes.html
-lspace2nbsp => Filter: http://www.icdevgroup.org/xmldocs/filters/lspace2nbsp.html
 reconfig-time => Tag: http://www.icdevgroup.org/xmldocs/tags/reconfig-time.html
 TrackPageParam => Config directive: http://www.icdevgroup.org/xmldocs/confs/TrackPageParam.html
 FullUrl => Config directive: http://www.icdevgroup.org/xmldocs/confs/FullUrl.html
@@ -36,6 +35,7 @@
 hash2acl => Filter: http://www.icdevgroup.org/xmldocs/filters/hash2acl.html
 msg => Tag: http://www.icdevgroup.org/xmldocs/tags/msg.html
 MV_FORTUNE_COMMAND => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_FORTUNE_COMMAND.html
+warning => Tag: http://www.icdevgroup.org/xmldocs/tags/warning.html
 TagGroup => Config directive: http://www.icdevgroup.org/xmldocs/confs/TagGroup.html
 exists => Ordercheck: http://www.icdevgroup.org/xmldocs/orderchecks/exists.html
 expire => Glossary: http://www.icdevgroup.org/xmldocs/glossary/expire.html
@@ -113,6 +113,7 @@
 convert-date => Tag: http://www.icdevgroup.org/xmldocs/tags/convert-date.html
 email-raw => Tag: http://www.icdevgroup.org/xmldocs/tags/email-raw.html
 ifdef => Tag: http://www.icdevgroup.org/xmldocs/tags/ifdef.html
+AVS => Glossary: http://www.icdevgroup.org/xmldocs/glossary/AVS.html
 local => Tag: http://www.icdevgroup.org/xmldocs/tags/local.html
 MV_COMPONENT_DIR => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_COMPONENT_DIR.html
 summary => Tag: http://www.icdevgroup.org/xmldocs/tags/summary.html
@@ -138,6 +139,7 @@
 image-collate => Tag: http://www.icdevgroup.org/xmldocs/tags/image-collate.html
 rotated-banner => Glossary: http://www.icdevgroup.org/xmldocs/glossary/rotated-banner.html
 MaxRequestsPerChild => Config directive: http://www.icdevgroup.org/xmldocs/confs/MaxRequestsPerChild.html
+CountrySubdomains => Config directive: http://www.icdevgroup.org/xmldocs/confs/CountrySubdomains.html
 StaticFly => Config directive: http://www.icdevgroup.org/xmldocs/confs/StaticFly.html
 ECHO_PAYMENT_PRECISION => Variable: http://www.icdevgroup.org/xmldocs/vars/ECHO_PAYMENT_PRECISION.html
 locale => Glossary: http://www.icdevgroup.org/xmldocs/glossary/locale.html
@@ -195,10 +197,12 @@
 PIDcheck => Config directive: http://www.icdevgroup.org/xmldocs/confs/PIDcheck.html
 MV_PAYMENT_PRECISION => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_PAYMENT_PRECISION.html
 loop => Tag: http://www.icdevgroup.org/xmldocs/tags/loop.html
+IMAGEFIELDS => Variable: http://www.icdevgroup.org/xmldocs/vars/IMAGEFIELDS.html
 fortune => Tag: http://www.icdevgroup.org/xmldocs/tags/fortune.html
 UI_DATE_END => Variable: http://www.icdevgroup.org/xmldocs/vars/UI_DATE_END.html
 NoImportExternal => Config directive: http://www.icdevgroup.org/xmldocs/confs/NoImportExternal.html
 widget-meta => Tag: http://www.icdevgroup.org/xmldocs/tags/widget-meta.html
+PreForkSingleFork => Config directive: http://www.icdevgroup.org/xmldocs/confs/PreForkSingleFork.html
 ConfDir => Config directive: http://www.icdevgroup.org/xmldocs/confs/ConfDir.html
 mac => Filter: http://www.icdevgroup.org/xmldocs/filters/mac.html
 SendMailProgram => Config directive: http://www.icdevgroup.org/xmldocs/confs/SendMailProgram.html
@@ -211,6 +215,7 @@
 ParseVariables => Config directive: http://www.icdevgroup.org/xmldocs/confs/ParseVariables.html
 traffic-report => Tag: http://www.icdevgroup.org/xmldocs/tags/traffic-report.html
 GIFT_CERT_TABLE => Variable: http://www.icdevgroup.org/xmldocs/vars/GIFT_CERT_TABLE.html
+CSS_CONTRAST => Variable: http://www.icdevgroup.org/xmldocs/vars/CSS_CONTRAST.html
 IMAGE_MOGRIFY => Variable: http://www.icdevgroup.org/xmldocs/vars/IMAGE_MOGRIFY.html
 ScratchDefault => Config directive: http://www.icdevgroup.org/xmldocs/confs/ScratchDefault.html
 ExternalFile => Config directive: http://www.icdevgroup.org/xmldocs/confs/ExternalFile.html
@@ -291,6 +296,7 @@
 discount => Glossary: http://www.icdevgroup.org/xmldocs/glossary/discount.html , Tag: http://www.icdevgroup.org/xmldocs/tags/discount.html
 roman => Filter: http://www.icdevgroup.org/xmldocs/filters/roman.html
 return_to => Tag: http://www.icdevgroup.org/xmldocs/tags/return_to.html
+process-target => Tag: http://www.icdevgroup.org/xmldocs/tags/process-target.html
 qb_safe => Filter: http://www.icdevgroup.org/xmldocs/filters/qb_safe.html
 USPS_MAILTYPE => Variable: http://www.icdevgroup.org/xmldocs/vars/USPS_MAILTYPE.html
 word => Filter: http://www.icdevgroup.org/xmldocs/filters/word.html
@@ -392,6 +398,7 @@
 setvar => Tag: http://www.icdevgroup.org/xmldocs/tags/setvar.html
 UI_T_BG => Variable: http://www.icdevgroup.org/xmldocs/vars/UI_T_BG.html
 SearchProfile => Config directive: http://www.icdevgroup.org/xmldocs/confs/SearchProfile.html
+no_negative_tax => Pragma: http://www.icdevgroup.org/xmldocs/pragmas/no_negative_tax.html
 always_fail => Ordercheck: http://www.icdevgroup.org/xmldocs/orderchecks/always_fail.html
 interval => Glossary: http://www.icdevgroup.org/xmldocs/glossary/interval.html
 space_to_null => Filter: http://www.icdevgroup.org/xmldocs/filters/space_to_null.html
@@ -487,6 +494,7 @@
 no_locale_parse => Pragma: http://www.icdevgroup.org/xmldocs/pragmas/no_locale_parse.html
 CookieLogin => Config directive: http://www.icdevgroup.org/xmldocs/confs/CookieLogin.html
 MV_OPTION_TABLE_SIMPLE => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_OPTION_TABLE_SIMPLE.html
+process-order => Tag: http://www.icdevgroup.org/xmldocs/tags/process-order.html
 dbinfo => Tag: http://www.icdevgroup.org/xmldocs/tags/dbinfo.html
 DeleteDirective => Config directive: http://www.icdevgroup.org/xmldocs/confs/DeleteDirective.html
 TAXCOUNTRY => Variable: http://www.icdevgroup.org/xmldocs/vars/TAXCOUNTRY.html
@@ -513,7 +521,9 @@
 js => Glossary: http://www.icdevgroup.org/xmldocs/glossary/js.html
 diff => Tag: http://www.icdevgroup.org/xmldocs/tags/diff.html
 db-hash => Tag: http://www.icdevgroup.org/xmldocs/tags/db-hash.html
+sha1 => Filter: http://www.icdevgroup.org/xmldocs/filters/sha1.html
 AdminHost => Config directive: http://www.icdevgroup.org/xmldocs/confs/AdminHost.html
+gateway => Glossary: http://www.icdevgroup.org/xmldocs/glossary/gateway.html
 SpecialPageDir => Config directive: http://www.icdevgroup.org/xmldocs/confs/SpecialPageDir.html
 LABEL => Variable: http://www.icdevgroup.org/xmldocs/vars/LABEL.html
 load_cart => Tag: http://www.icdevgroup.org/xmldocs/tags/load_cart.html
@@ -529,7 +539,6 @@
 IPCsocket => Config directive: http://www.icdevgroup.org/xmldocs/confs/IPCsocket.html
 import => Tag: http://www.icdevgroup.org/xmldocs/tags/import.html
 pgbooln => Filter: http://www.icdevgroup.org/xmldocs/filters/pgbooln.html
-space2nbsp => Filter: http://www.icdevgroup.org/xmldocs/filters/space2nbsp.html
 TcpMap => Config directive: http://www.icdevgroup.org/xmldocs/confs/TcpMap.html
 MV_COUNTRY_TABLE => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_COUNTRY_TABLE.html
 page-meta => Tag: http://www.icdevgroup.org/xmldocs/tags/page-meta.html
@@ -733,6 +742,7 @@
 IPC => Config directive: http://www.icdevgroup.org/xmldocs/confs/IPC.html
 special => Glossary: http://www.icdevgroup.org/xmldocs/glossary/special.html
 dereference => Glossary: http://www.icdevgroup.org/xmldocs/glossary/dereference.html
+href => Tag: http://www.icdevgroup.org/xmldocs/tags/href.html
 weight => Tag: http://www.icdevgroup.org/xmldocs/tags/weight.html
 UI_IMAGE_DIR => Variable: http://www.icdevgroup.org/xmldocs/vars/UI_IMAGE_DIR.html
 file-navigator => Tag: http://www.icdevgroup.org/xmldocs/tags/file-navigator.html
@@ -799,6 +809,7 @@
 SafeUntrap => Config directive: http://www.icdevgroup.org/xmldocs/confs/SafeUntrap.html
 configuration => Glossary: http://www.icdevgroup.org/xmldocs/glossary/configuration.html
 UserTag => Config directive: http://www.icdevgroup.org/xmldocs/confs/UserTag.html
+lcfirst => Filter: http://www.icdevgroup.org/xmldocs/filters/lcfirst.html
 setlocale => Tag: http://www.icdevgroup.org/xmldocs/tags/setlocale.html
 region => Tag: http://www.icdevgroup.org/xmldocs/tags/region.html
 accessories => Tag: http://www.icdevgroup.org/xmldocs/tags/accessories.html
@@ -837,6 +848,7 @@
 NoSearch => Config directive: http://www.icdevgroup.org/xmldocs/confs/NoSearch.html
 unlink_file => Tag: http://www.icdevgroup.org/xmldocs/tags/unlink_file.html
 counter => Tag: http://www.icdevgroup.org/xmldocs/tags/counter.html
+ucfirst => Filter: http://www.icdevgroup.org/xmldocs/filters/ucfirst.html
 namecase => Filter: http://www.icdevgroup.org/xmldocs/filters/namecase.html
 tmpn => Tag: http://www.icdevgroup.org/xmldocs/tags/tmpn.html
 OptionsEnable => Config directive: http://www.icdevgroup.org/xmldocs/confs/OptionsEnable.html
@@ -872,6 +884,7 @@
 date_change => Filter: http://www.icdevgroup.org/xmldocs/filters/date_change.html
 init_page => Pragma: http://www.icdevgroup.org/xmldocs/pragmas/init_page.html
 md5 => Filter: http://www.icdevgroup.org/xmldocs/filters/md5.html
+shipping-description => Tag: http://www.icdevgroup.org/xmldocs/tags/shipping-description.html
 CYBER_PRECISION => Variable: http://www.icdevgroup.org/xmldocs/vars/CYBER_PRECISION.html
 date2time => Filter: http://www.icdevgroup.org/xmldocs/filters/date2time.html
 soap => Tag: http://www.icdevgroup.org/xmldocs/tags/soap.html
@@ -890,6 +903,7 @@
 UserControl => Config directive: http://www.icdevgroup.org/xmldocs/confs/UserControl.html
 SDBM => Glossary: http://www.icdevgroup.org/xmldocs/glossary/SDBM.html
 MV_ROBOT_EXPIRE => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_ROBOT_EXPIRE.html
+MV_DOLLAR_ZERO => Variable: http://www.icdevgroup.org/xmldocs/vars/MV_DOLLAR_ZERO.html
 uneval => Tag: http://www.icdevgroup.org/xmldocs/tags/uneval.html
 VendURL => Config directive: http://www.icdevgroup.org/xmldocs/confs/VendURL.html
 UI_META_TABLE => Variable: http://www.icdevgroup.org/xmldocs/vars/UI_META_TABLE.html



1.1                  xmldocs/files/userdb/login.txt


rev 1.1, prev_rev 1.0
Index: login.txt
===================================================================
[set Login]
  [userdb login]
[/set]

[set Logout_choice]
  [if type=explicit compare="[userdb function=logout clear='[cgi clear_values]']"]
    [set mv_no_count]1[/set]
    [set mv_no_session_id]1[/set]
    [if cgi clear_cart]
      [calc] @$Items = (); return; [/calc]
    [/if]
  [/if]
[/set]

[tmp cookie_username][read-cookie MV_USERNAME][/tmp]

<form action="[process secure=1]" method="POST">
  <input type="hidden" name="mv_todo"  value="return">
  <input type="hidden" name="mv_nextpage" value="index">
  [form-session-id]

  [if !session logged_in]
    <input type="hidden" name="mv_click" value="Login">

    <input name="mv_username" type="text">
    <input name="mv_password" type="password">

    [if config CookieLogin]
    <input type="hidden" name="mv_cookie_password" value="0">
    <input type="checkbox" name="mv_cookie_password" value="1" [if scratch cookie_username]CHECKED[/if]>
    [/if]

  [else]
    <input type="hidden" name="mv_click" value="Logout_choice">

    Logged in as [data session username].

    <input class="input" type="hidden" name="clear_values" value="1">
    <input class="input" type="checkbox" name="clear_values" checked value="1"> Erase values.

  [/else]
  [/if]

  <input type="submit" value="Submit">
</form>




1.1                  xmldocs/files/userdb/userdatabase.txt


rev 1.1, prev_rev 1.0
Index: userdatabase.txt
===================================================================
code	password



1.1                  xmldocs/files/userdb/userdb.mysql


rev 1.1, prev_rev 1.0
Index: userdb.mysql
===================================================================
Database  userdb  DEFAULT_TYPE varchar(255)
Database  userdb  COLUMN_DEF   "username=varchar(64) NOT NULL PRIMARY KEY"
Database  userdb  COLUMN_DEF   "password=varchar(64) NOT NULL"
Database  userdb  COLUMN_DEF   "accounts=BLOB"
Database  userdb  COLUMN_DEF   "acl=text"
Database  userdb  COLUMN_DEF   "address1=varchar(64)"
Database  userdb  COLUMN_DEF   "address2=varchar(64)"
Database  userdb  COLUMN_DEF   "address3=varchar(64)"
Database  userdb  COLUMN_DEF   "address_book=BLOB"
Database  userdb  COLUMN_DEF   "b_address1=varchar(64)"
Database  userdb  COLUMN_DEF   "b_address2=varchar(64)"
Database  userdb  COLUMN_DEF   "b_address3=varchar(64)"
Database  userdb  COLUMN_DEF   "b_city=varchar(30)"
Database  userdb  COLUMN_DEF   "b_company=varchar(64)"
Database  userdb  COLUMN_DEF   "b_country=varchar(10)"
Database  userdb  COLUMN_DEF   "b_fname=varchar(30)"
Database  userdb  COLUMN_DEF   "b_lname=varchar(30)"
Database  userdb  COLUMN_DEF   "b_nickname=text"
Database  userdb  COLUMN_DEF   "b_phone=varchar(30)"
Database  userdb  COLUMN_DEF   "b_state=varchar(10)"
Database  userdb  COLUMN_DEF   "b_zip=varchar(10)"
Database  userdb  COLUMN_DEF   "carts=BLOB"
Database  userdb  COLUMN_DEF   "city=varchar(30)"
Database  userdb  COLUMN_DEF   "company=varchar(64)"
Database  userdb  COLUMN_DEF   "country=varchar(10)"
Database  userdb  COLUMN_DEF   "credit_limit=varchar(16)"
Database  userdb  COLUMN_DEF   "db_acl=BLOB"
Database  userdb  COLUMN_DEF   "dealer=varchar(32)"
Database  userdb  COLUMN_DEF   "email=varchar(42)"
Database  userdb  COLUMN_DEF   "fax=varchar(30)"
Database  userdb  COLUMN_DEF   "file_acl=BLOB"
Database  userdb  COLUMN_DEF   "fname=varchar(30)"
Database  userdb  COLUMN_DEF   "inactive=varchar(8)"
Database  userdb  COLUMN_DEF   "lname=varchar(30)"
Database  userdb  COLUMN_DEF   "mail_list=text"
Database  userdb  COLUMN_DEF   "mod_time=timestamp"
Database  userdb  COLUMN_DEF   "mv_shipmode=varchar(255)"
Database  userdb  COLUMN_DEF   "owner=varchar(20)"
Database  userdb  COLUMN_DEF   "p_nickname=text"
Database  userdb  COLUMN_DEF   "phone_day=varchar(30)"
Database  userdb  COLUMN_DEF   "phone_night=varchar(30)"
Database  userdb  COLUMN_DEF   "price_level=varchar(30)"
Database  userdb  COLUMN_DEF   "preferences=BLOB"
Database  userdb  COLUMN_DEF   "s_nickname=text"
Database  userdb  COLUMN_DEF   "state=varchar(20)"
Database  userdb  COLUMN_DEF   "zip=varchar(10)"



1.1                  xmldocs/files/userdb/userdb.pgsql


rev 1.1, prev_rev 1.0
Index: userdb.pgsql
===================================================================
Database  userdb  LENGTH_EXCEPTION_DEFAULT  truncate_log
Database  userdb  DEFAULT_TYPE  varchar(255)

Database  userdb  COLUMN_DEF   "username=varchar(64) NOT NULL PRIMARY KEY"
Database  userdb  COLUMN_DEF   "password=varchar(64) NOT NULL"
Database  userdb  COLUMN_DEF   "accounts=text"
Database  userdb  COLUMN_DEF   "acl=text"
Database  userdb  COLUMN_DEF   "address1=varchar(64)"
Database  userdb  COLUMN_DEF   "address2=varchar(64)"
Database  userdb  COLUMN_DEF   "address3=varchar(64)"
Database  userdb  COLUMN_DEF   "address_book=text"
Database  userdb  COLUMN_DEF   "b_address1=varchar(64)"
Database  userdb  COLUMN_DEF   "b_address2=varchar(64)"
Database  userdb  COLUMN_DEF   "b_address3=varchar(64)"
Database  userdb  COLUMN_DEF   "b_city=varchar(30)"
Database  userdb  COLUMN_DEF   "b_company=varchar(64)"
Database  userdb  COLUMN_DEF   "b_country=varchar(10)"
Database  userdb  COLUMN_DEF   "b_fname=varchar(30)"
Database  userdb  COLUMN_DEF   "b_lname=varchar(30)"
Database  userdb  COLUMN_DEF   "b_nickname=text"
Database  userdb  COLUMN_DEF   "b_phone=varchar(30)"
Database  userdb  COLUMN_DEF   "b_state=varchar(10)"
Database  userdb  COLUMN_DEF   "b_zip=varchar(10)"
Database  userdb  COLUMN_DEF   "carts=text"
Database  userdb  COLUMN_DEF   "city=varchar(30)"
Database  userdb  COLUMN_DEF   "company=varchar(64)"
Database  userdb  COLUMN_DEF   "country=varchar(10)"
Database  userdb  COLUMN_DEF   "credit_limit=varchar(16)"
Database  userdb  COLUMN_DEF   "db_acl=text"
Database  userdb  COLUMN_DEF   "dealer=varchar(32)"
Database  userdb  COLUMN_DEF   "email=varchar(42)"
Database  userdb  COLUMN_DEF   "fax=varchar(30)"
Database  userdb  COLUMN_DEF   "file_acl=text"
Database  userdb  COLUMN_DEF   "fname=varchar(30)"
Database  userdb  COLUMN_DEF   "inactive=varchar(8)"
Database  userdb  COLUMN_DEF   "lname=varchar(30)"
Database  userdb  COLUMN_DEF   "mail_list=text"
Database  userdb  COLUMN_DEF   "mod_time=varchar(20)"
Database  userdb  COLUMN_DEF   "mv_shipmode=varchar(255)"
Database  userdb  COLUMN_DEF   "owner=varchar(20)"
Database  userdb  COLUMN_DEF   "p_nickname=text"
Database  userdb  COLUMN_DEF   "phone_day=varchar(30)"
Database  userdb  COLUMN_DEF   "phone_night=varchar(30)"
Database  userdb  COLUMN_DEF   "price_level=varchar(30)"
Database  userdb  COLUMN_DEF   "preferences=text"
Database  userdb  COLUMN_DEF   "s_nickname=text"
Database  userdb  COLUMN_DEF   "state=varchar(20)"
Database  userdb  COLUMN_DEF   "zip=varchar(10)"
Database  userdb  DEFAULT      "inactive=''"



1.6       +181 -0    xmldocs/glossary/UserDB


rev 1.6, prev_rev 1.5
Index: UserDB
===================================================================
RCS file: /var/cvs/xmldocs/glossary/UserDB,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- UserDB	2 Sep 2006 22:21:47 -0000	1.5
+++ UserDB	10 Nov 2007 22:25:03 -0000	1.6
@@ -1 +1,182 @@
 
+The name "UserDB" stands for a set of built-in &IC; features related to
+the user &glos-database;. That includes the database table that will hold your
+visitors data, and the set of functions operating either on that database
+or on people's &glos-session; information.
+</para><para>
+&IC;'s set of user database functions is elaborate, but it still manages
+not to place
+application-specific requirements on your practical database. While it
+is possible to use &IC;'s UserDB functions with your custom type of
+database, it is strongly recommended to follow simple UserDB naming and
+usage standards. That alone will instantly give you a huge amount of
+built-in userdb functionality with no overhead programming.
+</para><para>
+
+</para><para>
+The whole UserDB set consists of:
+<itemizedlist>
+
+	<listitem><para>
+	The user database. It is the &glos-database; table that will actually 
+	contain all persistent information for visitors who create an account
+	at your website. This table has only a few required fields.
+	</para></listitem>
+	<listitem><para>
+	Set of predefined &IC; variables (such as <mv>mv_username</mv>,
+	<mv>mv_password</mv> and <mv>mv_verify</mv>.)
+	As you will see, most of the UserDB functions in
+	&IC; will be simplified to placing data in predefined variables
+	and then invoking required actions; no matter how complex the 
+	actions might be internally.
+	</para></listitem>
+	<listitem><para>
+	The &tag-userdb; tag. This tag is the convenient method of invoking
+	UserDB functions. As long as you will adhere to naming and usage
+	standards, UserDB invocations will be as simple as 
+	<code>[userdb login]</code>, <code>[userdb save]</code> or
+	<code>[userdb logout]</code>.
+	</para></listitem>
+
+</itemizedlist>
+</para>
+
+<section>
+	<title>Creating the user database</title>
+	<para>
+	To create the database, you could follow a very simple structure.
+	The only two required fields are
+	<database class='field'>username</database> and 
+	<database class='field'>password</database>.
+	Your <ulink url='files/userdb/userdatabase.txt'>sample test database</ulink>
+	could look like this:
+<programlisting>
+<xi:include parse='text' href='../files/userdb/userdatabase.txt'/>
+</programlisting>
+	(Note that the name of the first column &mdash; the primary key &mdash;
+	is arbitrary because &IC;'s default functions are not accessing it by
+	name. But it is a good standard to name the first field 
+	<database class='field'>code</database> in all your database tables).
+	</para><para>
+	It is, however, recommended to use an &glos-SQL; database for any
+	more complex functions. Let's take a look at a
+	<ulink url='files/userdb/userdb.pgsql'>more elaborate user
+	database</ulink>
+	that, among other things, has support for visitors' first and last name,
+	inactivity flag and billing and shipping addresses:
+<programlisting>
+<xi:include parse='text' href='../files/userdb/userdb.pgsql'/>
+</programlisting>
+	</para><para>
+	The above is &IC;'s database representation format that allows &IC;
+	to be aware of the database structure and automagically create it 
+	if it's missing. See &glos-database; glossary entry for complete
+	information.
+	</para><para>
+	The above is &PGSQL;-compatible definition. We have  the equivalent
+	<ulink url='files/userdb/userdb.mysql'>MySQL version</ulink> available
+	(in short, you only need to replace
+	type <literal>=text</literal> with MySQL's <literal>=BLOB</literal>).
+	</para>
+</section>
+
+
+<section>
+	<title>Registering the database</title>
+	<para>
+	To make the new database table accessible to &IC;, and to define
+	a couple more UserDB-specific options, you could add the following
+	to your &ccf;:
+<programlisting>
+# For SQL databases:
+Database  userdb  userdb.txt   __SQLDSN__
+
+# Or for file-based database (DBM):
+Database  userdb  userdb.txt   TAB
+
+# Encrypt passwords?
+UserDB    default    crypt         0
+
+# Ignore uppercase/lowercase in usernames?
+UserDB    default    ignore_case   1
+
+# Enable this in combination with the above, so that
+# username is always 'normalized':
+Filter    mv_username lc
+
+# To disable field containing date of last change:
+UserDB    default    time_field    none
+
+# To enable field containing date of last change
+#UserDB    default    time_field    mod_time
+
+UserDB    default    logfile       var/log/userdb.log
+
+# To allow people login using their email, and not their username
+# (in that case, username does not have to be meaningful and
+# can be automatically assigned, like "U00001"):
+#UserDB    default    indirect_login  email
+</programlisting>
+  </para>
+</section>
+
+<section>
+  <title>Creating the login page</title>
+  <para>
+  The login page could again be very simple, like this:
+<programlisting><![CDATA[
+[set Login]
+[userdb login]
+[/set]
+
+<form action="[process secure=1]" method="POST">
+  <input type="hidden" name="mv_todo"  value="return">
+  <input type="hidden" name="mv_nextpage" value="index">
+  <input type="hidden" name="mv_click" value="Login">
+  [form-session-id]
+
+  <input name="mv_username" type="text">
+  <input name="mv_password" type="password">
+  <input value="Submit"   type="submit">
+</form>
+]]></programlisting>
+  </para><para>
+	<ulink url='files/userdb/login.txt'>
+  More complex login page</ulink>
+	with support for cookies and "remembering"
+  users, and that displays a logout option if the user is already 
+  logged in could look like this:
+<programlisting>
+<xi:include parse='text' href='../files/userdb/login.txt'/>
+</programlisting>
+  </para>
+</section>
+
+
+<section>
+  <title>Conclusion</title>
+  <para>
+	When the user logs in, user database values are automatically
+	copied to their &glos-value;s space and can be retrieved at
+	any time using the &tag-value; tag. (Values which are not present
+	in the database might take on a default value defined with
+	&conf-ValuesDefault;).
+	</para><para>
+	Often times, you would like to save users' data back to the user
+	database, be it during or at the end of user session. To that
+	effect, use the following simple yet powerful code:
+<programlisting>
+[userdb save]
+</programlisting>
+	The above code saves all users' &glos-value;s back to the database.
+	Values which do not have a corresponding database field are 
+	ignored (as there's no place to save them). This is a fault-tolerant
+	behavior and something you almost always want to happen anyway.
+	</para><para>
+	For all advanced examples and more technical discussion, see
+	&tag-userdb; tag documentation.
+	</para>
+</section>
+
+<para>
+



1.1                  xmldocs/refs/DebugTemplate


rev 1.1, prev_rev 1.0
Index: DebugTemplate
===================================================================
__NAME__ purpose
specify format of debug messages
__END__

__NAME__ synopsis
<group rep='repeat'>
  <arg><replaceable>time_spec</replaceable></arg>
  <arg><literal>{CALLER0}</literal> ... <literal>{CALLER9}</literal></arg>
  <arg><literal>{CATALOG}</literal></arg>
  <arg><literal>{HOST}</literal></arg>
  <arg><literal>{MESSAGE}</literal></arg>
  <arg><literal>{PAGE}</literal></arg>
  <arg><literal>{REMOTE_ADDR}</literal></arg>
  <arg><literal>{TAG}</literal></arg>
</group>
__END__

__NAME__ see also
DebugFile, DEBUG
__END__

__NAME__ description
&conf-DebugTemplate;, a global directive, allows you to change the
format of debug messages. The meaning of the above literal 
elements is:

<itemizedlist>
	<listitem><para>
	<literal>time_spec</literal> -
	POSIX::strftime() format specifiers. Take
	a look at the &glos-time; glossary entry for a complete list. Since the
	character <literal>%</literal> is treated as the beginning of a specifier,
	use <literal>%%</literal> to insert a literal <literal>%</literal>.
	</para></listitem>
	<listitem><para>
	<literal>{CALLER0}</literal> ... <literal>{CALLER9}</literal> -
	members of the caller() list (see caller() &PERL; function).
	</para></listitem>
	<listitem><para>
	<literal>{CATALOG}</literal> - catalog name
	</para></listitem>
	<listitem><para>
	<literal>{HOST}</literal> - remote hostname or IP address
	</para></listitem>
	<listitem><para>
	<literal>{MESSAGE}</literal> - actual debug message
	</para></listitem>
	<listitem><para>
	<literal>{PAGE}</literal> - current page name (&var-MV_PAGE;)
	</para></listitem>
	<listitem><para>
	<literal>{REMOTE_ADDR}</literal> - remote IP address
	</para></listitem>
	<listitem><para>
	<literal>{TAG}</literal> - current tag name
	(from <classname>Vend::Parse</classname>)
	</para></listitem>
</itemizedlist>
__END__

__NAME__ notes
__END__




1.1                  xmldocs/refs/space_to_nbsp.filter


rev 1.1, prev_rev 1.0
Index: space_to_nbsp.filter
===================================================================
__NAME__ purpose
replace all spaces (" ") with null ("\0") characters
__END__


__NAME__ see also
space_to_null, lspace_to_nbsp
__END__


__NAME__ description
The filter replaces all space ("<literal> </literal>") characters
with &glos-HTML;'s Non-breakable-space ("<literal>&amp;nbsp;</literal>")
characters.
</para><para>
This is useful for places where you want strings to appear in a single
line, without word-wrapping to the next row.
__END__

__NAME__ notes
In &glos-HTML;, multiple spaces in a row render as just one space on the
screen. When the spaces are converted to "&amp;nbsp;", however, every
non-breakable space will produce one space character on the screen &mdash;
it's how &glos-HTML; works..
Use the &glos-filter;'s <option>compress</option> when you want to 
preserve the behavior of only one space being visible on the screen.
__END__

__NAME__ online: Filter example
<programlisting><![CDATA[
<div style="width: 80px;">
This is a very small DIV and will surely word-wrap this text to multiple lines..
With the filter applied, however, it will force the DIV to stretch and render as single line.
</div>

<div style="width: 80px;">
[filter space_to_nbsp]
With the filter applied, however,    it will    force the DIV to stretch and render as single line.
[/filter]
</div>
]]></programlisting>
__END__



__NAME__ online: Filter example
<programlisting><![CDATA[
<div>
[filter space_to_nbsp.compress]
Multiple    spaces    in a row   will render   as just   single  space.
[/filter]
</div>
]]></programlisting>
__END__








More information about the docs mailing list