From d3b80490065cae77a9209eff90cb64f6f4574e08 Mon Sep 17 00:00:00 2001 From: Exile Date: Tue, 21 Oct 2014 17:37:35 +0400 Subject: [PATCH 1/8] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D1=81=D1=8B=D0=BB=D0=BA=D0=B8=20=D0=BF=D0=BE=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D1=81=D1=8C=D0=B1=D0=B5,=20=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF=D1=83=D1=82=D0=B5=D0=B9=20?= =?UTF-8?q?=D0=BA=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA=D0=B0=D0=BC?= =?UTF-8?q?,=20=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8=20=D0=B0=D0=B2=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contributors.txt | 4 ++-- upload/admin/admin_cron.php | 2 +- upload/library/includes/functions.php | 6 +++--- upload/library/includes/functions_upload.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contributors.txt b/contributors.txt index d659e2e15..c88224b24 100644 --- a/contributors.txt +++ b/contributors.txt @@ -16,7 +16,7 @@ qaqra rserg99 leszav Dr_Brown -Bullit (http://bestrip.org/) +Bullit Triceratop (http://goldenshara.com/) Ramzess @@ -26,7 +26,7 @@ Ramzess SamSeGo alesel (http://sporttracker.kz/) -Bullit (http://bestrip.org/) +Bullit igorsaevets vasilich619 wint1000 (http://asmlocator.ru/) diff --git a/upload/admin/admin_cron.php b/upload/admin/admin_cron.php index 2f45987c6..7999137c4 100644 --- a/upload/admin/admin_cron.php +++ b/upload/admin/admin_cron.php @@ -58,7 +58,7 @@ switch ($mode) 'ROW_CLASS' => !($i % 2) ? 'row2' : 'row1', 'JOB_ID' => $i + 1, 'CRON_ID' => $row['cron_id'], - 'CRON_ACTIVE' => $row['cron_active'] ? ''. $lang['YES'] .'' : ''. $lang['NO'] .'', + 'CRON_ACTIVE' => $row['cron_active'] ? ''. $lang['YES'] .'' : ''. $lang['NO'] .'', 'CRON_TITLE' => $row['cron_title'], 'CRON_SCRIPT' => $row['cron_script'], 'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : ''. $lang['NOSELECT'] .'', diff --git a/upload/library/includes/functions.php b/upload/library/includes/functions.php index f151c9cfe..16b090ce2 100644 --- a/upload/library/includes/functions.php +++ b/upload/library/includes/functions.php @@ -1963,7 +1963,7 @@ function topic_attachment_image($switch_attachment) { return ''; } - return ' '; + return ' '; } function transliterate ($str) @@ -2825,10 +2825,10 @@ function is_gold ($type) switch ($type) { case TOR_TYPE_GOLD: - $is_gold = ' '; + $is_gold = ' '; break; case TOR_TYPE_SILVER: - $is_gold = ' '; + $is_gold = ' '; break; default: $is_gold = ''; diff --git a/upload/library/includes/functions_upload.php b/upload/library/includes/functions_upload.php index a6900f00d..3fffd4e4c 100644 --- a/upload/library/includes/functions_upload.php +++ b/upload/library/includes/functions_upload.php @@ -104,12 +104,12 @@ class upload_common } } // check ext - if (!isset($this->ext_ids[$this->file_ext]) || !in_array($this->file_ext, $this->cfg['allowed_ext'], true)) + if ($uploaded_only && (!isset($this->ext_ids[$this->file_ext]) || !in_array($this->file_ext, $this->cfg['allowed_ext'], true))) { $this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext)); return false; } - $this->file_ext_id = $this->ext_ids[$this->file_ext]; + $this->file_ext_id = @$this->ext_ids[$this->file_ext]; return true; } From cd8c7aa4b03f6b0704f3b4a929975c32878cc110 Mon Sep 17 00:00:00 2001 From: Exile Date: Tue, 21 Oct 2014 17:50:26 +0400 Subject: [PATCH 2/8] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D1=8B=20=D1=82?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=D1=81=D0=BB=D0=B8=D1=82=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D0=B8=D0=B7=20=D0=B4=D0=B2=D0=B8=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Отсутствует возможность поддерживать сложную систему транслитерации, тем более на нескольких языках. Пользователям следует посоветовать использование сайтов наподобие http://translit.net/ для этой цели. --- upload/library/config.php | 4 +- upload/library/includes/functions.php | 11 -- upload/library/includes/functions_upload.php | 2 +- upload/library/language/en/main.php | 3 - upload/library/language/en/translit_table.php | 5 - upload/library/language/ru/main.php | 3 - upload/library/language/ru/translit_table.php | 37 ------ upload/library/language/uk/main.php | 3 - upload/library/language/uk/translit_table.php | 37 ------ upload/styles/js/bbcode.js | 117 +----------------- upload/styles/templates/default/css/main.css | 9 +- .../templates/default/posting_editor.tpl | 64 ++-------- 12 files changed, 14 insertions(+), 281 deletions(-) delete mode 100644 upload/library/language/en/translit_table.php delete mode 100644 upload/library/language/ru/translit_table.php delete mode 100644 upload/library/language/uk/translit_table.php diff --git a/upload/library/config.php b/upload/library/config.php index bd4b2704a..1ac6dc37a 100644 --- a/upload/library/config.php +++ b/upload/library/config.php @@ -69,8 +69,8 @@ $domain_name = 'torrentpier.me'; // enter here your primary domain name of your $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; // Version info -$bb_cfg['tp_version'] = '2.1.2'; -$bb_cfg['tp_release_date'] = '20-10-2014'; +$bb_cfg['tp_version'] = '2.1.3'; +$bb_cfg['tp_release_date'] = '**-10-2014'; $bb_cfg['tp_release_state'] = 'ALPHA'; // Database diff --git a/upload/library/includes/functions.php b/upload/library/includes/functions.php index 16b090ce2..ff885e61c 100644 --- a/upload/library/includes/functions.php +++ b/upload/library/includes/functions.php @@ -1966,17 +1966,6 @@ function topic_attachment_image($switch_attachment) return ' '; } -function transliterate ($str) -{ - static $translit_table; - - if (!isset($translit_table)) - { - require(DEFAULT_LANG_DIR .'translit_table.php'); - } - return strtr($str, $translit_table); -} - /** * array_combine() * diff --git a/upload/library/includes/functions_upload.php b/upload/library/includes/functions_upload.php index 3fffd4e4c..cd335b294 100644 --- a/upload/library/includes/functions_upload.php +++ b/upload/library/includes/functions_upload.php @@ -109,7 +109,7 @@ class upload_common $this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext)); return false; } - $this->file_ext_id = @$this->ext_ids[$this->file_ext]; + $this->file_ext_id = $this->ext_ids[$this->file_ext]; return true; } diff --git a/upload/library/language/en/main.php b/upload/library/language/en/main.php index 039ea430a..c4bf20e7e 100644 --- a/upload/library/language/en/main.php +++ b/upload/library/language/en/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Add bot-message about split to new topic 'to', -); \ No newline at end of file diff --git a/upload/library/language/ru/main.php b/upload/library/language/ru/main.php index c7aeda26a..e021e08a2 100644 --- a/upload/library/language/ru/main.php +++ b/upload/library/language/ru/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Добавить сообщение о раз $lang['QUICK_REPLY'] = 'Быстрый ответ'; $lang['INS_NAME_TIP'] = 'Вставить имя или выделенный кусок сообщения.'; $lang['QUOTE_SELECTED'] = 'Цитировать выделенный текст'; -$lang['TRANSLIT_RULES'] = 'Правила транслита'; $lang['QR_ATTACHSIG'] = 'Присоединить подпись'; $lang['QR_NOTIFY'] = 'Уведомлять об ответах'; $lang['QR_DISABLE'] = 'Отключить'; @@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список'; $lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)'; $lang['LIST_ITEM'] = 'Нумерованный список: [list=]текст[/list] (Ctrl+O)'; $lang['QUOTE_SEL'] = 'Цит.выдел'; -$lang['TRANSLIT'] = 'Транслит'; -$lang['TRANSLIT_TITLE'] = 'Перевести выделение из транслита на русский'; $lang['JAVASCRIPT_ON'] = 'Для отправки сообщений необходимо включить JavaScript'; $lang['NEW'] = 'Новое'; diff --git a/upload/library/language/ru/translit_table.php b/upload/library/language/ru/translit_table.php deleted file mode 100644 index 13273d5fa..000000000 --- a/upload/library/language/ru/translit_table.php +++ /dev/null @@ -1,37 +0,0 @@ - 'e', 'Ё' => 'E', - 'а' => 'a', 'А' => 'A', - 'б' => 'b', 'Б' => 'B', - 'в' => 'v', 'В' => 'V', - 'г' => 'g', 'Г' => 'G', - 'д' => 'd', 'Д' => 'D', - 'е' => 'e', 'Е' => 'E', - 'ж' => 'zh', 'Ж' => 'ZH', - 'з' => 'z', 'З' => 'Z', - 'и' => 'i', 'И' => 'I', - 'й' => 'y', 'Й' => 'Y', - 'к' => 'k', 'К' => 'K', - 'л' => 'l', 'Л' => 'L', - 'м' => 'm', 'М' => 'M', - 'н' => 'n', 'Н' => 'N', - 'о' => 'o', 'О' => 'O', - 'п' => 'p', 'П' => 'P', - 'р' => 'r', 'Р' => 'R', - 'с' => 's', 'С' => 'S', - 'т' => 't', 'Т' => 'T', - 'у' => 'u', 'У' => 'U', - 'ф' => 'f', 'Ф' => 'F', - 'х' => 'h', 'Х' => 'H', - 'ц' => 'c', 'Ц' => 'C', - 'ч' => 'ch', 'Ч' => 'CH', - 'ш' => 'sh', 'Ш' => 'SH', - 'щ' => 'sh', 'Щ' => 'SH', - 'ъ' => "'", 'Ъ' => "'", - 'ы' => 'y', 'Ы' => 'Y', - 'ь' => "'", 'Ь' => "'", - 'э' => 'e', 'Э' => 'E', - 'ю' => 'yu', 'Ю' => 'YU', - 'я' => 'ya', 'Я' => 'YA', -); \ No newline at end of file diff --git a/upload/library/language/uk/main.php b/upload/library/language/uk/main.php index 6ab1a2551..6abd28883 100644 --- a/upload/library/language/uk/main.php +++ b/upload/library/language/uk/main.php @@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Додати повідомлення про $lang['QUICK_REPLY'] = 'Швидка відповідь'; $lang['INS_NAME_TIP'] = "Вставити ім'я або виділений шматок повідомлення."; $lang['QUOTE_SELECTED'] = 'Цитувати виділений текст'; -$lang['TRANSLIT_RULES'] = 'Правила трансліту'; $lang['QR_ATTACHSIG'] = 'Приєднати підпис'; $lang['QR_NOTIFY'] = 'Повідомляти про відповіді'; $lang['QR_DISABLE'] = 'Відключити'; @@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список'; $lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)'; $lang['LIST_ITEM'] = 'Нумерований список: [list=]текст[/list] (Ctrl+O)'; $lang['QUOTE_SEL'] = 'Цит.виділ'; -$lang['TRANSLIT'] = 'Трансліт'; -$lang['TRANSLIT_TITLE'] = 'Перевести виділення з трансліту на українську'; $lang['JAVASCRIPT_ON'] = 'Для надсилання повідомлень необхідно включити JavaScript'; $lang['NEW'] = 'Нове'; diff --git a/upload/library/language/uk/translit_table.php b/upload/library/language/uk/translit_table.php deleted file mode 100644 index f787ad5a7..000000000 --- a/upload/library/language/uk/translit_table.php +++ /dev/null @@ -1,37 +0,0 @@ - 'ye', 'Є' => 'YE', - 'а' => 'a', 'А' => 'A', - 'б' => 'b', 'Б' => 'B', - 'в' => 'v', 'В' => 'V', - 'г' => 'g', 'Г' => 'G', - 'д' => 'd', 'Д' => 'D', - 'е' => 'e', 'Е' => 'E', - 'ж' => 'zh', 'Ж' => 'ZH', - 'з' => 'z', 'З' => 'Z', - 'и' => 'y', 'И' => 'Y', - 'i' => 'i', 'I' => 'I', - 'ї' => 'yi', 'Ї' => 'YI', - 'й' => 'y', 'Й' => 'Y', - 'к' => 'k', 'К' => 'K', - 'л' => 'l', 'Л' => 'L', - 'м' => 'm', 'М' => 'M', - 'н' => 'n', 'Н' => 'N', - 'о' => 'o', 'О' => 'O', - 'п' => 'p', 'П' => 'P', - 'р' => 'r', 'Р' => 'R', - 'с' => 's', 'С' => 'S', - 'т' => 't', 'Т' => 'T', - 'у' => 'u', 'У' => 'U', - 'ф' => 'f', 'Ф' => 'F', - 'х' => 'h', 'Х' => 'H', - 'ц' => 'c', 'Ц' => 'C', - 'ч' => 'ch', 'Ч' => 'CH', - 'ш' => 'sh', 'Ш' => 'SH', - 'щ' => 'sh', 'Щ' => 'SH', - 'ь' => "'", 'Ь' => "'", - 'ю' => 'yu', 'Ю' => 'YU', - 'я' => 'ya', 'Я' => 'YA', - "'" => "'", -); \ No newline at end of file diff --git a/upload/styles/js/bbcode.js b/upload/styles/js/bbcode.js index 4ade8fcb6..9b8ddcb4c 100644 --- a/upload/styles/js/bbcode.js +++ b/upload/styles/js/bbcode.js @@ -453,119 +453,4 @@ function initMedia(context) $(document).ready(function(){ $('div.post_wrap, div.signature').each(function(){ initPostBBCode( $(this) ) }); -}); - -// One character letters -var t_table1 = "ABVGDEZIJKLMNOPRSTUFXHCYWabvgdezijklmnoprstufxhcyw'#"; -var w_table1 = "АБВГДЕЗИЙКЛМНОПРСТУФХХЦЫЩабвгдезийклмнопрстуфххцыщьъ"; - -// Two character letters -var t_table2 = "EHSZYOJOZHCHSHYUJUYAJAehszyojozhchshyujuyajaEhSzYoJoZhChShYuJuYaJa"; -var w_table2 = "ЭЩЁЁЖЧШЮЮЯЯэщёёжчшююяяЭЩЁЁЖЧШЮЮЯЯ"; - -var tagArray = [ - 'code', '', - 'img', '', - 'quote', "(=[\"']?[^"+String.fromCharCode(92,93)+"]+)?", - 'email', "(=[\"']?[a-zA-Z0-9_.-]+@?[a-zA-Z0-9_.-]+[\"']?)?", - 'url', "(=[\"']?[^ \"'"+String.fromCharCode(92,93)+"]*[\"']?)?" -]; - -function translit2win (str) -{ - var len = str.length; - var new_str = ""; - - for (i = 0; i < len; i++) - { - /* non-translatable text must be in ^ */ - if(str.substr(i).indexOf("^")==0){ - end_len=str.substr(i+1).indexOf("^")+2; - if (end_len>1){ - new_str+=str.substr(i,end_len); - i += end_len - 1; - continue; - } - } - - /* Skipping emoticons */ - if(str.substr(i).indexOf(":")==0){ - iEnd = str.substr(i+1).indexOf(":")+2; - if (iEnd > 1 && str.substr(i,iEnd).match("^:[a-zA-Z0-9]+:$")){ - new_str += str.substr(i,iEnd); - i += iEnd - 1; - continue; - } - } - - /* Skipping http|news|ftp:/.../ links */ - rExp = new RegExp("^((http|https|news|ftp|ed2k):\\/\\/[\\/a-zA-Z0-9%_?.:;&#|\(\)+=@-]+)","i"); - if (newArr = str.substr(i).match(rExp)){ - new_str += newArr[1]; - i += newArr[1].length - 1; - continue; - } - - /* Skipping FONT, COLOR, SIZE tags */ - rExp = new RegExp("^(\\[\\/?(b|i|u|s|font(=[a-z0-9]+)?|size(=[0-9]+)?|color(=#?[a-z0-9]+)?)\\])","i"); - if (newArr = str.substr(i).match(rExp)){ - new_str += newArr[1]; - i += newArr[1].length - 1; - continue; - } - - /* Skipping [QUOTE]..[/QUOTE], [IMG]..[/IMG], [CODE]..[/CODE], [SQL]..[/SQL], [EMAIL]..[/EMAIL] tags */ - bSkip = false; - for(j = 0; j < tagArray.length; j += 2){ - rExp = new RegExp("^(\\["+tagArray[j]+tagArray[j+1]+"\\])","i"); - if (newArr = str.substr(i).match(rExp)){ - rExp = new RegExp("\\[\\/" + tagArray[j] + "\\]", "i"); - if (iEnd = str.substr(i + newArr[1].length + 2).search(rExp)){ - end_len = iEnd + newArr[1].length + tagArray[j].length + 4; - new_str += str.substr(i,end_len); - i += end_len - 1; - bSkip = true; - } - } - if(bSkip)break; - } - if(bSkip)continue; - - // Check for 2-character letters - is2char=false; - if (i < len-1) { - for(j = 0; j < w_table2.length; j++) - { - if(str.substr(i, 2) == t_table2.substr(j*2,2)) { - new_str+= w_table2.substr(j, 1); - i++; - is2char=true; - break; - } - } - } - - if(!is2char) { - // Convert one-character letter - var c = str.substr(i, 1); - var pos = t_table1.indexOf(c); - if (pos < 0) - new_str+= c; - else - new_str+= w_table1.substr(pos, 1); - } - } - - return new_str; -} - -function transliterate (msg, e) -{ - if (e) e.disabled = true; - setTimeout(function() { - if (!bbcode.surround('', '', translit2win)) { - msg.value = translit2win(msg.value); - } - if (e) e.disabled = false; - }, 1); -} \ No newline at end of file +}); \ No newline at end of file diff --git a/upload/styles/templates/default/css/main.css b/upload/styles/templates/default/css/main.css index 5ca5875eb..81dc725e4 100644 --- a/upload/styles/templates/default/css/main.css +++ b/upload/styles/templates/default/css/main.css @@ -465,16 +465,11 @@ table.pm_box_size { width: 175px; margin: 8px 2px; } .pm_box_size b { font-size: 10px; } .pm_nav td { padding: 4px; font-size: 14px; font-weight: bold; } -table.translit_expl th { - width: 30px; padding-right: 8px; font-weight: bold; text-align: right; -} -table.translit_expl td { width: 14px; } - table.user_contacts th { text-align: right; white-space: nowrap; } - .user_contacts td { text-align: left; padding: 2px 6px; white-space: nowrap; } + .user_contacts td { text-align: left; padding: 2px 6px; white-space: nowrap; } table.user_details th { padding: 2px 6px; text-align: right; vertical-align: top; } - .user_details td { width: 70%; } + .user_details td { width: 70%; } table.usercp_register h6 { margin: 0.3em 0.4em; color: #444444; line-height: 100%; diff --git a/upload/styles/templates/default/posting_editor.tpl b/upload/styles/templates/default/posting_editor.tpl index 7d5d8838b..78a88d1f3 100644 --- a/upload/styles/templates/default/posting_editor.tpl +++ b/upload/styles/templates/default/posting_editor.tpl @@ -85,63 +85,16 @@ ajax.callback.posts = function(data) {   -   - - ? - + - - - - - +
- + + {L_POST_RELEASE_FROM_GROUP} @@ -147,7 +148,8 @@ - + + From 5c51e6a824e6239cb5634ea5c457e4c32b9ba012 Mon Sep 17 00:00:00 2001 From: PheRum Date: Thu, 23 Oct 2014 21:05:30 +0300 Subject: [PATCH 5/8] =?UTF-8?q?=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20ssl=20smtp=20=D0=BE=D1=82=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=BA=D0=B8,=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D0=BD=D1=82=D1=8B=20=D0=BD=D0=B0=20=D0=BF=D0=B0=D0=BF=D0=BA?= =?UTF-8?q?=D1=83=20=D1=81=20=D0=BA=D0=B0=D1=80=D1=82=D0=B8=D0=BD=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/library/config.php | 27 +++++++++++++++------------ upload/library/includes/smtp.php | 3 ++- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/upload/library/config.php b/upload/library/config.php index 08f155b81..b6d094647 100644 --- a/upload/library/config.php +++ b/upload/library/config.php @@ -65,6 +65,9 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); $bb_cfg = $tr_cfg = $page_cfg = array(); +// Increase number after changing js or css +$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; + // Primary domain name $domain_name = 'torrentpier.me'; // enter here your primary domain name of your site $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name; @@ -106,7 +109,7 @@ $bb_cfg['db_alias'] = array( // Cache $bb_cfg['cache']['pconnect'] = true; $bb_cfg['cache']['db_dir'] = realpath(BB_ROOT) .'/internal_data/cache/filecache/'; -$bb_cfg['cache']['prefix'] = 'tp_'; // Префикс кеша 'tp_2' +$bb_cfg['cache']['prefix'] = ''; // Префикс кеша 'tp_2' $bb_cfg['cache']['memcache'] = array( 'host' => '127.0.0.1', 'port' => 11211, @@ -145,9 +148,6 @@ if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) $_SERVER['REMOTE_ADDR'] = $_SERVER['HTTP_CF_CONNECTING_IP']; } -// Increase number after changing js or css -$bb_cfg['js_ver'] = $bb_cfg['css_ver'] = 1; - // GZip $bb_cfg['gzip_compress'] = true; // compress output @@ -162,7 +162,7 @@ $bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. $bb_cfg['ocelot'] = array( 'enabled' => false, 'host' => $domain_name, - 'url' => 'http://'. $domain_name .':34000/', + 'url' => "http://$domain_name:34000/", 'secret' => 'some_10_chars', // 10 chars 'stats' => 'some_10_chars', // 10 chars ); @@ -264,6 +264,7 @@ define('INC_DIR', BB_PATH .'/library/includes/' ); define('CLASS_DIR', BB_PATH .'/library/includes/classes/'); define('UCP_DIR', BB_PATH .'/library/includes/ucp/' ); define('LANG_ROOT_DIR', BB_PATH .'/library/language/' ); +define('IMAGES_DIR', BB_PATH .'/styles/images/' ); define('TEMPLATES_DIR', BB_PATH .'/styles/templates/' ); // URL's @@ -356,12 +357,14 @@ $bb_cfg['reg_email_activation'] = false; // Требовать акт // Email $bb_cfg['emailer_disabled'] = false; -$bb_cfg['smtp_delivery'] = false; // set true if you want or have to send email via a named server instead of the local mail function +$bb_cfg['smtp_delivery'] = false; // send email via a named server instead of the local mail function +$bb_cfg['smtp_ssl'] = false; // use ssl connect $bb_cfg['smtp_host'] = ''; // SMTP server host -$bb_cfg['smtp_password'] = ''; // enter a password if your SMTP server requires it +$bb_cfg['smtp_port'] = 25; // SMTP server port $bb_cfg['smtp_username'] = ''; // enter a username if your SMTP server requires it +$bb_cfg['smtp_password'] = ''; // enter a password if your SMTP server requires it -$bb_cfg['board_email'] = 'noreply@' . $domain_name; // admin email address +$bb_cfg['board_email'] = "noreply@$domain_name"; // admin email address $bb_cfg['board_email_form'] = false; // can users send email to each other via board $bb_cfg['board_email_sig'] = ''; // this text will be attached to all emails the board sends $bb_cfg['board_email_sitename'] = $domain_name; // sitename used in all emails header @@ -371,9 +374,9 @@ $bb_cfg['pm_notify_enabled'] = true; $bb_cfg['group_send_email'] = true; $bb_cfg['email_change_disabled'] = false; // disable changing email by user -$bb_cfg['tech_admin_email'] = 'admin@' . $domain_name; // email for sending error reports -$bb_cfg['abuse_email'] = 'abuse@' . $domain_name; -$bb_cfg['adv_email'] = 'adv@' . $domain_name; +$bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports +$bb_cfg['abuse_email'] = "abuse@$domain_name"; +$bb_cfg['adv_email'] = "adv@$domain_name"; // Debug define('DBG_LOG', false); // enable forum debug (off on production) @@ -570,7 +573,7 @@ $bb_cfg['avatars'] = array( // Group avatars $bb_cfg['group_avatars'] = array( 'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов - 'max_size' => 100*1024, // размер аватары в байтах + 'max_size' => 300*1024, // размер аватары в байтах 'max_height' => 300, // высота аватара в px 'max_width' => 300, // ширина аватара в px 'no_avatar' => 'gallery/noavatar.png', // дефолтная аватара diff --git a/upload/library/includes/smtp.php b/upload/library/includes/smtp.php index 23afafdbc..91fb93590 100644 --- a/upload/library/includes/smtp.php +++ b/upload/library/includes/smtp.php @@ -85,7 +85,8 @@ function smtpmail($mail_to, $subject, $message, $headers = '') // Ok we have error checked as much as we can to this point let's get on // it already. - if( !$socket = @fsockopen($bb_cfg['smtp_host'], 25, $errno, $errstr, 20) ) + $ssl = ($bb_cfg['smtp_ssl']) ? 'ssl://' : ''; + if( !$socket = @fsockopen($ssl . $bb_cfg['smtp_host'], $bb_cfg['smtp_port'], $errno, $errstr, 20) ) { bb_die('Could not connect to smtp host : '. $errno .' : '. $errstr); } From 99400052d31ac62a52e977ec628e5740e0e7d4e8 Mon Sep 17 00:00:00 2001 From: Exile Date: Fri, 24 Oct 2014 10:43:09 +0400 Subject: [PATCH 6/8] =?UTF-8?q?=D0=98=D0=BD=D1=82=D0=B5=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D1=81=20Ocelot?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Добавляем интеграцию с Ocelot. Включение в конфиге, настройки там же. Исправление дампа базы на замену. Исправление ошибки с добавлением ретрекера гостю. --- install/sql/ocelot.sql | 8 +- upload/library/config.php | 15 +- .../includes/cron/jobs/tr_complete_count.php | 64 ++++++--- .../includes/cron/jobs/tr_make_snapshot.php | 86 +++++++---- upload/library/includes/functions_torrent.php | 134 +++++++++++++++++- upload/library/includes/smtp.php | 3 +- 6 files changed, 247 insertions(+), 63 deletions(-) diff --git a/install/sql/ocelot.sql b/install/sql/ocelot.sql index 1c8167a92..cff9c322c 100644 --- a/install/sql/ocelot.sql +++ b/install/sql/ocelot.sql @@ -31,7 +31,10 @@ CREATE TABLE IF NOT EXISTS `bb_bt_tracker` ( `up_add` bigint(20) unsigned NOT NULL DEFAULT '0', `down_add` bigint(20) unsigned NOT NULL DEFAULT '0', `update_time` int(11) NOT NULL DEFAULT '0', - `complete_percent` bigint(20) NOT NULL DEFAULT '0' + `complete_percent` bigint(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`peer_hash`), + KEY `topic_id` (`topic_id`), + KEY `user_id` (`user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- -------------------------------------------------------- @@ -46,5 +49,6 @@ CREATE TABLE IF NOT EXISTS `bb_bt_tracker_snap` ( `leechers` mediumint(8) unsigned NOT NULL DEFAULT '0', `speed_up` int(10) unsigned NOT NULL DEFAULT '0', `speed_down` int(10) unsigned NOT NULL DEFAULT '0', - `complete` int(11) NOT NULL + `complete` int(11) NOT NULL, + PRIMARY KEY (`topic_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/upload/library/config.php b/upload/library/config.php index b6d094647..ff89baf9d 100644 --- a/upload/library/config.php +++ b/upload/library/config.php @@ -1,6 +1,7 @@ '127.0.0.1', 'port' => 11211, @@ -162,9 +162,10 @@ $bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. $bb_cfg['ocelot'] = array( 'enabled' => false, 'host' => $domain_name, - 'url' => "http://$domain_name:34000/", - 'secret' => 'some_10_chars', // 10 chars - 'stats' => 'some_10_chars', // 10 chars + 'port' => 34000, + 'url' => "http://$domain_name:34000/", // with '/' + 'secret' => 'some_10_chars', // 10 chars + 'stats' => 'some_10_chars', // 10 chars ); // FAQ url help link @@ -374,7 +375,7 @@ $bb_cfg['pm_notify_enabled'] = true; $bb_cfg['group_send_email'] = true; $bb_cfg['email_change_disabled'] = false; // disable changing email by user -$bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports +$bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports $bb_cfg['abuse_email'] = "abuse@$domain_name"; $bb_cfg['adv_email'] = "adv@$domain_name"; diff --git a/upload/library/includes/cron/jobs/tr_complete_count.php b/upload/library/includes/cron/jobs/tr_complete_count.php index fee5ff427..66230187e 100644 --- a/upload/library/includes/cron/jobs/tr_complete_count.php +++ b/upload/library/includes/cron/jobs/tr_complete_count.php @@ -2,29 +2,47 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); -// Get complete counts -DB()->query(" - CREATE TEMPORARY TABLE tmp_complete_count - SELECT - topic_id, COUNT(*) AS compl_cnt - FROM ". BB_BT_TORSTAT ." - WHERE completed = 0 - GROUP BY topic_id -"); +global $bb_cfg; -// Update USER "completed" counters -DB()->query("UPDATE ". BB_BT_TORSTAT ." SET completed = 1"); +if ($bb_cfg['ocelot']['enabled']) +{ + // Update TORRENT "completed" counters + DB()->query(" + UPDATE + ". BB_BT_TORRENTS ." tor, + ". BB_BT_TRACKER_SNAP. " snap + SET + tor.complete_count = snap.complete + WHERE + tor.topic_id = snap.topic_id + "); +} +else +{ + // Get complete counts + DB()->query(" + CREATE TEMPORARY TABLE tmp_complete_count + SELECT + topic_id, COUNT(*) AS compl_cnt + FROM ". BB_BT_TORSTAT ." + WHERE completed = 0 + GROUP BY topic_id + "); -// Update TORRENT "completed" counters -DB()->query(" - UPDATE - ". BB_BT_TORRENTS ." tor, - tmp_complete_count tmp - SET - tor.complete_count = tor.complete_count + tmp.compl_cnt - WHERE - tor.topic_id = tmp.topic_id -"); + // Update USER "completed" counters + DB()->query("UPDATE ". BB_BT_TORSTAT ." SET completed = 1"); -// Drop tmp table -DB()->query("DROP TEMPORARY TABLE tmp_complete_count"); \ No newline at end of file + // Update TORRENT "completed" counters + DB()->query(" + UPDATE + ". BB_BT_TORRENTS ." tor, + tmp_complete_count tmp + SET + tor.complete_count = tor.complete_count + tmp.compl_cnt + WHERE + tor.topic_id = tmp.topic_id + "); + + // Drop tmp table + DB()->query("DROP TEMPORARY TABLE tmp_complete_count"); +} \ No newline at end of file diff --git a/upload/library/includes/cron/jobs/tr_make_snapshot.php b/upload/library/includes/cron/jobs/tr_make_snapshot.php index 83fdbd1dc..7f5041188 100644 --- a/upload/library/includes/cron/jobs/tr_make_snapshot.php +++ b/upload/library/includes/cron/jobs/tr_make_snapshot.php @@ -2,17 +2,21 @@ if (!defined('BB_ROOT')) die(basename(__FILE__)); +global $bb_cfg; + DB()->expect_slow_query(600); // // Make tracker snapshot // -define('NEW_BB_BT_TRACKER_SNAP', 'new_tracker_snap'); -define('OLD_BB_BT_TRACKER_SNAP', 'old_tracker_snap'); +if (!$bb_cfg['ocelot']['enabled']) +{ + define('NEW_BB_BT_TRACKER_SNAP', 'new_tracker_snap'); + define('OLD_BB_BT_TRACKER_SNAP', 'old_tracker_snap'); -DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_TRACKER_SNAP .", ". OLD_BB_BT_TRACKER_SNAP); - -DB()->query("CREATE TABLE ". NEW_BB_BT_TRACKER_SNAP ." LIKE ". BB_BT_TRACKER_SNAP); + DB()->query("DROP TABLE IF EXISTS " . NEW_BB_BT_TRACKER_SNAP . ", " . OLD_BB_BT_TRACKER_SNAP); + DB()->query("CREATE TABLE " . NEW_BB_BT_TRACKER_SNAP . " LIKE " . BB_BT_TRACKER_SNAP); +} $per_cycle = 50000; $row = DB()->fetch_row("SELECT MIN(topic_id) AS start_id, MAX(topic_id) AS finish_id FROM ". BB_BT_TRACKER); @@ -25,44 +29,78 @@ while (true) $end_id = $start_id + $per_cycle - 1; $val = array(); - $sql = " - SELECT - topic_id, SUM(seeder) AS seeders, (COUNT(*) - SUM(seeder)) AS leechers, - SUM(speed_up) AS speed_up, SUM(speed_down) AS speed_down - FROM ". BB_BT_TRACKER ." - WHERE topic_id BETWEEN $start_id AND $end_id - GROUP BY topic_id - "; + + if (!$bb_cfg['ocelot']['enabled']) + { + $sql = " + SELECT + topic_id, SUM(seeder) AS seeders, (COUNT(*) - SUM(seeder)) AS leechers, + SUM(speed_up) AS speed_up, SUM(speed_down) AS speed_down + FROM " . BB_BT_TRACKER . " + WHERE topic_id BETWEEN $start_id AND $end_id + GROUP BY topic_id + "; + } + else + { + $sql = " + SELECT + topic_id, SUM(speed_up) AS speed_up, SUM(speed_down) AS speed_down + FROM " . BB_BT_TRACKER . " + WHERE topic_id BETWEEN $start_id AND $end_id + GROUP BY topic_id + "; + } + foreach (DB()->fetch_rowset($sql) as $row) { $val[] = join(',', $row); } + if ($val) { - DB()->query(" - REPLACE INTO ". NEW_BB_BT_TRACKER_SNAP ." - (topic_id, seeders, leechers, speed_up, speed_down) - VALUES(". join('),(', $val) .") - "); + if (!$bb_cfg['ocelot']['enabled']) + { + DB()->query(" + REPLACE INTO " . NEW_BB_BT_TRACKER_SNAP . " + (topic_id, seeders, leechers, speed_up, speed_down) + VALUES(" . join('),(', $val) . ") + "); + } + else + { + DB()->query(" + INSERT INTO " . BB_BT_TRACKER_SNAP . " + (topic_id, speed_up, speed_down) + VALUES(". join('),(', $val) .") + ON DUPLICATE KEY UPDATE speed_up = VALUES(speed_up), speed_down = VALUES(speed_down) + "); + } } + if ($end_id > $finish_id) { break; } + if (!($start_id % ($per_cycle*10))) { sleep(1); } + $start_id += $per_cycle; } -DB()->query(" - RENAME TABLE - ". BB_BT_TRACKER_SNAP ." TO ". OLD_BB_BT_TRACKER_SNAP .", - ". NEW_BB_BT_TRACKER_SNAP ." TO ". BB_BT_TRACKER_SNAP ." -"); +if (!$bb_cfg['ocelot']['enabled']) +{ + DB()->query(" + RENAME TABLE + ". BB_BT_TRACKER_SNAP ." TO ". OLD_BB_BT_TRACKER_SNAP .", + ". NEW_BB_BT_TRACKER_SNAP ." TO ". BB_BT_TRACKER_SNAP ." + "); -DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_TRACKER_SNAP .", ". OLD_BB_BT_TRACKER_SNAP); + DB()->query("DROP TABLE IF EXISTS ". NEW_BB_BT_TRACKER_SNAP .", ". OLD_BB_BT_TRACKER_SNAP); +} // // Make dl-list snapshot diff --git a/upload/library/includes/functions_torrent.php b/upload/library/includes/functions_torrent.php index d3f676a51..6c0472196 100644 --- a/upload/library/includes/functions_torrent.php +++ b/upload/library/includes/functions_torrent.php @@ -61,7 +61,7 @@ function tracker_unregister ($attach_id, $mode = '') global $lang, $bb_cfg; $attach_id = (int) $attach_id; - $post_id = $topic_id = $forum_id = null; + $post_id = $topic_id = $forum_id = $info_hash = null; // Get torrent info if ($torrent = get_torrent_info($attach_id)) @@ -117,6 +117,16 @@ function tracker_unregister ($attach_id, $mode = '') bb_die('Could not delete peers'); } + // Ocelot + if ($bb_cfg['ocelot']['enabled']) + { + if ($row = DB()->fetch_row("SELECT info_hash FROM ". BB_BT_TORRENTS ." WHERE attach_id = $attach_id LIMIT 1")) + { + $info_hash = $row['info_hash']; + } + ocelot_update_tracker('delete_torrent', array('info_hash' => rawurlencode($info_hash), 'id' => $topic_id)); + } + // Delete torrent $sql = "DELETE FROM ". BB_BT_TORRENTS ." WHERE attach_id = $attach_id"; @@ -206,9 +216,21 @@ function change_tor_type ($attach_id, $tor_status_gold) if (!IS_AM) bb_die($lang['ONLY_FOR_MOD']); - $topic_id = $torrent['topic_id']; + $topic_id = $torrent['topic_id']; $tor_status_gold = intval($tor_status_gold); + $info_hash = null; + DB()->query("UPDATE ". BB_BT_TORRENTS ." SET tor_type = $tor_status_gold WHERE topic_id = $topic_id LIMIT 1"); + + // Ocelot + if ($bb_cfg['ocelot']['enabled']) + { + if ($row = DB()->fetch_row("SELECT info_hash FROM ". BB_BT_TORRENTS ." WHERE topic_id = $topic_id LIMIT 1")) + { + $info_hash = $row['info_hash']; + } + ocelot_update_tracker('update_torrent', array('info_hash' => rawurlencode($info_hash), 'freetorrent' => $tor_status_gold)); + } } function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVED, $reg_time = TIMENOW) @@ -227,6 +249,7 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE $topic_id = $torrent['topic_id']; $forum_id = $torrent['forum_id']; $poster_id = $torrent['poster_id']; + $info_hash = null; if ($torrent['extension'] !== TORRENT_EXT) return torrent_error_exit($lang['NOT_TORRENT']); if (!$torrent['allow_reg_tracker']) return torrent_error_exit($lang['REG_NOT_ALLOWED_IN_THIS_FORUM']); @@ -275,6 +298,12 @@ function tracker_register ($attach_id, $mode = '', $tor_status = TOR_NOT_APPROVE $info_hash_sql = rtrim(DB()->escape($info_hash), ' '); $info_hash_md5 = md5($info_hash); + // Ocelot + if ($bb_cfg['ocelot']['enabled']) + { + ocelot_update_tracker('add_torrent', array('info_hash' => rawurlencode($info_hash), 'id' => $topic_id, 'freetorrent' => 0)); + } + if ($row = DB()->fetch_row("SELECT topic_id FROM ". BB_BT_TORRENTS ." WHERE info_hash = '$info_hash_sql' LIMIT 1")) { $msg = sprintf($lang['BT_REG_FAIL_SAME_HASH'], TOPIC_URL . $row['topic_id']); @@ -411,6 +440,10 @@ function send_torrent_with_passkey ($filename) { bb_simple_die('Could not generate passkey'); } + elseif ($bb_cfg['ocelot']['enabled']) + { + ocelot_update_tracker('add_user', array('id' => $user_id ,'passkey' => $passkey_val)); + } } // Ratio limits @@ -443,7 +476,7 @@ function send_torrent_with_passkey ($filename) bb_die('This is not a bencoded file'); } - $announce = strval($ann_url . "?$passkey_key=$passkey_val"); + $announce = $bb_cfg['ocelot']['enabled'] ? strval($bb_cfg['ocelot']['url'] .$passkey_val. "/announce") : strval($ann_url . "?$passkey_key=$passkey_val"); // Replace original announce url with tracker default if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce'])) @@ -464,7 +497,7 @@ function send_torrent_with_passkey ($filename) // Add retracker if (isset($tr_cfg['retracker']) && $tr_cfg['retracker']) { - if (bf($userdata['user_opt'], 'user_opt', 'user_retracker')) + if (bf($userdata['user_opt'], 'user_opt', 'user_retracker') || IS_GUEST) { if (!isset($tor['announce-list'])) { @@ -513,7 +546,7 @@ function send_torrent_with_passkey ($filename) function generate_passkey ($user_id, $force_generate = false) { - global $lang, $sql; + global $bb_cfg, $lang, $sql; $user_id = (int) $user_id; @@ -538,6 +571,12 @@ function generate_passkey ($user_id, $force_generate = false) for ($i=0; $i < 20; $i++) { $passkey_val = make_rand_str(BT_AUTH_KEY_LENGTH); + $old_passkey = null; + + if ($row = DB()->fetch_row("SELECT auth_key FROM ". BB_BT_USERS ." WHERE user_id = $user_id LIMIT 1")) + { + $old_passkey = $row['auth_key']; + } // Insert new row DB()->query("INSERT IGNORE INTO ". BB_BT_USERS ." (user_id, auth_key) VALUES ($user_id, '$passkey_val')"); @@ -551,6 +590,11 @@ function generate_passkey ($user_id, $force_generate = false) if (DB()->affected_rows() == 1) { + // Ocelot + if ($bb_cfg['ocelot']['enabled']) + { + ocelot_update_tracker('change_passkey', array('oldpasskey' => $old_passkey,'newpasskey' => $passkey_val)); + } return $passkey_val; } } @@ -606,6 +650,86 @@ function torrent_error_exit ($message) bb_die($msg . $message); } +function ocelot_update_tracker ($action, $updates) +{ + global $bb_cfg; + + $get = $bb_cfg['ocelot']['secret'] . "/update?action=$action"; + + foreach ($updates as $key => $value) + { + $get .= "&$key=$value"; + } + + $max_attempts = 3; + $err = false; + + if (ocelot_send_request($get, $max_attempts, $err) === false) + { + return false; + } + + return true; +} + +function ocelot_send_request ($get, $max_attempts = 1, &$err = false) +{ + global $bb_cfg; + + $header = "GET /$get HTTP/1.1\r\nConnection: Close\r\n\r\n"; + $attempts = $sleep = $success = $response = 0; + $start_time = microtime(true); + + while (!$success && $attempts++ < $max_attempts) + { + if ($sleep) + { + sleep($sleep); + } + + // Send request + $file = fsockopen($bb_cfg['ocelot']['host'], $bb_cfg['ocelot']['port'], $error_num, $error_string); + if ($file) + { + if (fwrite($file, $header) === false) + { + $err = "Failed to fwrite()"; + $sleep = 3; + continue; + } + } + else + { + $err = "Failed to fsockopen() - $error_num - $error_string"; + $sleep = 6; + continue; + } + + // Check for response + while (!feof($file)) + { + $response .= fread($file, 1024); + } + $data_start = strpos($response, "\r\n\r\n") + 4; + $data_end = strrpos($response, "\n"); + if ($data_end > $data_start) + { + $data = substr($response, $data_start, $data_end - $data_start); + } + else + { + $data = ""; + } + $status = substr($response, $data_end + 1); + if ($status == "success") + { + $success = true; + } + } + + return $success; +} + // bdecode: based on OpenTracker function bdecode_file ($filename) { diff --git a/upload/library/includes/smtp.php b/upload/library/includes/smtp.php index 91fb93590..175e6685f 100644 --- a/upload/library/includes/smtp.php +++ b/upload/library/includes/smtp.php @@ -83,8 +83,7 @@ function smtpmail($mail_to, $subject, $message, $headers = '') bb_die('Email message was blank'); } - // Ok we have error checked as much as we can to this point let's get on - // it already. + // Ok we have error checked as much as we can to this point let's get on it already $ssl = ($bb_cfg['smtp_ssl']) ? 'ssl://' : ''; if( !$socket = @fsockopen($ssl . $bb_cfg['smtp_host'], $bb_cfg['smtp_port'], $errno, $errstr, 20) ) { From 65e8058815e6e5d57661df42c7bfbdce8c5298f2 Mon Sep 17 00:00:00 2001 From: Exile Date: Fri, 24 Oct 2014 12:02:34 +0400 Subject: [PATCH 7/8] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0e55470e3..8822300bc 100644 --- a/README.md +++ b/README.md @@ -53,15 +53,21 @@ TorrentPier II - движок торрент-трекера, написанны ## Рекомендуемый способ запуска cron.php -Для значительного ускорения работы трекера может потребоваться отвязка встроенного форумного крона. С более подробной информацией об отвязке крона, вы можете ознакомиться в данной теме http://torrentpier.me/threads/52/ на нашем форуме поддержки. +Для значительного ускорения работы трекера может потребоваться отвязка встроенного форумного крона. С более подробной информацией об отвязке крона, вы можете ознакомиться в данной теме https://torrentpier.me/threads/52/ на нашем форуме поддержки. ## Локальный файл конфигурации Начиная с ревизии 599 была добавлена поддерка автоматического подключения файла config.local.php, при создании его вами. В данном файле вы можете переопределять настройки файла config.php для конкретного сервера, на котором запущен трекер или в целом менять стандартные значения файла config.php, для более простого обновления файлов движка в дальнейшем. +## Установка Ocelot + +В движок встроена по-умолчанию поддержка альтернативного компилируемого анонсера - Ocelot. Настройка производится в файле **library/config.php**, сам анонсер находится в репозитории https://github.com/torrentpier/ocelot + +Инструкция по сборке приведена на нашем форуме: https://torrentpier.me/threads/sborka-ocelot-pod-debian-7-1.26078/ + ## Полезные ссылки -+ Наш форум http://torrentpier.me/ -+ Центр загрузки http://get.torrentpier.me/ -+ Часто задаваемые вопросы http://faq.torrentpier.me/ -+ Где задать вопрос http://torrentpier.me/forums/10/ ++ Наш форум https://torrentpier.me/ ++ Центр загрузки https://get.torrentpier.me/ ++ Часто задаваемые вопросы https://faq.torrentpier.me/ ++ Где задать вопрос https://torrentpier.me/forums/10/ From 379b5f9677edf57c6b7d2315953ee821fc4dc183 Mon Sep 17 00:00:00 2001 From: Exile Date: Fri, 24 Oct 2014 16:06:56 +0400 Subject: [PATCH 8/8] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20readme.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8822300bc..03597f610 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,7 @@ TorrentPier II - движок торрент-трекера, написанны В движок встроена по-умолчанию поддержка альтернативного компилируемого анонсера - Ocelot. Настройка производится в файле **library/config.php**, сам анонсер находится в репозитории https://github.com/torrentpier/ocelot Инструкция по сборке приведена на нашем форуме: https://torrentpier.me/threads/sborka-ocelot-pod-debian-7-1.26078/ +Для работы анонсера требуется замена двух таблиц в базе данных - дамп в файле: **install/sql/ocelot.sql** ## Полезные ссылки