<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум АлаичЪ'а о SEO - Форма добавления комментария в модальном окне]]></title>
	<link rel="self" href="https://talk.alaev.info/feed/atom/topic/286/" />
	<updated>2012-12-03T13:56:13Z</updated>
	<generator>PunBB</generator>
	<id>https://talk.alaev.info/topic/286/</id>
		<entry>
			<title type="html"><![CDATA[Re: Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2145/#p2145" />
			<content type="html"><![CDATA[<p>В общем нашел решение, быть может кому поможет.</p><p>в addcomments.tpl кнопку<br /></p><div class="codebox"><pre><code>&lt;button type=&quot;submit&quot; name=&quot;submit&quot; class=&quot;fbutton&quot;&gt;Добавить комментарий&lt;/button&gt;</code></pre></div><p>поменять на на такую:<br /></p><div class="codebox"><pre><code>&lt;button onclick=&quot;doAddComments();return false;&quot; type=&quot;submit&quot; name=&quot;submit&quot; class=&quot;fbutton&quot;&gt;Добавить комментарий&lt;/button&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[darwin]]></name>
				<uri>https://talk.alaev.info/user/117/</uri>
			</author>
			<updated>2012-12-03T13:56:13Z</updated>
			<id>https://talk.alaev.info/post/2145/#p2145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2115/#p2115" />
			<content type="html"><![CDATA[<p><strong>Kanra</strong>,&nbsp; тю. странно.<br />Добавил в конец fullstory:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
function addnewcom() {$(function(){$(&#039;#comments&#039;).dialog({autoOpen: true,show: &#039;fade&#039;,hide: &#039;fade&#039;,width: 500,height: 300})})}
&lt;/script&gt;

&lt;div id=&quot;comments&quot;&gt;
{addcomments}
&lt;/div&gt;
&lt;a href=&quot;#comments&quot; onclick=&quot;addnewcom(); return false;&quot;&gt;Оставить отзыв&lt;/a&gt;</code></pre></div></div></div><p>Содержимое addcomments.tpl:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>&lt;div class=&quot;basecont&quot;&gt;
    &lt;table class=&quot;tableform&quot;&gt;&lt;tbody&gt;
        [not-logged]
        &lt;tr class=&quot;fieldtr&quot;&gt;
            &lt;td class=&quot;label&quot;&gt;Ваше Имя:&lt;span class=&quot;impot&quot;&gt;*&lt;/span&gt;&lt;/td&gt;
            &lt;td align=&quot;left&quot;&gt;&lt;input type=&quot;text&quot; name=&quot;name&quot; id=&quot;name&quot; class=&quot;f_input&quot; /&gt;&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr class=&quot;fieldtr&quot;&gt;
            &lt;td class=&quot;label&quot;&gt;Ваш E-Mail:&lt;span class=&quot;impot&quot;&gt;*&lt;/span&gt;&lt;/td&gt;
            &lt;td align=&quot;left&quot;&gt;&lt;input name=&quot;mail&quot; id=&quot;mail&quot; class=&quot;f_input&quot; type=&quot;text&quot;&gt;&lt;/td&gt;
        &lt;/tr&gt;
        [/not-logged]
        &lt;tr class=&quot;fieldtr&quot; align=&quot;center&quot;&gt;
            &lt;td colspan=&quot;2&quot;&gt;{editor}&lt;/td&gt;
        &lt;/tr&gt;
        [sec_code]
        &lt;tr class=&quot;fieldtr&quot;&gt;
            &lt;td class=&quot;label&quot;&gt;
                Введите код: &lt;span class=&quot;impot&quot;&gt;*&lt;/span&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;div&gt;{sec_code}&lt;/div&gt;
                &lt;div&gt;&lt;input name=&quot;sec_code&quot; id=&quot;sec_code&quot; style=&quot;width: 115px;&quot; class=&quot;f_input&quot; type=&quot;text&quot;&gt;&lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        [/sec_code]
        [recaptcha]
        &lt;tr&gt;
            &lt;td class=&quot;label&quot;&gt;
                Введите слова, показанные на изображении: &lt;span class=&quot;impot&quot;&gt;*&lt;/span&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;div&gt;{recaptcha}&lt;/div&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        [/recaptcha]
        [question]
            &lt;tr&gt;
                &lt;td class=&quot;label&quot;&gt;
                    Вопрос:
                 &lt;/td&gt;
                 &lt;td&gt;
                     &lt;div&gt;{question}&lt;/div&gt;
                 &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td class=&quot;label&quot;&gt;
                    Ответ:&lt;span class=&quot;impot&quot;&gt;*&lt;/span&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;div&gt;&lt;input type=&quot;text&quot; name=&quot;question_answer&quot; id=&quot;question_answer&quot; class=&quot;f_input&quot; /&gt;&lt;/div&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
        [/question]
        &lt;tr class=&quot;fieldtr flast&quot;&gt;
            &lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt;
                &lt;input name=&quot;submit&quot; class=&quot;fbutton&quot; value=&quot;Отправить&quot; title=&quot;Отправить&quot; type=&quot;submit&quot;&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;</code></pre></div></div></div><p>И всё равно при публикации комментария код его дублирует. Получается как двойное нажатие кнопки отправить...<br />Не понимаю в чем проблема <img src="https://talk.alaev.info/img/smilies/sad.png" width="15" height="15" alt="sad" /><br /></p><p class="lastedit merged"><em>Добавлено: 30-11-2012 23:23:49</em></p><p>Аа фак мой мозг. Уже перепробовал всё что мог! Двойное комментирование и хоть тресни...<br /></p>]]></content>
			<author>
				<name><![CDATA[darwin]]></name>
				<uri>https://talk.alaev.info/user/117/</uri>
			</author>
			<updated>2012-11-30T20:23:49Z</updated>
			<id>https://talk.alaev.info/post/2115/#p2115</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2114/#p2114" />
			<content type="html"><![CDATA[<p>Весь вышеприведенный мной код должен располагаться в fullstory.</p>]]></content>
			<author>
				<name><![CDATA[Kanra]]></name>
				<uri>https://talk.alaev.info/user/4/</uri>
			</author>
			<updated>2012-11-30T10:19:37Z</updated>
			<id>https://talk.alaev.info/post/2114/#p2114</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2113/#p2113" />
			<content type="html"><![CDATA[<p><strong>Kanra</strong>, <br />Я так понимаю, в таком случае функция Modalcom не нужна? <br />С твоим кодом всё проще и легче, но вот кроме вызова Окна комментирования больше ничего не происходит. Не Реагирует вовсе на кнопку &quot;Добавить комментарий&quot; после его написания.. <img src="https://talk.alaev.info/img/smilies/sad.png" width="15" height="15" alt="sad" /></p>]]></content>
			<author>
				<name><![CDATA[darwin]]></name>
				<uri>https://talk.alaev.info/user/117/</uri>
			</author>
			<updated>2012-11-30T09:49:22Z</updated>
			<id>https://talk.alaev.info/post/2113/#p2113</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2111/#p2111" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
function addnewcom() {$(function(){$(&#039;#comments&#039;).dialog({autoOpen: true,show: &#039;fade&#039;,hide: &#039;fade&#039;,width: 500,height: 300})})}
&lt;/script&gt;</code></pre></div><div class="codebox"><pre><code>&lt;div id=&quot;comments&quot;&gt;
Форма добавления комментария.
&lt;/div&gt;</code></pre></div><div class="codebox"><pre><code>&lt;a href=&quot;#comments&quot; onclick=&quot;addnewcom(); return false;&quot;&gt;Оставить отзыв&lt;/a&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Kanra]]></name>
				<uri>https://talk.alaev.info/user/4/</uri>
			</author>
			<updated>2012-11-30T05:02:48Z</updated>
			<id>https://talk.alaev.info/post/2111/#p2111</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Форма добавления комментария в модальном окне]]></title>
			<link rel="alternate" href="https://talk.alaev.info/post/2110/#p2110" />
			<content type="html"><![CDATA[<p>Бодрой ночи всем!</p><p>Я уже мозг себе сломал.. нашел на просторах инета хак для вывода формы комментирования в модальном окне. Не могу понять, но у меня почему то при нажатии &quot;отправить&quot; добавляется 2 одинаковых сообщения! </p><p>Код ниже. Если кто может, укажите на ошибку в нем:</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header"><strong>+</strong>&nbsp;Установка формы добавления комментария в модальном окне</div><div class="fancy_spoiler"><p>Установка:</p><p>1. Открываем fullstory.tpl и ищем:<br />2. В самый низ вставляем:<br /></p><div class="codebox"><pre><code>function Modalcom() {$(function(){    $(&#039;#Modalcom&#039;).dialog({        autoOpen: true,        show: &#039;fade&#039;,        hide: &#039;fade&#039;,        width: 700,        height: 500,    });});$(&#039;#Modalcom&#039;).show(3000);$(&#039;.ui-dialog&#039;).show(3000);}[center]&lt;div class=&quot;showLinki&quot;&gt;&lt;div class=&quot;quote&quot;&gt;&lt;input type=&quot;submit&quot; class=&quot;fbutton&quot; value=&quot;Комментировать&quot; style=&quot;width:200px;&quot; /&gt;&lt;/div&gt;&lt;/div&gt;[/center]&lt;div id=&quot;Modalcom&quot; title=&quot;Оставить комментарий&quot; style=&quot;display:none;&quot;&gt;{addcomments}&lt;/div&gt;</code></pre></div><p>3. Открываем addcomments.tpl и ищем примерно такой код:<br /></p><div class="codebox"><pre><code>&lt;button type=&quot;submit&quot; name=&quot;submit&quot;</code></pre></div><p>Вставляем туда код:<br /></p><div class="codebox"><pre><code>id=&quot;add_com&quot;</code></pre></div><br /><p>4. Открываем main.tpl и перед:<br /></p><div class="codebox"><pre><code>&lt;/head&gt;</code></pre></div><br /><p>Вставляем следующий код:<br /></p><div class="codebox"><pre><code>&lt;script type=&quot;text/javascript&quot;&gt;$(&#039;#add_com&#039;).click(function() {hide: &#039;fade&#039;,$(&#039;#Modalcom&#039;).hide(3000);$(&#039;.ui-dialog&#039;).hide(3000);});&lt;/script&gt;</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[darwin]]></name>
				<uri>https://talk.alaev.info/user/117/</uri>
			</author>
			<updated>2012-11-30T00:21:15Z</updated>
			<id>https://talk.alaev.info/post/2110/#p2110</id>
		</entry>
</feed>
