<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://ngcms.ru/forum/extern.php?action=feed&amp;tid=3824&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Next Generation CMS :: Форум поддержкиКак показать другой блок в мобильно версии]]></title>
		<link>https://ngcms.ru/forum/viewtopic.php?id=3824</link>
		<description><![CDATA[Самые свежие сообщения в Как показать другой блок в мобильно версии.]]></description>
		<lastBuildDate>Sat, 04 Sep 2021 07:09:02 +0000</lastBuildDate>
		<generator>FluxBB 1.5.11</generator>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45907#p45907</link>
			<description><![CDATA[<p>плагин не работает на php8 на последней сборке </p><div class="quotebox"><blockquote><div><p>NGCMS Runtime exception: Error<br />Class &quot;Twig_Extension&quot; not found</p><p>Stack trace<br />#&#160; &#160; Line #&#160; &#160; Class/Function&#160; &#160; File name<br />X&#160; &#160; 5&#160; &#160; 0&#160; &#160; /home/www/xn----7sbbawujfno3aqk5b5b7b.url3.ru/engine/plugins/check_pda/MobileDetect.php<br />0&#160; &#160; 11&#160; &#160; require_once&#160; &#160; /home/www/xn----7sbbawujfno3aqk5b5b7b.url3.ru/engine/plugins/check_pda/check_pda.php<br />1&#160; &#160; 587&#160; &#160; check_pda&#160; &#160; /home/www/xn----7sbbawujfno3aqk5b5b7b.url3.ru/engine/includes/inc/extras.inc.php<br />2&#160; &#160; 397&#160; &#160; executeActionHandler&#160; &#160; /home/www/xn----7sbbawujfno3aqk5b5b7b.url3.ru/engine/core.php<br />3&#160; &#160; 15&#160; &#160; include_once&#160; &#160; /home/www/xn----7sbbawujfno3aqk5b5b7b.url3.ru/engine/admin.php</p></div></blockquote></div>]]></description>
			<author><![CDATA[dummy@example.com (irbees2008)]]></author>
			<pubDate>Sat, 04 Sep 2021 07:09:02 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45907#p45907</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45735#p45735</link>
			<description><![CDATA[<div class="quotebox"><cite>irbees2008 пишет:</cite><blockquote><div><p>Можешь пробывать вот это </p><div class="codebox"><pre><code class="language-markup">&lt;script type=&quot;text/javascript&quot;&gt;
{
if (screen.width &gt; 480) document.write (&#039;&lt;script type=&quot;text/javascript&quot; src=&quot;js/wow.min.js&quot; &gt;&lt;/sc&#039; + &#039;ript&gt;&#039;);
}
&lt;/script&gt;</code></pre></div></div></blockquote></div><p>Этот код работает отлично</p>]]></description>
			<author><![CDATA[dummy@example.com (vl)]]></author>
			<pubDate>Sat, 05 Sep 2020 20:02:52 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45735#p45735</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45722#p45722</link>
			<description><![CDATA[<p>Можешь пробывать вот это </p><div class="codebox"><pre><code class="language-markup">&lt;script type=&quot;text/javascript&quot;&gt;
{
if (screen.width &gt; 480) document.write (&#039;&lt;script type=&quot;text/javascript&quot; src=&quot;js/wow.min.js&quot; &gt;&lt;/sc&#039; + &#039;ript&gt;&#039;);
}
&lt;/script&gt;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (irbees2008)]]></author>
			<pubDate>Sun, 30 Aug 2020 05:58:14 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45722#p45722</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45719#p45719</link>
			<description><![CDATA[<p>Спасибо, буду пробовать.&#160; А нельзя этореализовать с конкретным разрешением экрана?</p>]]></description>
			<author><![CDATA[dummy@example.com (vl)]]></author>
			<pubDate>Sat, 29 Aug 2020 16:08:48 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45719#p45719</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45716#p45716</link>
			<description><![CDATA[<div class="quotebox"><cite>vl пишет:</cite><blockquote><div><div class="quotebox"><cite>infinity237 пишет:</cite><blockquote><div><p>Использовать:</p><div class="codebox"><pre><code>{% if(system_flags.check_pda) %}Блок для мобильных устройств{% else %}Блок для PC{% endif %}</code></pre></div></div></blockquote></div><p>На мобильном телефоне тоже показывает&#160; &quot;Блок для PC&quot; .&#160; <br />а если&#160; &#160;добавить в&#160; core.php: </p><div class="codebox"><pre><code>$twig-&gt;addExtension(new Twig_Extension_MobileDetect()); </code></pre></div><p>Появляется сообщение&#160; &quot;NGCMS Runtime error: Class &#039;Twig_Extension_MobileDetect&#039; not found&quot;</p><br /><p>Используемая версия:&#160; &#160; &#160;0.9.5 Release + GIT 20170301</p></div></blockquote></div><p>Все работает, проверил&#160; 0.9.5 Release + GIT 20170301 и на 0.9.7</p>]]></description>
			<author><![CDATA[dummy@example.com (irbees2008)]]></author>
			<pubDate>Sat, 29 Aug 2020 06:49:54 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45716#p45716</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45715#p45715</link>
			<description><![CDATA[<p>попробовал дописать&#160; к самому скрипту&#160; &#160;такое выражение, -скрипт&#160; jquery_002.js&#160; не работает ни при каком разрешении</p><div class="codebox"><pre><code class="language-none">$(document).ready(function () {

	function mySuperFunc () {
		width = $(window).width();
		console.log(width);
		if (width &lt; 991) {

код скрипта jquery_002.js

				}
			});
		}
	}

	mySuperFunc ();
	$(window).resize( mySuperFunc );
});</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (vl)]]></author>
			<pubDate>Sat, 29 Aug 2020 04:39:07 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45715#p45715</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45714#p45714</link>
			<description><![CDATA[<p>На выходных проверю</p>]]></description>
			<author><![CDATA[dummy@example.com (irbees2008)]]></author>
			<pubDate>Thu, 27 Aug 2020 16:53:38 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45714#p45714</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=45713#p45713</link>
			<description><![CDATA[<div class="quotebox"><cite>infinity237 пишет:</cite><blockquote><div><p>Использовать:</p><div class="codebox"><pre><code>{% if(system_flags.check_pda) %}Блок для мобильных устройств{% else %}Блок для PC{% endif %}</code></pre></div></div></blockquote></div><p>На мобильном телефоне тоже показывает&#160; &quot;Блок для PC&quot; .&#160; <br />а если&#160; &#160;добавить в&#160; core.php: </p><div class="codebox"><pre><code>$twig-&gt;addExtension(new Twig_Extension_MobileDetect()); </code></pre></div><p>Появляется сообщение&#160; &quot;NGCMS Runtime error: Class &#039;Twig_Extension_MobileDetect&#039; not found&quot;</p><br /><p>Используемая версия:&#160; &#160; &#160;0.9.5 Release + GIT 20170301</p>]]></description>
			<author><![CDATA[dummy@example.com (vl)]]></author>
			<pubDate>Wed, 26 Aug 2020 17:39:11 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=45713#p45713</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=43129#p43129</link>
			<description><![CDATA[<div class="quotebox"><cite>easmik пишет:</cite><blockquote><div><div class="quotebox"><cite>infinity237 пишет:</cite><blockquote><div><p>Использовать:</p><div class="codebox"><pre><code>{% if(system_flags.check_pda) %}Блок для мобильных устройств{% else %}Блок для PC{% endif %}</code></pre></div></div></blockquote></div><p>Подскажи пожалуйста. В последней версии этот плагин работает?</p></div></blockquote></div><p>Да. Работает.</p>]]></description>
			<author><![CDATA[dummy@example.com (infinity237)]]></author>
			<pubDate>Wed, 31 May 2017 20:16:18 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=43129#p43129</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=43126#p43126</link>
			<description><![CDATA[<div class="quotebox"><cite>infinity237 пишет:</cite><blockquote><div><p>Использовать:</p><div class="codebox"><pre><code>{% if(system_flags.check_pda) %}Блок для мобильных устройств{% else %}Блок для PC{% endif %}</code></pre></div></div></blockquote></div><p>Подскажи пожалуйста. В последней версии этот плагин работает?</p>]]></description>
			<author><![CDATA[dummy@example.com (easmik)]]></author>
			<pubDate>Tue, 30 May 2017 21:42:28 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=43126#p43126</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=41498#p41498</link>
			<description><![CDATA[<p>В /engine/core.php найти:</p><div class="codebox"><pre><code>$twig-&gt;addExtension(new Twig_Extension_StringLoader());</code></pre></div><p>Ниже добавить:</p><div class="codebox"><pre><code>$twig-&gt;addExtension(new Twig_Extension_MobileDetect());</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (infinity237)]]></author>
			<pubDate>Wed, 20 Apr 2016 16:59:34 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=41498#p41498</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=41496#p41496</link>
			<description><![CDATA[<div class="quotebox"><cite>infinity237 пишет:</cite><blockquote><div><p>Если нужно большая точность и больше фич, то можно заюзать TWIG Extension.<br />По установке:<br />Скопировать в /engine/includes/classes/Twig/Extension</p><p>Использовать:</p><div class="codebox"><pre><code>{% extends is_mobile() ? &quot;layout_mobile.html.twig&quot; : &quot;layout.html.twig&quot; %}
{% if is_mobile() %} ... {% endif %}
{% if is_tablet() %} ... {% endif %}
{% if is_mobile() and is_samsung() %} ... {% endif %}
{{ get_available_devices()|join(&quot;&lt;br /&gt;&quot;)|raw }}</code></pre></div></div></blockquote></div><p>Выдает &quot;The function &quot;is_mobile&quot; does not exist in ...&quot; <br />проверял на GIT 20150123 и GIT [20150104+]</p>]]></description>
			<author><![CDATA[dummy@example.com (EsCaPeR)]]></author>
			<pubDate>Tue, 19 Apr 2016 23:29:10 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=41496#p41496</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=41108#p41108</link>
			<description><![CDATA[<div class="quotebox"><cite>legenda пишет:</cite><blockquote><div><p><strong>infinity237</strong>, это для разных устройств?</p></div></blockquote></div><p>Конкретно в этом решении используется библиотека:<br /><a href="/forum/go.php?link=https://github.com/serbanghita/Mobile-Detect" rel="nofollow">https://github.com/serbanghita/Mobile-Detect</a><br />Она точнее определяет устройства. Определяет отдельно мобильные - is_mobile()&#160; и планшеты - is_tablet(). Также отдельно можно определять устройства по вендорам и по браузерам (подробнее вызов get_available_devices() )</p>]]></description>
			<author><![CDATA[dummy@example.com (infinity237)]]></author>
			<pubDate>Thu, 07 Jan 2016 15:15:33 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=41108#p41108</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=41107#p41107</link>
			<description><![CDATA[<p><strong>infinity237</strong>, это для разных устройств?</p>]]></description>
			<author><![CDATA[dummy@example.com (legenda)]]></author>
			<pubDate>Thu, 07 Jan 2016 14:51:51 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=41107#p41107</guid>
		</item>
		<item>
			<title><![CDATA[Re: Как показать другой блок в мобильно версии]]></title>
			<link>https://ngcms.ru/forum/viewtopic.php?pid=41106#p41106</link>
			<description><![CDATA[<p>Если нужно большая точность и больше фич, то можно заюзать TWIG Extension.<br />По установке:<br />Скопировать в /engine/includes/classes/Twig/Extension</p><p>Использовать:</p><div class="codebox"><pre><code>{% extends is_mobile() ? &quot;layout_mobile.html.twig&quot; : &quot;layout.html.twig&quot; %}
{% if is_mobile() %} ... {% endif %}
{% if is_tablet() %} ... {% endif %}
{% if is_mobile() and is_samsung() %} ... {% endif %}
{{ get_available_devices()|join(&quot;&lt;br /&gt;&quot;)|raw }}</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (infinity237)]]></author>
			<pubDate>Thu, 07 Jan 2016 13:45:22 +0000</pubDate>
			<guid>https://ngcms.ru/forum/viewtopic.php?pid=41106#p41106</guid>
		</item>
	</channel>
</rss>
