diff --git a/upload/feed.php b/upload/feed.php index 85c9336b1..87b981957 100644 --- a/upload/feed.php +++ b/upload/feed.php @@ -12,7 +12,7 @@ $type = (string) @$_POST['type']; $id = (int) @$_POST['id']; $timecheck = TIMENOW - 600; -if (!$mode) bb_simple_die('Not specified mode'); +if (!$mode) bb_simple_die($lang['ATOM_NO_MODE']); if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) { @@ -26,7 +26,7 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) { $forum_data = array(); } - else bb_simple_die('Invalid type of query #1'); + else bb_simple_die($lang['ATOM_ERROR'].' #1'); } if (file_exists($bb_cfg['atom']['path'] .'/f/'. $id .'.atom') && filemtime($bb_cfg['atom']['path'] .'/f/'. $id .'.atom') > $timecheck) { @@ -36,7 +36,7 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) { require_once(INC_DIR .'functions_atom.php'); if (update_forum_feed($id, $forum_data)) redirect($bb_cfg['atom']['url'] .'/f/'. $id .'.atom'); - else bb_simple_die('No feed for this forum (no topics)'); + else bb_simple_die($lang['ATOM_NO_FORUM']); } } if ($type == 'u') @@ -44,11 +44,11 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) // Check if the user has actually sent a user ID if ($id < 1) { - bb_simple_die('Invalid type of query #2'); + bb_simple_die($lang['ATOM_ERROR'].' #2'); } if (!$username = get_username($id)) { - bb_simple_die('Invalid type of query #3'); + bb_simple_die($lang['ATOM_ERROR'].' #3'); } if (file_exists($bb_cfg['atom']['path'] .'/u/'. floor($id/5000) .'/'. ($id % 100) .'/'. $id .'.atom') && filemtime($bb_cfg['atom']['path'] .'/u/'. floor($id/5000) .'/'. ($id % 100) .'/'. $id .'.atom') > $timecheck) { @@ -58,11 +58,11 @@ if ($mode == 'get_feed_url' && ($type == 'f' || $type == 'u') && $id >= 0) { require_once(INC_DIR .'functions_atom.php'); if (update_user_feed($id, $username)) redirect($bb_cfg['atom']['url'] .'/u/'. floor($id/5000) .'/'. ($id % 100) .'/'. $id .'.atom'); - else bb_simple_die('No feed for this user (no topics)'); + else bb_simple_die($lang['ATOM_NO_USER']); } } } else { - bb_simple_die('Invalid type of query #4'); + bb_simple_die($lang['ATOM_ERROR'].' #4'); } \ No newline at end of file diff --git a/upload/includes/functions_atom.php b/upload/includes/functions_atom.php index d4b05bf87..0c3c4f2e2 100644 --- a/upload/includes/functions_atom.php +++ b/upload/includes/functions_atom.php @@ -165,7 +165,7 @@ function create_atom ($file_path, $mode, $id, $title, $topics) $date = bb_date($last_time, 'Y-m-d', 0); $time = bb_date($last_time, 'H:i:s', 0); $updated = ''; - $checktime = TIMENOW - 604800; // неделя + $checktime = TIMENOW - 604800; // неделя (week) if ($topic['topic_first_post_edit_time'] && $topic['topic_first_post_edit_time'] > $checktime) $updated = '[Обновлено] '; $atom .= "\n"; $atom .= " <![CDATA[$updated$topic_title$tor_size]]>\n"; diff --git a/upload/language/en/main.php b/upload/language/en/main.php index 13b9af5ad..fb65c606e 100644 --- a/upload/language/en/main.php +++ b/upload/language/en/main.php @@ -1282,7 +1282,7 @@ $lang['SEARCH_DL_COMPLETE_DOWNLOADS'] = 'Completed Downloads'; $lang['SEARCH_DL_CANCEL'] = 'Canceled'; $lang['CUR_DOWNLOADS'] = 'Current Downloads'; $lang['CUR_UPLOADS'] = 'Current Uploads'; -$lang['SEARCH_RELEASES'] = 'Find releases'; +$lang['SEARCH_RELEASES'] = 'Releases'; $lang['TOR_SEARCH_TITLE'] = 'Torrent search options'; $lang['OPEN_TOPIC'] = 'Open topic'; @@ -2998,4 +2998,10 @@ $lang['SITEMAP_ADD_PAGE'] = 'Additional pages'; $lang['SITEMAP_ADD_EXP_1'] = 'You can specify additional pages on your site (for example, http://torrentpier.me/memberlist.php) which should be included in your sitemap file that you creating.'; $lang['SITEMAP_ADD_EXP_2'] = 'Each reference must begin with http(s):// and a new line!'; -$lang['FORUM_MAP'] = 'Forums\' map'; \ No newline at end of file +$lang['FORUM_MAP'] = 'Forums\' map'; +$lang['ATOM_FEED'] = 'Feed'; +$lang['ATOM_ERROR'] = 'Error generating feed'; +$lang['ATOM_SUBSCRIBE'] = 'Subscribe to the feed'; +$lang['ATOM_NO_MODE'] = 'Do not specify a mode for the feed'; +$lang['ATOM_NO_FORUM'] = 'This forum does not have a feed (no ongoing topics)'; +$lang['ATOM_NO_USER'] = 'This user does not have a feed (no ongoing topics)'; \ No newline at end of file diff --git a/upload/language/ru/main.php b/upload/language/ru/main.php index 0799e78f0..9494c5135 100644 --- a/upload/language/ru/main.php +++ b/upload/language/ru/main.php @@ -1282,7 +1282,7 @@ $lang['SEARCH_DL_COMPLETE_DOWNLOADS'] = 'Прошлые закачки'; $lang['SEARCH_DL_CANCEL'] = 'Отмененные'; $lang['CUR_DOWNLOADS'] = 'Текущие закачки'; $lang['CUR_UPLOADS'] = 'Текущие раздачи'; -$lang['SEARCH_RELEASES'] = 'Найти раздачи'; +$lang['SEARCH_RELEASES'] = 'Раздачи'; $lang['TOR_SEARCH_TITLE'] = 'Опции показа торрентов'; $lang['OPEN_TOPIC'] = 'Открыть топик'; @@ -2998,4 +2998,10 @@ $lang['SITEMAP_ADD_PAGE'] = 'Дополнительные страницы'; $lang['SITEMAP_ADD_EXP_1'] = 'Здесь вы можете указать дополнительные страницы сайта (например http://torrentpier.me/memberlist.php), которые должны быть включены в создаваемый файл вами файл sitemap.'; $lang['SITEMAP_ADD_EXP_2'] = 'Каждая ссылка должна начинаться с http(s):// и новой строки!'; -$lang['FORUM_MAP'] = 'Карта форумов'; \ No newline at end of file +$lang['FORUM_MAP'] = 'Карта форумов'; +$lang['ATOM_FEED'] = 'Лента'; +$lang['ATOM_ERROR'] = 'Ошибка генерации ленты'; +$lang['ATOM_SUBSCRIBE'] = 'Подписка на ленту'; +$lang['ATOM_NO_MODE'] = 'Не указан режим для ленты'; +$lang['ATOM_NO_FORUM'] = 'Для этого форума нет ленты (нет начатых тем)'; +$lang['ATOM_NO_USER'] = 'Для этого пользователя нет ленты (нет начатых тем)'; \ No newline at end of file diff --git a/upload/language/ua/main.php b/upload/language/ua/main.php index 57370431b..e954323f6 100644 --- a/upload/language/ua/main.php +++ b/upload/language/ua/main.php @@ -1282,7 +1282,7 @@ $lang['SEARCH_DL_COMPLETE_DOWNLOADS'] = 'Минулі закачування'; $lang['SEARCH_DL_CANCEL'] = 'Скасовані'; $lang['CUR_DOWNLOADS'] = 'Поточні закачування'; $lang['CUR_UPLOADS'] = 'Поточні роздачі'; -$lang['SEARCH_RELEASES'] = 'Знайти роздачі'; +$lang['SEARCH_RELEASES'] = 'Роздачі'; $lang['TOR_SEARCH_TITLE'] = 'Опції показу торрентів'; $lang['OPEN_TOPIC'] = 'Відкрити топік'; @@ -2998,4 +2998,10 @@ $lang['SITEMAP_ADD_PAGE'] = 'Додаткові сторінки'; $lang['SITEMAP_ADD_EXP_1'] = 'Тут ви можете вказати додаткові сторінки сайту (наприклад http://torrentpier.me/memberlist.php), які повинні бути включені в створюваний файл вами файл sitemap.'; $lang['SITEMAP_ADD_EXP_2'] = 'Кожне посилання має починатись з http(s):// і нової рядки!'; -$lang['FORUM_MAP'] = 'Карта форумів'; \ No newline at end of file +$lang['FORUM_MAP'] = 'Карта форумів'; +$lang['ATOM_FEED'] = 'Стрічка'; +$lang['ATOM_ERROR'] = 'Помилка створення стрічки'; +$lang['ATOM_SUBSCRIBE'] = 'Підписка на стрічку'; +$lang['ATOM_NO_MODE'] = 'Не вказано режим для стрічки'; +$lang['ATOM_NO_FORUM'] = 'Для цього форуму немає стрічки (немає початих тем)'; +$lang['ATOM_NO_USER'] = 'Для цього користувача немає стрічки (немає початих тем)'; \ No newline at end of file diff --git a/upload/templates/default/tpl_config.php b/upload/templates/default/tpl_config.php index 96b4f72ec..31773f5bf 100644 --- a/upload/templates/default/tpl_config.php +++ b/upload/templates/default/tpl_config.php @@ -129,7 +129,7 @@ $template->assign_vars(array( 'POST_IMG_WIDTH_DECR_JS' => $bb_cfg['topic_left_column_witdh'] + $bb_cfg['post_img_width_decr'], 'ATTACH_IMG_WIDTH_DECR_JS' => $bb_cfg['topic_left_column_witdh'] + $bb_cfg['attach_img_width_decr'], 'MAGNET_LINKS' => $bb_cfg['magnet_links_enabled'], - 'FEED_IMG' => 'feed', + 'FEED_IMG' => ''. $lang['ATOM_FEED'] .'', )); // post_buttons diff --git a/upload/templates/default/usercp_viewprofile.tpl b/upload/templates/default/usercp_viewprofile.tpl index 7281ef627..8f1938ca3 100644 --- a/upload/templates/default/usercp_viewprofile.tpl +++ b/upload/templates/default/usercp_viewprofile.tpl @@ -365,8 +365,9 @@ ajax.callback.gen_passkey = function(data){ {POSTS} [ {L_SEARCH_USER_POSTS} ] [ {L_SEARCH_USER_TOPICS} ] - [ {L_SEARCH_RELEASES} ] - [ {L_WATCHED_TOPICS} ] + [ {L_SEARCH_RELEASES} ] + [ {L_WATCHED_TOPICS} ] + [ {FEED_IMG} ]