Modules in DIAFAN.CMS based on MVC pattern. This means that one part of the module data is prepared and processed, the other parts are made and these data are displayed on the website. It managed all this controller. This was done in order to be able to arbitrarily edit module design without worrying about data processing algorithm, and vice versa. That is, every developer can renew the appearance of the news module without affecting the algorithm. The module must be sure to have 3 parts:
Example:
The module "news" consists of files:
$result
from the model and all the data from it are made and displayed on the site.
If the module processes the data from the form, then the file will be added:
If the module is part of the "Connection", that is used in other modules, it adds one more file:
If the module is installed option, there must be the installation file:
If the page module should exist regardless of the structure of the site, you can refer to the module file directly. To do this, the file must have the name of modules/module_name/module_name.function.php. Refer to it as you can: http://site.com/modul/function/.
The module can communicate with other modules . To do this, you need to prepare files in the format provided by third-party modules.
Of special note is the module JS-scripts. They also involve some peculiarities.
Methods with the same name as their class will not be constructors in a future version of PHP; Markdown_Parser has a deprecated constructor #1 include_once() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499] #2 Docs_model->prepare_text( Modules in DIAFAN.CMS based on [MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller) pattern. This means that one part of the module data is prepared and processed, the other par...) called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:94] #3 Docs_model->show() called at [/var/www/diafan/data/www/diafancms.com/modules/docs/docs.php:29] #4 Docs->init() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:474] #5 Init->module() called at [/var/www/diafan/data/www/diafancms.com/includes/init.php:119] #6 Init->start() called at [/var/www/diafan/data/www/diafancms.com/index.php:62] | /var/www/diafan/data/www/diafancms.com/modules/docs/docs.model.php:499 |