To work off-site file structure described modules/module_name/module_name.function.php. This file can be called directly as: http://site.com/модуль/function/.
Direct access to the module may be needed for the following reasons:
The file modules/module_name/module_name.function.php available basic system class $this->diafan
. Through this variable, you can access to the users, cache, router, and connect the templates, as well as connections to the modules.
In addition, before connecting the files is the start of the session, determined the requested language version of the site, a temporary site and the user area. All these data can be used in the file of module.
If the requested address http://site.com/module_name/function/some_data/, the data is inherent in the link, the module will be available in the form: $_GET["rewrite"] = 'some_data';
Examples of the implementation of a direct appeal to the module in DIAFAN.CMS:
modules/captcha/captcha.get.php – http://site.com/captcha/get/ – генерирует изображение защитного кода;
the modules / news / news.rss.php - http://site.com/news/rss/ - generates RSS-feed news;
modules/payment/payment.get.php – http://site.com/payment/get/ – работа с платежными системами;
modules/useradmin/useradmin.edit.php – http://site.com/useradmin/edit/ – форма редактирования данных из пользовательской части;
the modules / the attachments / attachments.get.php - http://site.com/attachments/get/ - gives attachment.