<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Ajax part in plugins</title>
		<link>https://www.cotonti.com</link>
		<description>Последние сообщения в теме</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 11 Apr 2026 15:05:18 -0000</pubDate>

		<item>
			<title>ez</title>
			<description><![CDATA[I think Ajax should be as clean as possible... Why do you ask..  <img class="aux smiley" src="https://www.cotonti.com/./images/smilies/confused.gif" alt=":/" /> <br />
<br />
Because ajax responses needs to be FAST<br />
It is usually an action that the user is waiting for (so an UserInterface thing)<br />
<br />
If you need rights:<br />
just do: $plug_admin = sed_auth('plug', 'Yourplug', 'A');<br />
<br />
Language file:<br />
require_once(sed_langfile('Yourplug'));<br />
<br />
I think $cfg is available, not sure about $usr.. <br />
maybe try: global $usr]]></description>
			<pubDate>чт, 29 июл 2010 21:40:04 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=5760&d=0#post25394]]></link>
		</item>
		<item>
			<title>Macik</title>
			<description><![CDATA[Now (in cotonti <strong>0.6.9</strong>) when you exec some <strong>ajax part</strong> of you <strong>plugin</strong> you can not use usual enviroment.<br />
I talk aboun <strong>automatic loading</strong> you plugin <strong>LANG</strong> files and full initing <strong>$usr </strong> variable.<br />
(I mean $usr['auth_read'], $usr['auth_write'], $usr['isadmin']);<br />
<br />
So, now I must include some part of code that <strong>duplicate</strong> '<strong>plug.inc.php</strong>' in each of my plugin that uses AJAX (plug.php?r=plug) and need to be ajax-result localized.<br />
<br />
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.<br />
<br />
My suggestion to make it configurable: when user use additional parameter (for example 'plug.php?e=plug&amp;h=fullajax') it loads all variables and had done all init as in usual plugin part (plug.php?e=plug).]]></description>
			<pubDate>чт, 29 июл 2010 20:36:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/ru/forums?m=posts&q=5760&d=0#post25392]]></link>
		</item>
	</channel>
</rss>