From e55f8f5ece26331e83d45f57612b83194de244d7 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Sat, 30 Sep 2023 19:14:15 +0700 Subject: [PATCH] Minor improvements (#280) --- library/config.php | 8 ++++---- modcp.php | 2 +- styles/templates/posting_tpl.tpl | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/library/config.php b/library/config.php index 375ce93e..ac99b25f 100644 --- a/library/config.php +++ b/library/config.php @@ -545,12 +545,12 @@ $bb_cfg['attach'] = array( 'max_size' => 5*1024*1024, // размер аватары в байтах ); -$bb_cfg['tor_forums_allowed_ext'] = array('torrent', 'zip', 'rar'); // для разделов с раздачами -$bb_cfg['gen_forums_allowed_ext'] = array('zip', 'rar'); // для обычных разделов +$bb_cfg['tor_forums_allowed_ext'] = array('torrent', 'zip', 'rar'); // TODO: для разделов с раздачами +$bb_cfg['gen_forums_allowed_ext'] = array('zip', 'rar'); // TODO: для обычных разделов // Avatars $bb_cfg['avatars'] = array( - 'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов + 'allowed_ext' => array('gif','jpg','jpeg','png','webp','bmp'), // разрешенные форматы файлов 'bot_avatar' => 'gallery/bot.gif', // аватара бота 'max_size' => 100*1024, // размер аватары в байтах 'max_height' => 100, // высота аватара в px @@ -562,7 +562,7 @@ $bb_cfg['avatars'] = array( // Group avatars $bb_cfg['group_avatars'] = array( - 'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов + 'allowed_ext' => array('gif','jpg','jpeg','png','webp','bmp'), // разрешенные форматы файлов 'max_size' => 300*1024, // размер аватары в байтах 'max_height' => 300, // высота аватара в px 'max_width' => 300, // ширина аватара в px diff --git a/modcp.php b/modcp.php index f35d3f9d..0cfa30f0 100644 --- a/modcp.php +++ b/modcp.php @@ -627,7 +627,7 @@ switch ($mode) $poster_id = $postrow[$i]['poster_id']; $poster = $postrow[$i]['username']; - $post_date = bb_date($postrow[$i]['post_time']); + $post_date = bb_date($postrow[$i]['post_time'], $bb_cfg['post_date_format']); $message = $postrow[$i]['post_text']; diff --git a/styles/templates/posting_tpl.tpl b/styles/templates/posting_tpl.tpl index 67eebc00..b9f6f3a9 100644 --- a/styles/templates/posting_tpl.tpl +++ b/styles/templates/posting_tpl.tpl @@ -374,8 +374,8 @@ var TPL = { reg: { num : /^\d+$/, URL : /^https?:\/\/[\w\#$%&~/.\-;:=?@\[\]+]+$/i, - img : /^https?:\/\/[^\s\?&;:=\#\"<>]+\.(jpg|jpeg|gif|png)$/i, - img_tag : /(https?:\/\/[^\s\?&;:=\#\"<>]+\.(jpg|jpeg|gif|png)(?!\[|\]|\.))/ig + img : /^https?:\/\/[^\s\?&;:=\#\"<>]+\.(jpg|jpeg|gif|png|webp|bmp)$/i, + img_tag : /(https?:\/\/[^\s\?&;:=\#\"<>]+\.(jpg|jpeg|gif|png|webp|bmp)(?!\[|\]|\.))/ig }, // построение сообщения на основе данных из формы