diff --git a/upload/admin/admin_forum_prune.php b/upload/admin/admin_forum_prune.php
index 4b2cfccdd..d4d4c70c1 100644
--- a/upload/admin/admin_forum_prune.php
+++ b/upload/admin/admin_forum_prune.php
@@ -27,7 +27,7 @@ if (isset($_REQUEST['submit']))
}
if (!$var =& $_REQUEST['prunedays'] OR !$prunedays = abs(intval($var)))
{
- message_die(GENERAL_MESSAGE, return_msg_prune('Prune days not selected'));
+ message_die(GENERAL_MESSAGE, return_msg_prune($lang['NOT_DAYS']));
}
$prunetime = TIMENOW - 86400*$prunedays;
diff --git a/upload/config.php b/upload/config.php
index 7d6322d4d..f709d5cd0 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -53,8 +53,8 @@ $bb_cfg = $tr_cfg = $page_cfg = array();
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.2 Beta';
-$bb_cfg['tp_release_state'] = 'R306';
-$bb_cfg['tp_release_date'] = '09-11-2011';
+$bb_cfg['tp_release_state'] = 'R307';
+$bb_cfg['tp_release_date'] = '10-11-2011';
// Database
$charset = 'utf8';
@@ -171,9 +171,9 @@ $bb_cfg['allow_dl_list_names_mode'] = true;
$bb_cfg['torrent_sign'] = ''; // e.g. "[yoursite.com]"
$bb_cfg['tor_help_links'] = '';
-// Days to keep torrent registered, if:
-$bb_cfg['seeder_last_seen_days_keep'] = 20;
-$bb_cfg['seeder_never_seen_days_keep'] = 5;
+// Сколько дней сохранять торрент зарегистрированным / Days to keep torrent registered, if:
+$bb_cfg['seeder_last_seen_days_keep'] = 0; // сколько дней назад был сид последний раз
+$bb_cfg['seeder_never_seen_days_keep'] = 0; // сколько дней имеется статус "Сида не было никогда"
// Ratio limits
define('TR_RATING_LIMITS', true); // ON/OFF
diff --git a/upload/includes/functions.php b/upload/includes/functions.php
index 3c5b0bb8d..66f1df27d 100644
--- a/upload/includes/functions.php
+++ b/upload/includes/functions.php
@@ -1,9 +1,6 @@
11, // Запрет на создание новых тем
'allow_post' => 12, // Запрет на отправку сообщений
'allow_post_edit' => 13, // Запрет на редактирование сообщений
- 'view_profile' => 14, // Запрет на просмотр профиля гостям
+ 'allow_dls' => 14, // Запрет на список текущих закачек в профиле
);
function bit2dec ($bit_num)
@@ -1820,12 +1817,12 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
}
- $pagination = ($page_string) ? 'Страницы : '. $page_string : '';
+ $pagination = ($page_string) ? ''. $lang['GOTO_PAGE'] .' : '. $page_string : '';
$pagination = str_replace('&start=0', '', $pagination);
$template->assign_vars(array(
'PAGINATION' => $pagination,
- 'PAGE_NUMBER' => sprintf('Страница %d из %s', ( floor($start_item/$per_page) + 1 ), ceil( $num_items / $per_page )),
+ 'PAGE_NUMBER' => sprintf($lang['PAGE_OF'], ( floor($start_item/$per_page) + 1 ), ceil( $num_items / $per_page )),
'PG_BASE_URL' => $base_url,
'PG_PER_PAGE' => $per_page,
));
@@ -2614,7 +2611,7 @@ function log_sphinx_error ($err_type, $err_msg, $query = '')
function get_title_match_topics ($title_match_sql, $forum_ids = array())
{
- global $bb_cfg, $sphinx, $userdata, $title_match;
+ global $bb_cfg, $sphinx, $userdata, $title_match, $lang;
$where_ids = array();
if($forum_ids) $forum_ids = array_diff($forum_ids, array(0 => 0));
@@ -2646,7 +2643,7 @@ function get_title_match_topics ($title_match_sql, $forum_ids = array())
{
if (strpos($error, 'errno=110'))
{
- bb_die('В данный момент поисковик недоступен
Попробуйте повторить запрос через несколько секунд');
+ bb_die($lang['SEARCH_ERROR']);
}
log_sphinx_error('ERR', $error, $title_match_sql);
}
@@ -2683,7 +2680,7 @@ function get_title_match_topics ($title_match_sql, $forum_ids = array())
}
else
{
- bb_die('Поиск временно отключен');
+ bb_die($lang['SEARCH_OFF']);
}
return $where_ids;
@@ -2751,11 +2748,11 @@ function get_avatar ($avatar, $type, $allow_avatar = true)
function set_die_append_msg ($forum_id = null, $topic_id = null)
{
- global $template;
+ global $lang, $template;
$msg = '';
- $msg .= ($topic_id) ? '
'. $lang['CLICK_RETURN_TOPIC'] .'
' : ''; + $msg .= ($forum_id) ? ''. $lang['CLICK_RETURN_FORUM'] .'
' : ''; + $msg .= ''. $lang['CLICK_RETURN_INDEX'] .'
'; $template->assign_var('BB_DIE_APPEND_MSG', $msg); } diff --git a/upload/includes/ucp/usercp_register.php b/upload/includes/ucp/usercp_register.php index 7223a198c..464635d73 100644 --- a/upload/includes/ucp/usercp_register.php +++ b/upload/includes/ucp/usercp_register.php @@ -396,7 +396,7 @@ foreach ($profile_fields as $field => $can_edit) 'notify' => true, 'notify_pm' => true, 'hide_porn_forums' => true, - 'view_profile' => true, + 'allow_dls' => true, ); foreach ($update_user_opt as $opt => $can_change_opt) { diff --git a/upload/includes/ucp/usercp_viewprofile.php b/upload/includes/ucp/usercp_viewprofile.php index 44c0e24b7..aa7f26c43 100644 --- a/upload/includes/ucp/usercp_viewprofile.php +++ b/upload/includes/ucp/usercp_viewprofile.php @@ -17,9 +17,10 @@ if (!$profiledata = get_userdata($_GET[POST_USERS_URL])) bb_die($lang['NO_USER_ID_SPECIFIED']); } -if(bf($profiledata['user_opt'], 'user_opt', 'view_profile') && IS_GUEST) -{ meta_refresh(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", true)); - bb_die("{$profiledata['username']} " . $lang['FORBADE_VIEWING']); } +if (!$userdata['session_logged_in']) +{ + redirect(append_sid("login.php?redirect={$_SERVER['REQUEST_URI']}", true)); +} if (!$ranks = $datastore->get('ranks')) { @@ -74,15 +75,20 @@ if ($report_user && $report_user->auth_check('auth_write')) // Generate page // +$profile_user_id = ($profiledata['user_id'] == $userdata['user_id']); + $signature = ($bb_cfg['allow_sig'] && $profiledata['user_sig']) ? $profiledata['user_sig'] : ''; if(bf($profiledata['user_opt'], 'user_opt', 'allow_sig')) { - if($profiledata['user_id'] == $userdata['user_id']) - { $signature = $lang['SIGNATURE_DISABLE']; + if($profile_user_id) + { + $signature = $lang['SIGNATURE_DISABLE']; } else - { $signature = ''; } + { + $signature = ''; + } } else if ($signature) { @@ -104,6 +110,7 @@ $template->assign_vars(array( 'ICQ' => $profiledata['user_icq'], 'LAST_VISIT_TIME' => ($profiledata['user_lastvisit']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? $lang['HIDDEN_USER'] : bb_date($profiledata['user_lastvisit'], 'Y-m-d H:i', 'false') : $lang['NEVER'], 'LAST_ACTIVITY_TIME' => ($profiledata['user_session_time']) ? (bf($profiledata['user_opt'], 'user_opt', 'allow_viewonline') && !IS_ADMIN) ? $lang['HIDDEN_USER'] : bb_date($profiledata['user_session_time'], 'Y-m-d H:i', 'false') : $lang['NEVER'], + 'ALLOW_DLS' => (!bf($profiledata['user_opt'], 'user_opt', 'allow_dls') || (IS_AM || $profile_user_id)), 'LOCATION' => $profiledata['user_from'], 'USER_ACTIVE' => $profiledata['user_active'], @@ -117,7 +124,6 @@ $template->assign_vars(array( 'AVATAR_IMG' => get_avatar($profiledata['user_avatar'], $profiledata['user_avatar_type'], !bf($profiledata['user_opt'], 'user_opt', 'allow_avatar')), 'L_VIEWING_PROFILE' => sprintf($lang['VIEWING_USER_PROFILE'], $profiledata['username']), - 'L_ABOUT_USER_PROFILE' => sprintf($lang['ABOUT_USER'], $profiledata['username']), 'U_SEARCH_USER' => "search.php?search_author=1&uid={$profiledata['user_id']}", 'U_SEARCH_TOPICS' => "search.php?uid={$profiledata['user_id']}&myt=1", @@ -128,11 +134,12 @@ $template->assign_vars(array( 'SIGNATURE' => $signature, )); -//bt -// Show users torrent-profile -define('IN_VIEWPROFILE', TRUE); -include(INC_DIR .'ucp/torrent_userprofile.php'); -//bt end +if (!bf($profiledata['user_opt'], 'user_opt', 'allow_dls') || (IS_AM || $profile_user_id)) +{ + // Show users torrent-profile + define('IN_VIEWPROFILE', TRUE); + include(INC_DIR .'ucp/torrent_userprofile.php'); +} $template->assign_vars(array( 'SHOW_ACCESS_PRIVILEGE' => IS_ADMIN, diff --git a/upload/language/lang_english/lang_admin.php b/upload/language/lang_english/lang_admin.php index 213068b23..6622a053b 100644 --- a/upload/language/lang_english/lang_admin.php +++ b/upload/language/lang_english/lang_admin.php @@ -432,7 +432,7 @@ $lang['PRUNE_TOPICS_NOT_POSTED'] = 'Prune topics with no replies in this many da $lang['TOPICS_PRUNED'] = 'Topics pruned'; $lang['POSTS_PRUNED'] = 'Posts pruned'; $lang['PRUNE_SUCCESS'] = 'Pruning of forums was successful'; - +$lang['NOT_DAYS'] = 'Prune days not selected'; // // Word censor diff --git a/upload/language/lang_english/lang_main.php b/upload/language/lang_english/lang_main.php index dad54819c..b6ac1436f 100644 --- a/upload/language/lang_english/lang_main.php +++ b/upload/language/lang_english/lang_main.php @@ -526,8 +526,7 @@ $lang['OUTBOX_EXPL'] = ''; // // Profiles/Registration // -$lang['VIEWING_USER_PROFILE'] = 'Viewing profile :: %s'; // %s is username -$lang['ABOUT_USER'] = 'All about %s'; // %s is username +$lang['VIEWING_USER_PROFILE'] = 'Viewing profile :: %s'; $lang['DISABLED_USER'] = 'Account disabled'; $lang['MANAGE_USER'] = 'Administration'; @@ -802,6 +801,8 @@ $lang['MEMBERS_IN_GROUP'] = 'Members in group'; // // Search // +$lang['SEARCH_OFF'] = 'Search is temporarily disabled'; +$lang['SEARCH_ERROR'] = 'At the moment, the search engine is not availableChanges disabled (see $tr_cfg in config.php)
+Changes disabled (see $tr_cfg in config.php)
+
+ Изменение данных из файла config.php при необходимости. Строка ~143
+
{L_VIEW_TOR_PROF} | @@ -397,7 +395,7 @@ ajax.callback.manage_user = function(data) {|||
---|---|---|---|
{L_CUR_ACTIVE_DLS} |
{postrow.POSTER_AVATAR}
- - +{postrow.POSTER_NAME} ®
{postrow.POSTER_RANK}
diff --git a/upload/viewtopic.php b/upload/viewtopic.php index b8d4da88a..d690067e4 100644 --- a/upload/viewtopic.php +++ b/upload/viewtopic.php @@ -949,7 +949,7 @@ for($i = 0; $i < $total_posts; $i++) 'ROW_CLASS' => !($i % 2) ? 'row1' : 'row2', 'POST_ID' => $postrow[$i]['post_id'], 'IS_NEWEST' => ($postrow[$i]['post_id'] == $newest), - 'POSTER_NAME' => ($poster_id != $t_data['topic_poster']) ? profile_url(array('username' => $poster, 'user_rank' => $user_rank)) : wbr($poster), + 'POSTER_NAME' => profile_url(array('username' => $poster, 'user_rank' => $user_rank)), 'POSTER_NAME_JS' => addslashes($poster), 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image,