[dokuwiki] Re: events system patch

Martin Tschofen writes:

I realized that changing my plugins. But that's almost silly. Is there
trully a difference between when DOKUWIKI_STARTED_BEFORE and
DOKUWIKI_STARTED_AFTER happen -- I thought the AFTER event doesn't
exist in this case? So couldn't we combine the two events into
DOKUWIKI_BEFORE (was DOKUWIKI_STARTED_BEFORE and
DOKUWIKI_STARTED_AFTER) and DOKUWIKI_AFTER (was DOKUWIKI_DONE_BEFORE
and DOKUWIKI_DONE_AFTER)

As I understand it, an event usually wraps itself around a certain function in DokuWiki. Before this function is called the BEFORE event is signalled, after this function was called the AFTER event is signalled.


There is not a single function which does ALL the DokuWiki stuff where an DOKUWIKI event could wrap around. Instead simply two "pseudo events" are signalled which wrap them self around nothing, one at the start and one at the end of the doku.php script. This means the BEFORE and the AFTER event are virtually the same.

Chris named those "wrap-around-nothing-events" advise events before, I'm not sure if we still use this naming.

I hope this clears up why there can't be a single DOKUWIKI_(BEFORE|AFTER) event.

I hope I got it explained right - I havent looked too deep into the code for the last few days.

Andi
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: