mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Minor improvements (#812)
* Minor improvements
* fix
* fix
* Update viewtopic_attach.tpl
* Revert "Maked max post length configurable (#793)"
This reverts commit fd42eae329
.
* Update config.php
* fix
This commit is contained in:
parent
a340ff644b
commit
41664685ba
8 changed files with 39 additions and 37 deletions
|
@ -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'];
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 : '' : '',
|
||||
|
|
|
@ -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'] = '</div>'; // Это позволит испол
|
|||
// 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);
|
||||
|
|
|
@ -1888,7 +1888,7 @@ function profile_url($data)
|
|||
|
||||
$profile = '<span title="' . $title . '" class="' . $style . '">' . $username . '</span>';
|
||||
|
||||
if (!in_array($user_id, array('', GUEST_UID, BOT_UID)) && $username) {
|
||||
if (!in_array($user_id, explode(',', EXCLUDED_USERS)) && $username) {
|
||||
$profile = '<a href="' . make_url(PROFILE_URL . $user_id) . '">' . $profile . '</a>';
|
||||
}
|
||||
|
||||
|
@ -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 = '<img src="styles/images/tor_gold.gif" width="16" height="15" title="' . $lang['GOLD'] . '" /> ';
|
||||
$is_gold = '<img width="16" height="15" src="' . $images['icon_tor_gold'] . '" alt="' . $lang['GOLD'] . '" title="' . $lang['GOLD'] . '" /> ';
|
||||
break;
|
||||
case TOR_TYPE_SILVER:
|
||||
$is_gold = '<img src="styles/images/tor_silver.gif" width="16" height="15" title="' . $lang['SILVER'] . '" /> ';
|
||||
$is_gold = '<img width="16" height="15" src="' . $images['icon_tor_silver'] . '" alt="' . $lang['SILVER'] . '" title="' . $lang['SILVER'] . '" /> ';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -76,7 +76,6 @@ ajax.callback.posts = function(data) {
|
|||
</span>
|
||||
|
||||
<div class="buttons floatR">
|
||||
<input type="reset" value="{L_CLEAR}" class="liteoption"/>
|
||||
<input type="button" value="+" onclick="$('#message').css({height: parseInt($('#message').css('height')) + 100}); return false;">
|
||||
<input type="button" value="-" onclick="$('#message').css({height: parseInt($('#message').css('height')) - 100}); return false;">
|
||||
</div>
|
||||
|
@ -112,7 +111,8 @@ ajax.callback.posts = function(data) {
|
|||
<div class="pad_4" align="center">{CAPTCHA_HTML}</div>
|
||||
<input type="submit" name="preview" value="{L_PREVIEW}" id="post-preview-btn" onclick="$('#post-submit').remove();">
|
||||
<input onclick="submitted = true;" title="Ctrl+Enter" type="submit" name="post" class="bold" value="{L_SUBMIT}" id="post-submit-btn">
|
||||
<input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#message').val()});">
|
||||
<input type="button" value="{L_AJAX_PREVIEW}" onclick="ajax.exec({ action: 'posts', type: 'view_message', message: $('textarea#message').val()});">
|
||||
<input type="reset" value="{L_CLEAR}">
|
||||
</div>
|
||||
<div id="post-js-warn">{L_JAVASCRIPT_ON}</div>
|
||||
</div>
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -146,15 +146,11 @@
|
|||
<tr class="row3">
|
||||
<th colspan="3" class="{postrow.attach.tor_reged.DL_LINK_CLASS}">{postrow.attach.tor_reged.DOWNLOAD_NAME}<!-- IF postrow.attach.tor_reged.TOR_FROZEN == 0 --><!-- IF MAGNET_LINKS --> {postrow.attach.tor_reged.MAGNET}<!-- ENDIF --><!-- ENDIF --></th>
|
||||
</tr>
|
||||
<!-- IF postrow.attach.tor_reged.TOR_SILVER_GOLD == 2 && $bb_cfg['tracker']['gold_silver_enabled'] -->
|
||||
<tr class="row4">
|
||||
<th colspan="3" class="row7"><img src="styles/images/tor_silver.gif" width="16" height="15" title="{L_SILVER}" /> {L_SILVER_STATUS} <img src="styles/images/tor_silver.gif" width="16" height="15" title="{L_SILVER}" /></th>
|
||||
</tr>
|
||||
<!-- ELSEIF postrow.attach.tor_reged.TOR_SILVER_GOLD == 1 && $bb_cfg['tracker']['gold_silver_enabled'] -->
|
||||
<tr class="row4">
|
||||
<th colspan="3" class="row7"><img src="styles/images/tor_gold.gif" width="16" height="15" title="{L_GOLD}" /> {L_GOLD_STATUS} <img src="styles/images/tor_gold.gif" width="16" height="15" title="{L_GOLD}" /></th>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF postrow.attach.tor_reged.TOR_TYPE -->
|
||||
<tr class="row4">
|
||||
<th colspan="3" class="row7">{postrow.attach.tor_reged.TOR_TYPE} <!-- IF postrow.attach.tor_reged.TOR_SILVER_GOLD == 2 -->{L_SILVER_STATUS}<!-- ELSEIF postrow.attach.tor_reged.TOR_SILVER_GOLD == 1 -->{L_GOLD_STATUS}<!-- ENDIF --> {postrow.attach.tor_reged.TOR_TYPE}</th>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr class="row1">
|
||||
<td width="15%">{L_TORRENT}:</td>
|
||||
<td width="70%">
|
||||
|
@ -344,9 +340,7 @@ $('#tor-filelist-btn').click(function(){
|
|||
<tr>
|
||||
<td>
|
||||
<div id="tor-fl-treecontrol">
|
||||
<a href="#">{L_COLLAPSE}</a>·
|
||||
<a href="#">{L_EXPAND}</a>·
|
||||
<a href="#">{L_SWITCH}</a>
|
||||
<a href="#">{L_COLLAPSE}</a>·<a href="#">{L_EXPAND}</a>·<a href="#">{L_SWITCH}</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue