diff --git a/library/ajax/posts.php b/library/ajax/posts.php index 1c840bbd0..2e55eb265 100644 --- a/library/ajax/posts.php +++ b/library/ajax/posts.php @@ -94,7 +94,7 @@ switch ($this->request['type']) { if ($post['post_id'] == $post['topic_first_post_id']) { $message = "[quote]" . $post['topic_title'] . "[/quote]\r"; } - if (mb_strlen($message, 'UTF-8') > $bb_cfg['max_post_length']) { + if (mb_strlen($message, 'UTF-8') > 1000) { $this->response['redirect'] = make_url(POSTING_URL . '?mode=quote&p=' . $post_id); } @@ -121,7 +121,7 @@ switch ($this->request['type']) { if ($post['poster_id'] != $userdata['user_id'] && !$is_auth['auth_mod']) { $this->ajax_die($lang['EDIT_OWN_POSTS']); } - if ((mb_strlen($post['post_text'], 'UTF-8') > $bb_cfg['max_post_length']) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) { + if ((mb_strlen($post['post_text'], 'UTF-8') > 1000) || $post['post_attachment'] || ($post['topic_first_post_id'] == $post_id)) { $this->response['redirect'] = make_url(POSTING_URL . '?mode=editpost&p=' . $post_id); } elseif ($this->request['type'] == 'editor') { $text = (string)$this->request['text']; diff --git a/library/ajax/view_torrent.php b/library/ajax/view_torrent.php index cefa46dad..eb4ab4005 100644 --- a/library/ajax/view_torrent.php +++ b/library/ajax/view_torrent.php @@ -24,7 +24,7 @@ if (!$torrent) { } $filename = get_attachments_dir() . '/' . $torrent['physical_filename']; -if (file_exists($filename) && !$file_contents = file_get_contents($filename)) { +if (!file_exists($filename) || !$file_contents = file_get_contents($filename)) { if (IS_AM) { $this->ajax_die($lang['ERROR_NO_ATTACHMENT'] . "\n\n" . htmlCHR($filename)); } else { diff --git a/library/attach_mod/displaying_torrent.php b/library/attach_mod/displaying_torrent.php index 722498f5f..337d7b372 100644 --- a/library/attach_mod/displaying_torrent.php +++ b/library/attach_mod/displaying_torrent.php @@ -194,6 +194,7 @@ if ($tor_reged && $tor_info) { 'TRACKER_LINK' => $tracker_link, 'ATTACH_ID' => $attach_id, 'TOR_SILVER_GOLD' => $tor_type, + 'TOR_TYPE' => is_gold($tor_type), // torrent status mod 'TOR_FROZEN' => (!IS_AM) ? (isset($bb_cfg['tor_frozen'][$tor_info['tor_status']]) && !(isset($bb_cfg['tor_frozen_author_download'][$tor_info['tor_status']]) && $userdata['user_id'] == $tor_info['poster_id'])) ? true : '' : '', diff --git a/library/config.php b/library/config.php index 92f976adf..ad7a0fc8c 100644 --- a/library/config.php +++ b/library/config.php @@ -449,16 +449,16 @@ $bb_cfg['sf_on_first_page_only'] = true; $bb_cfg['allowed_topics_per_page'] = [50, 100, 150, 200, 250, 300]; // Topics -$bb_cfg['show_quick_reply'] = true; -$bb_cfg['show_rank_text'] = false; -$bb_cfg['show_rank_image'] = true; -$bb_cfg['show_poster_joined'] = true; -$bb_cfg['show_poster_posts'] = true; -$bb_cfg['show_poster_from'] = true; -$bb_cfg['show_bot_nick'] = false; +$bb_cfg['show_quick_reply'] = true; // показывать форму быстрого ответа +$bb_cfg['show_rank_text'] = false; // показывать название лычки в топиках +$bb_cfg['show_rank_image'] = true; // показывать картинку лычки в топиках +$bb_cfg['show_poster_joined'] = true; // показывать дату регистрации пользователя в топиках +$bb_cfg['show_poster_posts'] = true; // показывать количество постов пользователя в топиках +$bb_cfg['show_poster_from'] = true; // показывать страну пользователя +$bb_cfg['show_bot_nick'] = false; // показывать ник бота $bb_cfg['text_buttons'] = false; // replace EDIT, QUOTE... images with text links $bb_cfg['parse_ed2k_links'] = true; // make ed2k links clickable -$bb_cfg['post_date_format'] = 'd-M-Y H:i'; +$bb_cfg['post_date_format'] = 'd-M-Y H:i'; // формат даты публикации в топиках $bb_cfg['ext_link_new_win'] = true; // open external links in new window $bb_cfg['topic_moved_days_keep'] = 7; // remove topic moved links after xx days (or FALSE to disable) @@ -469,25 +469,27 @@ $bb_cfg['user_signature_end'] = ''; // Это позволит испол // Posts $bb_cfg['use_posts_cache'] = true; $bb_cfg['posts_cache_days_keep'] = 14; -$bb_cfg['max_post_length'] = 5000; $bb_cfg['use_ajax_posts'] = true; // Search $bb_cfg['search_engine_type'] = 'mysql'; // none, mysql, sphinx + $bb_cfg['sphinx_topic_titles_host'] = '127.0.0.1'; $bb_cfg['sphinx_topic_titles_port'] = 3312; $bb_cfg['sphinx_config_path'] = '../install/sphinx/sphinx.conf'; + $bb_cfg['disable_ft_search_in_posts'] = false; // disable searching in post bodies -$bb_cfg['disable_search_for_guest'] = true; +$bb_cfg['disable_search_for_guest'] = true; // отключить поиск для гостей $bb_cfg['allow_search_in_bool_mode'] = true; -$bb_cfg['max_search_words_per_post'] = 200; -$bb_cfg['search_min_word_len'] = 3; -$bb_cfg['search_max_word_len'] = 35; +$bb_cfg['max_search_words_per_post'] = 200; // максимальное число слов в рамках одного поста +$bb_cfg['search_min_word_len'] = 3; // минимальное число слов для поиска +$bb_cfg['search_max_word_len'] = 35; // максимальное число слов для поиска $bb_cfg['limit_max_search_results'] = false; // Posting $bb_cfg['prevent_multiposting'] = true; // replace "reply" with "edit last msg" if user (not admin or mod) is last topic poster $bb_cfg['max_smilies'] = 25; // Максимальное число смайлов в посте (0 - без ограничения) +$bb_cfg['max_symbols_post'] = 5000; // TODO: Максимальное число символов в посте (0 - без ограничения) // PM $bb_cfg['privmsg_disable'] = false; // отключить систему личных сообщений на форуме @@ -495,10 +497,12 @@ $bb_cfg['max_outgoing_pm_cnt'] = 10; // ограничение на кол. од $bb_cfg['max_inbox_privmsgs'] = 500; // максимальное число сообщений в папке входящие $bb_cfg['max_savebox_privmsgs'] = 500; // максимальное число сообщений в папке сохраненные $bb_cfg['max_sentbox_privmsgs'] = 500; // максимальное число сообщений в папке отправленные -$bb_cfg['pm_days_keep'] = 180; // время хранения ЛС +$bb_cfg['max_smilies_pm'] = 15; // TODO: максимальное число смайлов в сообщении (0 - без ограничения) +$bb_cfg['max_symbols_pm'] = 1500; // TODO: максимальное число символов в сообщении (0 - без ограничения) +$bb_cfg['pm_days_keep'] = 180; // TODO: время хранения ЛС // Actions log -$bb_cfg['log_days_keep'] = 365; +$bb_cfg['log_days_keep'] = 365; // время хранения истории действий // Users $bb_cfg['color_nick'] = true; // Окраска ников пользователей по user_rank @@ -506,7 +510,7 @@ $bb_cfg['user_not_activated_days_keep'] = 7; // "not activated" == "not finished $bb_cfg['user_not_active_days_keep'] = 180; // inactive users but only with no posts // Groups -$bb_cfg['group_members_per_page'] = 50; +$bb_cfg['group_members_per_page'] = 50; // количество групп на одной странице // Tidy $bb_cfg['tidy_post'] = in_array('tidy', get_loaded_extensions(), true); diff --git a/library/includes/functions.php b/library/includes/functions.php index 00635ad06..7d182e6fa 100644 --- a/library/includes/functions.php +++ b/library/includes/functions.php @@ -1888,7 +1888,7 @@ function profile_url($data) $profile = '' . $username . ''; - if (!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username) { + if (!in_array($user_id, explode(',', EXCLUDED_USERS)) && $username) { $profile = '' . $profile . ''; } @@ -1943,7 +1943,7 @@ function gender_image($gender): string function is_gold($type): string { - global $lang, $bb_cfg; + global $lang, $bb_cfg, $images; $type = (int)$type; $is_gold = ''; @@ -1954,10 +1954,10 @@ function is_gold($type): string switch ($type) { case TOR_TYPE_GOLD: - $is_gold = ' '; + $is_gold = '' . $lang['GOLD'] . ' '; break; case TOR_TYPE_SILVER: - $is_gold = ' '; + $is_gold = '' . $lang['SILVER'] . ' '; break; default: break; diff --git a/styles/templates/default/posting_editor.tpl b/styles/templates/default/posting_editor.tpl index cfb2beaee..5adfd00af 100644 --- a/styles/templates/default/posting_editor.tpl +++ b/styles/templates/default/posting_editor.tpl @@ -76,7 +76,6 @@ ajax.callback.posts = function(data) {
-
@@ -112,7 +111,8 @@ ajax.callback.posts = function(data) {
{CAPTCHA_HTML}
    - +   +
{L_JAVASCRIPT_ON}
diff --git a/styles/templates/default/tpl_config.php b/styles/templates/default/tpl_config.php index 217450379..c51bafaa6 100644 --- a/styles/templates/default/tpl_config.php +++ b/styles/templates/default/tpl_config.php @@ -37,6 +37,9 @@ $images['icon_male'] = $_main . 'icon_male.gif'; $images['icon_female'] = $_main . 'icon_female.gif'; $images['icon_nogender'] = $_main . 'icon_nogender.gif'; +$images['icon_tor_gold'] = $_img . 'tor_gold.gif'; +$images['icon_tor_silver'] = $_img . 'tor_silver.gif'; + // post_icons $images['icon_minipost'] = $_main . 'icon_minipost.gif'; $images['icon_gotopost'] = $_main . 'icon_minipost.gif'; diff --git a/styles/templates/default/viewtopic_attach.tpl b/styles/templates/default/viewtopic_attach.tpl index c639c3674..8b68184a2 100644 --- a/styles/templates/default/viewtopic_attach.tpl +++ b/styles/templates/default/viewtopic_attach.tpl @@ -146,15 +146,11 @@ {postrow.attach.tor_reged.DOWNLOAD_NAME} {postrow.attach.tor_reged.MAGNET} - - -  {L_SILVER_STATUS}  - - - -  {L_GOLD_STATUS}  - - + + + {postrow.attach.tor_reged.TOR_TYPE} {L_SILVER_STATUS}{L_GOLD_STATUS} {postrow.attach.tor_reged.TOR_TYPE} + + {L_TORRENT}: @@ -344,9 +340,7 @@ $('#tor-filelist-btn').click(function(){
- {L_COLLAPSE}· - {L_EXPAND}· - {L_SWITCH} + {L_COLLAPSE}·{L_EXPAND}·{L_SWITCH}