mhonarc-users

Re: what if 'mhonarc -defineconst FOO="bar"' existed

1999-02-10 17:00:21
On Mon, 8 Feb 1999, Earl Hood wrote:

I'm unclear why this feature is really needed.  I believe the common
practice among users that share resources across multiple files is
to invoke mhonarc with the proper -definevar setting for each
archive for variable information.
If you provide more information on the effect you are trying to
achieve, then we may be able to help on how to obtain the affect
with the current capabilities in MHonArc.

Ungh, management must have kidnapped my brain, there I go assuming that I
had already found the _only_ solution to my problem.  Sorry.

I am (was) building a web-based message board, I decided I wanted to try
using mhonarc as the front end and an ezmlm mailing list as the back end.
I wrote a set of cgi scripts that allows posting to the mailing lists
after authenticating with a HTTP realm.  (My situation is such that
posters will always be within an authenticated realm anyway.)  I ran into
a problem however when started writing the part of my posting cgi that
snarfs a previously sent message, quotes it ('>' style) and pops up an
interface to edit/compose the new message; that is, the 'reply' part of
message posting scripts.  The problem is that the message sequence number
I was passing to mhonarc on the command line via -definevar was being
periodically changed in a document when it shouldn't have been.

Example - I had a link in each message document that looked like:

<a href="/cgi-bin/newmsg?list=foobar&reply=$SEQNUM$">reply to this msg</a>

when a new message got posted to the list, mhonarc dutifully replaced
$SEQNUM$ with the sequence number of that message.  But when somebody
posted another message the $SEQNUM$ variable was again replaced with the
new number for the followup post.  This naturally hosed my reply scheme.  
This is because every message gets re-edited to include the followup links
and link buttons, and when that happens all the defined variables are
re-interpolated.  Well this wasn't so hard to fix when I found out that
there were 2 static areas of every message file, so I just placed my link
into the SUBJECTHEADER area and the problem went away.

Still it might be usefull to have a -defineconst because then you wouldn't
have to rely on a compatibilty 'feature' of MHonArc, and you could place
the static information anywhere you wanted.

I haven't had a chance to think about how this would be accomplished yet,
but I'm guessing it would involve placing the constant values into the
.mhonarc.db file on creation of the message, then refering to them whenver
the message was edited.

--
      ____Jamie_Heilman______________________jamie(_at_)salu(_dot_)net
 SALU.ne| Programmer/Analyst   917 SW Oak Street, Suite 405
        |                                Portland, OR 97205
        |                                (503) 242-0097 x20


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