{* $Id$ *}
{if $tiki_p_forum_read eq 'y'} {* This section (comment) is only displayed *} {* if a reply to it is being composed *} {* The $parent_com is only set in this case*} {* WARNING: when previewing a new reply to a forum post, $parent_com is also set *} {if $comments_cant gt 0}
{section name=i loop=$comments_request_data} {/section} {*for the forum service button when js is not enabled*} {if $smarty.request.topics_offset}{/if} {if $smarty.request.topics_find}{/if} {if $smarty.request.topics_sort_mode}{/if} {if $smarty.request.topics_threshold}{/if} {if $forumId}{/if} {if $tiki_p_admin_forum eq 'y'}
{tr}Moderator actions for selected topics:{/tr} {if $reported > 0} {tr}Reported{/tr} {$reported} {/if} {if $queued > 0} {tr}Queued{/tr} {$queued} {/if} {if $topics|@count > 1} {/if}
{/if} {if $prefs.forum_thread_user_settings eq 'y'} {if $comments_cant > 0 and $section eq 'blogs'} {* displaying just for blogs only because I'm not sure if this is useful for other sections *} {capture name=comments_cant_title}{if $comments_cant == 1}{tr _0=$comments_cant}%0 comment{/tr}{else}{tr _0=$comments_cant}%0 comments{/tr}{/if}{/capture}

{$smarty.capture.comments_cant_title}

{/if} {if $comments_cant > $prefs.forum_thread_user_settings_threshold}
{if $forum_info.is_flat neq 'y'} {/if} {if $forum_info.vote_threads eq 'y'} {/if}
{/if} {/if} {section name=rep loop=$comments_coms} {include file='comment.tpl' comment=$comments_coms[rep]} {if $thread_style != 'commentStyle_plain'}
{/if} {/section}
{if $comments_threshold ne 0}
{$comments_below} {if $comments_below eq 1}{tr}Reply{/tr}{else}{tr}Replies{/tr}{/if} {tr}below your current threshold{/tr}
{/if} {if $comments_cant_pages gt 1}
{if $comments_prev_offset >= 0 && ! $display eq ''} [{tr}Prev{/tr}]  {/if} {tr}Page:{/tr} {$comments_actual_page}/{$comments_cant_pages} {if $comments_next_offset >= 0 && $display eq ''}  [{tr}Next{/tr}] {/if} {if $prefs.direct_pagination eq 'y' && $display eq ''}
{section loop=$comments_cant_pages name=foo} {assign var=selector_offset value=$smarty.section.foo.index|times:$comments_per_page} {$smarty.section.foo.index_next}  {/section} {/if}
{/if}
{/if} {/if} {* end read comment *} {if $section eq 'forums'}{/if} {* Post dialog *} {block name=post_form} {if $tiki_p_forum_post eq 'y'} {if $thread_is_locked eq 'y'} {assign var='lock_text' value="{tr}This thread is locked{/tr}"} {remarksbox type="note" title="{tr}Note{/tr}" icon="lock"}{$lock_text}{/remarksbox} {else}
{if $post_reply > 0 || $edit_reply > 0 || $comment_preview} {* posting, editing or previewing a reply: show form *}
{else}
{/if}

{if $comments_threadId > 0}{tr}Editing reply{/tr}{elseif $comment_preview eq 'y'}{tr}Preview{/tr}{elseif $parent_com}{tr}Reply to the selected post{/tr}{else}{tr}Post new message{/tr}{/if}

{if $comment_preview eq 'y'} {include file='comment.tpl' comment=$comment_preview_data} {/if}
{if not empty($page)}{/if} {if $forumId}{/if} {* Traverse request variables that were set to this page adding them as hidden data *} {section name=i loop=$comments_request_data} {/section} {if !$user}
{/if} {if $prefs.forum_reply_notitle neq 'y'}
{/if}
{if $prefs.feature_wysiwyg eq 'y' and $prefs.wysiwyg_htmltowiki eq 'y' and $prefs.feature_forum_parse eq 'y' and ($prefs.wysiwyg_default eq 'y' and not isset($smarty.request.mode_wysiwyg) or $smarty.request.mode_wysiwyg eq 'y')} {$forum_wysiwyg = 'y'} {else} {$forum_wysiwyg = 'n'} {/if} {textarea rows="10" codemirror='true' syntax='tiki' id="editpost2" class="form-control" name="comments_data" _wysiwyg=$forum_wysiwyg _preview=$prefs.ajax_edit_previews}{strip} {*If set to reply not empty, if you are editing a post, or previewing, put the contents in the text area.*} {if ($prefs.feature_forum_replyempty ne 'y') || $edit_reply > 0 || $comment_preview eq 'y' || !empty($tikifeedback)} {$comment_data} {/if} {/strip}{/textarea} {if $user and $prefs.feature_user_watches eq 'y'}
{/if}
{if ($forum_info.att eq 'att_all') or ($forum_info.att eq 'att_admin' and ($tiki_p_admin_forum eq 'y' or $forum_info.moderator == $user)) or ($forum_info.att eq 'att_perm' and $tiki_p_forum_attach eq 'y')} {assign var='can_attach_file' value='y'}
{tr}Maximum size:{/tr} {$forum_info.att_max_size|kbsize}
{/if} {if $prefs.feature_contribution eq 'y'} {include file='contribution.tpl' in_comment="y"} {/if} {if $prefs.feature_antibot eq 'y'} {assign var='showmandatory' value='y'} {include file='antibot.tpl' td_style="formcolor"} {/if}
{if isset($parent_coms) and $parent_coms} {else} {/if}
{if !empty($user) && $prefs.feature_comments_post_as_anonymous eq 'y'} {/if} {if $prefs.ajax_edit_previews eq 'n'} {jq}$("#comments_previewComment").click(function () { if ($("#userfile1").val()) { alert("{tr}Please note that the preview does not keep the attached file which you will have to choose before posting.{/tr}"); } needToConfirm=false; }); {/jq} {/if}
{assign var=tips_title value="{tr}Posting replies{/tr}"}
{* id {$postclass} or {$postclass}open *} {/if}{* else $thread_is_locked *}
{* id="form"*} {/if}{* $tiki_p_forum_post *} {/block}
{jq} var $forum = $("#editpostform"); if (jqueryTiki.validate) { $forum.validate({ rules: { // make sure required fields are entered {{if $prefs.forum_reply_notitle eq 'n'}}comments_title: "required", {{/if}} comments_data: "required", }, messages: { comments_title: "{tr}Post title is required {/tr}", comments_data: "{tr}Post message is required {/tr}", }, }); } $forum.submit(function() { if (jqueryTiki.validate && ! $(this).valid()) { return false; } // prevent double submission if (!$forum.data("sub")) { $forum.tikiModal('Save in Progress...'); $forum.data("sub", true); $forum.submit(); } }); {/jq} {* End of Post dialog *}