".str_replace(array("\n","\t"), array(" "," "), htmlspecialchars($code, ENT_COMPAT, "UTF-8", false)).""; - + $body = str_replace("
", $code, $body);
}
}
@@ -2323,7 +2323,7 @@ function utf8tohtml($utf8) {
}
function ordutf8($string, &$offset) {
- $code = ord(substr($string, $offset,1));
+ $code = ord(substr($string, $offset,1));
if ($code >= 128) { // otherwise 0xxxxxxx
if ($code < 224)
$bytesnumber = 2; // 110xxxxx
@@ -2387,7 +2387,7 @@ function buildThread($id, $return = false, $mod = false) {
// Check if any posts were found
if (!isset($thread))
error($config['error']['nonexistant']);
-
+
$hasnoko50 = $thread->postCount() >= $config['noko50_min'];
$antibot = $mod || $return ? false : create_antibot($board['uri'], $id);
@@ -2438,16 +2438,16 @@ function buildThread($id, $return = false, $mod = false) {
function buildThread50($id, $return = false, $mod = false, $thread = null, $antibot = false) {
global $board, $config, $build_pages;
$id = round($id);
-
+
if ($antibot)
$antibot->reset();
-
+
if (!$thread) {
$query = prepare(sprintf("SELECT * FROM ``posts_%s`` WHERE (`thread` IS NULL AND `id` = :id) OR `thread` = :id ORDER BY `thread`,`id` DESC LIMIT :limit", $board['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->bindValue(':limit', $config['noko50_count']+1, PDO::PARAM_INT);
$query->execute() or error(db_error($query));
-
+
$num_images = 0;
while ($post = $query->fetch(PDO::FETCH_ASSOC)) {
if (!isset($thread)) {
@@ -2455,7 +2455,7 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti
} else {
if ($post['files'])
$num_images += $post['num_files'];
-
+
$thread->add(new Post($post, $mod ? '?/' : $config['root'], $mod));
}
}
@@ -2470,10 +2470,10 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti
SELECT SUM(`num_files`) FROM ``posts_%s`` WHERE `files` IS NOT NULL AND `thread` = :thread", $board['uri'], $board['uri']));
$count->bindValue(':thread', $id, PDO::PARAM_INT);
$count->execute() or error(db_error($count));
-
+
$c = $count->fetch();
$thread->omitted = $c['num'] - $config['noko50_count'];
-
+
$c = $count->fetch();
$thread->omitted_images = $c['num'] - $num_images;
}
@@ -2486,13 +2486,13 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti
$thread->omitted += count($allPosts) - count($thread->posts);
foreach ($allPosts as $index => $post) {
if ($index == count($allPosts)-count($thread->posts))
- break;
+ break;
if ($post->files)
$thread->omitted_images += $post->num_files;
}
}
- $hasnoko50 = $thread->postCount() >= $config['noko50_min'];
+ $hasnoko50 = $thread->postCount() >= $config['noko50_min'];
$body = Element('thread.html', array(
'board' => $board,
@@ -2506,7 +2506,7 @@ function buildThread50($id, $return = false, $mod = false, $thread = null, $anti
'antibot' => $mod ? false : ($antibot ? $antibot : create_antibot($board['uri'], $id)),
'boardlist' => createBoardlist($mod),
'return' => ($mod ? '?' . $board['url'] . $config['file_index'] : $config['root'] . $board['dir'] . $config['file_index'])
- ));
+ ));
if ($return) {
return $body;
@@ -2585,7 +2585,7 @@ function hcf($a, $b){
$b = $a-$b;
$a = $a-$b;
}
- if ($b==(round($b/$a))*$a)
+ if ($b==(round($b/$a))*$a)
$gcd=$a;
else {
for ($i=round($a/2);$i;$i--) {
@@ -2880,7 +2880,7 @@ function process_filenames($file, $board_dir, $multiple, $i){
if ($multiple)
$file['file_id'] .= "-$i";
-
+
$file['file'] = $board_dir . $config['dir']['img'] . $file['file_id'] . '.' . $file['extension'];
$file['thumb'] = $board_dir . $config['dir']['thumb'] . $file['file_id'] . '.' . ($config['thumb_ext'] ? $config['thumb_ext'] : $file['extension']);
return $file;
diff --git a/inc/image.php b/inc/image.php
index 20fcfdcb..7cd51afb 100644
--- a/inc/image.php
+++ b/inc/image.php
@@ -11,7 +11,7 @@ class Image {
public $src, $format, $image, $size;
public function __construct($src, $format = false, $size = false) {
global $config;
-
+
$this->src = $src;
$this->format = $format;
@@ -25,21 +25,21 @@ class Image {
error(_('Unsupported file format: ') . $this->format);
}
}
-
+
$this->image = new $classname($this, $size);
if (!$this->image->valid()) {
$this->delete();
error($config['error']['invalidimg']);
}
-
+
$this->size = (object)array('width' => $this->image->_width(), 'height' => $this->image->_height());
if ($this->size->width < 1 || $this->size->height < 1) {
$this->delete();
error($config['error']['invalidimg']);
}
}
-
+
public function resize($extension, $max_width, $max_height) {
global $config;
@@ -63,16 +63,16 @@ class Image {
error(_('Unsupported file format: ') . $extension);
}
}
-
+
$thumb = new $classname(false);
$thumb->src = $this->src;
$thumb->format = $this->format;
$thumb->original_width = $this->size->width;
$thumb->original_height = $this->size->height;
-
+
$x_ratio = $max_width / $this->size->width;
$y_ratio = $max_height / $this->size->height;
-
+
if (($this->size->width <= $max_width) && ($this->size->height <= $max_height)) {
$width = $this->size->width;
$height = $this->size->height;
@@ -83,16 +83,16 @@ class Image {
$width = ceil($y_ratio * $this->size->width);
$height = $max_height;
}
-
+
$thumb->_resize($this->image->image, $width, $height);
-
+
return $thumb;
}
-
+
public function to($dst) {
$this->image->to($dst);
}
-
+
public function delete() {
file_unlink($this->src);
}
@@ -115,26 +115,26 @@ class ImageGD {
}
class ImageBase extends ImageGD {
- public $image, $src, $original, $original_width, $original_height, $width, $height;
+ public $image, $src, $original, $original_width, $original_height, $width, $height;
public function valid() {
return (bool)$this->image;
}
-
+
public function __construct($img, $size = false) {
if (method_exists($this, 'init'))
$this->init();
-
+
if ($size && $size[0] > 0 && $size[1] > 0) {
$this->width = $size[0];
$this->height = $size[1];
}
-
+
if ($img !== false) {
$this->src = $img->src;
$this->from();
}
}
-
+
public function _width() {
if (method_exists($this, 'width'))
return $this->width();
@@ -157,7 +157,7 @@ class ImageBase extends ImageGD {
$this->original = &$original;
$this->width = $width;
$this->height = $height;
-
+
if (method_exists($this, 'resize'))
$this->resize();
else
@@ -200,31 +200,31 @@ class ImageImagick extends ImageBase {
}
public function resize() {
global $config;
-
+
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '')) {
$this->image = new Imagick();
$this->image->setFormat('gif');
-
+
$keep_frames = array();
for ($i = 0; $i < $this->original->getNumberImages(); $i += floor($this->original->getNumberImages() / $config['thumb_keep_animation_frames']))
$keep_frames[] = $i;
-
+
$i = 0;
$delay = 0;
foreach ($this->original as $frame) {
$delay += $frame->getImageDelay();
-
+
if (in_array($i, $keep_frames)) {
// $frame->scaleImage($this->width, $this->height, false);
$frame->sampleImage($this->width, $this->height);
$frame->setImagePage($this->width, $this->height, 0, 0);
$frame->setImageDelay($delay);
$delay = 0;
-
+
$this->image->addImage($frame->getImage());
}
$i++;
- }
+ }
} else {
$this->image = clone $this->original;
$this->image->scaleImage($this->width, $this->height, false);
@@ -235,15 +235,15 @@ class ImageImagick extends ImageBase {
class ImageConvert extends ImageBase {
public $width, $height, $temp, $gm = false, $gifsicle = false;
-
+
public function init() {
global $config;
-
+
if ($config['thumb_method'] == 'gm' || $config['thumb_method'] == 'gm+gifsicle')
$this->gm = true;
if ($config['thumb_method'] == 'convert+gifsicle' || $config['thumb_method'] == 'gm+gifsicle')
$this->gifsicle = true;
-
+
$this->temp = false;
}
public function get_size($src, $try_gd_first = true) {
@@ -265,7 +265,7 @@ class ImageConvert extends ImageBase {
if ($size) {
$this->width = $size[0];
$this->height = $size[1];
-
+
$this->image = true;
} else {
// mark as invalid
@@ -274,7 +274,7 @@ class ImageConvert extends ImageBase {
}
public function to($src) {
global $config;
-
+
if (!$this->temp) {
if ($config['strip_exif']) {
if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
@@ -306,16 +306,16 @@ class ImageConvert extends ImageBase {
}
public function resize() {
global $config;
-
+
if ($this->temp) {
// remove old
$this->destroy();
}
-
+
$this->temp = tempnam($config['tmp'], 'convert') . ($config['thumb_ext'] == '' ? '' : '.' . $config['thumb_ext']);
-
+
$config['thumb_keep_animation_frames'] = (int)$config['thumb_keep_animation_frames'];
-
+
if ($this->format == 'gif' && ($config['thumb_ext'] == 'gif' || $config['thumb_ext'] == '') && $config['thumb_keep_animation_frames'] > 1) {
if ($this->gifsicle) {
if (($error = shell_exec("gifsicle -w --unoptimize -O2 --resize {$this->width}x{$this->height} < " .
@@ -380,7 +380,7 @@ class ImageConvert extends ImageBase {
}
}
}
-
+
// For when -auto-orient doesn't exist (older versions)
static public function jpeg_exif_orientation($src, $exif = false) {
if (!$exif) {
@@ -398,16 +398,16 @@ class ImageConvert extends ImageBase {
// 8888
// 88
// 88
-
+
return '-flop';
case 3:
-
+
// 88
// 88
// 8888
// 88
// 888888
-
+
return '-flip -flop';
case 4:
// 88
@@ -415,31 +415,31 @@ class ImageConvert extends ImageBase {
// 8888
// 88
// 888888
-
+
return '-flip';
case 5:
// 8888888888
// 88 88
// 88
-
+
return '-rotate 90 -flop';
case 6:
// 88
// 88 88
// 8888888888
-
+
return '-rotate 90';
case 7:
// 88
// 88 88
// 8888888888
-
+
return '-rotate "-90" -flop';
case 8:
// 8888888888
// 88 88
// 88
-
+
return '-rotate "-90"';
}
}
@@ -497,6 +497,11 @@ class ImageBMP extends ImageBase {
}
}
-
-
-
+class ImageWEBP extends ImageBase {
+ public function from() {
+ $this->image = @imagecreatefromwebp($this->src);
+ }
+ public function to($src) {
+ imagewebp($this->image, $src);
+ }
+}
diff --git a/inc/template.php b/inc/template.php
index 648adae8..9ec93d34 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -13,12 +13,15 @@ $twig = false;
function load_twig() {
global $twig, $config;
+
+ $cache_dir = "{$config['dir']['template']}/cache/";
+
$loader = new Twig_Loader_Filesystem($config['dir']['template']);
$loader->setPaths($config['dir']['template']);
$twig = new Twig_Environment($loader, array(
'autoescape' => false,
- 'cache' => is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache')) ?
- "{$config['dir']['template']}/cache" : false,
+ 'cache' => is_writable('templates/') || (is_dir($cache_dir) && is_writable($cache_dir)) ?
+ $cache_dir : false,
'debug' => $config['debug']
));
$twig->addExtension(new Twig_Extensions_Extension_Tinyboard());
@@ -27,17 +30,17 @@ function load_twig() {
function Element($templateFile, array $options) {
global $config, $debug, $twig, $build_pages;
-
+
if (!$twig)
load_twig();
-
+
if (function_exists('create_pm_header') && ((isset($options['mod']) && $options['mod']) || isset($options['__mod'])) && !preg_match('!^mod/!', $templateFile)) {
$options['pm'] = create_pm_header();
}
-
+
if (isset($options['body']) && $config['debug']) {
$_debug = $debug;
-
+
if (isset($debug['start'])) {
$_debug['time']['total'] = '~' . round((microtime(true) - $_debug['start']) * 1000, 2) . 'ms';
$_debug['time']['init'] = '~' . round(($_debug['start_debug'] - $_debug['start']) * 1000, 2) . 'ms';
@@ -55,18 +58,17 @@ function Element($templateFile, array $options) {
str_replace("\n", '
', utf8tohtml(print_r($_debug, true))) .
'';
}
-
+
// Read the template file
if (@file_get_contents("{$config['dir']['template']}/${templateFile}")) {
$body = $twig->render($templateFile, $options);
-
+
if ($config['minify_html'] && preg_match('/\.html$/', $templateFile)) {
$body = trim(preg_replace("/[\t\r\n]/", '', $body));
}
-
+
return $body;
} else {
throw new Exception("Template file '${templateFile}' does not exist or is empty in '{$config['dir']['template']}'!");
}
}
-
diff --git a/install.php b/install.php
index 72994bfa..6e58d344 100644
--- a/install.php
+++ b/install.php
@@ -1,9 +1,9 @@
= 50503)
return query($sql);
else
return query(str_replace('utf8mb4', 'utf8', $sql));
}
-
+
$boards = listBoards();
-
+
switch ($version) {
case 'v0.9':
case 'v0.9.1':
// Upgrade to v0.9.2-dev
-
+
foreach ($boards as &$_board) {
// Add `capcode` field after `trip`
query(sprintf("ALTER TABLE `posts_%s` ADD `capcode` VARCHAR( 50 ) NULL AFTER `trip`", $_board['uri'])) or error(db_error());
-
+
// Resize `trip` to 15 characters
query(sprintf("ALTER TABLE `posts_%s` CHANGE `trip` `trip` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL", $_board['uri'])) or error(db_error());
}
case 'v0.9.2-dev':
// Upgrade to v0.9.2-dev-1
-
+
// New table: `theme_settings`
query("CREATE TABLE IF NOT EXISTS `theme_settings` ( `name` varchar(40) NOT NULL, `value` text, UNIQUE KEY `name` (`name`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;") or error(db_error());
-
+
// New table: `news`
query("CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text NOT NULL, `time` int(11) NOT NULL, `subject` text NOT NULL, `body` text NOT NULL, UNIQUE KEY `id` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;") or error(db_error());
case 'v0.9.2.1-dev':
@@ -81,7 +81,7 @@ if (file_exists($config['has_installed'])) {
// Fix broken version number/mistake
$version = 'v0.9.2-dev-1';
// Upgrade to v0.9.2-dev-2
-
+
foreach ($boards as &$_board) {
// Increase field sizes
query(sprintf("ALTER TABLE `posts_%s` CHANGE `subject` `subject` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL", $_board['uri'])) or error(db_error());
@@ -89,7 +89,7 @@ if (file_exists($config['has_installed'])) {
}
case 'v0.9.2-dev-2':
// Upgrade to v0.9.2-dev-3 (v0.9.2)
-
+
foreach ($boards as &$_board) {
// Add `custom_fields` field
query(sprintf("ALTER TABLE `posts_%s` ADD `embed` TEXT NULL", $_board['uri'])) or error(db_error());
@@ -97,7 +97,7 @@ if (file_exists($config['has_installed'])) {
case 'v0.9.2-dev-3': // v0.9.2-dev-3 == v0.9.2
case 'v0.9.2':
// Upgrade to v0.9.3-dev-1
-
+
// Upgrade `theme_settings` table
query("TRUNCATE TABLE `theme_settings`") or error(db_error());
query("ALTER TABLE `theme_settings` ADD `theme` VARCHAR( 40 ) NOT NULL FIRST") or error(db_error());
@@ -129,7 +129,7 @@ if (file_exists($config['has_installed'])) {
foreach ($boards as &$board) {
$tables[] = "posts_{$board['uri']}";
}
-
+
foreach ($tables as &$table) {
query("ALTER TABLE `{$table}` ENGINE = MYISAM DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci") or error(db_error());
}
@@ -153,10 +153,10 @@ if (file_exists($config['has_installed'])) {
query("ALTER TABLE `boards` DROP PRIMARY KEY") or error(db_error());
query("ALTER TABLE `reports` DROP INDEX `id`") or error(db_error());
query("ALTER TABLE `boards` DROP INDEX `uri`") or error(db_error());
-
+
query("ALTER IGNORE TABLE `robot` ADD PRIMARY KEY (`hash`)") or error(db_error());
query("ALTER TABLE `bans` ADD FULLTEXT (`ip`)") or error(db_error());
- query("ALTER TABLE `ip_notes` ADD INDEX (`ip`)") or error(db_error());
+ query("ALTER TABLE `ip_notes` ADD INDEX (`ip`)") or error(db_error());
query("ALTER TABLE `modlogs` ADD INDEX (`time`)") or error(db_error());
query("ALTER TABLE `boards` ADD PRIMARY KEY(`uri`)") or error(db_error());
query("ALTER TABLE `mutes` ADD INDEX (`ip`)") or error(db_error());
@@ -174,9 +174,9 @@ if (file_exists($config['has_installed'])) {
I have read and understood the agreement. Proceed to upgrading.
';
-
+
file_write($config['has_installed'], 'v0.9.4-dev-2');
-
+
break;
}
case 'v0.9.4-dev-3':
@@ -194,14 +194,14 @@ if (file_exists($config['has_installed'])) {
}
query("CREATE TABLE IF NOT EXISTS `cites` ( `board` varchar(8) NOT NULL, `post` int(11) NOT NULL, `target_board` varchar(8) NOT NULL, `target` int(11) NOT NULL, KEY `target` (`target_board`,`target`), KEY `post` (`board`,`post`)) ENGINE=MyISAM DEFAULT CHARSET=utf8;") or error(db_error());
case 'v0.9.5-dev-2':
- query("ALTER TABLE `boards`
+ query("ALTER TABLE `boards`
CHANGE `uri` `uri` VARCHAR( 15 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CHANGE `title` `title` VARCHAR( 40 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CHANGE `subtitle` `subtitle` VARCHAR( 120 ) CHARACTER SET utf8 COLLATE utf8_general_ci NULL") or error(db_error());
case 'v0.9.5-dev-3':
// v0.9.5
case 'v0.9.5':
- query("ALTER TABLE `boards`
+ query("ALTER TABLE `boards`
CHANGE `uri` `uri` VARCHAR( 50 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CHANGE `title` `title` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CHANGE `subtitle` `subtitle` TINYTEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL") or error(db_error());
@@ -228,12 +228,12 @@ if (file_exists($config['has_installed'])) {
$query->bindValue(':newboard', $board['uri']);
$query->bindValue(':oldboard', $board['id']);
$query->execute() or error(db_error($query));
-
+
$query = prepare("UPDATE `modlogs` SET `board` = :newboard WHERE `board` = :oldboard");
$query->bindValue(':newboard', $board['uri']);
$query->bindValue(':oldboard', $board['id']);
$query->execute() or error(db_error($query));
-
+
$query = prepare("UPDATE `reports` SET `board` = :newboard WHERE `board` = :oldboard");
$query->bindValue(':newboard', $board['uri']);
$query->bindValue(':oldboard', $board['id']);
@@ -271,10 +271,10 @@ if (file_exists($config['has_installed'])) {
if (strlen($user['password']) == 40) {
mt_srand(microtime(true) * 100000 + memory_get_usage(true));
$salt = md5(uniqid(mt_rand(), true));
-
+
$user['salt'] = $salt;
$user['password'] = hash('sha256', $user['salt'] . $user['password']);
-
+
$_query = prepare("UPDATE `mods` SET `password` = :password, `salt` = :salt WHERE `id` = :id");
$_query->bindValue(':id', $user['id']);
$_query->bindValue(':password', $user['password']);
@@ -306,7 +306,7 @@ if (file_exists($config['has_installed'])) {
CHANGE `embed` `embed` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;", $board['uri'])) or error(db_error());
}
-
+
__query("ALTER TABLE `antispam`
CHANGE `board` `board` VARCHAR( 120 ) CHARACTER SET ASCII COLLATE ascii_general_ci NOT NULL ,
CHANGE `hash` `hash` CHAR( 40 ) CHARACTER SET ASCII COLLATE ascii_bin NOT NULL ,
@@ -466,44 +466,44 @@ if (file_exists($config['has_installed'])) {
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1") or error(db_error());
$listquery = query("SELECT * FROM ``bans`` ORDER BY `id`") or error(db_error());
while ($ban = $listquery->fetch(PDO::FETCH_ASSOC)) {
- $query = prepare("INSERT INTO ``bans_new_temp`` VALUES
+ $query = prepare("INSERT INTO ``bans_new_temp`` VALUES
(NULL, :ipstart, :ipend, :created, :expires, :board, :creator, :reason, :seen, NULL)");
-
+
$range = Bans::parse_range($ban['ip']);
if ($range === false) {
// Invalid retard ban; just skip it.
continue;
}
-
+
$query->bindValue(':ipstart', $range[0]);
if ($range[1] !== false && $range[1] != $range[0])
$query->bindValue(':ipend', $range[1]);
else
$query->bindValue(':ipend', null, PDO::PARAM_NULL);
-
+
$query->bindValue(':created', $ban['set']);
-
+
if ($ban['expires'])
$query->bindValue(':expires', $ban['expires']);
else
$query->bindValue(':expires', null, PDO::PARAM_NULL);
-
+
if ($ban['board'])
$query->bindValue(':board', $ban['board']);
else
$query->bindValue(':board', null, PDO::PARAM_NULL);
-
+
$query->bindValue(':creator', $ban['mod']);
-
+
if ($ban['reason'])
$query->bindValue(':reason', $ban['reason']);
else
$query->bindValue(':reason', null, PDO::PARAM_NULL);
-
+
$query->bindValue(':seen', $ban['seen']);
$query->execute() or error(db_error($query));
}
-
+
// Drop old bans table
query("DROP TABLE ``bans``") or error(db_error());
// Replace with new table
@@ -535,9 +535,9 @@ if (file_exists($config['has_installed'])) {
I have read and understood the agreement. Proceed to upgrading.
';
-
+
file_write($config['has_installed'], '4.4.97');
-
+
break;
}
case '4.4.98-pre':
@@ -553,9 +553,9 @@ if (file_exists($config['has_installed'])) {
I have read and understood the warning. Proceed to upgrading.
';
-
+
file_write($config['has_installed'], '4.5.2');
-
+
break;
}
@@ -614,7 +614,7 @@ if (file_exists($config['has_installed'])) {
// Update version number
file_write($config['has_installed'], VERSION);
-
+
$page['title'] = 'Upgraded';
$page['body'] = 'Successfully upgraded from ' . $version . ' to ' . VERSION . '.
';
break;
@@ -626,8 +626,8 @@ if (file_exists($config['has_installed'])) {
$page['title'] = 'Already installed';
$page['body'] = 'It appears that vichan is already installed (' . $version . ') and there is nothing to upgrade! Delete ' . $config['has_installed'] . ' to reinstall.
';
break;
- }
-
+ }
+
die(Element('page.html', $page));
}
@@ -659,11 +659,11 @@ if ($step == 0) {
I have read and understood the agreement. Proceed to installation.
';
-
+
echo Element('page.html', $page);
} elseif ($step == 1) {
$page['title'] = 'Pre-installation test';
-
+
$can_exec = true;
if (!function_exists('shell_exec'))
$can_exec = false;
@@ -673,12 +673,12 @@ if ($step == 0) {
$can_exec = false;
elseif (trim(shell_exec('echo "TEST"')) !== 'TEST')
$can_exec = false;
-
+
if (!defined('PHP_VERSION_ID')) {
$version = explode('.', PHP_VERSION);
define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
}
-
+
// Required extensions
$extensions = array(
'PDO' => array(
@@ -818,14 +818,14 @@ if ($step == 0) {
array(
'category' => 'File permissions',
'name' => getcwd() . '/templates/cache',
- 'result' => is_writable('templates') || (is_dir('templates/cache') && is_writable('templates/cache')),
+ 'result' => is_dir('templates/cache/') && is_writable('templates/cache/'),
'required' => true,
'message' => 'You must give vichan permission to create (and write to) the templates/cache
directory or performance will be drastically reduced.'
),
array(
'category' => 'File permissions',
'name' => getcwd() . '/tmp/cache',
- 'result' => is_dir('tmp/cache') && is_writable('tmp/cache'),
+ 'result' => is_dir('tmp/cache/') && is_writable('tmp/cache/'),
'required' => true,
'message' => 'You must give vichan permission to write to the tmp/cache
directory.'
),
@@ -854,7 +854,7 @@ if ($step == 0) {
);
$config['font_awesome'] = true;
-
+
$additional_config = array();
foreach ($tests as $test) {
if ($test['result'] && isset($test['effect'])) {
@@ -877,10 +877,10 @@ if ($step == 0) {
} elseif ($step == 2) {
// Basic config
$page['title'] = 'Configuration';
-
+
$config['cookies']['salt'] = substr(base64_encode(sha1(rand())), 0, 30);
- $config['secure_trip_salt'] = substr(base64_encode(sha1(rand())), 0, 30);
-
+ $config['secure_trip_salt'] = substr(base64_encode(sha1(rand())), 0, 30);
+
echo Element('page.html', array(
'body' => Element('installer/config.html', array(
'config' => $config,
@@ -893,7 +893,7 @@ if ($step == 0) {
$more = $_POST['more'];
unset($_POST['more']);
- $instance_config =
+ $instance_config =
'<'.'?php
/*
@@ -905,13 +905,13 @@ if ($step == 0) {
*/
';
-
+
create_config_from_array($instance_config, $_POST);
-
+
$instance_config .= "\n";
$instance_config .= $more;
$instance_config .= "\n";
-
+
if (@file_put_contents('inc/instance-config.php', $instance_config)) {
header('Location: ?step=4', true, $config['redirect_http']);
} else {
@@ -928,34 +928,38 @@ if ($step == 0) {
}
} elseif ($step == 4) {
// SQL installation
-
+
buildJavascript();
-
+
$sql = @file_get_contents('install.sql') or error("Couldn't load install.sql.");
-
+
sql_open();
$mysql_version = mysql_version();
-
+
// This code is probably horrible, but what I'm trying
// to do is find all of the SQL queires and put them
// in an array.
preg_match_all("/(^|\n)((SET|CREATE|INSERT).+)\n\n/msU", $sql, $queries);
$queries = $queries[2];
-
+
$queries[] = Element('posts.sql', array('board' => 'b'));
-
+
$sql_errors = '';
+ $sql_err_count = 0;
foreach ($queries as $query) {
if ($mysql_version < 50503)
$query = preg_replace('/(CHARSET=|CHARACTER SET )utf8mb4/', '$1utf8', $query);
$query = preg_replace('/^([\w\s]*)`([0-9a-zA-Z$_\x{0080}-\x{FFFF}]+)`/u', '$1``$2``', $query);
- if (!query($query))
- $sql_errors .= '' . db_error() . ' ';
+ if (!query($query)) {
+ $sql_err_count++;
+ $error = db_error();
+ $sql_errors .= "$sql_err_count- $query
- $error
";
+ }
}
-
+
$page['title'] = 'Installation complete';
$page['body'] = 'Thank you for using vichan. Please remember to report any bugs you discover. How do I edit the config files?
';
-
+
if (!empty($sql_errors)) {
$page['body'] .= 'SQL errors
SQL errors were encountered when trying to install the database. This may be the result of using a database which is already occupied with a vichan installation; if so, you can probably ignore this.
The errors encountered were:
' . $sql_errors . '
';
} else {
@@ -964,29 +968,28 @@ if ($step == 0) {
setupBoard($_board);
buildIndex();
}
-
+
file_write($config['has_installed'], VERSION);
/*if (!file_unlink(__FILE__)) {
$page['body'] .= 'Delete install.php!
I couldn\'t remove install.php. You will have to remove it manually.
';
}*/
}
-
+
echo Element('page.html', $page);
} elseif ($step == 5) {
$page['title'] = 'Installation complete';
$page['body'] = 'Thank you for using vichan. Please remember to report any bugs you discover.
';
-
+
$boards = listBoards();
foreach ($boards as &$_board) {
setupBoard($_board);
buildIndex();
}
-
+
file_write($config['has_installed'], VERSION);
if (!file_unlink(__FILE__)) {
$page['body'] .= 'Delete install.php!
I couldn\'t remove install.php. You will have to remove it manually.
';
}
-
+
echo Element('page.html', $page);
}
-
diff --git a/install.sql b/install.sql
index a394dcc3..3d745aad 100644
--- a/install.sql
+++ b/install.sql
@@ -313,7 +313,7 @@ CREATE TABLE `pages` (
`content` text,
PRIMARY KEY (`id`),
UNIQUE KEY `u_pages` (`name`,`board`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
diff --git a/js/hud-pinning.js b/js/hud-pinning.js
new file mode 100644
index 00000000..15f8a157
--- /dev/null
+++ b/js/hud-pinning.js
@@ -0,0 +1,54 @@
+/*
+ * hud-pinning.js
+ * https://git.leftypol.org/leftypol/leftypol
+ *
+ * Released under the MIT license
+ * Copyright (c) 2024 Zankaria
+ *
+ * Usage:
+ * $config['additional_javascript'][] = 'js/jquery.min.js';
+ * $config['additional_javascript'][] = 'js/hud-pinning.js';
+ */
+
+/**
+ * You know the bar on the top of the page that is created if you specify the $config['boards'] array? That one.
+ * Also know the bottom bar with the "Return" button and thread update controls? Also that one.
+ *
+ * Both bars are pinned on the top and bottom of the page. This script adds an option to unpin them.
+ */
+$(document).ready(function() {
+ 'use strict';
+
+ if (window.Options && Options.get_tab('general') && window.jQuery) {
+ function setHudPinning(pin) {
+ let style = pin ? '' : 'initial';
+ $('#top-hud').css('position', style);
+ $('#bottom-hud').css('position', style);
+ }
+
+ // Insert the option in the panel.
+ Options.extend_tab('general', '');
+
+ // Trigger if the panel's checkbox is toggled.
+ $('#hud-pinning>input').on('change', function() {
+ if (this.checked) {
+ localStorage.hud_pinning = 'false';
+ setHudPinning(false);
+ } else {
+ localStorage.hud_pinning = 'true';
+ setHudPinning(true);
+ }
+ });
+
+ // Reload on new post: allows it to work with auto-reload.js etc.
+ $(document).on('new_post', function(e, post) {
+ setHudPinning(localStorage.hud_pinning === 'true');
+ });
+
+ // Enforce the setting on loading.
+ if (localStorage.hud_pinning === 'false') {
+ $('#hud-pinning>input').attr('checked', 'checked');
+ setHudPinning(false);
+ }
+ }
+});
diff --git a/post.php b/post.php
index df720733..346f68ef 100644
--- a/post.php
+++ b/post.php
@@ -123,24 +123,24 @@ function db_select_thread_with_attributes($board, $thread_id)
}
/**
- * Get the threads with the given id in the given board.
+ * Get the post with the given id in the given board.
*
* @param string $board Board to search in. MUST ALREADY BE SANITIZED.
- * @param int $thread_id Id of the thread.
- * @return false|array Returns false if no thread exists. Otherwise, an array of arrays with the threads 'id', 'thread'
- * and 'body_nomarkup' properties.
+ * @param int $id Id of the post.
+ * @return false|array Returns false if no post exists. Otherwise, an array with the post's 'id', 'thread' and
+ * 'body_nomarkup' keys.
*/
-function db_select_threads_minimal($board, $thread_id)
+function db_select_post_minimal($board, $id)
{
$query = prepare(sprintf("SELECT `id`, `thread`, `body_nomarkup` FROM ``posts_%s`` WHERE `id` = :id", $board));
- $query->bindValue(':id', $thread_id, PDO::PARAM_INT);
+ $query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error($query));
- $threads = $query->fetch(PDO::FETCH_ASSOC);
+ $post = $query->fetch(PDO::FETCH_ASSOC);
- if (!$threads) {
+ if (!$post) {
return false;
}
- return $threads;
+ return $post;
}
/**
@@ -537,9 +537,21 @@ function handle_report()
markup($reason);
foreach ($report as $id) {
- $thread = db_select_threads_minimal($board['uri'], $id);
+ $post = db_select_post_minimal($board['uri'], $id);
+ if ($post === false) {
+ if ($config['syslog']) {
+ _syslog(LOG_INFO, "Failed to report non-existing post #{$id} in {$board['dir']}");
+ }
+ error($config['error']['nopost']);
+ }
- $error = event('report', array('ip' => $_SERVER['REMOTE_ADDR'], 'board' => $board['uri'], 'post' => $post, 'reason' => $reason, 'link' => link_for($thread)));
+ $error = event('report', [
+ 'ip' => $_SERVER['REMOTE_ADDR'],
+ 'board' => $board['uri'],
+ 'post' => $post,
+ 'reason' => $reason,
+ 'link' => link_for($post)
+ ]);
if ($error) {
error($error);
}
@@ -548,7 +560,7 @@ function handle_report()
_syslog(
LOG_INFO,
'Reported post: ' .
- '/' . $board['dir'] . $config['dir']['res'] . link_for($thread) . ($thread['thread'] ? '#' . $id : '') .
+ '/' . $board['dir'] . $config['dir']['res'] . link_for($post) . ($post['thread'] ? '#' . $id : '') .
' for "' . $reason . '"'
);
@@ -579,20 +591,20 @@ function handle_report()
return $result;
}
- $postcontent = mb_substr($thread['body_nomarkup'], 0, 120) . '... _*(POST TRIMMED)*_';
- $slackmessage = '<' . $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ($thread['thread'] ? $thread['thread'] : $id) . ".html" . ($thread['thread'] ? '#' . $id : '') . '> \n ' . $reason . '\n ' . $postcontent . '\n';
+ $postcontent = mb_substr($post['body_nomarkup'], 0, 120) . '... _*(POST TRIMMED)*_';
+ $slackmessage = '<' . $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ($post['thread'] ? $post['thread'] : $id) . ".html" . ($post['thread'] ? '#' . $id : '') . '> \n ' . $reason . '\n ' . $postcontent . '\n';
$slackresult = slack($slackmessage, $config['slack_channel']);
}
if (isset($config['matrix'])) {
- $reported_post_url = $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ($thread['thread'] ? $thread['thread'] : $id) . ".html";
+ $reported_post_url = $config['domain'] . "/mod.php?/" . $board['dir'] . $config['dir']['res'] . ($post['thread'] ? $post['thread'] : $id) . ".html";
$post_url = $config['matrix']['host'] . "/_matrix/client/r0/rooms/" . $config['matrix']['room_id'] . "/send/m.room.message?access_token=" . $config['matrix']['access_token'];
- $trimmed_post = strlen($thread['body_nomarkup']) > $config['matrix']['max_message_length'] ? ' [...]' : '';
- $postcontent = mb_substr($thread['body_nomarkup'], 0, $config['matrix']['max_message_length']) . $trimmed_post;
- $matrix_message = $reported_post_url . ($thread['thread'] ? '#' . $id : '') . " \nReason:\n" . $reason . " \nPost:\n" . $postcontent . " \n";
+ $trimmed_post = strlen($post['body_nomarkup']) > $config['matrix']['max_message_length'] ? ' [...]' : '';
+ $postcontent = mb_substr($post['body_nomarkup'], 0, $config['matrix']['max_message_length']) . $trimmed_post;
+ $matrix_message = $reported_post_url . ($post['thread'] ? '#' . $id : '') . " \nReason:\n" . $reason . " \nPost:\n" . $postcontent . " \n";
$post_data = json_encode(
array(
"msgtype" => "m.text",
@@ -1147,7 +1159,7 @@ function handle_post()
if (!$size = @getimagesize($file['tmp_name'])) {
error($config['error']['invalidimg']);
}
- if (!in_array($size[2], array(IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_BMP))) {
+ if (!in_array($size[2], [IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_WEBP, IMAGETYPE_JPEG, IMAGETYPE_BMP])) {
error($config['error']['invalidimg']);
}
if ($size[0] > $config['max_width'] || $size[1] > $config['max_height']) {
@@ -1240,10 +1252,10 @@ function handle_post()
$thumb->_destroy();
}
- if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg'))) {
+ if ($config['redraw_image'] || (!@$file['exif_stripped'] && $config['strip_exif'] && ($file['extension'] == 'jpg' || $file['extension'] == 'jpeg' || $file['extension'] == 'webp' || $file['extension'] == 'png'))) {
if (!$config['redraw_image'] && $config['use_exiftool']) {
if (
- $error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= ' .
+ $error = shell_exec_error('exiftool -overwrite_original -ignoreMinorErrors -q -q -all= -Orientation ' .
escapeshellarg($file['tmp_name']))
) {
error(_('Could not strip EXIF metadata!'), null, $error);
diff --git a/site.conf b/site.conf
deleted file mode 100644
index 80bc50fb..00000000
--- a/site.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-server {
- index index.php index.html;
- error_log /var/log/nginx/error.log;
- access_log /var/log/nginx/access.log;
- root /code;
-
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_pass php:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param PATH_INFO $fastcgi_path_info;
- }
-}
\ No newline at end of file
diff --git a/static/banned.jpg b/static/banned.jpg
new file mode 100644
index 00000000..7c9affc6
Binary files /dev/null and b/static/banned.jpg differ
diff --git a/banners/1608992480627.webp b/static/banners/1608992480627.webp
similarity index 100%
rename from banners/1608992480627.webp
rename to static/banners/1608992480627.webp
diff --git a/banners/1608992511794.webp b/static/banners/1608992511794.webp
similarity index 100%
rename from banners/1608992511794.webp
rename to static/banners/1608992511794.webp
diff --git a/banners/1608992524118.webp b/static/banners/1608992524118.webp
similarity index 100%
rename from banners/1608992524118.webp
rename to static/banners/1608992524118.webp
diff --git a/banners/1608992551600.webp b/static/banners/1608992551600.webp
similarity index 100%
rename from banners/1608992551600.webp
rename to static/banners/1608992551600.webp
diff --git a/banners/1608992576348.webp b/static/banners/1608992576348.webp
similarity index 100%
rename from banners/1608992576348.webp
rename to static/banners/1608992576348.webp
diff --git a/banners/1608992589414.webp b/static/banners/1608992589414.webp
similarity index 100%
rename from banners/1608992589414.webp
rename to static/banners/1608992589414.webp
diff --git a/banners/1608992682734.webp b/static/banners/1608992682734.webp
similarity index 100%
rename from banners/1608992682734.webp
rename to static/banners/1608992682734.webp
diff --git a/banners/1608993276367.webp b/static/banners/1608993276367.webp
similarity index 100%
rename from banners/1608993276367.webp
rename to static/banners/1608993276367.webp
diff --git a/banners/1608996011049.webp b/static/banners/1608996011049.webp
similarity index 100%
rename from banners/1608996011049.webp
rename to static/banners/1608996011049.webp
diff --git a/banners/1609004437891.webp b/static/banners/1609004437891.webp
similarity index 100%
rename from banners/1609004437891.webp
rename to static/banners/1609004437891.webp
diff --git a/banners/1609004460965.webp b/static/banners/1609004460965.webp
similarity index 100%
rename from banners/1609004460965.webp
rename to static/banners/1609004460965.webp
diff --git a/banners/1609010983068.gif b/static/banners/1609010983068.gif
similarity index 100%
rename from banners/1609010983068.gif
rename to static/banners/1609010983068.gif
diff --git a/banners/1610174020766-0.webp b/static/banners/1610174020766-0.webp
similarity index 100%
rename from banners/1610174020766-0.webp
rename to static/banners/1610174020766-0.webp
diff --git a/banners/1610174020766-1.webp b/static/banners/1610174020766-1.webp
similarity index 100%
rename from banners/1610174020766-1.webp
rename to static/banners/1610174020766-1.webp
diff --git a/banners/1610174020766-2.webp b/static/banners/1610174020766-2.webp
similarity index 100%
rename from banners/1610174020766-2.webp
rename to static/banners/1610174020766-2.webp
diff --git a/banners/1610174020766-3.webp b/static/banners/1610174020766-3.webp
similarity index 100%
rename from banners/1610174020766-3.webp
rename to static/banners/1610174020766-3.webp
diff --git a/banners/1610174020766-4.webp b/static/banners/1610174020766-4.webp
similarity index 100%
rename from banners/1610174020766-4.webp
rename to static/banners/1610174020766-4.webp
diff --git a/banners/1610175053568.webp b/static/banners/1610175053568.webp
similarity index 100%
rename from banners/1610175053568.webp
rename to static/banners/1610175053568.webp
diff --git a/banners/1610178074936-0.webp b/static/banners/1610178074936-0.webp
similarity index 100%
rename from banners/1610178074936-0.webp
rename to static/banners/1610178074936-0.webp
diff --git a/banners/1610178074936-3.webp b/static/banners/1610178074936-3.webp
similarity index 100%
rename from banners/1610178074936-3.webp
rename to static/banners/1610178074936-3.webp
diff --git a/banners/1610178074936-4.webp b/static/banners/1610178074936-4.webp
similarity index 100%
rename from banners/1610178074936-4.webp
rename to static/banners/1610178074936-4.webp
diff --git a/banners/1610178136375.webp b/static/banners/1610178136375.webp
similarity index 100%
rename from banners/1610178136375.webp
rename to static/banners/1610178136375.webp
diff --git a/banners/1610178320956-0.webp b/static/banners/1610178320956-0.webp
similarity index 100%
rename from banners/1610178320956-0.webp
rename to static/banners/1610178320956-0.webp
diff --git a/banners/1610178320956-1.webp b/static/banners/1610178320956-1.webp
similarity index 100%
rename from banners/1610178320956-1.webp
rename to static/banners/1610178320956-1.webp
diff --git a/banners/1610310834005.webp b/static/banners/1610310834005.webp
similarity index 100%
rename from banners/1610310834005.webp
rename to static/banners/1610310834005.webp
diff --git a/banners/1610311198568.webp b/static/banners/1610311198568.webp
similarity index 100%
rename from banners/1610311198568.webp
rename to static/banners/1610311198568.webp
diff --git a/banners/1610328634611-0.webp b/static/banners/1610328634611-0.webp
similarity index 100%
rename from banners/1610328634611-0.webp
rename to static/banners/1610328634611-0.webp
diff --git a/banners/1610328634611-1.webp b/static/banners/1610328634611-1.webp
similarity index 100%
rename from banners/1610328634611-1.webp
rename to static/banners/1610328634611-1.webp
diff --git a/banners/1610350191135.webp b/static/banners/1610350191135.webp
similarity index 100%
rename from banners/1610350191135.webp
rename to static/banners/1610350191135.webp
diff --git a/banners/1610377334211.webp b/static/banners/1610377334211.webp
similarity index 100%
rename from banners/1610377334211.webp
rename to static/banners/1610377334211.webp
diff --git a/banners/1610377617354.webp b/static/banners/1610377617354.webp
similarity index 100%
rename from banners/1610377617354.webp
rename to static/banners/1610377617354.webp
diff --git a/banners/1610400597507.webp b/static/banners/1610400597507.webp
similarity index 100%
rename from banners/1610400597507.webp
rename to static/banners/1610400597507.webp
diff --git a/banners/1610403313252.webp b/static/banners/1610403313252.webp
similarity index 100%
rename from banners/1610403313252.webp
rename to static/banners/1610403313252.webp
diff --git a/banners/1610423146058.webp b/static/banners/1610423146058.webp
similarity index 100%
rename from banners/1610423146058.webp
rename to static/banners/1610423146058.webp
diff --git a/banners/1610506710736.webp b/static/banners/1610506710736.webp
similarity index 100%
rename from banners/1610506710736.webp
rename to static/banners/1610506710736.webp
diff --git a/banners/1610532935321.webp b/static/banners/1610532935321.webp
similarity index 100%
rename from banners/1610532935321.webp
rename to static/banners/1610532935321.webp
diff --git a/banners/1610562179096.webp b/static/banners/1610562179096.webp
similarity index 100%
rename from banners/1610562179096.webp
rename to static/banners/1610562179096.webp
diff --git a/banners/1610570911383.webp b/static/banners/1610570911383.webp
similarity index 100%
rename from banners/1610570911383.webp
rename to static/banners/1610570911383.webp
diff --git a/banners/1610758629078-1.webp b/static/banners/1610758629078-1.webp
similarity index 100%
rename from banners/1610758629078-1.webp
rename to static/banners/1610758629078-1.webp
diff --git a/banners/1610759876074.gif b/static/banners/1610759876074.gif
similarity index 100%
rename from banners/1610759876074.gif
rename to static/banners/1610759876074.gif
diff --git a/banners/1610971781494.webp b/static/banners/1610971781494.webp
similarity index 100%
rename from banners/1610971781494.webp
rename to static/banners/1610971781494.webp
diff --git a/banners/1610975954706.webp b/static/banners/1610975954706.webp
similarity index 100%
rename from banners/1610975954706.webp
rename to static/banners/1610975954706.webp
diff --git a/banners/1610977708450.webp b/static/banners/1610977708450.webp
similarity index 100%
rename from banners/1610977708450.webp
rename to static/banners/1610977708450.webp
diff --git a/banners/1610998964025.jpeg b/static/banners/1610998964025.jpeg
similarity index 100%
rename from banners/1610998964025.jpeg
rename to static/banners/1610998964025.jpeg
diff --git a/banners/1610998964025.webp b/static/banners/1610998964025.webp
similarity index 100%
rename from banners/1610998964025.webp
rename to static/banners/1610998964025.webp
diff --git a/banners/1611082496367.webp b/static/banners/1611082496367.webp
similarity index 100%
rename from banners/1611082496367.webp
rename to static/banners/1611082496367.webp
diff --git a/banners/1611088031974.webp b/static/banners/1611088031974.webp
similarity index 100%
rename from banners/1611088031974.webp
rename to static/banners/1611088031974.webp
diff --git a/banners/1611223873258.gif b/static/banners/1611223873258.gif
similarity index 100%
rename from banners/1611223873258.gif
rename to static/banners/1611223873258.gif
diff --git a/banners/1611337091375.webp b/static/banners/1611337091375.webp
similarity index 100%
rename from banners/1611337091375.webp
rename to static/banners/1611337091375.webp
diff --git a/banners/1611337749739.webp b/static/banners/1611337749739.webp
similarity index 100%
rename from banners/1611337749739.webp
rename to static/banners/1611337749739.webp
diff --git a/banners/1611338455652.webp b/static/banners/1611338455652.webp
similarity index 100%
rename from banners/1611338455652.webp
rename to static/banners/1611338455652.webp
diff --git a/banners/1613099853307.webp b/static/banners/1613099853307.webp
similarity index 100%
rename from banners/1613099853307.webp
rename to static/banners/1613099853307.webp
diff --git a/banners/1613099947568.webp b/static/banners/1613099947568.webp
similarity index 100%
rename from banners/1613099947568.webp
rename to static/banners/1613099947568.webp
diff --git a/banners/1613100022707.webp b/static/banners/1613100022707.webp
similarity index 100%
rename from banners/1613100022707.webp
rename to static/banners/1613100022707.webp
diff --git a/banners/1613100084652.webp b/static/banners/1613100084652.webp
similarity index 100%
rename from banners/1613100084652.webp
rename to static/banners/1613100084652.webp
diff --git a/banners/1613100158681.webp b/static/banners/1613100158681.webp
similarity index 100%
rename from banners/1613100158681.webp
rename to static/banners/1613100158681.webp
diff --git a/banners/1613153123060.webp b/static/banners/1613153123060.webp
similarity index 100%
rename from banners/1613153123060.webp
rename to static/banners/1613153123060.webp
diff --git a/banners/1613173074089.gif b/static/banners/1613173074089.gif
similarity index 100%
rename from banners/1613173074089.gif
rename to static/banners/1613173074089.gif
diff --git a/banners/1613187031184.gif b/static/banners/1613187031184.gif
similarity index 100%
rename from banners/1613187031184.gif
rename to static/banners/1613187031184.gif
diff --git a/banners/1613265848816-0.webp b/static/banners/1613265848816-0.webp
similarity index 100%
rename from banners/1613265848816-0.webp
rename to static/banners/1613265848816-0.webp
diff --git a/banners/1613265848816-1.webp b/static/banners/1613265848816-1.webp
similarity index 100%
rename from banners/1613265848816-1.webp
rename to static/banners/1613265848816-1.webp
diff --git a/banners/1613265848816-2.webp b/static/banners/1613265848816-2.webp
similarity index 100%
rename from banners/1613265848816-2.webp
rename to static/banners/1613265848816-2.webp
diff --git a/banners/1613265931396-0.webp b/static/banners/1613265931396-0.webp
similarity index 100%
rename from banners/1613265931396-0.webp
rename to static/banners/1613265931396-0.webp
diff --git a/banners/1613265931396-1.webp b/static/banners/1613265931396-1.webp
similarity index 100%
rename from banners/1613265931396-1.webp
rename to static/banners/1613265931396-1.webp
diff --git a/banners/1613267545568.webp b/static/banners/1613267545568.webp
similarity index 100%
rename from banners/1613267545568.webp
rename to static/banners/1613267545568.webp
diff --git a/banners/1613501994415.webp b/static/banners/1613501994415.webp
similarity index 100%
rename from banners/1613501994415.webp
rename to static/banners/1613501994415.webp
diff --git a/banners/1613502208401.webp b/static/banners/1613502208401.webp
similarity index 100%
rename from banners/1613502208401.webp
rename to static/banners/1613502208401.webp
diff --git a/banners/1613653224536.webp b/static/banners/1613653224536.webp
similarity index 100%
rename from banners/1613653224536.webp
rename to static/banners/1613653224536.webp
diff --git a/banners/1613668042189.gif b/static/banners/1613668042189.gif
similarity index 100%
rename from banners/1613668042189.gif
rename to static/banners/1613668042189.gif
diff --git a/banners/1613699469879.gif b/static/banners/1613699469879.gif
similarity index 100%
rename from banners/1613699469879.gif
rename to static/banners/1613699469879.gif
diff --git a/banners/1614115920095-0.webp b/static/banners/1614115920095-0.webp
similarity index 100%
rename from banners/1614115920095-0.webp
rename to static/banners/1614115920095-0.webp
diff --git a/banners/1614115920095-1.gif b/static/banners/1614115920095-1.gif
similarity index 100%
rename from banners/1614115920095-1.gif
rename to static/banners/1614115920095-1.gif
diff --git a/banners/1614115920095-2.webp b/static/banners/1614115920095-2.webp
similarity index 100%
rename from banners/1614115920095-2.webp
rename to static/banners/1614115920095-2.webp
diff --git a/banners/1614170887091.webp b/static/banners/1614170887091.webp
similarity index 100%
rename from banners/1614170887091.webp
rename to static/banners/1614170887091.webp
diff --git a/banners/1614207368332.gif b/static/banners/1614207368332.gif
similarity index 100%
rename from banners/1614207368332.gif
rename to static/banners/1614207368332.gif
diff --git a/banners/1614528500405-0.webp b/static/banners/1614528500405-0.webp
similarity index 100%
rename from banners/1614528500405-0.webp
rename to static/banners/1614528500405-0.webp
diff --git a/banners/1614528500405-1.webp b/static/banners/1614528500405-1.webp
similarity index 100%
rename from banners/1614528500405-1.webp
rename to static/banners/1614528500405-1.webp
diff --git a/banners/1614528500405-2.webp b/static/banners/1614528500405-2.webp
similarity index 100%
rename from banners/1614528500405-2.webp
rename to static/banners/1614528500405-2.webp
diff --git a/banners/1614528500405-3.webp b/static/banners/1614528500405-3.webp
similarity index 100%
rename from banners/1614528500405-3.webp
rename to static/banners/1614528500405-3.webp
diff --git a/banners/1614528500405-4.webp b/static/banners/1614528500405-4.webp
similarity index 100%
rename from banners/1614528500405-4.webp
rename to static/banners/1614528500405-4.webp
diff --git a/banners/1614528532096-0.webp b/static/banners/1614528532096-0.webp
similarity index 100%
rename from banners/1614528532096-0.webp
rename to static/banners/1614528532096-0.webp
diff --git a/banners/1614528532096-1.webp b/static/banners/1614528532096-1.webp
similarity index 100%
rename from banners/1614528532096-1.webp
rename to static/banners/1614528532096-1.webp
diff --git a/banners/1614528532096-2.webp b/static/banners/1614528532096-2.webp
similarity index 100%
rename from banners/1614528532096-2.webp
rename to static/banners/1614528532096-2.webp
diff --git a/banners/1614528532096-3.webp b/static/banners/1614528532096-3.webp
similarity index 100%
rename from banners/1614528532096-3.webp
rename to static/banners/1614528532096-3.webp
diff --git a/banners/1614528532096-4.webp b/static/banners/1614528532096-4.webp
similarity index 100%
rename from banners/1614528532096-4.webp
rename to static/banners/1614528532096-4.webp
diff --git a/banners/1614528597664-0.webp b/static/banners/1614528597664-0.webp
similarity index 100%
rename from banners/1614528597664-0.webp
rename to static/banners/1614528597664-0.webp
diff --git a/banners/1614528597664-1.webp b/static/banners/1614528597664-1.webp
similarity index 100%
rename from banners/1614528597664-1.webp
rename to static/banners/1614528597664-1.webp
diff --git a/banners/1614528597664-2.webp b/static/banners/1614528597664-2.webp
similarity index 100%
rename from banners/1614528597664-2.webp
rename to static/banners/1614528597664-2.webp
diff --git a/banners/1614528597664-3.webp b/static/banners/1614528597664-3.webp
similarity index 100%
rename from banners/1614528597664-3.webp
rename to static/banners/1614528597664-3.webp
diff --git a/banners/1614528597664-4.webp b/static/banners/1614528597664-4.webp
similarity index 100%
rename from banners/1614528597664-4.webp
rename to static/banners/1614528597664-4.webp
diff --git a/banners/1614528661078-0.webp b/static/banners/1614528661078-0.webp
similarity index 100%
rename from banners/1614528661078-0.webp
rename to static/banners/1614528661078-0.webp
diff --git a/banners/1614528661078-1.webp b/static/banners/1614528661078-1.webp
similarity index 100%
rename from banners/1614528661078-1.webp
rename to static/banners/1614528661078-1.webp
diff --git a/banners/1614528661078-2.webp b/static/banners/1614528661078-2.webp
similarity index 100%
rename from banners/1614528661078-2.webp
rename to static/banners/1614528661078-2.webp
diff --git a/banners/1614528661078-3.webp b/static/banners/1614528661078-3.webp
similarity index 100%
rename from banners/1614528661078-3.webp
rename to static/banners/1614528661078-3.webp
diff --git a/banners/1614528661078-4.webp b/static/banners/1614528661078-4.webp
similarity index 100%
rename from banners/1614528661078-4.webp
rename to static/banners/1614528661078-4.webp
diff --git a/banners/1614528736159-0.webp b/static/banners/1614528736159-0.webp
similarity index 100%
rename from banners/1614528736159-0.webp
rename to static/banners/1614528736159-0.webp
diff --git a/banners/1614528736159-1.webp b/static/banners/1614528736159-1.webp
similarity index 100%
rename from banners/1614528736159-1.webp
rename to static/banners/1614528736159-1.webp
diff --git a/banners/1614528736159-2.webp b/static/banners/1614528736159-2.webp
similarity index 100%
rename from banners/1614528736159-2.webp
rename to static/banners/1614528736159-2.webp
diff --git a/banners/1614528736159-3.webp b/static/banners/1614528736159-3.webp
similarity index 100%
rename from banners/1614528736159-3.webp
rename to static/banners/1614528736159-3.webp
diff --git a/banners/1614528736159-4.webp b/static/banners/1614528736159-4.webp
similarity index 100%
rename from banners/1614528736159-4.webp
rename to static/banners/1614528736159-4.webp
diff --git a/banners/1614528799131-0.webp b/static/banners/1614528799131-0.webp
similarity index 100%
rename from banners/1614528799131-0.webp
rename to static/banners/1614528799131-0.webp
diff --git a/banners/1614528799131-1.webp b/static/banners/1614528799131-1.webp
similarity index 100%
rename from banners/1614528799131-1.webp
rename to static/banners/1614528799131-1.webp
diff --git a/banners/1614528799131-2.webp b/static/banners/1614528799131-2.webp
similarity index 100%
rename from banners/1614528799131-2.webp
rename to static/banners/1614528799131-2.webp
diff --git a/banners/1614528799131-3.webp b/static/banners/1614528799131-3.webp
similarity index 100%
rename from banners/1614528799131-3.webp
rename to static/banners/1614528799131-3.webp
diff --git a/banners/1614528799131-4.webp b/static/banners/1614528799131-4.webp
similarity index 100%
rename from banners/1614528799131-4.webp
rename to static/banners/1614528799131-4.webp
diff --git a/banners/1614528864720-0.webp b/static/banners/1614528864720-0.webp
similarity index 100%
rename from banners/1614528864720-0.webp
rename to static/banners/1614528864720-0.webp
diff --git a/banners/1614528864720-1.webp b/static/banners/1614528864720-1.webp
similarity index 100%
rename from banners/1614528864720-1.webp
rename to static/banners/1614528864720-1.webp
diff --git a/banners/1614528864720-2.webp b/static/banners/1614528864720-2.webp
similarity index 100%
rename from banners/1614528864720-2.webp
rename to static/banners/1614528864720-2.webp
diff --git a/banners/1614528864720-3.webp b/static/banners/1614528864720-3.webp
similarity index 100%
rename from banners/1614528864720-3.webp
rename to static/banners/1614528864720-3.webp
diff --git a/banners/1614528864720-4.webp b/static/banners/1614528864720-4.webp
similarity index 100%
rename from banners/1614528864720-4.webp
rename to static/banners/1614528864720-4.webp
diff --git a/banners/1614528929883-0.webp b/static/banners/1614528929883-0.webp
similarity index 100%
rename from banners/1614528929883-0.webp
rename to static/banners/1614528929883-0.webp
diff --git a/banners/1614528929883-1.webp b/static/banners/1614528929883-1.webp
similarity index 100%
rename from banners/1614528929883-1.webp
rename to static/banners/1614528929883-1.webp
diff --git a/banners/1614528929883-2.webp b/static/banners/1614528929883-2.webp
similarity index 100%
rename from banners/1614528929883-2.webp
rename to static/banners/1614528929883-2.webp
diff --git a/banners/1614528991634-0.webp b/static/banners/1614528991634-0.webp
similarity index 100%
rename from banners/1614528991634-0.webp
rename to static/banners/1614528991634-0.webp
diff --git a/banners/1614528991634-1.webp b/static/banners/1614528991634-1.webp
similarity index 100%
rename from banners/1614528991634-1.webp
rename to static/banners/1614528991634-1.webp
diff --git a/banners/1614528991634-2.webp b/static/banners/1614528991634-2.webp
similarity index 100%
rename from banners/1614528991634-2.webp
rename to static/banners/1614528991634-2.webp
diff --git a/banners/1614538308178-0.webp b/static/banners/1614538308178-0.webp
similarity index 100%
rename from banners/1614538308178-0.webp
rename to static/banners/1614538308178-0.webp
diff --git a/banners/1614538308178-1.webp b/static/banners/1614538308178-1.webp
similarity index 100%
rename from banners/1614538308178-1.webp
rename to static/banners/1614538308178-1.webp
diff --git a/banners/1614538308178-2.webp b/static/banners/1614538308178-2.webp
similarity index 100%
rename from banners/1614538308178-2.webp
rename to static/banners/1614538308178-2.webp
diff --git a/banners/1614646549712.webp b/static/banners/1614646549712.webp
similarity index 100%
rename from banners/1614646549712.webp
rename to static/banners/1614646549712.webp
diff --git a/banners/1614709628373.webp b/static/banners/1614709628373.webp
similarity index 100%
rename from banners/1614709628373.webp
rename to static/banners/1614709628373.webp
diff --git a/banners/1614888222585.webp b/static/banners/1614888222585.webp
similarity index 100%
rename from banners/1614888222585.webp
rename to static/banners/1614888222585.webp
diff --git a/banners/1614915441925.webp b/static/banners/1614915441925.webp
similarity index 100%
rename from banners/1614915441925.webp
rename to static/banners/1614915441925.webp
diff --git a/banners/1614965893494.webp b/static/banners/1614965893494.webp
similarity index 100%
rename from banners/1614965893494.webp
rename to static/banners/1614965893494.webp
diff --git a/banners/1615690739640.webp b/static/banners/1615690739640.webp
similarity index 100%
rename from banners/1615690739640.webp
rename to static/banners/1615690739640.webp
diff --git a/banners/1615964192028.webp b/static/banners/1615964192028.webp
similarity index 100%
rename from banners/1615964192028.webp
rename to static/banners/1615964192028.webp
diff --git a/banners/1616154091282-0.webp b/static/banners/1616154091282-0.webp
similarity index 100%
rename from banners/1616154091282-0.webp
rename to static/banners/1616154091282-0.webp
diff --git a/banners/1616154091282-1.webp b/static/banners/1616154091282-1.webp
similarity index 100%
rename from banners/1616154091282-1.webp
rename to static/banners/1616154091282-1.webp
diff --git a/banners/1616154091282-2.webp b/static/banners/1616154091282-2.webp
similarity index 100%
rename from banners/1616154091282-2.webp
rename to static/banners/1616154091282-2.webp
diff --git a/banners/1616638816360-0.webp b/static/banners/1616638816360-0.webp
similarity index 100%
rename from banners/1616638816360-0.webp
rename to static/banners/1616638816360-0.webp
diff --git a/banners/1616638816360-1.webp b/static/banners/1616638816360-1.webp
similarity index 100%
rename from banners/1616638816360-1.webp
rename to static/banners/1616638816360-1.webp
diff --git a/banners/1616705372282.webp b/static/banners/1616705372282.webp
similarity index 100%
rename from banners/1616705372282.webp
rename to static/banners/1616705372282.webp
diff --git a/banners/1616812809191.webp b/static/banners/1616812809191.webp
similarity index 100%
rename from banners/1616812809191.webp
rename to static/banners/1616812809191.webp
diff --git a/banners/1617121943734.webp b/static/banners/1617121943734.webp
similarity index 100%
rename from banners/1617121943734.webp
rename to static/banners/1617121943734.webp
diff --git a/banners/1617786807721-0.webp b/static/banners/1617786807721-0.webp
similarity index 100%
rename from banners/1617786807721-0.webp
rename to static/banners/1617786807721-0.webp
diff --git a/banners/1617786807721-1.webp b/static/banners/1617786807721-1.webp
similarity index 100%
rename from banners/1617786807721-1.webp
rename to static/banners/1617786807721-1.webp
diff --git a/banners/1618154376944.webp b/static/banners/1618154376944.webp
similarity index 100%
rename from banners/1618154376944.webp
rename to static/banners/1618154376944.webp
diff --git a/banners/1619185144464.webp b/static/banners/1619185144464.webp
similarity index 100%
rename from banners/1619185144464.webp
rename to static/banners/1619185144464.webp
diff --git a/banners/1619720957833-0.gif b/static/banners/1619720957833-0.gif
similarity index 100%
rename from banners/1619720957833-0.gif
rename to static/banners/1619720957833-0.gif
diff --git a/banners/1619720957833-2.webp b/static/banners/1619720957833-2.webp
similarity index 100%
rename from banners/1619720957833-2.webp
rename to static/banners/1619720957833-2.webp
diff --git a/banners/1619720957833-3.webp b/static/banners/1619720957833-3.webp
similarity index 100%
rename from banners/1619720957833-3.webp
rename to static/banners/1619720957833-3.webp
diff --git a/banners/1619720957833-4.webp b/static/banners/1619720957833-4.webp
similarity index 100%
rename from banners/1619720957833-4.webp
rename to static/banners/1619720957833-4.webp
diff --git a/banners/1619721025886-0.webp b/static/banners/1619721025886-0.webp
similarity index 100%
rename from banners/1619721025886-0.webp
rename to static/banners/1619721025886-0.webp
diff --git a/banners/1619721025886-1.webp b/static/banners/1619721025886-1.webp
similarity index 100%
rename from banners/1619721025886-1.webp
rename to static/banners/1619721025886-1.webp
diff --git a/banners/1619721025886-2.webp b/static/banners/1619721025886-2.webp
similarity index 100%
rename from banners/1619721025886-2.webp
rename to static/banners/1619721025886-2.webp
diff --git a/banners/1619721025886-3.webp b/static/banners/1619721025886-3.webp
similarity index 100%
rename from banners/1619721025886-3.webp
rename to static/banners/1619721025886-3.webp
diff --git a/banners/1619721090661-0.webp b/static/banners/1619721090661-0.webp
similarity index 100%
rename from banners/1619721090661-0.webp
rename to static/banners/1619721090661-0.webp
diff --git a/banners/1619721090661-1.webp b/static/banners/1619721090661-1.webp
similarity index 100%
rename from banners/1619721090661-1.webp
rename to static/banners/1619721090661-1.webp
diff --git a/banners/1619728132154.webp b/static/banners/1619728132154.webp
similarity index 100%
rename from banners/1619728132154.webp
rename to static/banners/1619728132154.webp
diff --git a/banners/1619871870401.webp b/static/banners/1619871870401.webp
similarity index 100%
rename from banners/1619871870401.webp
rename to static/banners/1619871870401.webp
diff --git a/banners/1619899355422-0.webp b/static/banners/1619899355422-0.webp
similarity index 100%
rename from banners/1619899355422-0.webp
rename to static/banners/1619899355422-0.webp
diff --git a/banners/1619974919184.webp b/static/banners/1619974919184.webp
similarity index 100%
rename from banners/1619974919184.webp
rename to static/banners/1619974919184.webp
diff --git a/banners/1620785782713.webp b/static/banners/1620785782713.webp
similarity index 100%
rename from banners/1620785782713.webp
rename to static/banners/1620785782713.webp
diff --git a/banners/1621202782123-0.webp b/static/banners/1621202782123-0.webp
similarity index 100%
rename from banners/1621202782123-0.webp
rename to static/banners/1621202782123-0.webp
diff --git a/banners/1621202782123-1.webp b/static/banners/1621202782123-1.webp
similarity index 100%
rename from banners/1621202782123-1.webp
rename to static/banners/1621202782123-1.webp
diff --git a/banners/1621544376335.webp b/static/banners/1621544376335.webp
similarity index 100%
rename from banners/1621544376335.webp
rename to static/banners/1621544376335.webp
diff --git a/banners/1622026910600.webp b/static/banners/1622026910600.webp
similarity index 100%
rename from banners/1622026910600.webp
rename to static/banners/1622026910600.webp
diff --git a/banners/1622028894741.webp b/static/banners/1622028894741.webp
similarity index 100%
rename from banners/1622028894741.webp
rename to static/banners/1622028894741.webp
diff --git a/banners/1622029078326.webp b/static/banners/1622029078326.webp
similarity index 100%
rename from banners/1622029078326.webp
rename to static/banners/1622029078326.webp
diff --git a/banners/1622030808653-0.webp b/static/banners/1622030808653-0.webp
similarity index 100%
rename from banners/1622030808653-0.webp
rename to static/banners/1622030808653-0.webp
diff --git a/banners/1622030808653-1.webp b/static/banners/1622030808653-1.webp
similarity index 100%
rename from banners/1622030808653-1.webp
rename to static/banners/1622030808653-1.webp
diff --git a/banners/1622030808653-2.webp b/static/banners/1622030808653-2.webp
similarity index 100%
rename from banners/1622030808653-2.webp
rename to static/banners/1622030808653-2.webp
diff --git a/banners/1622030808653-3.webp b/static/banners/1622030808653-3.webp
similarity index 100%
rename from banners/1622030808653-3.webp
rename to static/banners/1622030808653-3.webp
diff --git a/banners/1622201701504.webp b/static/banners/1622201701504.webp
similarity index 100%
rename from banners/1622201701504.webp
rename to static/banners/1622201701504.webp
diff --git a/banners/1622431309616.gif b/static/banners/1622431309616.gif
similarity index 100%
rename from banners/1622431309616.gif
rename to static/banners/1622431309616.gif
diff --git a/banners/1623177594945.webp b/static/banners/1623177594945.webp
similarity index 100%
rename from banners/1623177594945.webp
rename to static/banners/1623177594945.webp
diff --git a/banners/1626682168875-0.webp b/static/banners/1626682168875-0.webp
similarity index 100%
rename from banners/1626682168875-0.webp
rename to static/banners/1626682168875-0.webp
diff --git a/banners/1626682168875-2.webp b/static/banners/1626682168875-2.webp
similarity index 100%
rename from banners/1626682168875-2.webp
rename to static/banners/1626682168875-2.webp
diff --git a/banners/1626682407536-1.webp b/static/banners/1626682407536-1.webp
similarity index 100%
rename from banners/1626682407536-1.webp
rename to static/banners/1626682407536-1.webp
diff --git a/banners/1626682407536-2.webp b/static/banners/1626682407536-2.webp
similarity index 100%
rename from banners/1626682407536-2.webp
rename to static/banners/1626682407536-2.webp
diff --git a/banners/1626682407536-3.webp b/static/banners/1626682407536-3.webp
similarity index 100%
rename from banners/1626682407536-3.webp
rename to static/banners/1626682407536-3.webp
diff --git a/banners/1626684938065-1.webp b/static/banners/1626684938065-1.webp
similarity index 100%
rename from banners/1626684938065-1.webp
rename to static/banners/1626684938065-1.webp
diff --git a/banners/1626684938065-2.webp b/static/banners/1626684938065-2.webp
similarity index 100%
rename from banners/1626684938065-2.webp
rename to static/banners/1626684938065-2.webp
diff --git a/banners/1627148695765-1.webp b/static/banners/1627148695765-1.webp
similarity index 100%
rename from banners/1627148695765-1.webp
rename to static/banners/1627148695765-1.webp
diff --git a/banners/1639006516292.webp b/static/banners/1639006516292.webp
similarity index 100%
rename from banners/1639006516292.webp
rename to static/banners/1639006516292.webp
diff --git a/banners/flagsroom2.webp b/static/banners/flagsroom2.webp
similarity index 100%
rename from banners/flagsroom2.webp
rename to static/banners/flagsroom2.webp
diff --git a/banners/minecraft.webp b/static/banners/minecraft.webp
similarity index 100%
rename from banners/minecraft.webp
rename to static/banners/minecraft.webp
diff --git a/banners/pencilbanner.webp b/static/banners/pencilbanner.webp
similarity index 100%
rename from banners/pencilbanner.webp
rename to static/banners/pencilbanner.webp
diff --git a/banners/saboteurs.webp b/static/banners/saboteurs.webp
similarity index 100%
rename from banners/saboteurs.webp
rename to static/banners/saboteurs.webp
diff --git a/static/banners/united-front.webp b/static/banners/united-front.webp
new file mode 100644
index 00000000..0e57c297
Binary files /dev/null and b/static/banners/united-front.webp differ
diff --git a/templates/banned.html b/templates/banned.html
index 3d0b333f..ecfb361c 100644
--- a/templates/banned.html
+++ b/templates/banned.html
@@ -1,7 +1,8 @@
{% filter remove_whitespace %}
{# Automatically removes unnecessary whitespace #}
-
+
+
{% if ban.expires and time() >= ban.expires %}
{% trans %}You were banned! ;_;{% endtrans %}
{% else %}
@@ -30,8 +31,8 @@
{% endif %}
- {% trans %}Your ban was filed on{% endtrans %}
- {{ ban.created|date(config.ban_date) }}
+ {% trans %}Your ban was filed on{% endtrans %}
+ {{ ban.created|date(config.ban_date) }}
{% if config.show_modname %}
{% if ban.username %}
{% trans %}by{% endtrans %} {{ ban.username }}
@@ -39,14 +40,12 @@
{% trans %}by{% endtrans %} 'system'
{% endif %}
{% endif %}
- {% trans %}and{% endtrans %}
+ {% trans %}and{% endtrans %}
{% if ban.expires and time() >= ban.expires %}
{% trans %} has since expired. Refresh the page to continue.{% endtrans %}
{% elseif ban.expires %}
- {% trans %}expires{% endtrans %} {{ ban.expires|until }} {% trans %}from now, which is on{% endtrans %}
-
- {{ ban.expires|date(config.ban_date) }}
-
+ {% trans %}expires{% endtrans %} {{ ban.expires|until }} {% trans %}from now, which is on{% endtrans %}
+ {{ ban.expires|date(config.ban_date) }}
@@ -85,30 +84,31 @@
{% trans %}Your IP address is{% endtrans %} {{ ban.ip }}.
+ {% trans %}Your ban ID is{% endtrans %} {{ ban.id }}.
{% if config.ban_page_extra %}
{{ config.ban_page_extra }}
{% endif %}
-
+
{% if post and config.ban_show_post %}
{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:
{{ post }}
{% endif %}
-
+
{% if config.ban_appeals and (not ban.expires or ban.expires - ban.created > config.ban_appeals_min_length )%}
{% if pending_appeal %}
- {% trans %}You submitted an appeal for this ban on{% endtrans %}
+ {% trans %}You submitted an appeal for this ban on{% endtrans %}
{{ pending_appeal|date(config.ban_date) }}. {% trans %}It is still pending{% endtrans %}.
{% elseif denied_appeals|length >= config.ban_appeals_max %}
{% if denied_appeals|length == 1 %}
- {% trans %}You appealed this ban on{% endtrans %}
- {{ denied_appeals[0]|date(config.ban_date) }}
+ {% trans %}You appealed this ban on{% endtrans %}
+ {{ denied_appeals[0]|date(config.ban_date) }}
{% trans %}and it was denied. You may not appeal this ban again.{% endtrans %}
{% else %}
@@ -118,15 +118,15 @@
{% if denied_appeals|length %}
{% if denied_appeals|length == 1 %}
- {% trans %}You appealed this ban on{% endtrans %}
- {{ denied_appeals[0]|date(config.ban_date) }}
+ {% trans %}You appealed this ban on{% endtrans %}
+ {{ denied_appeals[0]|date(config.ban_date) }}
{% trans %}and it was denied.{% endtrans %}
{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}
{% else %}
- {% trans %}You last appealed this ban on{% endtrans %}
- {{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}
+ {% trans %}You last appealed this ban on{% endtrans %}
+ {{ denied_appeals[denied_appeals|length - 1]|date(config.ban_date) }}
{% trans %}and it was denied.{% endtrans %}
{% trans %}You may appeal this ban again. Please enter your reasoning below.{% endtrans %}
diff --git a/templates/index.html b/templates/index.html
index 52059a3c..696796df 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -31,10 +31,10 @@
{{ board.url }} - {{ board.title|e }}{% if page_num %} - Page {{ page_num }}{% endif %}
-