[dokuwiki] Another one Please ?
- From: "Gerry Weißbach" <gerry.w@xxxxxxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: 23 Jun 2008 16:27:11 +0200
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
- Follow-Ups:
- [dokuwiki] Re: Another one Please ?
- From: Andreas Gohr
Other related posts:
- » [dokuwiki] Another one Please ?
- » [dokuwiki] Re: Another one Please ?
- » [dokuwiki] Re: Another one Please ?
- » [dokuwiki] Re: Another one Please ?
- [dokuwiki] Re: Another one Please ?
- From: Andreas Gohr