Re: Serving files as-is
will guaraldi <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
Well, you could build a parallel directory to your datadir that's in your web-root. So then the files would get served by your web-server and wouldn't go through pyblosxom. Then you would have to change your plugin to look at the parallel directory hierarchy rather than the current directory. The other thing you could do is build a plugin that's a handler. This plugin would see urls like pyblosxom.cgi/file/foo/bar.xml and recognize that since the path_info starts with "file", it needs to pull the file and return it directly. Then it does so and tells pyblosxom it handled the request and Pyblosxom execution would end. There's an imagekicker plugin in the registry that serves up images. It might help. http://www.planetpyblosxom.org/blog/registry/display/graphics/imagekicker Hope that helps! /will On Fri, 15 Oct 2004, Ross Burton wrote: > > I'm having a mental block whilst writing a simple plugin and am > resorting to mailing the list. I've got a plugin which looks for a > certain file (not a .txt file) in the current category, and if it is > set adds a <link> element to the page. However, I need to the link > element to point at the file. An example: > > [blosxom-base]/foo/bar.xml exists. When the web browser goes to /foo/ > the plugin sees that bar.xml exists in the current category and writes a > <link> element pointing to foo/bar.xml. However, when I try and fetch > it pyblosxom doesn't accept bar.xml and returns a 404 -- I presume > because it is looking for an entry called foo and a flavour called xml. > Is there a way a plugin can catch requests for files and return foo.xml > as is, without any more pyblosxom parsing? > > Thanks, > Ross ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl