Hey Till and Falko. I would like to see a scheme of ISPConfig 3 structure. Would you like to post it or send to pm? Thank's
We dont have a scheme of the ispconfig structure available as prt of the ispconfig developer docs yet.
I suspect the manual would help, but in (very) general, ispconfig has a web interface which updates a database, and services like email, web, etc. either access access the database directly or config files are generated from that database on a schedule (via cronjobs). Software installation is done manually, the official method is by following one of the 'Perfect Server' guides.
thanks, thank you very much...I have been testing ISPConfig3, the installation and it's functionalities...but i need to add some customizations to my needs, and i want to know if there is some documentation of how does the aplication is made....how does the code works. (excuse my english...i am working on it)
I would caution against making any major customizations otherwise every update you will have to redo your customizations and ISPConfig gets updated a lot. Would recommend using Debian OS as that's what its developed under. Most of the issues I see on the forums here are on other OS'es or people who have customized their systems and any update breaks everything. The more you can accommodate the standard system the easier your life will be down the line.
Customizations are not a problem as long as they developed as server or interface plugins instead of altering any core files. But keeping the standard system will make your life easier off course. ISPConfig uses a event based model with plugins, so you can replace or extend each server functionality by writing a new plugin that attches itself to the event. There are no additional docs available beside the commented sourcecode. If you have a more specific question, then we can try to answer it.
If you want to modify the interface, this will be overwritten during an update. To trigger some actions after i.e. creating a new mail-domain, you can create plugin interface/lib/plugins If you want additional actions on the server, you can create a plugin in server/plugins-available and link this to server/plugins-enabled. interface/lib/classes - you can use it for own classes interface/lib/plugins - the plugins are loaded during login and you can do something like $app->plugin->registerEvent('client:clientn_after_update', 'ticket_plugin', 'client_update'); function client_update($event_name, $page_form) { some stuff; } server/lib/classes - same as interface-classes server/lib/classes/cron.d - cronjobs server/plugins-available - trigger action I think, you can browse through the code to get an idea how it works.
for example i need to add some roles to some resellers, or to add a new login level. I would like to know if it is possible where can i find this events, at the code level
The ISPConfig permission system is similar to the one of the Linux operating system. an Item in the database is owned by a user and a group. Users are stored in sys_user and groups in sys_group table. Each record has some sys_* columns for user, group, user permission, group permission and other permission. Each client has it's own group, so the permissions are managed by the group ownership, A reseller is just a client that is member in groups of other clients (beside the membership in his own group). The admin user type is basically a user without permission checks, so he can access and edit all items of all users similar to the root user in Linux. When you craete a client in ipconfig, then a corresponding sys_user and sys_group are created automatically. Regarding plugins, ispconfig consists of two independent parts, the interface, and the server. Server plugins are in /usr/local/ispconfig/server/plugins-available/ and get enabled by a symlink in /usr/local/ispconfig/server/plugins-enabled/. Take a look at the code of the existing plugins to see how they work, at the beginning of each plugin you can find the code where the plugin subscribes to events so that it's local functions get called when an event happens. The interface plugins are in /usr/local/ispconfig/interface/lib/plugins/, the subscribe to events that get raised by the form system e.g. when an item get's saved in the interface. One thing to note is that interface plugin events get cached, so when you add a new interface plugin, then you'll have to logout and login again once to activate it. server plugins get loaded automatically on next cron run.
ISPConfig is using a templating system for the interface and server config, it is an extended version of vlibTemplate.
This extended version is part of ISPConfig and yes, you can download the ISPConfig code on the internet. e.g. at https://www.ispconfig.org/ispconfig/download/ or use git.ispconfig.org if you want to download the ISPConfig dev version. Take a look at the lib/classes folder, there you find all classes used in ispconfig.
The ISPConfig project uses a GIT server, we do not use SVN anymore for several years. You can find the GIT server here: https://git.ispconfig.org/ispconfig/ispconfig3