[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of HTML in AddressModifyCode



On May 30, 2002 at 01:50, John Belmonte wrote:

> Earl Hood wrote:
>  > It seems it may be useful to have some kind resource in MHonArc
>  > that allows manipulation of addresses in the HTML domain (say
>  > ADDRESSCONVERTER).
> 
> That would be great to have.
> 
> What I'd like to set up is to display "user@..." with the "..." linking
> to a cgi script that displays its encoded query (the full address) using
> one of the on-the-fly text to image generators that are around.

Actually, you can replace routine that converts messages headers
to HTML -- complete bypassing the message header layout resources --
with a custom front-end.  For example:

  MAIN: {
    require 'mhamain.pl' || die qq/ERROR: Unable to require "mhamain.pl"\n/;
    mhonarc::initialize();
    mhonarc::open_archive();

    $readmail::FormatHeaderFunc = \&my_header_func;
    mhonarc::process_input() ? exit(0) : exit($mhonarc::CODE);
  }

  sub my_header_func {
    my $fields_hash_ref = shift;
    ...
  }

The comments about FormatHeaderFunc in readmail.pl are incorrect,
they descibed the old method of invocation before switching to references.
The htmlize_header() function in mhutil.pl reflects how the
FormatHeaderFunc is actually called and how MHonArc actually formats
message headers.

It may be worth exposing the function as a configurable resource.

--ewh


[Index of Archives]     [Bugtraq]     [Yosemite News]     [Mhonarc Home]