{* $Id$ *} {if !$ts.ajax} {block name=title} {title help="forums" admpage="forums" url=$forum_info.forumId|sefurl:'forum'}{$forum_info.name}{/title} {/block} {if $forum_info.show_description eq 'y'}
{wiki}{$forum_info.description}{/wiki}
{/if}
{assign var=thisforum_info value=$forum_info.forumId} {if ($tiki_p_forum_post_topic eq 'y' and ($prefs.feature_wiki_discuss ne 'y' or $prefs.$forumId ne $prefs.wiki_forum_id)) or $tiki_p_admin_forum eq 'y'} {if !isset($comments_threadId) or $comments_threadId eq 0} {button href="tiki-view_forum.php?openpost=1&forumId=$thisforum_info&comments_threadId=0&comments_threshold=$comments_threshold&comments_offset=$comments_offset&thread_sort_mode=$thread_sort_mode&comments_per_page=$comments_per_page" _onclick='$("#forumpost").show();return false;' _icon_name="create" _type="primary" class="btn btn-primary" _text="{tr}New Topic{/tr}"} {else} {button href="tiki-view_forum.php?openpost=1&forumId=$thisforum_info&comments_threadId=0&comments_threshold=$comments_threshold&comments_offset=$comments_offset&thread_sort_mode=$thread_sort_mode&comments_per_page=$comments_per_page" _onclick='$("#forumpost").show();return false;' _icon_name="create" _type="link" class="btn btn-link" _text="{tr}New Topic{/tr}"} {/if} {/if} {if $tiki_p_admin_forum eq 'y'} {button href="tiki-admin_forums.php?parentId=$thisforum_info&cookietab=2#content_admin_forums1-2" _icon_name="create" _type="link" class="btn btn-link" _text="{tr}Add Sub Forum{/tr}"} {button href="tiki-admin_forums.php?forumId=$thisforum_info&cookietab=2#content_admin_forums1-2" _icon_name="edit" _type="link" class="btn btn-link" _text="{tr}Edit Forum{/tr}"} {button href="tiki-admin_forums.php?parentId=$thisforum_info" _icon_name="cog" _type="link" class="btn btn-link" _text="{tr}Admin{/tr}"} {/if} {if $tiki_p_admin_forum eq 'y' or !isset($all_forums) or $all_forums|@count > 1} {* No need for users to go to forum list if they are already looking at the only forum BUT note that all_forums only defined with quickjump feature *} {button href="tiki-forums.php" _icon_name="list" _type="link" class="btn btn-link" _text="{tr}Forum List{/tr}"} {/if}
{if ! $js}{/if}
{if $user and $prefs.feature_user_watches eq 'y' and isset($category_watched) and $category_watched eq 'y'}
{tr}Watched by categories:{/tr} {section name=i loop=$watching_categories} {$watching_categories[i].name|escape}   {/section}
{/if}
{if $tiki_p_forum_post_topic eq 'y'} {if $comment_preview eq 'y'}

