WebCatalog 2.1 Change History

Subscribe to WebCatalog-Talk at http://www.pacific-coast.com/maillists/

Converting Sites from WebCatalog 1.6.1 to WebCatalog 2.0

3/17/98

2/24/98

2/15/98

2/5/98

1/29/98

1/19/98

1/16/98

1/12/98

1/5/98

12/27/97

12/27/97

12/10/97

11/24/97

11/11/97

11/3/97

11/2/97

10/30/97

10/28/97

10/23/97

10/7/97

10/2/97

10/1/97

9/14/97


9/10/97


9/3/97


9/2/97


8/28/97


8/27/97


8/26/97


8/21/97


8/1/97-8/13/97

7/31/97

7/16/97

5/13/97-6/30/97 (Windows NT phase)

5/22/97

5/19/97

5/13/97

5/12/97

5/8/97

5/5/97

5/2/97

4/16/97

4/9/97

4/7/97

4/4/97

4/2/97

4/1/97

3/26/97

3/24/97

3/21/97

3/19/97

3/16/97

3/10/97

3/5/97

3/3/97

2/28/97

2/26/97

2/23/97

2/17/97

2/14/97

2/11/97

$search?template=xx.tpl&PRICEtype=num&gtPRICEdata=52.95

Similarly, date comparisons look like so:

$search?template=xx.tpl&EXPIREStype=date&gtEXPIRESdata=6/19/1997

2/8/97


2/4/97

1/31/97

1/29/97

1/24/97

1/22/97

1/22/97

1/21/97

1/19/97

1/16/97

1/15/97

1/10/97

1/4/97

1/2/97

12/28/96

12/17/96

12/11/96

12/10/96

11/30/96

11/27/96

11/26/96

11/25/96

11/23/96

11/22/96

11/21/96
Converting existing databases and commands to WebCatalog2:

WebCatalog2 can open any number of databases (actually 100, but that's a lot), each of which can have its own field structure. You are no longer limited to a file called Catalog.txt with 27 fields.

To convert an existing Catalog.txt file, you must put the 27 field names (separated by tabs) on the very first line of the file (basically record #0 is the names of the fields). Here is an example of a database with a different field schema:

Contents of AddressList.db file (the .db is a convention only-not necessary):

--------------------------------
name      address                    city        state  zip
Grant     667 Corte Raquel           San Marcos  CA     92069
PCS       11770 Bernardo Plaza Court San Diego   CA     92128
--------------------------------

Notice that the fields are separate by tabs, as usual, even though it may be hard to tell by just looking at the lines above using SimpleText.

Because WebCatalog2 deals with more than one database, you must now tell it which database it is supposed to search when sending it commands, like so:

WebCatalog2.acgi$search?template=results.html&db=AddressList.db&eqnamedata=Grant

Notice that you use the same syntax for searching as always: eqnamedata=Grant or wocitydata=Diego, but the fieldnames are now determined by you, not us.

[CatalogItems] has been changed to [FoundItems] to reflect the fact that we are dealing with general databases now, not just catalogs:

[FoundItems]
[name], [address], [city], [state], [zip]<br>
[/FoundItems]


Handling "Show Next xxx..xxx":
WebCatalog2 gives you much greater control over the appearance of the "Show Next..." hyperlinks. The "N" in [CatalogItems N] has been moved to the search command, and now you must explicitly decide where you want the "Show Next" links to appear (WebCatalog 1.x would put them in for you). If you execute a search command as follows

WebCatalog.acgi$search?db=database.db&template=test.tpl&max=10

...then [FoundItems] will only display 10 items even if more are found.

Here is what the "test.tpl" template should look like:

--------------------------
[FoundItems]
[someField]<br>
[/FoundItems]

[ShowNext]
<a href="WebCatalog.acgi$search?[SearchString]">Show Items [start]-[end]</a><br>
[/ShowNext]
--------------------------


URL and INPUT modifiers:
[URLfieldname] has gone away! Replace it with [url][fieldname][/url]
[INPUTfieldname] has gone away! Replace it with [input][fieldname][/input]

Converting existing sites from WebCatalog 1.6.1 to 2.0

Summary:

  1. Put field names at the top of your Catalog.txt file
  2. Add "db=Catalog.txt" to all search, showcart, purchase, append, delete, replace, add, and remove commands (see #9 below)
  3. Change [catalogItems 20] to [foundItems] (and add max=20 to search commands)
  4. Add [shownext] tags
  5. Change [URLfieldname] to [URL][fieldname][/URL]
  6. Change [INPUTfieldname] to [INPUT][fieldname][/INPUT]
  7. Change [float1 6.2] to [FORMAT 6.2f][float1][/FORMAT]
  8. Change all <!WebCatalog> tags to <!HAS_PCS_TAGS>
  9. Change all template and db references to URL-style relative paths.
  10. If you need search logging, insert WebDNA commands into your search results templates


Detail:
1) To convert an existing Catalog.txt file, you must put the 27 field names (separated by tabs) on the very first line of the file (basically record #0 is the names of the fields). Copy the following line and paste it into the first line of your Catalog.txt file:
SKU TITLE DESCRIPTION PRICE TAXABLE CANEMAIL SHIPCOST FLOAT1 FLOAT2 FLOAT3 FLOAT4 FLOAT5 INT1 INT2 INT3 INT4 INT5 TEXT1 TEXT2 TEXT3 TEXT4 TEXT5 TEXT6 TEXT7 TEXT8 TEXT9 TEXT10

2) Because WebCatalog2 deals with more than one database, you must now tell it which database it is supposed to use when sending it search / showcart / purchase / append / delete / replace / add / remove commands, like so:

WebCatalog.acgi$search?template=results.html&db=Catalog.txt&max=20&eqdescriptiondata=Grant

3) [CatalogItems] has been changed to [FoundItems] to reflect the fact that we are dealing with general databases now, not just catalogs:

[FoundItems]
[sku], [title], [description]<br>
[/FoundItems]

The old way of specifying a maximum number of returned records [catalogItems 20] has changed so that you must put "max=20" into the search command itself, as in:

WebCatalog.acgi$search?template=results.html&db=Catalog.txt&max=20&eqdescriptiondata=Grant

4) WebCatalog2 gives you much greater control over the appearance of the "Show Next..." hyperlinks. The "N" in [CatalogItems N] has been moved to the search command, and now you must explicitly decide where you want the "Show Next" links to appear (WebCatalog 1.x would put them in for you). If you execute a search command as follows

