[pmwiki-users] An integration question

David Spitzley dspitzle at wash.k12.mi.us
Fri Apr 8 21:57:07 CDT 2005


David
>>> "Patrick R. Michaud" <pmichaud at pobox.com> 04/08/05 4:54 PM >>>
On Fri, Apr 08, 2005 at 04:27:29PM -0400, David Spitzley wrote:
> In following up to myself, I think the heart of the problem here is
that
> comments.php does not add entries to the .mailposts file.  If somebody
> can point me to the file and function where the core page edit
functions
> write to the .mailposts file, I may be able to figure something out
> myself by stealing code.

scripts/mailposts.php has the function that does it (called
"MailPosts").
-----------------------------------

Hmm, this is interesting.  Mailposts() does its mojo via membership in
the $EditFunctions array: 
(in mailposts.php)  array_push($EditFunctions,'MailPosts');

Then in HandleEdit() the $EditFunctions array is used as an instruction
set:
(in index.php)  foreach((array)$EditFunctions as $fn)
$fn($pagename,$page,$new);

However, comments.php doesn't use $EditFunctions at all, which probably
why it fails to integrate into any of the other features, such as
Search, as it is basically independent of the PmWiki control structures.

So, anyway, it looks to me like the short solution to adding comments to
the .mailpost is going to be to add a call to Mailposts() to
comments.php in HandleComments().  I can't test that right now, but I'll
let people know what I find.

However, in the long run, it seems like it might be nice to rework
comments.php to integrate into the standard control framework so the
GROUP.PAGENAME.Comments files basically function the same way as all the
others.

Ok, that's enough for tonight.









More information about the pmwiki-users mailing list