[dokuwiki] Another one Please ?

Hi List,

as I see that old ideas (the DOKU_INIT event) get implementet after a
while ^^ I propose another event: a MEDIA_SENDFILE in the fetch.php
which controls the delivery of any kind of media.

I introduced it in my own installation and use it for counting real
downloads and image tweaking via action plugins (in fact I can add some
nice reflection effects into the cached image version without changing
the original). It would really be great to have that event in the DWs
core.

I figured, that if the action plugin is implemented correct it takes only
little more time for the delivery.

My code goes the following (might be lousy and is open for suggestions :D
):

                // finally send the file to the client
                $evt = new Doku_Event('MEDIA_SENDFILE', $FILE);
                if ($evt->advise_before()) {
                        sendFile($FILE,$MIME,$CACHE);
                }
                $evt->advise_after();
                unset($evt);

What do you think?

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

Other related posts: