AFAIK,

plugin could be used

-1-to be a ~~~separate application : example the blog plugin, the auth
plugin, the forum plugin, etc...
-2-to be called from anywhere by using a requestAction: example
captcha plugin is used to be called via requestAction to import the
"prove that you are human" image

choose the option you need (you may use number 2)

and have a nice baking day


On Dec 18, 12:53 pm, Aargh <dra...@secured.ro> wrote:
> I would like to know if there is any official (or at least supported /
> under development) mechanism that would allow me to create hooks so
> that i can hook certain plugin functions into a controller.
>
> What would be sweet :
>
> Controller hooks
>
> For example let-s say we have a two statistics plugins. One checks the
> ip, one checks the searchphrase. They both basically work with the
> same data, and could be hooked into the afterFilter or smth.
>
> So the idea would be to be able to register a hook, and then (using
> naming conventions ??), certain (plugin) functions to be called.
>
> View hooks
>
> Would be great such thing to also exist for the views, let-s say we
> register a viewHook called "product_addons", so if we develop a "rate
> the product" plugin, the view would take a ctp from the plugin and
> render the stars and the rating form in that hook. And of course when
> disabling the plugin, searching for the things to be rendered there
> will return empty. Whatever.
>
> I've seen something like (controllerHooks) this at Tarique Sani's
> Cheesecake, in his hitStats plugin. It has some AppInit component that
> will do the hooks. I'm not sure how it works, I've not investgated
> further as the software seems to be quite old (1.1 framework version I
> think). There was another implementation like this called SpliceIt,
> but is not mantained, and seems quite old also.
>
> Is there any reccomended way of actually plugging/unplugging custom
> logic ? Because the plugins seem more like separate apps (that can use
> the main's app logic, and not the other way arround, which is ok after
> all) to me. Maybe I missed something, but I can't find a way to
> elegantly plug in/out custom logic into the controllers.
>
> For plugging in/out custom elements/views i didn't find anything :(.
>
> Probably doing this in models is wrong by design.
>
> Maybe I have some brain damage from other apps I modified. But there
> are plenty of components and helpers that make development a breeze,
> until you need to actually do a plugin that can also easly plug out.
> This is one of the reasons I think apps like wordpress, prestashop and
> similar have a bigger community than any cakephp based app outhere
> (for example CheeseCake is a good photoblog, but without other (spam
> filtering for example) plugins is not to be considered by most
> photographers out there, and noone is willing to create one if there
> is no standard way to develop plugins in cakphp, and everytime you
> have to rediscover how the developer implemented the hooks). I think
> this would make easier for us to port plugins from one app to another,
> thus making creation of feature rich software easier.
>
> Is very hard to do anything but custom software on cakephp, as for
> example creating a good shopping cart will essentially rule out 3'rd
> parties from developing payment or shipping plugins. Most of those
> payment plugins for example do the same thing, but using different
> apis. From the cart's point of view they all act the same, send a
> form, receive an answer, update the cart's status. But there is no
> elegant way to plug in/out these modules. And the funny thing is most
> of them do not even need a table, just a form and a way to validate
> the answer and change cart's status.
>
> Some time ago I developed some publishing software with cake (1.1). It
> was great, until it came to statistics. I had to add lots of
> requestActions in the before and afterFilters. Right now is some kind
> of mess (as removong a "plugin" would also mean to remove the added
> logic into the main apps controllers and views). The next thing I
> develop I would like to not become so messy.
>
> (Btw, sluggable behaviour, bindable behaviour, meio upload and magick
> resize helper spared me a lot of work, 10x god the community is
> strugling to add cool functionality to the framework).
>
> I searched about this topics, but I didn't find much. I checked
> various apps for ideas, but most of them are outdated.
>
> Is there anything like this in plan ? Is there any component that
> already do that ?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to