How to make plugin auto installed?
Hi,
As part of our production release, we will be installing our developed plugin as RPM and basically it will create directory within
.../phpdevshell
All our configuration will be within the /config/
We want just the way some ready to use plugin comes auto installed.
Please help how we can auto configure it?
Thanks,
Hitesh
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- PHPDevShell Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Hiteshbhai
- Solved:
- 2014-01-06
- Last query:
- 2014-01-06
- Last reply:
- 2014-01-06
Greg (gregfr) said : | #1 |
Wow this is a cool idea!
We didn't implement this explicitly (mainly for security reasons), but it should be doable. To add this behavior, consider the following points:
- the config file of all plugins are executed at each request, whether the plugin is "installed" or not
- "installing" a plugin is basically only filling some tables in the database, such as menus linked to controllers
- detecting a user login is probably more tricky
What kind of features does your plugin provide?
greg
TitanKing (titan-phpdevshell) said : | #2 |
Another way you could do this is to have a custom database with the plugin already installed. But note that the next version of PHPDevShell plugin manager is much more flexible. You may want to wait for it.
Hiteshbhai (hiteshbhai-patel) said : | #3 |
The project we are doing is internal to our company and it is being develop as plugin within phpdevshell.
We install everything on our system as rpm as i said earlier, so as phpdevshell.
Currently, we have exported the phpdevshell database as sql dump and we create and insert the configuration as part of rpm install.
However, our project is plugin within phpdevshell and it will be separate rpm. Also, our project has his own database which we can create as db dump just like we do for phpdevshell or we can put all our initial queries in ../config/
The option of creating database dump will not work because we have to create menu with in phpdevshell db and with other option ./config/
We also had an issue applying theme to an individual menu item when we configure it in plugin.config.xml file.
For example, we we create menu from the phpdevshell UI, Manage Menu screen there is a drop down to select the theme (one can select "empty"), we didn't find any option to do that when you define your menu in plugin.config.xml file.
I understand it's bit tricky and odd but that's what our requirement is.
TitanKing (titan-phpdevshell) said : | #4 |
I think I understand what you are saying but remember when installing a new menu or new plugin, all it does is it ads a few entries in the mysql database. Why dont you just add this with your plugin installer. To give you an idea, just by adding database entries in a few tables I can install a plugin without touching PHPDevShell Plugin UI.
Am I missing something?
Install plugin without devshell .
Greg (gregfr) said : | #6 |
I'm sorry is that a question?
Hiteshbhai (hiteshbhai-patel) said : | #7 |
I think that's not the answer, we were looking for.
However, we added new controller and a helper class similar to controllers/
In RPM post install script we simply use this URL to install/unistall and reinstall depending on our needs.
Greg (gregfr) said : | #8 |
That's clever! I love it when people find elegant way of solving complex problems. Would you consider contributing a little article about that? :)