Как в шаблон добавления комментариев добавить поле загрузить фотографию?
Как добавить поле "Ваша фотография"?
<!-- Шаблон вывода добавления комментария -->
<xsl:template name="AddCommentForm">
<xsl:param name="comment_id" select="0"/>
<!-- Заполняем форму -->
<xsl:variable name="subject">
<xsl:if test="/document/form_parent_id/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_subject"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="email">
<xsl:if test="/document/form_user_email/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_email"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="phone">
<xsl:if test="/document/form_parent_id/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_phone"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="text">
<xsl:if test="/document/form_text/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of disable-output-escaping="yes" select="/document/form_text"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="name">
<xsl:if test="/document/form_user_name/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_name"/>
</xsl:if>
</xsl:variable>
<div class="comment">
<div class="tl"></div>
<div class="tr"></div>
<div class="bl"></div>
<div class="br"></div>
<!--Отображение формы добавления комментария-->
<form action="{/document/url}" name="comment_form_0{comment_id}" method="post" class="review_form">
<!-- Авторизированным не показываем -->
<xsl:if test="/document/site_user_id = 0">
Имя
<br/>
<input type="text" size="70" name="comment_autor" value="{$name}"/>
<!--p>
E-mail
<br/>
<input id="email{$comment_id}" type="text" size="70" name="comment_email" value="{$email}" />
<div id="error_email{$comment_id}"></div>
</p>
<p>
Телефон
<br/>
<input type="text" size="70" name="comment_phone" value="{$phone}"/>
</p-->
</xsl:if>
<!--p>
Тема
<br/>
<input type="text" size="70" name="comment_subject" value="{$subject}"/>
</p-->
<p>
Ваш отзыв
<br/>
<textarea name="comment_text" cols="68" rows="5" class="mceEditor"><xsl:value-of select="$text"/></textarea>
</p>
<!--p>
Оценка
<br/>
<input type="hidden" name="comment_grade" value="0"/>
<xsl:variable name="ul_id">
<xsl:choose>
<xsl:when test="comment_id > 0"><xsl:value-of select="comment_id"/>_stars</xsl:when>
<xsl:otherwise>0_stars</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<ul id="{$ul_id}" class="stars">
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}1_star_1"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}2_star_2"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}3_star_3"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}4_star_4"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}5_star_5"></li>
</ul>
</p-->
<br />
<!-- Обработка CAPTCHA -->
<xsl:if test="//captcha_key != 0 and /document/site_user_id = 0">
<p>Контрольные цифры
<sup>
<font color="red">*</font>
</sup></p>
<div style="float: left">
<img id="comment_{$comment_id}" class="image" src="/captcha.php?get_captcha={//captcha_key}{$comment_id}&height=30&width=100" title="Код подтверждения" name="captcha"/>
</div>
<div id="captcha" style="clear:both;">
<img style="border: 0px" src="/hostcmsfiles/images/refresh.gif" /> <a href="javascript:void(0);" onclick="ReNewCaptchaById('comment_{$comment_id}', '{//captcha_key}{$comment_id}', 30); return false;">Показать другое число</a>
</div>
<div style="float: left; margin-top: 5px">
<input type="hidden" name="captcha_key" value="{//captcha_key}{$comment_id}"/>
<input type="text" name="captcha_keystring" size="15"/>
</div>
<div id="captcha" style="clear:both;margin-bottom:10px;">
Введите число, которое указано выше.
</div>
</xsl:if>
<xsl:if test="$comment_id != 0">
<input type="hidden" name="comment_parent_id" value="{comment_id}"/>
</xsl:if>
<p>
<input id="submit_email{$comment_id}" type="submit" name="add_comment" value="Опубликовать"/>
</p>
</form>
</div>
</xsl:template>
<!-- Шаблон вывода добавления комментария -->
<xsl:template name="AddCommentForm">
<xsl:param name="comment_id" select="0"/>
<!-- Заполняем форму -->
<xsl:variable name="subject">
<xsl:if test="/document/form_parent_id/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_subject"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="email">
<xsl:if test="/document/form_user_email/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_email"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="phone">
<xsl:if test="/document/form_parent_id/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_phone"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="text">
<xsl:if test="/document/form_text/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of disable-output-escaping="yes" select="/document/form_text"/>
</xsl:if>
</xsl:variable>
<xsl:variable name="name">
<xsl:if test="/document/form_user_name/node() and /document/form_parent_id/node() and /document/form_parent_id= $comment_id">
<xsl:value-of select="/document/form_user_name"/>
</xsl:if>
</xsl:variable>
<div class="comment">
<div class="tl"></div>
<div class="tr"></div>
<div class="bl"></div>
<div class="br"></div>
<!--Отображение формы добавления комментария-->
<form action="{/document/url}" name="comment_form_0{comment_id}" method="post" class="review_form">
<!-- Авторизированным не показываем -->
<xsl:if test="/document/site_user_id = 0">
Имя
<br/>
<input type="text" size="70" name="comment_autor" value="{$name}"/>
<!--p>
<br/>
<input id="email{$comment_id}" type="text" size="70" name="comment_email" value="{$email}" />
<div id="error_email{$comment_id}"></div>
</p>
<p>
Телефон
<br/>
<input type="text" size="70" name="comment_phone" value="{$phone}"/>
</p-->
</xsl:if>
<!--p>
Тема
<br/>
<input type="text" size="70" name="comment_subject" value="{$subject}"/>
</p-->
<p>
Ваш отзыв
<br/>
<textarea name="comment_text" cols="68" rows="5" class="mceEditor"><xsl:value-of select="$text"/></textarea>
</p>
<!--p>
Оценка
<br/>
<input type="hidden" name="comment_grade" value="0"/>
<xsl:variable name="ul_id">
<xsl:choose>
<xsl:when test="comment_id > 0"><xsl:value-of select="comment_id"/>_stars</xsl:when>
<xsl:otherwise>0_stars</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<ul id="{$ul_id}" class="stars">
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}1_star_1"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}2_star_2"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}3_star_3"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}4_star_4"></li>
<li onclick="set_rate(this.id, this.id)" onmouseover="set_rate(this.id, '-1')" onmouseout="set_rate(this.id, 0)" id="{comment_id}5_star_5"></li>
</ul>
</p-->
<br />
<!-- Обработка CAPTCHA -->
<xsl:if test="//captcha_key != 0 and /document/site_user_id = 0">
<p>Контрольные цифры
<sup>
<font color="red">*</font>
</sup></p>
<div style="float: left">
<img id="comment_{$comment_id}" class="image" src="/captcha.php?get_captcha={//captcha_key}{$comment_id}&height=30&width=100" title="Код подтверждения" name="captcha"/>
</div>
<div id="captcha" style="clear:both;">
<img style="border: 0px" src="/hostcmsfiles/images/refresh.gif" /> <a href="javascript:void(0);" onclick="ReNewCaptchaById('comment_{$comment_id}', '{//captcha_key}{$comment_id}', 30); return false;">Показать другое число</a>
</div>
<div style="float: left; margin-top: 5px">
<input type="hidden" name="captcha_key" value="{//captcha_key}{$comment_id}"/>
<input type="text" name="captcha_keystring" size="15"/>
</div>
<div id="captcha" style="clear:both;margin-bottom:10px;">
Введите число, которое указано выше.
</div>
</xsl:if>
<xsl:if test="$comment_id != 0">
<input type="hidden" name="comment_parent_id" value="{comment_id}"/>
</xsl:if>
<p>
<input id="submit_email{$comment_id}" type="submit" name="add_comment" value="Опубликовать"/>
</p>
</form>
</div>
</xsl:template>
Авторизация