{tr}Preview{/tr}
{$comments_preview_title|escape}
{tr}by{/tr} {$user|userlink}
{$comments_preview_data}
{/if}
{if $comments_threadId > 0} {tr}Editing:{/tr} {$comment_title|escape} ({tr}Post New{/tr}) {/if}
{if $forum_info.forum_use_password ne 'n'}
{/if} {if $tiki_p_admin_forum eq 'y'}
{/if} {if $forum_info.topic_smileys eq 'y'}
{/if} {if $forum_info.topic_summary eq '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 id="editpost" class="form-control" name="comments_data" codemirror="y" syntax="tiki" _toolbars=$prefs.feature_forum_parse _wysiwyg=$forum_wysiwyg _preview=$prefs.ajax_edit_previews}{$comment_data}{/textarea}
{if ($forum_info.att eq 'att_all') or ($forum_info.att eq 'att_admin' and $tiki_p_admin_forum eq 'y') or ($forum_info.att eq 'att_perm' and $tiki_p_forum_attach eq 'y')}
{tr}Maximum size:{/tr} {$forum_info.att_max_size|kbsize}
{/if} {if $prefs.feature_contribution eq 'y'} {include file='contribution.tpl'} {/if} {jq} $('select.comment_topictype') .change(function() { if ($('select.comment_topictype').val() == 'd') { $('tr.forum_deliberation').show(); } else { $('tr.forum_deliberation').hide(); } }) .change(); var itemMaster; $('.forum_deliberation_add_item').click(function() { var thisItem; if (!itemMaster) { $.tikiModal(tr('Loading...')); $.get('tiki-ajax_services', {controller: 'comment', action: "deliberation_item"}, function(itemInput) { itemMaster = itemInput; thisItem = $(itemMaster).insertBefore('div.forum_deliberation_items_toolbar'); configureDeliberationItemRatings(thisItem); $.tikiModal(); }); } else { thisItem = $(itemMaster).insertBefore('div.forum_deliberation_items_toolbar'); configureDeliberationItemRatings(thisItem); } return false; }); {/jq} {if $prefs.feature_antibot eq 'y'} {include file='antibot.tpl' tr_style="formcolor"} {/if} {if $prefs.feature_freetags eq 'y' and $tiki_p_freetags_tag eq 'y'} {include file='freetag.tpl' labelColClass='col-sm-2' inputColClass='col-sm-10'} {/if} {if $user and $prefs.feature_user_watches eq 'y' and (!isset($comments_threadId) or $comments_threadId eq 0)}

{/if} {if empty($user) && $prefs.feature_user_watches eq 'y'}
{/if}
{if empty($user)} {tr}Enter your name:{/tr}  {/if} {if $prefs.ajax_edit_previews eq 'n'} {/if}
{remarksbox title="{tr}Editing posts{/tr}"} {tr}Use wiki syntax when editing the content of posts - HTML is not allowed. Please click on the following link for documentation on wiki syntax:{/tr} {wiki}[http://doc.tiki.org/Wiki-syntax]{/wiki} {/remarksbox}
{/if} {if $prefs.feature_forum_content_search eq 'y' and $prefs.feature_search eq 'y'}
{icon name="search"}
{/if} {/if} {if count($channels) > 0}
{*the table-responsive class cuts off dropdown menus *}
{tr}Sub Forums{/tr}
{block name=forum-header} {$numbercol = 1} {if $prefs.forum_list_topics eq 'y'} {$numbercol = $numbercol + 1} {/if} {if $prefs.forum_list_posts eq 'y'} {$numbercol = $numbercol + 1} {/if} {if $prefs.forum_list_ppd eq 'y'} {$numbercol = $numbercol + 1} {/if} {if $prefs.forum_list_lastpost eq 'y'} {$numbercol = $numbercol + 1} {/if} {if $prefs.forum_list_visits eq 'y'} {$numbercol = $numbercol + 1} {/if} {$numbercol = $numbercol + 1} {/block} {assign var=section_old value=""} {section name=user loop=$channels} {assign var=section value=$channels[user].section} {if $section ne $section_old} {assign var=section_old value=$section} {/if} {block name=forum-row} {if $prefs.forum_list_topics eq 'y'} {/if} {if $prefs.forum_list_posts eq 'y'} {/if} {if $prefs.forum_list_ppd eq 'y'} {/if} {if $prefs.forum_list_lastpost eq 'y'} {/if} {if $prefs.forum_list_visits eq 'y'} {/if} {/block} {sectionelse} {if !$ts.enabled || ($ts.enabled && $ts.ajax)} {norecords _colspan=$numbercol _text="{tr}No Sub forums found{/tr}"} {else} {norecords _colspan=$numbercol _text="{tr}Loading{/tr}..."} {/if} {/section}
{self_link _sort_arg='sort_mode' _sort_field='name'}{tr}Name{/tr}{/self_link}{self_link _sort_arg='sort_mode' _sort_field='threads'}{tr}Topics{/tr}{/self_link}{self_link _sort_arg='sort_mode' _sort_field='comments'}{tr}Posts{/tr}{/self_link}{tr}PPD{/tr}{self_link _sort_arg='sort_mode' _sort_field='lastPost'}{tr}Last Post{/tr}{/self_link}{self_link _sort_arg='sort_mode' _sort_field='hits'}{tr}Visits{/tr}{/self_link}
{tr}{$section|escape}{/tr}
{if (isset($channels[user].individual) and $channels[user].individual eq 'n') or ($tiki_p_admin eq 'y') or ($channels[user].individual_tiki_p_forum_read eq 'y')} {$channels[user].name|escape} {else} {$channels[user].name|escape} {/if} {if $prefs.forum_list_desc eq 'y'}
{capture name="parsedDesc"}{wiki}{$channels[user].description}{/wiki}{/capture} {if strlen($smarty.capture.parsedDesc) < $prefs.forum_list_description_len} {$smarty.capture.parsedDesc} {else} {$smarty.capture.parsedDesc|strip_tags|truncate:$prefs.forum_list_description_len:"...":true} {/if}
{/if}
{if count($channels[user].sub_forums) > 0} Sub Forums: {foreach from=$channels[user].sub_forums item=forum} {button href="tiki-view_forum.php?forumId={$forum.forumId}" _onclick='$("#forumpost").show();return false;' _icon_name="users" _type="link" class="btn btn-link" _text="{tr}{$forum.name}{/tr}"} {/foreach} {/if}
{$channels[user].threads}{$channels[user].comments}{$channels[user].posts_per_day|string_format:"%.2f"} {if isset($channels[user].lastPost)} {$channels[user].lastPost|tiki_short_datetime}
{if $prefs.forum_reply_notitle neq 'y'}{$channels[user].lastPostData.title|escape}{/if} {tr}by{/tr} {$channels[user].lastPostData.userName|username} {/if}
{$channels[user].hits} {actions} {strip} {icon name="view" _menu_text='y' _menu_icon='y' alt="{tr}View{/tr}"} {if ($tiki_p_admin eq 'y') or (($channels[user].individual eq 'n') and ($tiki_p_admin_forum eq 'y')) or ($channels[user].individual_tiki_p_admin_forum eq 'y')} {icon name="edit" _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"} {permission_link mode=text type="forum" permType="forums" id=$channels[user].forumId} {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Delete{/tr}"} {/if} {/strip} {/actions}
{/if}
{if $tiki_p_admin_forum eq 'y' && ($comments_coms|@count > 0 || $queued > 0 || $reported > 0)}
{tr}Moderator actions on selected topics{/tr}
{if $comments_coms|@count > 1} {/if} {if $all_forums|@count > 1 && $comments_coms|@count > 0} {/if} {if $comments_coms|@count > 0} {/if}
{if $reported > 0} {tr}Reported{/tr} {$reported} {/if} {if $queued > 0} {tr}Queued{/tr} {$queued} {/if}
{/if} {* Use css menus as fallback for item dropdown action menu if javascript is not being used *}
{block name=forum-header} {$cntcol = 0} {if $tiki_p_admin_forum eq 'y'} {$cntcol = $cntcol + 1} {/if} {$cntcol = $cntcol + 1} {if $forum_info.topic_smileys eq 'y'} {$cntcol = $cntcol + 1} {/if} {$cntcol = $cntcol + 1} {if $forum_info.topics_list_replies eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $forum_info.topics_list_reads eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $forum_info.vote_threads eq 'y' and ($tiki_p_ratings_view_results eq 'y' or $tiki_p_admin eq 'y')} {$cntcol = $cntcol + 1} {if $prefs.rating_results_detailed eq 'y' and $prefs.rating_results_detailed_percent neq 'y'} {$cntcol = $cntcol + 1} {elseif $prefs.rating_results_detailed eq 'y' and $prefs.rating_results_detailed_percent eq 'y'} {$cntcol = $cntcol + 1} {/if} {/if} {if $forum_info.topics_list_pts eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $forum_info.topics_list_lastpost eq 'y' or $forum_info.topics_list_lastpost_avatar eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $forum_info.topics_list_author eq 'y' or $forum_info.topics_list_author_avatar eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $forum_info.att_list_nb eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $prefs.feature_multilingual eq 'y'} {$cntcol = $cntcol + 1} {/if} {if $prefs.forum_category_selector_in_list eq 'y'} {$cntcol = $cntcol + 1} {/if} {$cntcol = $cntcol + 1} {/block} {section name=ix loop=$comments_coms} {if $userinfo && $comments_coms[ix].lastPost > $userinfo.lastLogin} {assign var="newtopic" value="_new"} {else} {assign var="newtopic" value=""} {/if} {block name=forum-row} {if $tiki_p_admin_forum eq 'y'} {/if} {if $forum_info.topic_smileys eq 'y'} {/if} {if $forum_info.topics_list_replies eq 'y'} {/if} {if $forum_info.topics_list_reads eq 'y'} {/if} {if $forum_info.vote_threads eq 'y' and ($tiki_p_ratings_view_results eq 'y' or $tiki_p_admin eq 'y')} {if $prefs.rating_results_detailed eq 'y'} {/if} {/if} {if $forum_info.topics_list_pts eq 'y'} {/if} {if $forum_info.topics_list_lastpost eq 'y'} {elseif $forum_info.topics_list_lastpost_avatar eq 'y' and $prefs.feature_userPreferences eq 'y'} {/if} {if $forum_info.topics_list_author eq 'y'} {elseif $forum_info.topics_list_author_avatar eq 'y' and $prefs.feature_userPreferences eq 'y'} {/if} {if $forum_info.att_list_nb eq 'y'} {/if} {if $prefs.feature_multilingual eq 'y'} {/if} {if $prefs.forum_category_selector_in_list eq 'y'} {/if} {/block} {sectionelse} {norecords _colspan=$cntcol _text="{tr}No topics found{/tr}"} {/section}
{select_all checkbox_names='forumtopic[]' tablesorter="{$ts.enabled}"} {self_link _sort_arg='thread_sort_mode' _sort_field='type'}{tr}Type{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='smiley'}{tr}Emot{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='title'}{tr}Title{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='replies'}{tr}Replies{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='hits'}{tr}Reads{/tr}{/self_link}{tr}Rating
(avg/max){/tr}
{tr}Detailed results
(counts){/tr}
{tr}Detailed results
(counts/%){/tr}
{self_link _sort_arg='thread_sort_mode' _sort_field='average'}{tr}pts{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='lastPost'}{tr}Last Post{/tr}{/self_link}{self_link _sort_arg='thread_sort_mode' _sort_field='userName'}{tr}Author{/tr}{/self_link}{tr}Files{/tr}{tr}Language{/tr}{tr}Category{/tr}
{if $newtopic neq ''} {assign var=nticon value=$newtopic} {assign var=ntalt value="-{tr}New{/tr}"} {/if} {if $comments_coms[ix].type eq 'n'} {tr}Normal{/tr} {elseif $comments_coms[ix].type eq 'a'} {tr}Announce{/tr} {elseif $comments_coms[ix].type eq 'h'} {tr}Hot{/tr} {elseif $comments_coms[ix].type eq 's'} {tr}Sticky{/tr} {elseif $comments_coms[ix].type eq 'l'} {tr}Locked{/tr} {elseif $comments_coms[ix].type eq 'd'} {tr}Deliberation{/tr} {/if} {if $comments_coms[ix].locked eq 'y'} {icon name="lock" title=":{tr}Topic locked{/tr}" class="tips"} {elseif $forum_info.is_locked eq 'y'} {icon name="lock" title=":{tr}Forum locked{/tr}" class="tips"} {/if} {if strlen($comments_coms[ix].smiley) > 0} {else}  {$comments_coms[ix].smiley} {/if} {if $prefs.feature_sefurl === 'y'}{$sep = '?'}{else}{$sep = '&'}{/if} {$comments_coms[ix].title|escape} {if $forum_info.topic_summary eq 'y'}
{if $comments_coms[ix].summary|count_characters > 0} {$comments_coms[ix].summary|truncate:240:"...":true|escape} {else} {$comments_coms[ix].data|truncate:100:"...":true|escape} {/if}
{/if}
{$comments_coms[ix].replies}{$comments_coms[ix].hits}{rating_result_avg type=comment id=$comments_coms[ix].threadId }   {rating_result type=comment id=$comments_coms[ix].threadId }{$comments_coms[ix].average|string_format:"%.2f"} {if $forum_info.topics_list_lastpost_avatar eq 'y' and $prefs.feature_userPreferences eq 'y'}
{$comments_coms[ix].lastPostData.userName|avatarize}
{/if}
{$comments_coms[ix].lastPost|tiki_short_datetime} {* date_format:"%b %d [%H:%M]" *} {if $comments_coms[ix].replies}
{if $forum_info.topics_list_lastpost_title eq 'y'}{$comments_coms[ix].lastPostData.title|escape} {/if}{tr}by{/tr} {$comments_coms[ix].lastPostData.userName|userlink} {/if}
{$comments_coms[ix].lastPostData.userName|avatarize} {if $forum_info.topics_list_author_avatar eq 'y' and $prefs.feature_userPreferences eq 'y'}
{$comments_coms[ix].userName|avatarize}
{/if}
{$comments_coms[ix].userName|userlink}
{$comments_coms[ix].userName|avatarize} {if !empty($comments_coms[ix].nb_attachments)}{/if} {$comments_coms[ix].nb_attachments} {if !empty($comments_coms[ix].nb_attachments)}{/if} {$forum_info.forumLanguage} {categoryselector type="forum post" object=$comments_coms[ix].threadId categories=$prefs.forum_available_categories} {actions} {strip} {if ( $tiki_p_admin_forum eq 'y' or ($comments_coms[ix].userName == $user && $tiki_p_forum_post eq 'y') ) and $forum_info.is_locked neq 'y' and $comments_coms[ix].locked neq 'y'} {icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"} {/if} {if $prefs.feature_forum_topics_archiving eq 'y' && $tiki_p_admin_forum eq 'y'} {if $comments_coms[ix].archived eq 'y'} {icon name='file-archive-open' _menu_text='y' _menu_icon='y' alt="{tr}Unarchive{/tr}"} {else} {icon name='file-archive' _menu_text='y' _menu_icon='y' alt="{tr}Archive{/tr}"} {/if} {/if} {if $tiki_p_admin_forum eq 'y'} {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Delete{/tr}"} {permission_link mode=text type="thread" permType="forums" id=$comments_coms[ix].threadId title=$comments_coms[ix].title} {/if} {/strip} {/actions}
{if !$ts.ajax} {if !$ts.enabled} {pagination_links cant=$comments_cant step=$comments_per_page offset=$comments_offset offset_arg='comments_offset'}{/pagination_links} {/if} {if $forum_info.forum_last_n > 0 && count($last_comments)} {* Last n titles *}
{section name=ix loop=$last_comments} {/section}
{tr}Last{/tr} {$forum_info.forum_last_n} {tr}posts in this forum{/tr}
{if $last_comments[ix].parentId eq 0} {assign var="idt" value=$last_comments[ix].threadId} {else} {assign var="idt" value=$last_comments[ix].parentId} {/if} {$last_comments[ix].title|escape}

{/if} {if !$ts.enabled}
{if $comments_offset neq 0} {/if} {if $comments_threadId neq 0} {/if} {if $comments_threshold neq 0} {/if}
{if $prefs.feature_forum_topics_archiving eq 'y'}
{/if} {if $user}
{/if}
{/if} {if empty($user) and $prefs.javascript_enabled eq "y"} {jq} var js_anonymous_name = getCookie('anonymous_name'); if (js_anonymous_name) document.getElementById('anonymous_name').value = js_anonymous_name; {/jq} {/if} {jq} var $forum = $("#editpageform"); if (jqueryTiki.validate) { $forum.validate({ rules: { // make sure required fields are entered comments_title: "required", comments_data: "required", }, messages: { comments_title: "{tr}Topic title is required {/tr}", comments_data: "{tr}Topic 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} {/if}