From: <And...@Be...> - 2001-12-13 16:48:18
|
.. this really sounds like a good idea. It probably would ease my plan = to port Apache::MP3 to OI.=20 In a recent post I told you about our plan to add features to base_page = to build differnt views, which probably come close to these directory = handlers. I think, that you need two sorts of directory handlers: - one like you described before, where you build the index by reading through files of some sort and extracting whatever metainfo or = displaying them - one which looks at who the user is and which rights he has and from = this build some kind of "portal" with links to the information he shall see Also, the type of the "pages" in the Page hierarchy should be = irrelevant. It does not matter, if the information is in files, some db, an external website or dynamically generated. What do you think? later, Andreas -----Urspr=FCngliche Nachricht----- Von: Chris Winters [mailto:ch...@cw...] Gesendet: Donnerstag, 13. Dezember 2001 14:43 An: ope...@li... Betreff: [Openinteract-dev] extending base_page: custom directory handlers I've been meaning for some time to get my own website back up and on the latest version of OpenInteract. But before I do that I'd like to have a good photo album program in place -- the one I wrote a while ago was just a bad and temporary hack, and one that sucked up mounds of CPU cycles at that. So I was thinking about a WebTechniques column [1] of Randal's where he implemented the photo album that's running on his site now [2], plus a recent discussion of such systems on either the mod_perl or TT mailing lists. And then it hit me -- all we need to do is tell OpenInteract is to treat requests for directory indexes differently. Then I thought: why can't we just associate a particular action with a directory request? And then: actions that are meant to be directory indexes can be flagged in the action table, just like actions that are lookups. I can hear you asking: These are different from normal actions how? Generally an action takes over an entire URL space -- all requests for /Photos/ would have to be handled by a particular action. This type of action is focused only on the directory request and leaves OpenInteract to deal with the files or subdirectories by its normal means. So, say you have a directory /Photos/. You could edit this as an individual object (page_directory), give it a description and pick 'photo_album' from the available directory handlers installed on your site. Thereafter, requests for /Photos/ will check to see if there's a directory handler registered and if so, execute that action. You can also tell subdirectories of /Photos/ that they should inherit the settings from parent directories, so you won't have to create an object for every subdirectory you want using the same directory handler. One of the good things is that we'd hopefully be able to create a simple wrapper around existing modules -- Apache::OpenIndex, Apache::PhotoIndex, etc. And creating a custom index should be a snap -- one of the sites I work on has a directory with files following a regular pattern (20011213.html) -- it would be nice to be able to list these out as: November 18, 2001 December 13, 2001 ... And have it automatically be updated when a new file is created in the directory. And so on. I wanted to put it out here to see if anyone had any ideas, problems, etc.=20 Chris [1] http://web.stonehenge.com/merlyn/WebTechniques/col41.html [2] http://web.stonehenge.com/merlyn/Pictures/ --=20 Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. _______________________________________________ openinteract-dev mailing list ope...@li... https://lists.sourceforge.net/lists/listinfo/openinteract-dev |