Форумы / Cotonti / Development / Ajax part in plugins

Suggestion for some improvments

Macik
#25392 29.07.2010 20:36
Now (in cotonti 0.6.9) when you exec some ajax part of you plugin you can not use usual enviroment.
I talk aboun automatic loading you plugin LANG files and full initing $usr variable.
(I mean $usr['auth_read'], $usr['auth_write'], $usr['isadmin']);

So, now I must include some part of code that duplicate 'plug.inc.php' in each of my plugin that uses AJAX (plug.php?r=plug) and need to be ajax-result localized.

I think it done for some speed optimizing for AJAX part in simple plugins. But some times developer needs full power of CMS to use in AJAX responce part.

My suggestion to make it configurable: when user use additional parameter (for example 'plug.php?e=plug&h=fullajax') it loads all variables and had done all init as in usual plugin part (plug.php?e=plug).
https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F