<commit_before><#include "header.htm"/>
<#import "../macros/pagination.ftl" as pagination/>
<#import "../macros/presentation.ftl" as presentation/>

<#assign canEditSomeMessage = false/>

<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.jeditable.pack.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/post_show.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/post.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/pagination.js?${startupTime}"></script>

<#if logged>
	<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/watch.js?${startupTime}"></script>
</#if>

<script type="text/javascript">
<!--
<#include "js/karma.js">
<#include "js/utils.js"/>

<#if canRemove || isModerator || isAdmin>
	function confirmDelete(postId)
	{
		if (confirm("${I18n.getMessage("Moderation.ConfirmPostDelete")}")) {
			var reason = prompt("${I18n.getMessage("ModerationLog.changeReason")}");

			if (reason == null || reason == "") {
				alert("${I18n.getMessage("ModerationLog.reasonIsEmpty")}");
				return false;
			}
			else {
				var link = document.getElementById("delete" + postId);
				link.href += "&log_description=" + encodeURIComponent(reason) + "&log_type=1";
			}

			return true;
		}
		
		return false;
	}
</#if>

-->
</script>

<#if moderator>
	<script type="text/JavaScript" src="${JForumContext.encodeURL("/js/list/moderation")}"></script>
</#if>

<table cellspacing="0" cellpadding="10" width="100%" align="center" border="0">
	<tr>
		<td class="bodyline">
			<table cellspacing="2" cellpadding="2" width="100%" border="0">
				<tr>
					<td valign="middle" align="left" colspan="2">
						<span class="maintitle"><a href="${JForumContext.encodeURL("/posts/list/${topic.id}")}" name="top" class="maintitle" id="top">${topic.title?html}</a></span>
						<#if rssEnabled>
						&nbsp;<a href="${contextPath}/rss/topicPosts/${topic.id}${extension}"><img src="${contextPath}/templates/${templateName}/images/xml_button.gif" border="0" alt="XML" /></a>
						</#if>
					</td>
				</tr>
			</table>
			
			<table cellspacing="2" cellpadding="2" width="100%" border="0">
				<tr>
					<#if !readonly>
					<td width="8%" align="left" valign="bottom" nowrap="nowrap">
					</#if>
						<#if topic.status == STATUS_LOCKED>
							<span class="icon_reply_locked"><img src="${contextPath}/images/transp.gif" alt="" /></span>
						<#else>
							<#if !readonly>
								<a href="${JForumContext.encodeURL("/posts/reply/${start}/${topic.id}")}" rel="nofollow" class="icon_reply nav"><img src="${contextPath}/images/transp.gif" alt="" /></a>
							<#else>
								<#assign colspan = "2"/>
							</#if>
						</#if>
					</td>

					<td valign="middle" align="left" colspan="${colspan?default("0")}">
						<span class="nav">
						<a class="nav" href="${JForumContext.encodeURL("/forums/list")}">${I18n.getMessage("ForumListing.forumIndex")} </a> 
            			&raquo; <a class="nav" href="${JForumContext.encodeURL("/forums/show/${forum.id}")}">${forum.name} </a></span>
					</td>
					<td valign="middle" align="right"><#assign paginationData><@pagination.doPagination "list", topic.id/></#assign>${paginationData}</td>
				</tr>
			</table>

			<table class="forumline" cellspacing="1" cellpadding="3" width="100%" border="0">
				<#if poll?exists>
					<tr>
						<td class="cathead cattitle" align="center" colspan="2" nowrap="nowrap" width="100%">${I18n.getMessage("PostShow.pollTitle")}</td>
					</tr>
					<tr>
						<td class="row1" colspan="2" align="center">
							<#if (poll.open && canVoteOnPoll && !request.getParameter("viewResults")?exists)>
								<form action="${JForumContext.encodeURL("/jforum")}" method="post">
									<input type="hidden" name="action" value="vote" />
									<input type="hidden" name="module" value="${moduleName}" />
									<input type="hidden" name="poll_id" value="${poll.id}" />
									<input type="hidden" name="topic_id" value="${topic.id}" />
									<div class="poll">
										<span class="strong">${poll.label}</span>
										<table class="poll">
										<#list poll.options as option>
											<tr>
												<td><input type="radio" name="poll_option" value="${option.id}">${option.text}</input></td>
											</tr>
										</#list>
										</table>
										<input type="submit" value="${I18n.getMessage("PostShow.pollVote")}"></input><br />
										<span class="gensmall" align="center"><a href="${JForumContext.encodeURL("/jforum${extension}?module=posts&amp;action=list&amp;topic_id=${topic.id}&amp;viewResults=true", "")}">${I18n.getMessage("PostShow.showPollResults")}</a></span>
									</div>
								</form>
							<#else>
								<@presentation.renderPoll poll/>
							</#if>
						</td>
					</tr>
				</#if>
				
				<tr>
					<th class="thleft" nowrap="nowrap" width="150" height="26">${I18n.getMessage("PostShow.author")}</th>
					<th class="thright" nowrap="nowrap" width="100%">${I18n.getMessage("PostShow.messageTitle")}</th>
				</tr>

				<!-- POST LISTING --> 
				<#assign rowColor = ""/>
				<#list posts as post>
					<#if post_index % 2 == 0>
						<#assign rowColor = "row1">
					<#else>
						<#assign rowColor = "row2">
					</#if>
	
					<#assign user = users.get(post.userId)/>
					<#assign canEditCurrentMessage = (post.canEdit && topic.status != STATUS_LOCKED) || moderatorCanEdit/>
					<tr>
						<td colspan="2">
							<#include "post_show_action_buttons_inc.htm"/>
						</td>
					</tr>

					<tr>
						<!-- Username -->
						<#assign rowspan = "3"/>
						<#assign useSignature = (user.attachSignatureEnabled && user.signature?exists && user.signature?length > 0 && post.isSignatureEnabled())/>

						<#if useSignature>
							<#assign rowspan = "3"/>
						<#else>
							<#assign rowspan = "2"/>
						</#if>

						<td class="${rowColor}" valign="top" align="left" rowspan="${rowspan}">
							<#include "post_show_user_inc.htm"/>
						</td>
		
						<!-- Message -->
						<td class="${rowColor}" valign="top" id="post_text_${post.id}">
							<span class="postbody">
								<#if canEditCurrentMessage>
									<#assign canEditSomeMessage = true/>
									<div class="edit_area" id="${post.id}">${post.text}</div>
								<#else>
									${post.text}
								</#if>
							</span>

							<!-- Attachments -->
							<#if post.hasAttachments() && (canDownloadAttachments || attachmentsEnabled)>
								<#assign attachments = am.getAttachments(post.id, post.forumId)/>

								<#include "post_show_attachments_inc.htm"/>
							</#if>

							<#if (post.editCount > 0)>
								<#if post.editCount == 1>
									<#assign editCountMessage = "PostShow.editCountSingle"/>
								<#else>
									<#assign editCountMessage = "PostShow.editCountMany"/>
								</#if>

								<p><i><span class="gensmall">${I18n.getMessage(editCountMessage, [post.editCount, post.editTime?default("Unknown")])}</span></i></p>
							</#if>
						</td>
					</tr>

					<#if useSignature>
						<tr><commit_msg>*** empty log message ***<commit_after><#include "header.htm"/>
<#import "../macros/pagination.ftl" as pagination/>
<#import "../macros/presentation.ftl" as presentation/>

<#assign canEditSomeMessage = false/>

<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/jquery.jeditable.pack.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/post_show.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/post.js?${startupTime}"></script>
<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/pagination.js?${startupTime}"></script>

<#if logged>
	<script type="text/javascript" src="${contextPath}/templates/${templateName}/js/watch.js?${startupTime}"></script>
</#if>

<script type="text/javascript">
<!--
<#include "js/karma.js">
<#include "js/utils.js"/>

<#if canRemove || isModerator || isAdmin>
	function confirmDelete(postId)
	{
		if (confirm("${I18n.getMessage("Moderation.ConfirmPostDelete")}")) {
			var reason = prompt("${I18n.getMessage("ModerationLog.changeReason")}");

			if (reason == null || reason == "") {
				alert("${I18n.getMessage("ModerationLog.reasonIsEmpty")}");
				return false;
			}
			else {
				var link = document.getElementById("delete" + postId);
				link.href += "&log_description=" + encodeURIComponent(reason) + "&log_type=1";
			}

			return true;
		}
		
		return false;
	}
</#if>

-->
</script>

<#if moderator>
	<script type="text/JavaScript" src="${JForumContext.encodeURL("/js/list/moderation")}"></script>
</#if>

