<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Как в php поймать где я совершаю действие?</title>
		<link>https://www.cotonti.com</link>
		<description>Laatste forum onderwerpen</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Sat, 11 Apr 2026 22:25:23 -0000</pubDate>

		<item>
			<title>Roffun</title>
			<description><![CDATA[<p><a href="https://www.cotonti.com/ru/docs/devel/debugging">Можно воспользоваться отладкой</a></p>
]]></description>
			<pubDate>Ma, 27 Aug 2018 20:53:57 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=8706&d=0#post43671]]></link>
		</item>
		<item>
			<title>Edward</title>
			<description><![CDATA[<p>А в плагине var_dump(<code class="php variable" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(0,134,179);float:none;height:auto;line-height:1.3em;width:auto;">$env</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">[</code><code class="php string" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(234,124,30);float:none;height:auto;line-height:1.3em;width:auto;">'ext'</code><code class="php plain" style="font-size:13.5px;background-color:rgb(250,250,250);white-space:pre;margin-right:0px;margin-left:0px;padding:0px;border-width:0px;background-image:none;font-family:Monaco, Menlo, Consolas, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;color:rgb(51,51,51);float:none;height:auto;line-height:1.3em;width:auto;">])</code> что даст?</p>
]]></description>
			<pubDate>Ma, 27 Aug 2018 15:24:24 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=8706&d=0#post43670]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>Я в Hooks=comments.send.first пытаюсь отправить определенные комментарии на модерацию ($comarray['com_state'] = 1;)</p>

<p>Это отдельный плагин. </p>

<p>Для админа все работает - если я админ то <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;">['com_state'] = 0 иначе 1</span></p>

<pre class="brush:php;gutter:false;toolbar:false;">
if(!$usr['isadmin'])
{
	$comarray['com_state'] = 1;	
}</pre>

<p>Пробую "если я в <span style="font-family:'Open Sans', 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;text-align:justify;background-color:rgb(255,255,255);">$env['ext'] == "page" </span></p>

<pre class="brush:php;gutter:false;toolbar:false;">
global $structure, $sys, $c, $db, $cfg, $env, $db_pages, $db_structure;
 
if ($env['ext'] == "page")
{
$comarray['com_state'] = 1; 
}
</pre>

<p>В шаблоне dump дает<br />
{PHP.env.ext} ="page"<br />
 </p>

<pre class="brush:php;gutter:false;toolbar:false;">
global $structure, $sys, $c, $db, $cfg, $env, $db_pages, $db_com, $db_structure;
require_once cot_incfile('comments', 'plug');

if ($env['ext'] == "page")
{
$comarray['com_state'] = 1; // a кидает 0
}</pre>

<p>Не работает.<br />
 </p>

<pre class="brush:php;gutter:false;toolbar:false;" style="font-size:15px;background-image:url(&quot;../img/code-blueprint.png&quot;);">
if ($env['ext'] = "page"</pre>

<p class="updated">и прочие телодвижения не помогли</p>
]]></description>
			<pubDate>Ma, 27 Aug 2018 12:16:02 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=8706&d=0#post43669]]></link>
		</item>
		<item>
			<title>Edward</title>
			<description><![CDATA[<p>Привет!</p>

<p>Значит не выполняется условие)</p>

<p>что в</p>

<pre class="brush:php;gutter:false;toolbar:false;">
var_dump($env['ext'])</pre>

<p>или в шаблоне</p>

<pre class="brush:php;gutter:false;toolbar:false;">
{PHP.env|dump}</pre>

<p>?</p>
]]></description>
			<pubDate>Ma, 27 Aug 2018 10:04:45 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=8706&d=0#post43668]]></link>
		</item>
		<item>
			<title>Kopusha</title>
			<description><![CDATA[<p>К примеру мне надо сделать ХХХ только если я не админ. В php нужного модуля - </p>

<pre class="brush:php;gutter:false;toolbar:false;">
	if(!$usr['isadmin'])
	{  
    тут искомый ХХХ;	
	}
</pre>

<p>А как сделать ХХХ если я в page и категрии news?<br />
пробую и так и сяк<br />
global $structure, $sys, $c, $db, $cfg, $env, $db_pages, $db_structure;</p>

<div> </div>

<div> </div>

<div>if ($env['ext'] == "page" &amp;&amp; $c == "tricks")</div>

<div>{</div>

<div>$comarray['com_state'] = 1; // a кидает =0</div>

<div>}</div>
]]></description>
			<pubDate>Ma, 27 Aug 2018 01:58:37 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=8706&d=0#post43667]]></link>
		</item>
	</channel>
</rss>