Re: [pLog-General] new plugin directory structure
Brought to you by:
jondaley
From: Oscar R. <os...@re...> - 2004-04-06 18:05:07
|
> +1 > > Could you allow plugins to define new actions and their associated > views as well? For plugins that want to add new sections... like for > example, if someone wanted to post recipes or something, they could > create a plugin that adds actions "PluginRecipeList" and > "PluginRecipeDetail" to display and navigate through them. Ok, bad > example, but you get the idea. > > Good idea? Terrible idea? > No no, it's good :) I already had something like this in mind. As it is now, it would be very easy to do this, but we need a system to register actions (at the moment it's an array that maps action name to action class) >> /plugins/helloworld/actions.php >> /plugins/helloworld/block.php what's this one for?? (block.php) >> /plugins/helloworld/block.template >> /plugins/helloworld/main.class.php >> ... so if we need a template file, it is located by >> default in the plugin itself, and if the user want to >> add it's own, the users template will be located in Too complicated. Allow users to change the way plugins generate content? Uh, I'm not so sure... So far plugins didn't generate any html code and it was left up to the user how to present the stuff generated by the plugin. Like the haiku plugin: it returns a single string. And then the user is free to use <p>haiku-text</p> or <div id="haiku">haiku-text</div>. >> the users template dir. not all plugins need a >> template, but like for the calendar and the weather >> block, we can need one, so we need one or two default >> styles, included in the plugin itself. >> having a seperate file for the block will make things >> clearer. only that file will be loaded if the block >> is activated. >> the main.class.php is the class to be included if >> needed by some part of the blog... if this plugin is >> not interacting with any parts of plog, the file >> droped. Sorry, I don't understand this. >> the actions.php file is to be the "admin" part of the >> plugin only, so this file will deal with the config of >> the plugin only. >> i know you don't like to change your structures Oscar, >> but this would make the work a little easier if we >> seperate everything in the plugins the same way you >> seperate your classed elsewhere... ;) I am not agains changes 'per se', but if it's for good, why not... Oscar |