WebCatalog.acgi$search?db=database.db&template=test.tpl&max=10

...then [FoundItems] will only display 10 items even if more are found.

Here is what the "test.tpl" template should look like:

--------------------------
[FoundItems]
[someField]<br>
[/FoundItems]

[ShowNext]
<a href="WebCatalog.acgi$search?[SearchString]">Show Items [start]-[end]</a><br>
[/ShowNext]
--------------------------


5) [URLfieldname] has gone away! Replace it with [url][fieldname][/url], as in [url][sku][/url]. This more-general approach gives you the flexibility of 'URL-izing' anything, so [url]hello there[/url] becomes "hello%20there"

6) [INPUTfieldname] has gone away! Replace it with [input][fieldname][/input], as in [input][description][/input]

7) The old-style numeric format has changed, so [grandTotal 6.2] becomes [format 6.2f][grandTotal][/format]. This more-general approach gives you the flexibility of formatting anything, so [format 6.2f]12[/format] becomes " 12.00"

8) If you are using <!WebCatalog> to mark files that are allowed to be viewed outside the WebStar folder hierarchy, you need to change them to the more general <!HAS_PCS_TAGS>. If you do not, then WebCatalog will tell you that you that the file is not allowed to be viewed.

9) Databases and templates are now specified URL-relative to the template being displayed. In WebCatalog 1.6.1, you specified templates using Macintosh paths relative to WebCatalog.acgi (template=::hello.html looked "up" one folder from WebCatalog.acgi to find the file). Now you specify templates the same way you would in standard HTML, relative to the template you are looking at (template=../hello.html looks "up" one folder from the template being displayed).

10) Because WebCatalog can open arbitrary databases now, it doesn't know what searches are important for you to store in its log file. Using WebDNA commands it is very easy to add your own custom log information every time someone searches a database. Just insert something like the following into your search results template:

[AppendFile WebCatalog.log][date]	[time]	[command]	[SearchField]
[/AppendFile]