<commit_before>
<section class="mod topic topic-<?= $topic->id ?>">
	<?php foreach ($posts as $post):

		// Time difference between posts
		$current = strtotime($post->created);
		$difference = (isset($previous)) ? date::timespan($current, $previous, 'years,months') : array('years' => 0, 'months' => 0);
		if ($difference['years'] || $difference['months']):
	?>

	<div class="divider post-old"><?= __('Previous post over :ago ago', array(':ago' => date::timespan_short($current, $previous))) ?></div>

	<?php
		endif;
		$previous = $current;

		echo View::factory('forum/post', array(
			'topic' => $topic,
			'post'  => $post,
			'user'  => $user,
		));

	endforeach; ?>
</section>
<?php

// AJAX hooks
echo html::script_source('
$(function() {
	$("a.post-edit").live("click", function(e) {
		e.preventDefault();
		var href = $(this).attr("href");
		var post = href.match(/([0-9]*)\\/edit/);
		$("#post-" + post[1] + " .actions").fadeOut();
		$.get(href, function(data) {
			$("#post-" + post[1] + " .post-content").html(data);
		});
	});

	$("a.post-delete").each(function(i) {
		var action = $(this);
		action.data("action", function() {
			var post = action.attr("href").match(/([0-9]*)\\/delete/);
			if (post) {
				$.get(action.attr("href"), function(data) {
					$("#post-" + post[1]).fadeOut("slow");
				});
			}
		});
	});
<commit_msg>Slide deleted topic instead of fade<commit_after>
<section class="mod topic topic-<?= $topic->id ?>">
	<?php foreach ($posts as $post):

		// Time difference between posts
		$current = strtotime($post->created);
		$difference = (isset($previous)) ? date::timespan($current, $previous, 'years,months') : array('years' => 0, 'months' => 0);
		if ($difference['years'] || $difference['months']):
	?>

	<div class="divider post-old"><?= __('Previous post over :ago ago', array(':ago' => date::timespan_short($current, $previous))) ?></div>

	<?php
		endif;
		$previous = $current;

		echo View::factory('forum/post', array(
			'topic' => $topic,
			'post'  => $post,
			'user'  => $user,
		));

	endforeach; ?>
</section>
<?php

// AJAX hooks
echo html::script_source('
$(function() {
	$("a.post-edit").live("click", function(e) {
		e.preventDefault();
		var href = $(this).attr("href");
		var post = href.match(/([0-9]*)\\/edit/);
		$("#post-" + post[1] + " .actions").fadeOut();
		$.get(href, function(data) {
			$("#post-" + post[1] + " .post-content").html(data);
		});
	});

	$("a.post-delete").each(function(i) {
		var action = $(this);
		action.data("action", function() {
			var post = action.attr("href").match(/([0-9]*)\\/delete/);
			if (post) {
				$.get(action.attr("href"), function(data) {
					$("#post-" + post[1]).slideUp();
				});
			}
		});
	});

{'fraction_non_alphanumeric': 0.2605166051660517, 'fraction_numerical': 0.006642066420664207, 'mean_word_length': 3.983455882352941, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1991072', 'n_tokens_mistral': 1085, 'n_tokens_neox': 966, 'n_words': 193}