Merge ../http

Conflicts:
	js/auto-reload.js
This commit is contained in:
8chan 2014-09-25 20:52:41 +00:00
commit 142bc60863
5 changed files with 11 additions and 8 deletions

2
.gitignore vendored
View File

@ -7,6 +7,8 @@
/*/config.php /*/config.php
/*.html /*.html
/inc/secrets.php
# include some files though # include some files though
!/templates/*.html !/templates/*.html
!/inc/config.php !/inc/config.php

View File

@ -33,7 +33,7 @@ th.headerSortDown {
} }
</style> </style>
CSS; CSS;
$body .= '<table class="modlog" style="width:auto"><thead><tr><th>L</th><th>Board</th><th>Posts in last hour</th><th>Total posts</th><th>Created</th></tr></thead><tbody>'; $body .= '<table class="modlog" style="width:auto"><thead><tr><th>L</th><th>Board</th><th>Board title</th><th>Posts in last hour</th><th>Total posts</th><th>Created</th></tr></thead><tbody>';
$total_posts_hour = 0; $total_posts_hour = 0;
$total_posts = 0; $total_posts = 0;
@ -80,7 +80,7 @@ foreach ($boards as $i => &$board) {
} }
$locale = isset($boardCONFIG['locale'])?$boardCONFIG['locale']:'en'; $locale = isset($boardCONFIG['locale'])?$boardCONFIG['locale']:'en';
$board['title'] = htmlentities(utf8tohtml($board['title'])); $board['title'] = utf8tohtml($board['title']);
$locale_arr = explode('_', $locale); $locale_arr = explode('_', $locale);
$locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]); $locale_short = isset($locale_arr[1]) ? strtolower($locale_arr[1]) : strtolower($locale_arr[0]);
$locale_short = str_replace('.utf-8', '', $locale_short); $locale_short = str_replace('.utf-8', '', $locale_short);
@ -97,7 +97,8 @@ foreach ($boards as $i => &$board) {
$board['ago'] = human_time_diff(strtotime($board['time'])); $board['ago'] = human_time_diff(strtotime($board['time']));
$body .= "<tr>"; $body .= "<tr>";
$body .= "<td>$img</td>"; $body .= "<td>$img</td>";
$body .= "<td><a href='/{$board['uri']}/' title=\"{$board['title']}\">/{$board['uri']}/</a>$lock</td>"; $body .= "<td><a href='/{$board['uri']}/'>/{$board['uri']}/</a>$lock</td>";
$body .= "<td>{$board['title']}</td>";
$body .= "<td style='text-align:right'>{$board['pph']}</td>"; $body .= "<td style='text-align:right'>{$board['pph']}</td>";
$body .= "<td style='text-align:right'>{$board['max']}</td>"; $body .= "<td style='text-align:right'>{$board['max']}</td>";
$body .= "<td>{$board['time']} ({$board['ago']} ago)</td></tr>"; $body .= "<td>{$board['time']} ({$board['ago']} ago)</td></tr>";
@ -121,7 +122,7 @@ $body .= <<<FOOTER
}); */ }); */
$(function() { $(function() {
$('table').tablesorter({sortList: [[2,1]], $('table').tablesorter({sortList: [[3,1]],
textExtraction: function(node) { textExtraction: function(node) {
childNode = node.childNodes[0]; childNode = node.childNodes[0];
if (!childNode) { return node.innerHTML; } if (!childNode) { return node.innerHTML; }

View File

@ -12,7 +12,7 @@ include "inc/lib/recaptcha/recaptchalib.php";
checkBan('*'); checkBan('*');
$bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/'); $bannedWords = array('/^cake$/', '8ch', '/^cp$/', 'child', '/^inc$/', '/^static$/', '/^templates$/', '/^js$/', '/^stylesheets$/', '/^tools$/', '/^pedo$/');
$ayah = (($config['ayah_enabled']) ? new AYAH() : false); $ayah = (($config['ayah_enabled']) ? new AYAH() : false);
@ -158,4 +158,4 @@ EOT;
echo Element("page.html", array("config" => $config, "body" => $body, "title" => "Success", "subtitle" => "This was a triumph")); echo Element("page.html", array("config" => $config, "body" => $body, "title" => "Success", "subtitle" => "This was a triumph"));
} }
?> ?>

View File

@ -42,7 +42,7 @@
$config['thread_subject_in_title'] = true; $config['thread_subject_in_title'] = true;
$config['spam']['hidden_inputs_max_pass'] = 128; $config['spam']['hidden_inputs_max_pass'] = 128;
require_once "secrets.php"; include "secrets.php";
// Image shit // Image shit
$config['thumb_method'] = 'gm+gifsicle'; $config['thumb_method'] = 'gm+gifsicle';

View File

@ -153,7 +153,7 @@ $(document).ready(function(){
end_of_page = true; end_of_page = true;
}).trigger('scroll'); }).trigger('scroll');
$('#update_thread').on('click', poll); $('#update_thread').on('click', function(e) {e.preventDefault(); poll();});
setInterval(timer_update, 1000); setInterval(timer_update, 1000);
setInterval(decrement_timer, 1000); setInterval(decrement_timer, 1000);