wandros Posted April 7, 2017 Report Posted April 7, 2017 Hello! Is there any way to customize/add onto core features directly from plugins without having to actually edit the core files? I need to add additional functionality to the invoicecreate form, but would if possible keep everything about the plugin in the plugin code and not splash it around in the core. How do you guys resolve this issue? Swapping out core files with modified ones on plugin install? Thanks! /Wandros
Michael Posted April 7, 2017 Report Posted April 7, 2017 Depends on what files? Naja7Host did the CSS/JS/PHP plugin which allows editing but keeping them as they are: MiikaaQC 1
Paul Posted April 7, 2017 Report Posted April 7, 2017 On 4/7/2017 at 4:25 AM, wandros said: I need to add additional functionality to the invoicecreate form, but would if possible keep everything about the plugin in the plugin code and not splash it around in the core. Expand Modifying the invoice creation form would be part of the core. However, you could create a plugin that adds an action to the Actions section on a client profile page, when clicked, would load the plugin with your own invoice creation form. You'd have full control over it. The core form would still exist, but you could use the one you created instead. This is a good place to start - https://docs.blesta.com/display/dev/Creating+a+Plugin wandros, activa and Michael 3
wandros Posted April 10, 2017 Author Report Posted April 10, 2017 Thanks for the responses! Instead of modifying the existing invoice creation page, I'm going to do as follows. Create my own invoice creation page, based on the original one but residing inside my plugin. Then hijack all the requests to the original invoicecreate form using preAction event in plugin with url filtering to redirect to my plugins own invoicecreate page. Any disadvantage to this approach? Thanks! /Wandros
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now