diff --git a/library/config.php b/library/config.php index 779260b74..009968ba6 100644 --- a/library/config.php +++ b/library/config.php @@ -559,12 +559,12 @@ $bb_cfg['attach'] = [ 'max_size' => 5 * 1024 * 1024, // максимальный размер файла в байтах ]; -$bb_cfg['tor_forums_allowed_ext'] = ['torrent', 'zip', 'rar']; // для разделов с раздачами -$bb_cfg['gen_forums_allowed_ext'] = ['zip', 'rar']; // для обычных разделов +$bb_cfg['tor_forums_allowed_ext'] = ['torrent', 'zip', 'rar']; // TODO: для разделов с раздачами +$bb_cfg['gen_forums_allowed_ext'] = ['zip', 'rar']; // TODO: для обычных разделов // Avatars $bb_cfg['avatars'] = [ - 'allowed_ext' => ['gif', 'jpg', 'jpeg', 'png'], // разрешенные форматы файлов + 'allowed_ext' => ['gif', 'jpg', 'jpeg', 'png', 'webp', 'bmp'], // разрешенные форматы файлов 'bot_avatar' => '/gallery/bot.gif', // аватара бота 'max_size' => 100 * 1024, // размер аватары в байтах 'max_height' => 100, // высота аватара в px @@ -577,7 +577,7 @@ $bb_cfg['avatars'] = [ // Group avatars $bb_cfg['group_avatars'] = [ - 'allowed_ext' => ['gif', 'jpg', 'jpeg', 'png'], // разрешенные форматы файлов + 'allowed_ext' => ['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 63a55ad93..727a23851 100644 --- a/modcp.php +++ b/modcp.php @@ -547,7 +547,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/src/Legacy/BBCode.php b/src/Legacy/BBCode.php index da4185ec4..ca9caa9f9 100644 --- a/src/Legacy/BBCode.php +++ b/src/Legacy/BBCode.php @@ -76,7 +76,7 @@ class BBCode private function init_replacements(): void { $tpl = $this->tpl; - $img_exp = '(https?:)?//[^\s\?&;=\#\"<>]+?\.(jpg|jpeg|gif|png)([a-z0-9/?&%;][^\[\]]*)?'; + $img_exp = '(https?:)?//[^\s\?&;=\#\"<>]+?\.(jpg|jpeg|gif|png|bmp)([a-z0-9/?&%;][^\[\]]*)?'; $email_exp = '[a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+'; $this->preg = [ diff --git a/styles/templates/posting_tpl.tpl b/styles/templates/posting_tpl.tpl index 5aba82b0d..18d4c71e7 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|bmp)$/i, + img_tag : /(https?:\/\/[^\s\?&;:=\#\"<>]+\.(jpg|jpeg|gif|png|bmp)(?!\[|\]|\.))/ig }, // построение сообщения на основе данных из формы