Guys, I created a website via wordpress plugin and i want this site to be a default website for every client created.. lets say i created 3 wordpress site. i need these 3 sites as 3 default websites were user can select any of these as their site.. once they select it then all data needed(by default) will also be populated. How can i do this? pls help...
Create a server side ISPConfig plugin wich attaches itself to the website insert even that copies the nescessary files when a site gets created.
Hello, I'm also interested in such a plugin. Although I'm not a PHP ninja, I have some experience deploying / customizing open source PHP solutions and also have done some Laravel development by myself. I am currently looking for information regarding ISPConfig plugin development, but couldn't find much until now. I reviewed the ISPConfig User Manual, but didn't seem to find anything relevant to ISPConfig plugin/modules development (did I miss it ?). Could you please tell me where to look in order to start learning about plugin development ? That could also be a possibility, could someone tell me where to reach for those developers and what budget it could represent to develop the kind of plugin @ed123 is talking about ? Thank you very much.
Existing plugins are in /usr/local/ispconfig/server/plugins-available/, so certainly refer to those. I don't know about documentation offhand, I've never tried to create one.
Ok, so let's give it a try Create a new file /usr/local/ispconfig/server/plugins-available/x_custom_apache2_plugin.inc.php which contains this code: Code: <?php class x_custom_apache2_plugin { var $plugin_name = 'x_custom_apache2_plugin'; var $class_name = 'x_custom_apache2_plugin'; //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. function onInstall() { global $conf; if($conf['services']['web'] == true) { return true; } else { return false; } } /* This function is called when the plugin is loaded */ function onLoad() { global $app; /* Register for the events */ $app->plugins->registerEvent('web_domain_insert', $this->plugin_name, 'insert'); } function insert($event_name, $data) { global $app, $conf; // do something here } } ?> Add your custom code in at "// do something here". You get all fields from web domain table incl. the paths in the array $data['new'], so e.g. the domain name is $data['new']['domain'] Then activate the plugin by creating a symlink /usr/local/ispconfig/server/plugins-enabled/x_custom_apache2_plugin.inc.php that points to /usr/local/ispconfig/server/plugins-available/x_custom_apache2_plugin.inc.php
Thank you both @Jesse Norell and @till... The given skeleton and explanation, along with an exploration of the files present under /usr/local/ispconfig/server/plugins-available/, should at least allow me to start to understand the mechanics of ISPConfig's plugins. I'll probably soon be back on this forum with more questions I guess Thank you for pointing me in the correct direction.
Hi, Thank you so much for all of these. I will try to look at it.. but if someone successfully did something like this.. would be great to share the plugin very much appreciated not just me but for whole community..