mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 14:23:57 -07:00
Merge pull request #38 from torrentpier/develop
Версия 2.1.3 ALPHA-3 Третий ALPHA-билд. Основные изменения: - нативная поддержка альтернативного компилируемого анонсера Ocelot; - поддержка SSL-шифрования у внешнего SMTP-сервера (Яндекс.Почта и т.п.); - удалена система транслитерации из движка (пользователям следует посоветовать использование сайтов наподобие http://translit.net/ для этой цели); - исправлена ошибка с прописыванием ретрекера у гостей; - исправлена ошибка с выводом списка релиз-групп; - исправления путей к изображениям.
This commit is contained in:
commit
9bf658893a
22 changed files with 351 additions and 366 deletions
17
README.md
17
README.md
|
@ -53,15 +53,22 @@ TorrentPier II - движок торрент-трекера, написанны
|
||||||
|
|
||||||
## Рекомендуемый способ запуска cron.php
|
## Рекомендуемый способ запуска cron.php
|
||||||
|
|
||||||
Для значительного ускорения работы трекера может потребоваться отвязка встроенного форумного крона. С более подробной информацией об отвязке крона, вы можете ознакомиться в данной теме http://torrentpier.me/threads/52/ на нашем форуме поддержки.
|
Для значительного ускорения работы трекера может потребоваться отвязка встроенного форумного крона. С более подробной информацией об отвязке крона, вы можете ознакомиться в данной теме https://torrentpier.me/threads/52/ на нашем форуме поддержки.
|
||||||
|
|
||||||
## Локальный файл конфигурации
|
## Локальный файл конфигурации
|
||||||
|
|
||||||
Начиная с ревизии 599 была добавлена поддерка автоматического подключения файла config.local.php, при создании его вами. В данном файле вы можете переопределять настройки файла config.php для конкретного сервера, на котором запущен трекер или в целом менять стандартные значения файла config.php, для более простого обновления файлов движка в дальнейшем.
|
Начиная с ревизии 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/
|
||||||
|
Для работы анонсера требуется замена двух таблиц в базе данных - дамп в файле: **install/sql/ocelot.sql**
|
||||||
|
|
||||||
## Полезные ссылки
|
## Полезные ссылки
|
||||||
|
|
||||||
+ Наш форум http://torrentpier.me/
|
+ Наш форум https://torrentpier.me/
|
||||||
+ Центр загрузки http://get.torrentpier.me/
|
+ Центр загрузки https://get.torrentpier.me/
|
||||||
+ Часто задаваемые вопросы http://faq.torrentpier.me/
|
+ Часто задаваемые вопросы https://faq.torrentpier.me/
|
||||||
+ Где задать вопрос http://torrentpier.me/forums/10/
|
+ Где задать вопрос https://torrentpier.me/forums/10/
|
||||||
|
|
|
@ -16,7 +16,7 @@ qaqra
|
||||||
rserg99
|
rserg99
|
||||||
leszav
|
leszav
|
||||||
Dr_Brown
|
Dr_Brown
|
||||||
Bullit (http://bestrip.org/)
|
Bullit
|
||||||
Triceratop (http://goldenshara.com/)
|
Triceratop (http://goldenshara.com/)
|
||||||
Ramzess
|
Ramzess
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ Ramzess
|
||||||
|
|
||||||
SamSeGo
|
SamSeGo
|
||||||
alesel (http://sporttracker.kz/)
|
alesel (http://sporttracker.kz/)
|
||||||
Bullit (http://bestrip.org/)
|
Bullit
|
||||||
igorsaevets
|
igorsaevets
|
||||||
vasilich619
|
vasilich619
|
||||||
wint1000 (http://asmlocator.ru/)
|
wint1000 (http://asmlocator.ru/)
|
||||||
|
|
54
install/sql/ocelot.sql
Normal file
54
install/sql/ocelot.sql
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Удаление старых таблиц
|
||||||
|
--
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `bb_bt_tracker`;
|
||||||
|
DROP TABLE IF EXISTS `bb_bt_tracker_snap`;
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Структура таблицы `bb_bt_tracker`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `bb_bt_tracker` (
|
||||||
|
`peer_hash` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||||
|
`topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`peer_id` varchar(20) NOT NULL,
|
||||||
|
`user_id` mediumint(9) NOT NULL DEFAULT '0',
|
||||||
|
`ip` varchar(15) NOT NULL DEFAULT '0',
|
||||||
|
`client` varchar(51) NOT NULL DEFAULT 'Unknown',
|
||||||
|
`ipv6` varchar(32) DEFAULT NULL,
|
||||||
|
`port` smallint(5) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`seeder` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
`releaser` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
`tor_type` tinyint(1) NOT NULL DEFAULT '0',
|
||||||
|
`uploaded` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`downloaded` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`remain` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`speed_up` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`speed_down` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`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',
|
||||||
|
PRIMARY KEY (`peer_hash`),
|
||||||
|
KEY `topic_id` (`topic_id`),
|
||||||
|
KEY `user_id` (`user_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||||
|
|
||||||
|
-- --------------------------------------------------------
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Структура таблицы `bb_bt_tracker_snap`
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `bb_bt_tracker_snap` (
|
||||||
|
`topic_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`seeders` mediumint(8) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`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,
|
||||||
|
PRIMARY KEY (`topic_id`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
|
@ -58,7 +58,7 @@ switch ($mode)
|
||||||
'ROW_CLASS' => !($i % 2) ? 'row2' : 'row1',
|
'ROW_CLASS' => !($i % 2) ? 'row2' : 'row1',
|
||||||
'JOB_ID' => $i + 1,
|
'JOB_ID' => $i + 1,
|
||||||
'CRON_ID' => $row['cron_id'],
|
'CRON_ID' => $row['cron_id'],
|
||||||
'CRON_ACTIVE' => $row['cron_active'] ? '<img src="../images/icon_run.gif" alt="'. $lang['YES'] .'" />' : '<img src="../images/icon_delete.gif" alt="'. $lang['NO'] .'" />',
|
'CRON_ACTIVE' => $row['cron_active'] ? '<img src="../styles/images/icon_run.gif" alt="'. $lang['YES'] .'" />' : '<img src="../styles/images/icon_delete.gif" alt="'. $lang['NO'] .'" />',
|
||||||
'CRON_TITLE' => $row['cron_title'],
|
'CRON_TITLE' => $row['cron_title'],
|
||||||
'CRON_SCRIPT' => $row['cron_script'],
|
'CRON_SCRIPT' => $row['cron_script'],
|
||||||
'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : '<b class="leech">'. $lang['NOSELECT'] .'</b>',
|
'SCHEDULE' => $row['schedule'] ? $lang['SCHEDULE'][$row['schedule']] : '<b class="leech">'. $lang['NOSELECT'] .'</b>',
|
||||||
|
|
|
@ -7,7 +7,6 @@ define('FILENAME_PREFIX_LENGTH', 6);
|
||||||
define('FILENAME_MAX_LENGTH', 180);
|
define('FILENAME_MAX_LENGTH', 180);
|
||||||
define('FILENAME_CRYPTIC', false);
|
define('FILENAME_CRYPTIC', false);
|
||||||
define('FILENAME_CRYPTIC_LENGTH', 64);
|
define('FILENAME_CRYPTIC_LENGTH', 64);
|
||||||
define('FILENAME_TRANSLITERATE', true);
|
|
||||||
|
|
||||||
class attach_parent
|
class attach_parent
|
||||||
{
|
{
|
||||||
|
@ -964,10 +963,6 @@ class attach_parent
|
||||||
{
|
{
|
||||||
$this->attach_filename = make_rand_str(FILENAME_CRYPTIC_LENGTH);
|
$this->attach_filename = make_rand_str(FILENAME_CRYPTIC_LENGTH);
|
||||||
}
|
}
|
||||||
else if (FILENAME_TRANSLITERATE)
|
|
||||||
{
|
|
||||||
$this->attach_filename = transliterate($this->attach_filename);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{ // original
|
{ // original
|
||||||
$this->attach_filename = html_entity_decode(trim(stripslashes($this->attach_filename)));
|
$this->attach_filename = html_entity_decode(trim(stripslashes($this->attach_filename)));
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Script versions
|
||||||
* Domain name
|
* Domain name
|
||||||
* Version info
|
* Version info
|
||||||
* Database
|
* Database
|
||||||
|
@ -12,9 +13,9 @@
|
||||||
- Datastore
|
- Datastore
|
||||||
* Server
|
* Server
|
||||||
- Cloudflare
|
- Cloudflare
|
||||||
- Script versions
|
|
||||||
- GZip
|
- GZip
|
||||||
* Tracker
|
* Tracker
|
||||||
|
* Ocelot
|
||||||
* FAQ url
|
* FAQ url
|
||||||
* Torrents
|
* Torrents
|
||||||
- Ratio limits
|
- Ratio limits
|
||||||
|
@ -64,13 +65,16 @@ if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
|
|
||||||
$bb_cfg = $tr_cfg = $page_cfg = array();
|
$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
|
// Primary domain name
|
||||||
$domain_name = 'torrentpier.me'; // enter here your primary domain name of your site
|
$domain_name = 'torrentpier.me'; // enter here your primary domain name of your site
|
||||||
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
$domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $domain_name;
|
||||||
|
|
||||||
// Version info
|
// Version info
|
||||||
$bb_cfg['tp_version'] = '2.1.2';
|
$bb_cfg['tp_version'] = '2.1.3';
|
||||||
$bb_cfg['tp_release_date'] = '20-10-2014';
|
$bb_cfg['tp_release_date'] = '24-10-2014';
|
||||||
$bb_cfg['tp_release_state'] = 'ALPHA';
|
$bb_cfg['tp_release_state'] = 'ALPHA';
|
||||||
|
|
||||||
// Database
|
// Database
|
||||||
|
@ -105,7 +109,7 @@ $bb_cfg['db_alias'] = array(
|
||||||
// Cache
|
// Cache
|
||||||
$bb_cfg['cache']['pconnect'] = true;
|
$bb_cfg['cache']['pconnect'] = true;
|
||||||
$bb_cfg['cache']['db_dir'] = realpath(BB_ROOT) .'/internal_data/cache/filecache/';
|
$bb_cfg['cache']['db_dir'] = realpath(BB_ROOT) .'/internal_data/cache/filecache/';
|
||||||
$bb_cfg['cache']['prefix'] = 'tp_'; // Префикс кеша 'tp_2'
|
$bb_cfg['cache']['prefix'] = 'tp_'; // Префикс кеша ('tp_')
|
||||||
$bb_cfg['cache']['memcache'] = array(
|
$bb_cfg['cache']['memcache'] = array(
|
||||||
'host' => '127.0.0.1',
|
'host' => '127.0.0.1',
|
||||||
'port' => 11211,
|
'port' => 11211,
|
||||||
|
@ -144,9 +148,6 @@ if (isset($_SERVER['HTTP_CF_CONNECTING_IP']))
|
||||||
$_SERVER['REMOTE_ADDR'] = $_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
|
// GZip
|
||||||
$bb_cfg['gzip_compress'] = true; // compress output
|
$bb_cfg['gzip_compress'] = true; // compress output
|
||||||
|
|
||||||
|
@ -157,6 +158,16 @@ $bb_cfg['ignore_reported_ip'] = false; // Ignore IP reported by clie
|
||||||
$bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR']
|
$bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR']
|
||||||
$bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. etc.)
|
$bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. etc.)
|
||||||
|
|
||||||
|
// Ocelot
|
||||||
|
$bb_cfg['ocelot'] = array(
|
||||||
|
'enabled' => false,
|
||||||
|
'host' => $domain_name,
|
||||||
|
'port' => 34000,
|
||||||
|
'url' => "http://$domain_name:34000/", // with '/'
|
||||||
|
'secret' => 'some_10_chars', // 10 chars
|
||||||
|
'stats' => 'some_10_chars', // 10 chars
|
||||||
|
);
|
||||||
|
|
||||||
// FAQ url help link
|
// FAQ url help link
|
||||||
$bb_cfg['how_to_download_url_help'] = 'viewtopic.php?t=1'; // Как скачивать?
|
$bb_cfg['how_to_download_url_help'] = 'viewtopic.php?t=1'; // Как скачивать?
|
||||||
$bb_cfg['what_is_torrent_url_help'] = 'viewtopic.php?t=2'; // Что такое торрент?
|
$bb_cfg['what_is_torrent_url_help'] = 'viewtopic.php?t=2'; // Что такое торрент?
|
||||||
|
@ -254,6 +265,7 @@ define('INC_DIR', BB_PATH .'/library/includes/' );
|
||||||
define('CLASS_DIR', BB_PATH .'/library/includes/classes/');
|
define('CLASS_DIR', BB_PATH .'/library/includes/classes/');
|
||||||
define('UCP_DIR', BB_PATH .'/library/includes/ucp/' );
|
define('UCP_DIR', BB_PATH .'/library/includes/ucp/' );
|
||||||
define('LANG_ROOT_DIR', BB_PATH .'/library/language/' );
|
define('LANG_ROOT_DIR', BB_PATH .'/library/language/' );
|
||||||
|
define('IMAGES_DIR', BB_PATH .'/styles/images/' );
|
||||||
define('TEMPLATES_DIR', BB_PATH .'/styles/templates/' );
|
define('TEMPLATES_DIR', BB_PATH .'/styles/templates/' );
|
||||||
|
|
||||||
// URL's
|
// URL's
|
||||||
|
@ -346,12 +358,14 @@ $bb_cfg['reg_email_activation'] = false; // Требовать акт
|
||||||
// Email
|
// Email
|
||||||
$bb_cfg['emailer_disabled'] = false;
|
$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_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_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_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_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
|
$bb_cfg['board_email_sitename'] = $domain_name; // sitename used in all emails header
|
||||||
|
@ -361,9 +375,9 @@ $bb_cfg['pm_notify_enabled'] = true;
|
||||||
$bb_cfg['group_send_email'] = true;
|
$bb_cfg['group_send_email'] = true;
|
||||||
$bb_cfg['email_change_disabled'] = false; // disable changing email by user
|
$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['abuse_email'] = "abuse@$domain_name";
|
||||||
$bb_cfg['adv_email'] = 'adv@' . $domain_name;
|
$bb_cfg['adv_email'] = "adv@$domain_name";
|
||||||
|
|
||||||
// Debug
|
// Debug
|
||||||
define('DBG_LOG', false); // enable forum debug (off on production)
|
define('DBG_LOG', false); // enable forum debug (off on production)
|
||||||
|
@ -560,7 +574,7 @@ $bb_cfg['avatars'] = array(
|
||||||
// Group avatars
|
// Group avatars
|
||||||
$bb_cfg['group_avatars'] = array(
|
$bb_cfg['group_avatars'] = array(
|
||||||
'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов
|
'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов
|
||||||
'max_size' => 100*1024, // размер аватары в байтах
|
'max_size' => 300*1024, // размер аватары в байтах
|
||||||
'max_height' => 300, // высота аватара в px
|
'max_height' => 300, // высота аватара в px
|
||||||
'max_width' => 300, // ширина аватара в px
|
'max_width' => 300, // ширина аватара в px
|
||||||
'no_avatar' => 'gallery/noavatar.png', // дефолтная аватара
|
'no_avatar' => 'gallery/noavatar.png', // дефолтная аватара
|
||||||
|
|
|
@ -2,29 +2,47 @@
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
|
|
||||||
// Get complete counts
|
global $bb_cfg;
|
||||||
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 USER "completed" counters
|
if ($bb_cfg['ocelot']['enabled'])
|
||||||
DB()->query("UPDATE ". BB_BT_TORSTAT ." SET completed = 1");
|
{
|
||||||
|
// 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
|
// Update USER "completed" counters
|
||||||
DB()->query("
|
DB()->query("UPDATE ". BB_BT_TORSTAT ." SET completed = 1");
|
||||||
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
|
// Update TORRENT "completed" counters
|
||||||
DB()->query("DROP TEMPORARY TABLE tmp_complete_count");
|
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");
|
||||||
|
}
|
|
@ -2,17 +2,21 @@
|
||||||
|
|
||||||
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
if (!defined('BB_ROOT')) die(basename(__FILE__));
|
||||||
|
|
||||||
|
global $bb_cfg;
|
||||||
|
|
||||||
DB()->expect_slow_query(600);
|
DB()->expect_slow_query(600);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Make tracker snapshot
|
// Make tracker snapshot
|
||||||
//
|
//
|
||||||
define('NEW_BB_BT_TRACKER_SNAP', 'new_tracker_snap');
|
if (!$bb_cfg['ocelot']['enabled'])
|
||||||
define('OLD_BB_BT_TRACKER_SNAP', 'old_tracker_snap');
|
{
|
||||||
|
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("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("CREATE TABLE ". NEW_BB_BT_TRACKER_SNAP ." LIKE ". BB_BT_TRACKER_SNAP);
|
}
|
||||||
|
|
||||||
$per_cycle = 50000;
|
$per_cycle = 50000;
|
||||||
$row = DB()->fetch_row("SELECT MIN(topic_id) AS start_id, MAX(topic_id) AS finish_id FROM ". BB_BT_TRACKER);
|
$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;
|
$end_id = $start_id + $per_cycle - 1;
|
||||||
|
|
||||||
$val = array();
|
$val = array();
|
||||||
$sql = "
|
|
||||||
SELECT
|
if (!$bb_cfg['ocelot']['enabled'])
|
||||||
topic_id, SUM(seeder) AS seeders, (COUNT(*) - SUM(seeder)) AS leechers,
|
{
|
||||||
SUM(speed_up) AS speed_up, SUM(speed_down) AS speed_down
|
$sql = "
|
||||||
FROM ". BB_BT_TRACKER ."
|
SELECT
|
||||||
WHERE topic_id BETWEEN $start_id AND $end_id
|
topic_id, SUM(seeder) AS seeders, (COUNT(*) - SUM(seeder)) AS leechers,
|
||||||
GROUP BY 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
|
||||||
|
";
|
||||||
|
}
|
||||||
|
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)
|
foreach (DB()->fetch_rowset($sql) as $row)
|
||||||
{
|
{
|
||||||
$val[] = join(',', $row);
|
$val[] = join(',', $row);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($val)
|
if ($val)
|
||||||
{
|
{
|
||||||
DB()->query("
|
if (!$bb_cfg['ocelot']['enabled'])
|
||||||
REPLACE INTO ". NEW_BB_BT_TRACKER_SNAP ."
|
{
|
||||||
(topic_id, seeders, leechers, speed_up, speed_down)
|
DB()->query("
|
||||||
VALUES(". join('),(', $val) .")
|
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)
|
if ($end_id > $finish_id)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($start_id % ($per_cycle*10)))
|
if (!($start_id % ($per_cycle*10)))
|
||||||
{
|
{
|
||||||
sleep(1);
|
sleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
$start_id += $per_cycle;
|
$start_id += $per_cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
DB()->query("
|
if (!$bb_cfg['ocelot']['enabled'])
|
||||||
RENAME TABLE
|
{
|
||||||
". BB_BT_TRACKER_SNAP ." TO ". OLD_BB_BT_TRACKER_SNAP .",
|
DB()->query("
|
||||||
". NEW_BB_BT_TRACKER_SNAP ." TO ". BB_BT_TRACKER_SNAP ."
|
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
|
// Make dl-list snapshot
|
||||||
|
|
|
@ -1963,18 +1963,7 @@ function topic_attachment_image($switch_attachment)
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return '<img src="images/icon_clip.gif" alt="" border="0" /> ';
|
return '<img src="styles/images/icon_clip.gif" alt="" border="0" /> ';
|
||||||
}
|
|
||||||
|
|
||||||
function transliterate ($str)
|
|
||||||
{
|
|
||||||
static $translit_table;
|
|
||||||
|
|
||||||
if (!isset($translit_table))
|
|
||||||
{
|
|
||||||
require(DEFAULT_LANG_DIR .'translit_table.php');
|
|
||||||
}
|
|
||||||
return strtr($str, $translit_table);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2825,10 +2814,10 @@ function is_gold ($type)
|
||||||
switch ($type)
|
switch ($type)
|
||||||
{
|
{
|
||||||
case TOR_TYPE_GOLD:
|
case TOR_TYPE_GOLD:
|
||||||
$is_gold = '<img src="images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" /> ';
|
$is_gold = '<img src="styles/images/tor_gold.gif" width="16" height="15" title="'. $lang['GOLD'] .'" /> ';
|
||||||
break;
|
break;
|
||||||
case TOR_TYPE_SILVER:
|
case TOR_TYPE_SILVER:
|
||||||
$is_gold = '<img src="images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" /> ';
|
$is_gold = '<img src="styles/images/tor_silver.gif" width="16" height="15" title="'. $lang['SILVER'] .'" /> ';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$is_gold = '';
|
$is_gold = '';
|
||||||
|
|
|
@ -61,7 +61,7 @@ function tracker_unregister ($attach_id, $mode = '')
|
||||||
global $lang, $bb_cfg;
|
global $lang, $bb_cfg;
|
||||||
|
|
||||||
$attach_id = (int) $attach_id;
|
$attach_id = (int) $attach_id;
|
||||||
$post_id = $topic_id = $forum_id = null;
|
$post_id = $topic_id = $forum_id = $info_hash = null;
|
||||||
|
|
||||||
// Get torrent info
|
// Get torrent info
|
||||||
if ($torrent = get_torrent_info($attach_id))
|
if ($torrent = get_torrent_info($attach_id))
|
||||||
|
@ -117,6 +117,16 @@ function tracker_unregister ($attach_id, $mode = '')
|
||||||
bb_die('Could not delete peers');
|
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
|
// Delete torrent
|
||||||
$sql = "DELETE FROM ". BB_BT_TORRENTS ." WHERE attach_id = $attach_id";
|
$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']);
|
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);
|
$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");
|
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)
|
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'];
|
$topic_id = $torrent['topic_id'];
|
||||||
$forum_id = $torrent['forum_id'];
|
$forum_id = $torrent['forum_id'];
|
||||||
$poster_id = $torrent['poster_id'];
|
$poster_id = $torrent['poster_id'];
|
||||||
|
$info_hash = null;
|
||||||
|
|
||||||
if ($torrent['extension'] !== TORRENT_EXT) return torrent_error_exit($lang['NOT_TORRENT']);
|
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']);
|
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_sql = rtrim(DB()->escape($info_hash), ' ');
|
||||||
$info_hash_md5 = md5($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"))
|
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']);
|
$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');
|
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
|
// Ratio limits
|
||||||
|
@ -443,7 +476,7 @@ function send_torrent_with_passkey ($filename)
|
||||||
bb_die('This is not a bencoded file');
|
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
|
// Replace original announce url with tracker default
|
||||||
if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce']))
|
if ($bb_cfg['bt_replace_ann_url'] || !isset($tor['announce']))
|
||||||
|
@ -464,7 +497,7 @@ function send_torrent_with_passkey ($filename)
|
||||||
// Add retracker
|
// Add retracker
|
||||||
if (isset($tr_cfg['retracker']) && $tr_cfg['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']))
|
if (!isset($tor['announce-list']))
|
||||||
{
|
{
|
||||||
|
@ -513,7 +546,7 @@ function send_torrent_with_passkey ($filename)
|
||||||
|
|
||||||
function generate_passkey ($user_id, $force_generate = false)
|
function generate_passkey ($user_id, $force_generate = false)
|
||||||
{
|
{
|
||||||
global $lang, $sql;
|
global $bb_cfg, $lang, $sql;
|
||||||
|
|
||||||
$user_id = (int) $user_id;
|
$user_id = (int) $user_id;
|
||||||
|
|
||||||
|
@ -538,6 +571,12 @@ function generate_passkey ($user_id, $force_generate = false)
|
||||||
for ($i=0; $i < 20; $i++)
|
for ($i=0; $i < 20; $i++)
|
||||||
{
|
{
|
||||||
$passkey_val = make_rand_str(BT_AUTH_KEY_LENGTH);
|
$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
|
// Insert new row
|
||||||
DB()->query("INSERT IGNORE INTO ". BB_BT_USERS ." (user_id, auth_key) VALUES ($user_id, '$passkey_val')");
|
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)
|
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;
|
return $passkey_val;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -606,6 +650,86 @@ function torrent_error_exit ($message)
|
||||||
bb_die($msg . $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
|
// bdecode: based on OpenTracker
|
||||||
function bdecode_file ($filename)
|
function bdecode_file ($filename)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,7 +104,7 @@ class upload_common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// check ext
|
// 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));
|
$this->errors[] = sprintf($lang['UPLOAD_ERROR_NOT_ALLOWED'], htmlCHR($this->file_ext));
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -83,9 +83,9 @@ function smtpmail($mail_to, $subject, $message, $headers = '')
|
||||||
bb_die('Email message was blank');
|
bb_die('Email message was blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ok we have error checked as much as we can to this point let's get on
|
// Ok we have error checked as much as we can to this point let's get on it already
|
||||||
// it already.
|
$ssl = ($bb_cfg['smtp_ssl']) ? 'ssl://' : '';
|
||||||
if( !$socket = @fsockopen($bb_cfg['smtp_host'], 25, $errno, $errstr, 20) )
|
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);
|
bb_die('Could not connect to smtp host : '. $errno .' : '. $errstr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Add bot-message about split to <b>new topic</
|
||||||
$lang['QUICK_REPLY'] = 'Quick Reply';
|
$lang['QUICK_REPLY'] = 'Quick Reply';
|
||||||
$lang['INS_NAME_TIP'] = 'Insert name or selected text.';
|
$lang['INS_NAME_TIP'] = 'Insert name or selected text.';
|
||||||
$lang['QUOTE_SELECTED'] = 'Quote selected';
|
$lang['QUOTE_SELECTED'] = 'Quote selected';
|
||||||
$lang['TRANSLIT_RULES'] = 'Translit rules';
|
|
||||||
$lang['QR_ATTACHSIG'] = 'Attach signature';
|
$lang['QR_ATTACHSIG'] = 'Attach signature';
|
||||||
$lang['QR_NOTIFY'] = 'Notify on reply';
|
$lang['QR_NOTIFY'] = 'Notify on reply';
|
||||||
$lang['QR_DISABLE'] = 'Disable';
|
$lang['QR_DISABLE'] = 'Disable';
|
||||||
|
@ -1517,8 +1516,6 @@ $lang['LIST'] = 'List';
|
||||||
$lang['LIST_TITLE'] = 'List: [list]text[/list] (Ctrl+l)';
|
$lang['LIST_TITLE'] = 'List: [list]text[/list] (Ctrl+l)';
|
||||||
$lang['LIST_ITEM'] = 'Ordered list: [list=]text[/list] (Ctrl+O)';
|
$lang['LIST_ITEM'] = 'Ordered list: [list=]text[/list] (Ctrl+O)';
|
||||||
$lang['QUOTE_SEL'] = 'Quote selected';
|
$lang['QUOTE_SEL'] = 'Quote selected';
|
||||||
$lang['TRANSLIT'] = 'Translit';
|
|
||||||
$lang['TRANSLIT_TITLE'] = 'Translit selected to russian';
|
|
||||||
$lang['JAVASCRIPT_ON'] = 'Heads necessary to send messages to enable JavaScript';
|
$lang['JAVASCRIPT_ON'] = 'Heads necessary to send messages to enable JavaScript';
|
||||||
|
|
||||||
$lang['NEW'] = 'New';
|
$lang['NEW'] = 'New';
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$translit_table = array(
|
|
||||||
# 'from' => 'to',
|
|
||||||
);
|
|
|
@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Добавить сообщение о раз
|
||||||
$lang['QUICK_REPLY'] = 'Быстрый ответ';
|
$lang['QUICK_REPLY'] = 'Быстрый ответ';
|
||||||
$lang['INS_NAME_TIP'] = 'Вставить имя или выделенный кусок сообщения.';
|
$lang['INS_NAME_TIP'] = 'Вставить имя или выделенный кусок сообщения.';
|
||||||
$lang['QUOTE_SELECTED'] = 'Цитировать выделенный текст';
|
$lang['QUOTE_SELECTED'] = 'Цитировать выделенный текст';
|
||||||
$lang['TRANSLIT_RULES'] = 'Правила транслита';
|
|
||||||
$lang['QR_ATTACHSIG'] = 'Присоединить подпись';
|
$lang['QR_ATTACHSIG'] = 'Присоединить подпись';
|
||||||
$lang['QR_NOTIFY'] = 'Уведомлять об ответах';
|
$lang['QR_NOTIFY'] = 'Уведомлять об ответах';
|
||||||
$lang['QR_DISABLE'] = 'Отключить';
|
$lang['QR_DISABLE'] = 'Отключить';
|
||||||
|
@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список';
|
||||||
$lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)';
|
$lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)';
|
||||||
$lang['LIST_ITEM'] = 'Нумерованный список: [list=]текст[/list] (Ctrl+O)';
|
$lang['LIST_ITEM'] = 'Нумерованный список: [list=]текст[/list] (Ctrl+O)';
|
||||||
$lang['QUOTE_SEL'] = 'Цит.выдел';
|
$lang['QUOTE_SEL'] = 'Цит.выдел';
|
||||||
$lang['TRANSLIT'] = 'Транслит';
|
|
||||||
$lang['TRANSLIT_TITLE'] = 'Перевести выделение из транслита на русский';
|
|
||||||
$lang['JAVASCRIPT_ON'] = 'Для отправки сообщений необходимо включить JavaScript';
|
$lang['JAVASCRIPT_ON'] = 'Для отправки сообщений необходимо включить JavaScript';
|
||||||
|
|
||||||
$lang['NEW'] = 'Новое';
|
$lang['NEW'] = 'Новое';
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$translit_table = array(
|
|
||||||
'ё' => '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',
|
|
||||||
);
|
|
|
@ -1325,7 +1325,6 @@ $lang['BOT_AFTER_SPLIT_TO_NEW'] = 'Додати повідомлення про
|
||||||
$lang['QUICK_REPLY'] = 'Швидка відповідь';
|
$lang['QUICK_REPLY'] = 'Швидка відповідь';
|
||||||
$lang['INS_NAME_TIP'] = "Вставити ім'я або виділений шматок повідомлення.";
|
$lang['INS_NAME_TIP'] = "Вставити ім'я або виділений шматок повідомлення.";
|
||||||
$lang['QUOTE_SELECTED'] = 'Цитувати виділений текст';
|
$lang['QUOTE_SELECTED'] = 'Цитувати виділений текст';
|
||||||
$lang['TRANSLIT_RULES'] = 'Правила трансліту';
|
|
||||||
$lang['QR_ATTACHSIG'] = 'Приєднати підпис';
|
$lang['QR_ATTACHSIG'] = 'Приєднати підпис';
|
||||||
$lang['QR_NOTIFY'] = 'Повідомляти про відповіді';
|
$lang['QR_NOTIFY'] = 'Повідомляти про відповіді';
|
||||||
$lang['QR_DISABLE'] = 'Відключити';
|
$lang['QR_DISABLE'] = 'Відключити';
|
||||||
|
@ -1517,8 +1516,6 @@ $lang['LIST'] = 'Список';
|
||||||
$lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)';
|
$lang['LIST_TITLE'] = 'Список: [list]текст[/list] (Ctrl+L)';
|
||||||
$lang['LIST_ITEM'] = 'Нумерований список: [list=]текст[/list] (Ctrl+O)';
|
$lang['LIST_ITEM'] = 'Нумерований список: [list=]текст[/list] (Ctrl+O)';
|
||||||
$lang['QUOTE_SEL'] = 'Цит.виділ';
|
$lang['QUOTE_SEL'] = 'Цит.виділ';
|
||||||
$lang['TRANSLIT'] = 'Трансліт';
|
|
||||||
$lang['TRANSLIT_TITLE'] = 'Перевести виділення з трансліту на українську';
|
|
||||||
$lang['JAVASCRIPT_ON'] = 'Для надсилання повідомлень необхідно включити JavaScript';
|
$lang['JAVASCRIPT_ON'] = 'Для надсилання повідомлень необхідно включити JavaScript';
|
||||||
|
|
||||||
$lang['NEW'] = 'Нове';
|
$lang['NEW'] = 'Нове';
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$translit_table = array(
|
|
||||||
'є' => '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',
|
|
||||||
"'" => "'",
|
|
||||||
);
|
|
|
@ -454,118 +454,3 @@ function initMedia(context)
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('div.post_wrap, div.signature').each(function(){ initPostBBCode( $(this) ) });
|
$('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);
|
|
||||||
}
|
|
|
@ -465,16 +465,11 @@ table.pm_box_size { width: 175px; margin: 8px 2px; }
|
||||||
.pm_box_size b { font-size: 10px; }
|
.pm_box_size b { font-size: 10px; }
|
||||||
.pm_nav td { padding: 4px; font-size: 14px; font-weight: bold; }
|
.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; }
|
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; }
|
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 {
|
table.usercp_register h6 {
|
||||||
margin: 0.3em 0.4em; color: #444444; line-height: 100%;
|
margin: 0.3em 0.4em; color: #444444; line-height: 100%;
|
||||||
|
|
|
@ -136,7 +136,8 @@
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- IF ATTACHBOX && POSTER_RGROUPS -->
|
<!-- IF ATTACHBOX -->
|
||||||
|
<!-- IF POSTER_RGROUPS -->
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vTop pad_4" valign="top"><b>{L_POST_RELEASE_FROM_GROUP}</b></td>
|
<td class="vTop pad_4" valign="top"><b>{L_POST_RELEASE_FROM_GROUP}</b></td>
|
||||||
<td>
|
<td>
|
||||||
|
@ -147,7 +148,8 @@
|
||||||
<label><input type="checkbox" name="attach_rg_sig" <!-- IF ATTACH_RG_SIG -->checked<!-- ENDIF -->/> {L_ATTACH_RG_SIG}</label>
|
<label><input type="checkbox" name="attach_rg_sig" <!-- IF ATTACH_RG_SIG -->checked<!-- ENDIF -->/> {L_ATTACH_RG_SIG}</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF / POSTER_RGROUPS -->
|
||||||
|
<!-- ENDIF / ATTACHBOX -->
|
||||||
<!-- ENDIF / LOGGED_IN -->
|
<!-- ENDIF / LOGGED_IN -->
|
||||||
<!-- BEGIN switch_type_toggle -->
|
<!-- BEGIN switch_type_toggle -->
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -85,63 +85,16 @@ ajax.callback.posts = function(data) {
|
||||||
<input type="button" value="{L_CODE}" name="codeCode" title="{L_CODE_TITLE}" style="width: 43px;" />
|
<input type="button" value="{L_CODE}" name="codeCode" title="{L_CODE_TITLE}" style="width: 43px;" />
|
||||||
<input type="button" value="{L_LIST}" name="codeList" title="{L_LIST_TITLE}" style="width: 60px;"/>
|
<input type="button" value="{L_LIST}" name="codeList" title="{L_LIST_TITLE}" style="width: 60px;"/>
|
||||||
<input type="button" value="1." name="codeOpt" title="{L_LIST_ITEM}" style="width: 30px;" />
|
<input type="button" value="1." name="codeOpt" title="{L_LIST_ITEM}" style="width: 30px;" />
|
||||||
<input type="button" value="{L_QUOTE_SEL}" name="quoteselected" title="{L_QUOTE_SELECTED}" onclick="bbcode.onclickQuoteSel();" />
|
<input type="button" value="{L_QUOTE_SEL}" name="quoteselected" title="{L_QUOTE_SELECTED}" onclick="bbcode.onclickQuoteSel();" />
|
||||||
<!-- IF USER_LANG != 'en' -->
|
|
||||||
<input type="button" value="{L_TRANSLIT}" name="Translit" title="{L_TRANSLIT_TITLE}" style="width: 68px;" onclick="transliterate(document.post.message, this);" /> <a href="#" onclick="toggle_block('translit_opt'); return false"><span style="color: darkred"><b>?</b></span></a>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
class="editor mrg_4" name="message" id="message" rows="18" cols="92"
|
class="editor mrg_4" name="message" id="message" rows="18" cols="92"
|
||||||
onfocus = "storeCaret(this);"
|
onfocus = "storeCaret(this);"
|
||||||
onselect = "storeCaret(this);"
|
onselect = "storeCaret(this);"
|
||||||
onclick = "storeCaret(this);"
|
onclick = "storeCaret(this);"
|
||||||
onkeyup = "storeCaret(this);"
|
onkeyup = "storeCaret(this);"
|
||||||
>{MESSAGE}</textarea>
|
>{MESSAGE}</textarea>
|
||||||
|
|
||||||
<!-- IF USER_LANG != 'en' -->
|
|
||||||
<div id="translit_opt" class="mrg_4" style="display: none;">
|
|
||||||
<table cellspacing="0" class="translit_expl borderless bCenter">
|
|
||||||
<tr>
|
|
||||||
<th>А</th><td>-</td><td>a</td>
|
|
||||||
<th>Д</th><td>-</td><td>d</td>
|
|
||||||
<th>И</th><td>-</td><td>i</td>
|
|
||||||
<th>М</th><td>-</td><td>m</td>
|
|
||||||
<th>Р</th><td>-</td><td>r</td>
|
|
||||||
<th>Ф</th><td>-</td><td>f</td>
|
|
||||||
<th>Ш</th><td>-</td><td>sh</td>
|
|
||||||
<th>Ы</th><td>-</td><td>y</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>Б</th><td>-</td><td>b</td>
|
|
||||||
<th>Е</th><td>-</td><td>e</td>
|
|
||||||
<th>Й</th><td>-</td><td>j</td>
|
|
||||||
<th>Н</th><td>-</td><td>n</td>
|
|
||||||
<th>С</th><td>-</td><td>s</td>
|
|
||||||
<th>Х</th><td>-</td><td>h,x</td>
|
|
||||||
<th>Щ</th><td>-</td><td>sz,w</td>
|
|
||||||
<th>Э</th><td>-</td><td>eh</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>В</th><td>-</td><td>v</td>
|
|
||||||
<th>Ж</th><td>-</td><td>zh</td>
|
|
||||||
<th>К</th><td>-</td><td>k</td>
|
|
||||||
<th>О</th><td>-</td><td>o</td>
|
|
||||||
<th>Т</th><td>-</td><td>t</td>
|
|
||||||
<th>Ц</th><td>-</td><td>c</td>
|
|
||||||
<th>Ь</th><td>-</td><td>'</td>
|
|
||||||
<th>Ю</th><td>-</td><td>ju</td>
|
|
||||||
</tr><tr>
|
|
||||||
<th>Г</th><td>-</td><td>g</td>
|
|
||||||
<th>З</th><td>-</td><td>z</td>
|
|
||||||
<th>Л</th><td>-</td><td>l</td>
|
|
||||||
<th>П</th><td>-</td><td>p</td>
|
|
||||||
<th>У</th><td>-</td><td>u</td>
|
|
||||||
<th>Ч</th><td>-</td><td>ch</td>
|
|
||||||
<th>Ъ</th><td>-</td><td>#</td>
|
|
||||||
<th>Я</th><td>-</td><td>ja</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
<!-- ENDIF -->
|
|
||||||
|
|
||||||
<div class="mrg_8 tCenter">
|
<div class="mrg_8 tCenter">
|
||||||
<div id="post-buttons-block" style="display: none;">
|
<div id="post-buttons-block" style="display: none;">
|
||||||
|
@ -157,7 +110,6 @@ ajax.callback.posts = function(data) {
|
||||||
function dis_submit_btn ()
|
function dis_submit_btn ()
|
||||||
{
|
{
|
||||||
$('#post-submit-btn').attr('disabled', 1);
|
$('#post-submit-btn').attr('disabled', 1);
|
||||||
//debounce('post-submit-btn', 3000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function debounce (el_id, time_ms)
|
function debounce (el_id, time_ms)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue