mhonarc-users

[no subject]

2000-04-07 02:27:47
On April 6, 2000 at 12:43, J C Lawrence wrote:

Okay.  Is there any way to directly affect the message body as it
goes into the final HTML file?  

Are your refering to the message body of the message data itself
or the MHonArc message page body?

If MHonArc could make all the quoted strings in the HREFs etc use
single quotes (as versus double), I could work me way around the
rest by having MsgPgStart end with  

  $variable=" 

and MsgPgEnd start with 

  "; 

to effectively surround the body as a quoted string (and relying on
the fact that you'll " all the user-visible doube quotes in
between), I might be able to fudge the rest of the way.

The problem arises with other media types, like text/html, which
are harder to deal with.

A hack could be added to have a post processing function to
be called on the converted message header and message body to
escape quotes and other chars for inclusion in PHP code.

On a hunch, I checked out the PHP docs (I have never used PHP) and
found out that PHP supports here documents (in PHP 4 or later):

    $variable=<<<END_OF_MHONARC_MSG;
... converted mhonarc message here ...
END_OF_MHONARC_MSG;

This way you do not have to worry about having mhonarc escape
quotes and other things for you.  Are you using PHP 4?

(BTW: Will
MHonArc allow unbalanced quotes in its config stanzas?)

Sure.  It does not care.  This allows one to actually generate
alternate file formats, like XML.

Can MHonArc be persuaded to use single quotes for HREFs and the
like?  

It will be tedious to update the code.  See if you can use
the here document syntax of PHP.

        --ewh

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