<table cellspacing="0" cellpadding="10" width="100%" align="center" border="0">
	<tr>
		<td class="bodyline">
			<table cellspacing="2" cellpadding="2" width="100%" border="0">
				<tr>
					<td valign="middle" align="left" colspan="2">
						<span class="maintitle"><a href="${JForumContext.encodeURL("/posts/list/${topic.id}")}" name="top" class="maintitle" id="top">${topic.title?html}</a></span>
						<#if rssEnabled>
						&nbsp;<a href="${contextPath}/rss/topicPosts/${topic.id}${extension}"><img src="${contextPath}/templates/${templateName}/images/xml_button.gif" border="0" alt="XML" /></a>
						</#if>
					</td>
				</tr>
			</table>
			
			<table cellspacing="2" cellpadding="2" width="100%" border="0">
				<tr>
					<#if !readonly>
					<td width="8%" align="left" valign="bottom" nowrap="nowrap">
					</#if>
						<#if topic.status == STATUS_LOCKED>
							<span class="icon_reply_locked"><img src="${contextPath}/images/transp.gif" alt="" /></span>
						<#else>
							<#if !readonly>
								<a href="${JForumContext.encodeURL("/posts/reply/${start}/${topic.id}")}" rel="nofollow" class="icon_reply nav"><img src="${contextPath}/images/transp.gif" alt="" /></a>
							<#else>
								<#assign colspan = "2"/>
							</#if>
						</#if>
					</td>

					<td valign="middle" align="left" colspan="${colspan?default("0")}">
						<span class="nav">
						<a class="nav" href="${JForumContext.encodeURL("/forums/list")}">${I18n.getMessage("ForumListing.forumIndex")} </a> 
            			&raquo; <a class="nav" href="${JForumContext.encodeURL("/forums/show/${forum.id}")}">${forum.name} </a></span>
					</td>
					<td valign="middle" align="right"><#assign paginationData><@pagination.doPagination "list", topic.id/></#assign>${paginationData}</td>
				</tr>
			</table>

			<table class="forumline" cellspacing="1" cellpadding="3" width="100%" border="0">
				<#if poll?exists>
					<tr>
						<td class="cathead cattitle" align="center" colspan="2" nowrap="nowrap" width="100%">${I18n.getMessage("PostShow.pollTitle")}</td>
					</tr>
					<tr>
						<td class="row1" colspan="2" align="center">
							<#if (poll.open && canVoteOnPoll && !request.getParameter("viewResults")?exists)>
								<form action="${JForumContext.encodeURL("/jforum")}" method="post">
									<input type="hidden" name="action" value="vote" />
									<input type="hidden" name="module" value="${moduleName}" />
									<input type="hidden" name="poll_id" value="${poll.id}" />
									<input type="hidden" name="topic_id" value="${topic.id}" />
									<div class="poll">
										<span class="strong">${poll.label}</span>
										<table class="poll">
										<#list poll.options as option>
											<tr>
												<td><input type="radio" name="poll_option" value="${option.id}">${option.text}</input></td>
											</tr>
										</#list>
										</table>
										<input type="submit" value="${I18n.getMessage("PostShow.pollVote")}"></input><br />
										<span class="gensmall" align="center"><a href="${JForumContext.encodeURL("/jforum${extension}?module=posts&amp;action=list&amp;topic_id=${topic.id}&amp;viewResults=true", "")}">${I18n.getMessage("PostShow.showPollResults")}</a></span>
									</div>
								</form>
							<#else>
								<@presentation.renderPoll poll/>
							</#if>
						</td>
					</tr>
				</#if>
				
				<tr>
					<th class="thleft" nowrap="nowrap" width="150" height="26">${I18n.getMessage("PostShow.author")}</th>
					<th class="thright" nowrap="nowrap" width="100%">${I18n.getMessage("PostShow.messageTitle")}</th>
				</tr>

				<!-- POST LISTING --> 
				<#assign rowColor = ""/>
				<#list posts as post>
					<#if post_index % 2 == 0>
						<#assign rowColor = "row1">
					<#else>
						<#assign rowColor = "row2">
					</#if>
	
					<#assign user = users.get(post.userId)/>
					<#assign canEditCurrentMessage = (post.canEdit && topic.status != STATUS_LOCKED) || moderatorCanEdit/>
					<tr>
						<td colspan="2">
							<#include "post_show_action_buttons_inc.htm"/>
						</td>
					</tr>

					<tr>
						<!-- Username -->
						<#assign rowspan = "3"/>
						<#assign useSignature = (user.attachSignatureEnabled && user.signature?exists && user.signature?length > 0 && post.isSignatureEnabled())/>

						<#if useSignature>
							<#assign rowspan = "3"/>
						<#else>
							<#assign rowspan = "2"/>
						</#if>

						<td class="${rowColor}" valign="top" align="left" rowspan="${rowspan}">
							<#include "post_show_user_inc.htm"/>
						</td>
		
						<!-- Message -->
						<td class="${rowColor}" valign="top" id="post_text_${post.id}">
							<span class="postbody">
								<#if canEditCurrentMessage>
									<#assign canEditSomeMessage = true/>
									<div class="edit_area" id="${post.id}">${post.text}</div>
								<#else>
									${post.text}
								</#if>
							</span>

							<!-- Attachments -->
							<#if post.hasAttachments() && (canDownloadAttachments || attachmentsEnabled)>
								<#assign attachments = am.getAttachments(post.id, post.forumId)/>

								<#include "post_show_attachments_inc.htm"/>
							</#if>

							<#if (post.editCount > 0) && post.editTime?exists>
								<#if post.editCount == 1>
									<#assign editCountMessage = "PostShow.editCountSingle"/>
								<#else>
									<#assign editCountMessage = "PostShow.editCountMany"/>
								</#if>
								
								<p><i><span class="gensmall">${I18n.getMessage(editCountMessage, [post.editCount, post.editTime?datetime?string])}</span></i></p>
							</#if>
						</td>
					</tr>

					<#if useSignature>
						<tr>
{'fraction_non_alphanumeric': 0.2156004105371194, 'fraction_numerical': 0.010400273691412932, 'mean_word_length': 3.4615384615384617, 'pattern_counts': {'":': 0, '<': 379, '<?xml version=': 0, '>': 383, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5694211', 'n_tokens_mistral': 6425, 'n_tokens_neox': 4869, 'n_words': 788}