<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Движок сайтов S2 — Новые шаблоны]]></title>
	<link rel="self" href="https://s2cms.ru/forum/feed/atom/topic/186/"/>
	<updated>2013-05-22T06:00:53Z</updated>
	<generator>PunBB</generator>
	<id>https://s2cms.ru/forum/topic/186/</id>
		<entry>
			<title type="html"><![CDATA[Re: Новые шаблоны]]></title>
			<link rel="alternate" href="https://s2cms.ru/forum/post/895/#p895"/>
			<content type="html"><![CDATA[<p>А где второй тег h1?</p><p>Вы правы. Пока пусть будет так из соображений совместимости. В следующих версиях надо продумать и доработать.</p>]]></content>
			<author>
				<name><![CDATA[Роман]]></name>
				<uri>https://s2cms.ru/forum/user/2/</uri>
			</author>
			<updated>2013-05-22T06:00:53Z</updated>
			<id>https://s2cms.ru/forum/post/895/#p895</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Новые шаблоны]]></title>
			<link rel="alternate" href="https://s2cms.ru/forum/post/894/#p894"/>
			<content type="html"><![CDATA[<p>Очень понравился простой скрипт. Хотел сделать пару шкурок для себя. <br />Возникли несколько вопросов. <br />К большому сожалению, тэги вывода заголовком статей и выдержек <strong>зашиты в код</strong>. <br /></p><div class="codebox"><pre><code>function s2_last_articles ($num)
{
    $return = ($hook = s2_hook(&#039;fn_last_articles_start&#039;)) ? eval($hook) : null;
    if ($return)
        return $return;

    $articles = s2_last_articles_array($num);

    $output = &#039;&#039;;
    foreach ($articles as $item)
    {
        ($hook = s2_hook(&#039;fn_last_articles_loop&#039;)) ? eval($hook) : null;

        $output .= &#039;&lt;h2 class=&quot;preview&quot;&gt;&lt;small&gt;&lt;a class=&quot;preview_section&quot; href=&quot;&#039;.s2_link(preg_replace(&#039;#[^/]*$#&#039;, &#039;&#039;, $item[&#039;rel_path&#039;])).&#039;&quot;&gt;&#039;.$item[&#039;ptitle&#039;].&#039;&lt;/a&gt; &amp;rarr;&lt;/small&gt; &lt;a href=&quot;&#039;.s2_link($item[&#039;rel_path&#039;]).&#039;&quot;&gt;&#039;.s2_htmlencode($item[&#039;title&#039;]).&#039;&lt;/a&gt;&lt;/h2&gt;&#039;.
             &#039;&lt;div class=&quot;preview time&quot;&gt;&#039;.s2_date($item[&#039;time&#039;]).&#039;&lt;/div&gt;&#039;.
             &#039;&lt;div class=&quot;preview cite&quot;&gt;&#039;.$item[&#039;text&#039;].&#039;&lt;/div&gt;&#039;;
    }

    ($hook = s2_hook(&#039;fn_last_articles_end&#039;)) ? eval($hook) : null;

    return $output;
}</code></pre></div><p>Для меня не проблема переопредилить их хуками, но это для меня. </p><p>Вот еще пример:<br /></p><div class="codebox"><pre><code>$replace[&#039;&lt;!-- s2_title --&gt;&#039;] = !empty($page[&#039;title&#039;]) ? &#039;&lt;h1&gt;&#039;.$page[&#039;title&#039;].&#039;&lt;/h1&gt;&#039; : &#039;&#039;;</code></pre></div><p>Не должно быть на странице два тэга h1, но это мелочь. Проблема в том, что оно зашито в код.</p>]]></content>
			<author>
				<name><![CDATA[Kravchenko]]></name>
				<uri>https://s2cms.ru/forum/user/96/</uri>
			</author>
			<updated>2013-05-21T19:45:11Z</updated>
			<id>https://s2cms.ru/forum/post/894/#p894</id>
		</entry>
</feed>
