On October 23, 2000 at 10:33, Rodos wrote:
I am trying to do this by changing the TTOPEND resource to output things
To try and get the first date I want to save into a definevar the date of
the first message. So in the TTOPBEGIN I was defining a var called
FIRSTDATE and setting it to $MSGGMTDATE$ and then in my TTOPEND refering
to it as $FIRSTDATE$.
Problem is it does not recongnise my define var. Looks like definevars can
only be set at the begining and not during the processing of other
Variable interpolation (or evaluation, or expansion, or whatever
term is appropriate) is not done until the resource a variable is
referenced in is actually used. However, you cannot define a variable
within another resource. In general, the definition of a MHonArc
resource cannot be done within the definition of another resource.
For example, the following will *NOT* work:
<!-- ... TTopEnd markup here referencing $FIRSTDATE$... -->
If you look at the raw HTML output, you will see "<DefineVar>" tag
in the markup.
A possible solution to your problem is to use message specifiers
in variables that support them. For example, $MSGGMTDATE$ can take
a message specification argument to denote the date of which message
you want. To get the date of the first message of the main index,
do the following:
From the Resource Variables section of the documentation, the following
list of specifiers can be used:
CUR - Current message.
FIRST - First message listed in main index.
LAST - Last message listed in main index.
NEXT - Next message by main sort order.
PREV - Previous message by main sort order.
TFIRST - First message listed thread index.
TLAST - Last message listed thread index.
TNEXT - Next message by thread.
TPARENT - Parent message of current thread.
TPREV - Previous message by thread.
"CUR" is the default if nothing is specified for mesg_spec.
Most of the MSG* resource variables can take a mesg_spec argument.
Check the Resource Variable Index for more information.
Note, I am unsure if what is currently supported by MHonArc will give
you the information you require.