mhonarc-users

Re: Creating other indexes (fwd)

1997-06-06 14:55:28
I have used the <NOTHREAD> command to successfully do away with the thread
index command.  Now Ineed to have another index page so I have one subject
index page and one date index page.  I know I need to use the
<OTHERINDEXES> tag to do this, but I have a world of questions to ask.

1)Do I put both rcfiles on the command line ie. -rcfile subject.rc:date.rc

Not legal.

2)Do I need to make a "main message page layout" in both  rcfiles?

Depends on you layout choices for the other indexes.

3)How do I use the <INXPREFIX> and <IDXFNAME> tags. (I  have looked over
-----------------------^
                       D
the help files to no use)

I am going to describe a basic example of what needs to be
done with OTHERINDEXES.

First, lets have the top resource file (call it "top.rc") that
defines the formatting of the default 2 indexes (a main and
a thread).  Example:

*** snip "top.rc" ***
<MAIN>
<THREAD>
<SORT>
<NOTREVERSE>
<NOREVERSE>
*** snip "top.rc" ***

I may have a bunch of layout stuff, but that is not important
for this discussion.

The above tells mhonarc to create a date and thread index.  I
I am explicit with the settings to avoid potential unknown settings
from a default resource file (ie. It is always good to be explicit,
especially when we get to otherindexes).

Now, I would like to also create subject and author indexes.
In "top.rc" I would add the following:

*** snip "top.rc" ***
<OTHERINDEXES>
subject.rc
date.rc
</OTHERINDEXES>
*** snip "top.rc" ***

The filenames listed are arbitrary, but it is useful if they
imply their purpose.  Since absolute pathnames were not used,
the files will be looked for in the current working directory,
or in the archive directory.  Since the current working directory
may not be appropriate, it is usually best to put the files in
the archive directory.

The following now shows the important settings for each file:

*** snip "subject.rc" ***
<MAIN>
<NOTHREAD>
<SUBSORT>
<IDXFNAME>
subject.html
</IDXFNAME>
<IDXPREFIX>
subject
</IDXPREFIX>
<NOREVERSE>
*** snip "subject.rc" ***

*** snip "author.rc" ***
<MAIN>
<NOTHREAD>
<AUTHSORT>
<IDXFNAME>
author.html
</IDXFNAME>
<IDXPREFIX>
author
</IDXPREFIX>
<NOREVERSE>
*** snip "author.rc" ***

Again, notice how I am being explicit.  MHonArc does not reset
resources when reading the otherindexes resource files. with one
*exception*: THREAD is shut-off.  To avoid overriding the default
index files, I must explicitly redefine IDXFNAME (amd IDXPREFIX
if MULTIPG is active).  If I want different layouts for my
other indexes, I must explicitly define those, or they will
use what was ever set in top.rc (or the default is not explicitly
set).

NOTE
    Otherindexes resource file only defines a *single* index type: main
    or thread.  If you specify the THREAD, a thread index will be
    created and all MAIN related resources are ignored.  I.e.  THREAD
    overrides MAIN.

WARNING
    Do *NOT* define OTHERINDEXES in your otherindexes resource files.
    Also, make sure there is no self references.  If you do not heed
    these warnings, you will cause an infinite loop, and/or
    unpredictable results.

Make sure otherindexes resource files are present for all
updates to an archive.  Mhonarc only stores settings for the
default indexes, so the resource files are needed each time
for other indexes.

What I left out in this example is the redefinition of the navigational
based resources.  Since I am adding more indexes, I would have to
redefine resources like TOPLINK, BOTLINKS, LISTBEGIN, THEAD, etc, so
there will be links to the other indexes.

Hope this helps,

        --ewh

<Prev in Thread] Current Thread [Next in Thread>