[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Automatic linking to a mhonarc archive
Earl Hood wrote:
> The location of a message on an index page is not known until MHonArc
> is writing/editing the HTML pages. A solution would require two
> step process:
>
> 1. Use the $mhonarc::CBMessageHeadRead callback to store the index
> and message-id of new messages (probably in some kind of hash).
>
> 2. At the end of archive processing, go through your hash and
> resolve which index page each new message is listed under. This
> could be done by calling the mhonarc::replace_li_var() function
> directly:
>
> $idx_file = mhonarc::replace_li_var('$IDXFNAME$', $index);
>
> Where $index is the message index you save in
> $mhonarc::CBMessageHeadRead. Now you should have the
> index filename and the message-id (which you grabbed in
> $mhonarc::CBMessageHeadRead) to support your linking.
I've done this, but I don't get a callback to mhonarc::CBMessageHeadRead if
a message is moved between one index page and another, due to the insertion
of an earlier message. How do I figure out that a message has been moved
onto a different index page? Would it be better to iterate through all the
messages in say %mhonarc::IndexNum at the end of processing?
BTW, what is the control character stuck on the end of lots of the hash keys
in .monharc.db?
Ta,
--
Alan Burlison
--
$ head -1 /dev/bollocks
aggregate segmented discontinuities, going forwards
---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS
[Index of Archives]
[Bugtraq]
[Yosemite News]
[Mhonarc Home]