diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql
index 021f9da01..7d8ec3069 100644
--- a/install/sql/mysql.sql
+++ b/install/sql/mysql.sql
@@ -63,7 +63,6 @@ DROP TABLE IF EXISTS `bb_sessions`;
DROP TABLE IF EXISTS `bb_smilies`;
DROP TABLE IF EXISTS `bb_topics`;
DROP TABLE IF EXISTS `bb_topics_watch`;
-DROP TABLE IF EXISTS `bb_topic_templates`;
DROP TABLE IF EXISTS `bb_topic_tpl`;
DROP TABLE IF EXISTS `bb_users`;
DROP TABLE IF EXISTS `bb_user_group`;
@@ -779,7 +778,6 @@ CREATE TABLE IF NOT EXISTS `bb_forums` (
`show_on_index` tinyint(1) NOT NULL DEFAULT '1',
`forum_display_sort` tinyint(1) NOT NULL DEFAULT '0',
`forum_display_order` tinyint(1) NOT NULL DEFAULT '0',
- `topic_tpl_id` smallint(6) NOT NULL DEFAULT '0',
PRIMARY KEY (`forum_id`),
KEY `forums_order` (`forum_order`),
KEY `cat_id` (`cat_id`),
@@ -791,7 +789,7 @@ CREATE TABLE IF NOT EXISTS `bb_forums` (
-- Дамп данных таблицы `bb_forums`
--
-INSERT INTO `bb_forums` VALUES (1, 1, 'Ваш первый форум', 'Описание вашего первого форума.', 0, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0);
+INSERT INTO `bb_forums` VALUES (1, 1, 'Ваш первый форум', 'Описание вашего первого форума.', 0, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0);
-- --------------------------------------------------------
@@ -1295,41 +1293,6 @@ CREATE TABLE IF NOT EXISTS `bb_topics_watch` (
-- --------------------------------------------------------
---
--- Структура таблицы `bb_topic_templates`
---
-
-CREATE TABLE IF NOT EXISTS `bb_topic_templates` (
- `tpl_id` smallint(6) NOT NULL AUTO_INCREMENT,
- `tpl_name` varchar(20) NOT NULL DEFAULT '',
- `tpl_script` varchar(30) NOT NULL DEFAULT '',
- `tpl_template` varchar(30) NOT NULL DEFAULT '',
- `tpl_desc` varchar(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`tpl_id`),
- UNIQUE KEY `tpl_name` (`tpl_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-
---
--- Дамп данных таблицы `bb_topic_templates`
---
-
-INSERT INTO `bb_topic_templates` VALUES (1, 'video', 'video', 'video', 'Video (basic)');
-INSERT INTO `bb_topic_templates` VALUES (2, 'video_home', 'video', 'video_home', 'Video (home)');
-INSERT INTO `bb_topic_templates` VALUES (3, 'video_simple', 'video', 'video_simple', 'Video (simple)');
-INSERT INTO `bb_topic_templates` VALUES (4, 'video_lesson', 'video', 'video_lesson', 'Video (lesson)');
-INSERT INTO `bb_topic_templates` VALUES (5, 'games', 'games', 'games', 'Games');
-INSERT INTO `bb_topic_templates` VALUES (6, 'games_ps', 'games', 'games_ps', 'Games PS/PS2');
-INSERT INTO `bb_topic_templates` VALUES (7, 'games_psp', 'games', 'games_psp', 'Games PSP');
-INSERT INTO `bb_topic_templates` VALUES (8, 'games_xbox', 'games', 'games_xbox', 'Games XBOX');
-INSERT INTO `bb_topic_templates` VALUES (9, 'progs', 'progs', 'progs', 'Programs');
-INSERT INTO `bb_topic_templates` VALUES (10, 'progs_mac', 'progs', 'progs_mac', 'Programs Mac OS');
-INSERT INTO `bb_topic_templates` VALUES (11, 'music', 'music', 'music', 'Music');
-INSERT INTO `bb_topic_templates` VALUES (12, 'books', 'books', 'books', 'Books');
-INSERT INTO `bb_topic_templates` VALUES (13, 'audiobooks', 'audiobooks', 'audiobooks', 'Audiobooks');
-INSERT INTO `bb_topic_templates` VALUES (14, 'sport', 'sport', 'sport', 'Sport');
-
--- --------------------------------------------------------
-
--
-- Структура таблицы `bb_topic_tpl`
--
diff --git a/upload/admin/admin_forums.php b/upload/admin/admin_forums.php
index a91f0de1b..05b405ad4 100644
--- a/upload/admin/admin_forums.php
+++ b/upload/admin/admin_forums.php
@@ -762,9 +762,9 @@ if (!$mode || $show_main_page)
//
$gen_cat = array();
- $bgr_class_1 = 'row1';
- $bgr_class_2 = 'row2';
- $bgr_class_over = 'row3';
+ $bgr_class_1 = 'prow1';
+ $bgr_class_2 = 'prow2';
+ $bgr_class_over = 'prow3';
$template->assign_vars(array(
'U_ALL_FORUMS' => "admin_forums.php?c=all",
diff --git a/upload/admin/admin_topic_templates.php b/upload/admin/admin_topic_templates.php
deleted file mode 100644
index 01d197986..000000000
--- a/upload/admin/admin_topic_templates.php
+++ /dev/null
@@ -1,195 +0,0 @@
-fetch_rowset($sql) as $i => $row)
- {
- $template->assign_block_vars('tpl', array(
- 'ROW_CLASS' => !($i % 2) ? 'row4' : 'row5',
- 'ID' => $row['tpl_id'],
- 'NAME' => $row['tpl_name'],
- ));
- }
-
- $template->assign_vars(array(
- 'TPL_LIST' => true,
- 'S_ACTION' => "admin_topic_templates.php?mode=delete",
- ));
-}
-elseif ($mode == 'add' || $mode == 'edit')
-{
- $template->assign_vars(array(
- 'TPL' => true,
- ));
-
- if ($mode == 'edit')
- {
- $tpl_id = (int) request_var('tpl', '');
- if (!$tpl_id) bb_die('');
-
- $row = DB()->fetch_row("SELECT * FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id = $tpl_id");
- if (!$row) bb_die('');
-
- $template->assign_vars(array(
- 'S_ACTION' => "admin_topic_templates.php?mode=edit&tpl=$tpl_id",
- ));
- }
- else
- {
- $template->assign_vars(array(
- 'S_ACTION' => "admin_topic_templates.php?mode=add",
- ));
- }
-
- $tpl_name = isset($_POST['tpl_name']) ? $_POST['tpl_name'] : @$row['tpl_name'];
- $tpl_script = isset($_POST['tpl_script']) ? $_POST['tpl_script'] : @$row['tpl_script'];
- $tpl_template = isset($_POST['tpl_template']) ? $_POST['tpl_template'] : @$row['tpl_template'];
- $tpl_desc = isset($_POST['tpl_desc']) ? $_POST['tpl_desc'] : @$row['tpl_desc'];
-
- $template->assign_vars(array(
- 'NAME' => $tpl_name,
- 'SCRIPT' => $tpl_script,
- 'TEMP' => $tpl_template,
- 'DESC' => $tpl_desc,
- ));
-
- if (isset($_POST['submit']))
- {
- if ($mode == 'edit')
- {
- DB()->query("UPDATE ". BB_TOPIC_TPL_OLD ." SET
- tpl_name = '". DB()->escape($tpl_name) ."',
- tpl_script = '". DB()->escape($tpl_script) ."',
- tpl_template = '". DB()->escape($tpl_template) ."',
- tpl_desc = '". DB()->escape($tpl_desc) ."'
- WHERE tpl_id = $tpl_id
- ");
- $message = $lang['CHANGED'];
- }
- else
- {
- DB()->query("INSERT INTO ". BB_TOPIC_TPL_OLD ." (tpl_name, tpl_script, tpl_template, tpl_desc)
- VALUES ('". DB()->escape($tpl_name) ."', '". DB()->escape($tpl_script) ."', '". DB()->escape($tpl_template) ."', '". DB()->escape($tpl_desc) ."')");
- $message = $lang['ADDED'];
- }
-
- bb_die($message);
- }
-}
-elseif ($mode == 'delete')
-{
- $tpl_ids = isset($_POST['tpl_id']) ? $_POST['tpl_id'] : bb_die($lang['NOT_CHOOSE']);
-
- foreach ($tpl_ids as $tpl_id)
- {
- $hidden_fields['tpl_id'][] = $tpl_id;
- }
-
- if (isset($_POST['confirm']))
- {
- DB()->query("DELETE FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .")");
- bb_die($lang['REMOVED']);
- }
- else
- {
- $names = DB()->fetch_rowset("SELECT tpl_name FROM ". BB_TOPIC_TPL_OLD ." WHERE tpl_id IN(". join(',', $tpl_ids) .") ORDER BY tpl_name", 'tpl_name');
-
- print_confirmation(array(
- 'QUESTION' => $lang['QUESTION'],
- 'ITEMS_LIST' => join("\n\n
\n", $names),
- 'FORM_ACTION' => "admin_topic_templates.php?mode=delete",
- 'HIDDEN_FIELDS' => build_hidden_fields($hidden_fields),
- ));
- }
-}
-else
-{
- $forums = DB()->fetch_rowset("
- SELECT f.forum_id, f.forum_parent, f.topic_tpl_id, f.forum_name
- FROM ". BB_CATEGORIES ." c, ". BB_FORUMS ." f
- WHERE f.cat_id = c.cat_id
- ORDER BY c.cat_order, f.forum_order
- ");
-
- $tpl_ary = array();
- $available_tpl_id = array(0);
- $tpl_select = array($lang['TPL_NONE'] => 0);
-
- $sql = "SELECT * FROM ". BB_TOPIC_TPL_OLD ." ORDER BY tpl_name";
-
- foreach (DB()->fetch_rowset($sql) as $row)
- {
- $tpl_ary[$row['tpl_id']] = $row;
- $available_tpl_id[] = $row['tpl_id'];
-
- $name = isset($lang[strtoupper('TPL_'. $row['tpl_name'])]) ? $lang[strtoupper('TPL_'. $row['tpl_name'])] : $row['tpl_desc'];
- $tpl_select[$name] = $row['tpl_id'];
- }
-
- if (isset($_POST['submit']) && @is_array($_POST['forum_tpl']))
- {
- $cur_val = $new_val = array();
-
- foreach ($forums as $forum)
- {
- $cur_val["{$forum['forum_id']}"] = (int) $forum['topic_tpl_id'];
- }
- foreach ($_POST['forum_tpl'] as $forum_id => $tpl_id)
- {
- if (isset($cur_val["$forum_id"]) && in_array($tpl_id, $available_tpl_id))
- {
- $new_val["$forum_id"] = (int) $tpl_id;
- }
- }
- if ($new_settings = array_diff_assoc($new_val, $cur_val))
- {
- foreach ($new_settings as $forum_id => $tpl_id)
- {
- DB()->query("
- UPDATE ". BB_FORUMS ." SET
- topic_tpl_id = ". (int) $tpl_id ."
- WHERE forum_id = ". (int) $forum_id ."
- ");
- }
- }
-
- $message = $lang['CONFIG_UPD'] .'
';
- $message .= sprintf($lang['RETURN_CONFIG'], '', '') .'
';
- $message .= sprintf($lang['CLICK_RETURN_ADMIN_INDEX'], '', '');
-
- message_die(GENERAL_MESSAGE, $message);
- }
-
- foreach ($forums as $i => $forum)
- {
- $template->assign_block_vars('forum', array(
- 'ROW_CLASS' => !($i % 2) ? 'row4' : 'row5',
- 'SF_PAD' => ($forum['forum_parent']) ? 'padding-left: 20px;' : '',
- 'TPL_SELECT' => build_select("forum_tpl[{$forum['forum_id']}]", $tpl_select, $forum['topic_tpl_id']),
- 'FORUM_CLASS' => ($forum['forum_parent']) ? 'gen' : 'gen',
- 'FORUM_STYLE' => ($forum['topic_tpl_id']) ? 'font-weight: bold;' : '',
- 'FORUM_ID' => $forum['forum_id'],
- 'FORUM_NAME' => htmlCHR($forum['forum_name']),
- ));
- }
-
- $template->assign_vars(array(
- 'FORUM_LIST' => true,
- 'S_ACTION' => "admin_topic_templates.php",
- ));
-}
-
-print_page('admin_topic_templates.tpl', 'admin');
\ No newline at end of file
diff --git a/upload/ajax.php b/upload/ajax.php
index b4d77410b..5a7bd9e73 100644
--- a/upload/ajax.php
+++ b/upload/ajax.php
@@ -10,7 +10,7 @@ require('./common.php');
$ajax->init();
// Handle "board disabled via ON/OFF trigger"
-if (file_exists(BB_DISABLED))
+if (file_exists(BB_DISABLED) || $bb_cfg['board_disable'])
{
$ajax->ajax_die($bb_cfg['board_disabled_msg']);
}
diff --git a/upload/config.php b/upload/config.php
index 539b0cc86..dcc3e0469 100644
--- a/upload/config.php
+++ b/upload/config.php
@@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Increase number of revision after update
$bb_cfg['tp_version'] = '2.6 (RC)';
-$bb_cfg['tp_release_date'] = '11-02-2014';
-$bb_cfg['tp_release_state'] = 'R583';
+$bb_cfg['tp_release_date'] = '08-03-2014';
+$bb_cfg['tp_release_state'] = 'R584';
// Database
$charset = 'utf8';
@@ -472,7 +472,7 @@ $bb_cfg['search_min_word_len'] = 3;
$bb_cfg['search_max_word_len'] = 35;
$bb_cfg['limit_max_search_results'] = false;
$bb_cfg['tidy_post'] = true;
-$bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt';
+$bb_cfg['spam_filter_file_path'] = ''; //BB_PATH .'/misc/spam_filter_words.txt';
// Posting
$bb_cfg['prevent_multiposting'] = true; // replace "reply" with "edit last msg" if user (not admin or mod) is last topic poster
@@ -537,14 +537,14 @@ $bb_cfg['gen_forums_allowed_ext'] = array('zip', 'rar'); // для о
// Avatars
$bb_cfg['avatars'] = array(
- 'allowed_ext' => array('gif','jpg','png'), // разрешенные форматы файлов
- 'bot_avatar' => 'gallery/bot.gif', // аватара бота
- 'max_size' => 15*1024, // размер аватары в байтах
- 'max_height' => 100, // высота аватара в px
- 'max_width' => 100, // ширина аватара в px
- 'no_avatar' => 'gallery/noavatar.png', // дефолтная аватара
- 'upload_path' => BB_ROOT . 'images/avatars/', // путь к директории с аватарами
- 'up_allowed' => true, // разрешить загрузку аватар
+ 'allowed_ext' => array('gif','jpg','jpeg','png'), // разрешенные форматы файлов
+ 'bot_avatar' => 'gallery/bot.gif', // аватара бота
+ 'max_size' => 512*1024, // размер аватары в байтах
+ 'max_height' => 100, // высота аватара в px
+ 'max_width' => 100, // ширина аватара в px
+ 'no_avatar' => 'gallery/noavatar.png', // дефолтная аватара
+ 'upload_path' => BB_ROOT . 'images/avatars/', // путь к директории с аватарами
+ 'up_allowed' => true, // разрешить загрузку аватар
);
// Misc
diff --git a/upload/includes/functions.php b/upload/includes/functions.php
index 6a14a2f4e..b9337cd89 100644
--- a/upload/includes/functions.php
+++ b/upload/includes/functions.php
@@ -1564,57 +1564,58 @@ function setup_style ()
// Create date/time from format and timezone
function bb_date ($gmepoch, $format = false, $tz = null)
{
- global $bb_cfg, $lang, $userdata;
+ global $bb_cfg, $lang, $userdata;
- if (!$format) $format = $bb_cfg['default_dateformat'];
- if (empty($lang))require_once($bb_cfg['default_lang_dir'] .'lang_main.php');
+ if (!$format) $format = $bb_cfg['default_dateformat'];
+ if (empty($lang)) require_once($bb_cfg['default_lang_dir'] .'lang_main.php');
- if (is_null($tz) || $tz == 'false')
- {
- if (empty($userdata['session_logged_in']))
- {
- $tz2 = $bb_cfg['board_timezone'];
- }
- else $tz2 = $userdata['user_timezone'];
- }
- elseif (is_numeric($tz)) $tz2 = $tz;
+ if (is_null($tz) || $tz == 'false')
+ {
+ if (empty($userdata['session_logged_in']))
+ {
+ $tz2 = $bb_cfg['board_timezone'];
+ }
+ else $tz2 = $userdata['user_timezone'];
+ }
+ elseif (is_numeric($tz)) $tz2 = $tz;
- $date = gmdate($format, $gmepoch + (3600 * $tz2));
+ $date = gmdate($format, $gmepoch + (3600 * $tz2));
- if($tz != 'false')
- {
- $time_format = " H:i";
+ if ($tz != 'false')
+ {
+ $time_format = " H:i";
- $today = gmdate("d", TIMENOW + (3600 * $tz2));
- $month = gmdate("m", TIMENOW + (3600 * $tz2));
- $year = gmdate("Y", TIMENOW + (3600 * $tz2));
+ $today = gmdate("d", TIMENOW + (3600 * $tz2));
+ $month = gmdate("m", TIMENOW + (3600 * $tz2));
+ $year = gmdate("Y", TIMENOW + (3600 * $tz2));
- $date_today = gmdate("d", $gmepoch + (3600 * $tz2));
- $date_month = gmdate("m", $gmepoch + (3600 * $tz2));
- $date_year = gmdate("Y", $gmepoch + (3600 * $tz2));
+ $date_today = gmdate("d", $gmepoch + (3600 * $tz2));
+ $date_month = gmdate("m", $gmepoch + (3600 * $tz2));
+ $date_year = gmdate("Y", $gmepoch + (3600 * $tz2));
- if ($date_today == $today && $date_month == $month && $date_year == $year)
- {
- $date = 'today' . gmdate($time_format, $gmepoch + (3600 * $tz2));
- }
- elseif ($today != 1 && $date_today == ($today-1) && $date_month == $month && $date_year == $year)
- {
- $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
- }
- elseif ($today == 1 && $month != 1)
- {
- $yesterday = date ("t", mktime(0, 0, 0, ($month-1), 1, $year));
- if ($date_today == $yesterday && $date_month == ($month-1) && $date_year == $year)
- $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
- }
- elseif ($today == 1 && $month == 1)
- {
- $yesterday = date ("t", mktime(0, 0, 0, 12, 1, ($year -1)));
- if ($date_today == $yesterday && $date_month == 12 && $date_year == ($year-1))
- $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz));
- }
- }
- return ($bb_cfg['translate_dates']) ? strtr(strtoupper($date), $lang['DATETIME']) : $date;
+ if ($date_today == $today && $date_month == $month && $date_year == $year)
+ {
+ $date = 'today' . gmdate($time_format, $gmepoch + (3600 * $tz2));
+ }
+ elseif ($today != 1 && $date_today == ($today-1) && $date_month == $month && $date_year == $year)
+ {
+ $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
+ }
+ elseif ($today == 1 && $month != 1)
+ {
+ $yesterday = date ("t", mktime(0, 0, 0, ($month-1), 1, $year));
+ if ($date_today == $yesterday && $date_month == ($month-1) && $date_year == $year)
+ $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz2));
+ }
+ elseif ($today == 1 && $month == 1)
+ {
+ $yesterday = date ("t", mktime(0, 0, 0, 12, 1, ($year -1)));
+ if ($date_today == $yesterday && $date_month == 12 && $date_year == ($year-1))
+ $date = 'yesterday' . gmdate($time_format, $gmepoch + (3600 * $tz));
+ }
+ }
+
+ return ($bb_cfg['translate_dates']) ? strtr(strtoupper($date), $lang['DATETIME']) : $date;
}
// Birthday
@@ -1624,8 +1625,7 @@ function bb_date ($gmepoch, $format = false, $tz = null)
// from 1901 - 2099. it returns a "like" UNIX timestamp divided by 86400, so
// calculation from the originate php date and mktime is easy.
// mkrealdate, returns the number of day (with sign) from 1.1.1970.
-
-function mkrealdate($day, $month, $birth_year)
+function mkrealdate ($day, $month, $birth_year)
{
// define epoch
$epoch = 0;
@@ -1692,15 +1692,15 @@ function mkrealdate($day, $month, $birth_year)
// UNIX users should replace this function with the below code, since this should be faster
//
-function realdate($date, $format = "Ymd")
+function realdate ($date, $format = "Ymd")
{
- if(!$date) return;
- return bb_date($date*86400+1, $format, 0);
+ if (!$date) return;
+ return bb_date($date*86400 + 1, $format, 0);
}
-function birthday_age($date, $list = 0)
+function birthday_age ($date, $list = 0)
{
- if(!$date) return;
+ if (!$date) return;
return delta_time(mktime(11, 0, 0, date('m', strtotime($date)), date('d', strtotime($date)), (date('Y', strtotime($date)) - $list)));
}
@@ -1708,7 +1708,7 @@ function birthday_age($date, $list = 0)
// Pagination routine, generates
// page number sequence
//
-function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
+function generate_pagination ($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
global $lang, $template;
diff --git a/upload/includes/functions_post.php b/upload/includes/functions_post.php
index 354e63840..f90584d68 100644
--- a/upload/includes/functions_post.php
+++ b/upload/includes/functions_post.php
@@ -346,21 +346,22 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
if ($mode == 'reply')
{
$update_watched_sql = $user_id_sql = array();
-
+
$sql = DB()->fetch_rowset("SELECT ban_userid FROM ". BB_BANLIST ." WHERE ban_userid != 0");
-
+
foreach ($sql as $row)
{
$user_id_sql[] = ','. $row['ban_userid'];
}
$user_id_sql = join('', $user_id_sql);
- $watch_list = DB()->fetch_rowset("SELECT u.username, u.user_id, u.user_email, u.user_lang
+ $watch_list = DB()->fetch_rowset("SELECT u.username, u.user_id, u.user_active, u.user_email, u.user_lang
FROM " . BB_TOPICS_WATCH . " tw, " . BB_USERS . " u
WHERE tw.topic_id = $topic_id
AND tw.user_id NOT IN (". $userdata['user_id'] .", ". EXCLUDED_USERS_CSV . $user_id_sql .")
AND tw.notify_status = ". TOPIC_WATCH_NOTIFIED ."
AND u.user_id = tw.user_id
+ AND u.user_active = 1
");
if ($watch_list)
@@ -411,11 +412,7 @@ function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topi
}
}
- $topic_watch = DB()->fetch_row("SELECT topic_id
- FROM ". BB_TOPICS_WATCH ."
- WHERE topic_id = $topic_id
- AND user_id = {$userdata['user_id']}
- ", 'topic_id');
+ $topic_watch = DB()->fetch_row("SELECT topic_id FROM ". BB_TOPICS_WATCH ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']}", 'topic_id');
if (!$notify_user && !empty($topic_watch))
{
diff --git a/upload/includes/functions_upload.php b/upload/includes/functions_upload.php
index d7fa75232..aab94c5eb 100644
--- a/upload/includes/functions_upload.php
+++ b/upload/includes/functions_upload.php
@@ -31,8 +31,8 @@ class upload_common
$lang['upload_error_common'] = 'Ошибка загрузки файла';
$lang['upload_errors'] = array(
- UPLOAD_ERR_INI_SIZE => 'превышен максимальный размер (upload_max_filesize)',
- UPLOAD_ERR_FORM_SIZE => 'превышен максимальный размер (MAX_FILE_SIZE)',
+ UPLOAD_ERR_INI_SIZE => 'превышен максимальный размер файлов для сервера',
+ UPLOAD_ERR_FORM_SIZE => 'превышен максимальный размер загружаемого файла',
UPLOAD_ERR_PARTIAL => 'файл был загружен частично',
UPLOAD_ERR_NO_FILE => 'файл не был загружен',
UPLOAD_ERR_NO_TMP_DIR => 'временная директория не найдена',
diff --git a/upload/includes/init_bb.php b/upload/includes/init_bb.php
index 9fdf5bb09..349a0a0ae 100644
--- a/upload/includes/init_bb.php
+++ b/upload/includes/init_bb.php
@@ -372,7 +372,6 @@ define('BB_SEARCH_REBUILD', 'bb_search_rebuild');
define('BB_SEARCH', 'bb_search_results');
define('BB_SESSIONS', 'bb_sessions');
define('BB_SMILIES', 'bb_smilies');
-define('BB_TOPIC_TPL_OLD', 'bb_topic_templates');
define('BB_TOPIC_TPL', 'bb_topic_tpl');
define('BB_TOPICS', 'bb_topics');
define('BB_TOPICS_WATCH', 'bb_topics_watch');
@@ -588,7 +587,7 @@ $dl_status_css = array(
);
// Show 'Board is disabled' message if needed
-if ($bb_cfg['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN'))
+if ($bb_cfg['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN') && !defined('IN_AJAX'))
{
message_die(GENERAL_MESSAGE, 'BOARD_DISABLE');
}
\ No newline at end of file
diff --git a/upload/includes/posting_tpl.php b/upload/includes/posting_tpl.php
index 97ef78102..14dfe6c98 100644
--- a/upload/includes/posting_tpl.php
+++ b/upload/includes/posting_tpl.php
@@ -20,7 +20,7 @@ if (!$f_data['forum_tpl_id'] OR !$tpl_data = DB()->fetch_row($sql))
{
if (!$edit_tpl_mode)
{
- redirect(POSTING_URL . "?mode=newtopic&f=$forum_id&tpl=1");
+ redirect(POSTING_URL . "?mode=newtopic&f=$forum_id");
}
}
diff --git a/upload/includes/topic_templates.php b/upload/includes/topic_templates.php
deleted file mode 100644
index 152b18ee5..000000000
--- a/upload/includes/topic_templates.php
+++ /dev/null
@@ -1,116 +0,0 @@
- $val)
- {
- if (is_array($item))
- {
- $name = array_keys($item);
- $item = $name[0];
- }
- $message .= build_tpl_item($item, $val);
- }
- return $message;
-}
-
-function tpl_func_screen_shots ($item, $val)
-{
- if (!$val) return '';
-
- $img = preg_replace('#(?<=\s)(http\S+?(jpg|gif|png))(?=\s)#i', '[img]$1[/img]', " $val ");
-
- return '[spoiler="'. $GLOBALS['lang']['TPL'][strtoupper($item)] .'"]' . trim($img) ."\n" ."[/spoiler]";
-}
-
-// get tpl data
-$sql = "SELECT *
- FROM ". BB_TOPIC_TPL_OLD ."
- WHERE tpl_id = ". (int) $post_info['topic_tpl_id'];
-
-if ($topic_tpl = DB()->fetch_row($sql))
-{
- $message = $subject = '';
- $tpl_script = basename($topic_tpl['tpl_script']);
-
- // this include() should return $message and $subject on submit
- require(INC_DIR ."topic_templates/$tpl_script.php");
-
- $lang['TPL']['GUIDE'] = array();
- @include(INC_DIR ."topic_templates/{$tpl_script}_guide.php");
-
- if (isset($_REQUEST['preview']))
- {
- $_POST['subject'] = $subject;
- $_POST['message'] = $message;
- }
- else
- {
- require(INC_DIR .'topic_templates/tpl_selects.php');
-
- $template->assign_vars(array(
- 'PAGE_TITLE' => $lang['NEW_RELEASE'],
- 'FORUM_NAME' => htmlCHR($post_info['forum_name']),
- 'S_ACTION' => POSTING_URL . "?mode=newtopic&tpl=1&". POST_FORUM_URL .'='. $post_info['forum_id'],
- 'S_CANCEL_ACTION' => FORUM_URL . $post_info['forum_id'],
- 'TORRENT_EXT' => TORRENT_EXT,
- 'TORRENT_EXT_LEN' => strlen(TORRENT_EXT) + 1,
- 'U_VIEW_FORUM' => FORUM_URL . $post_info['forum_id'],
-
- 'REGULAR_TOPIC_BUTTON' => true, # (IS_AM),
- 'REGULAR_TOPIC_HREF' => POSTING_URL . "?mode=newtopic&". POST_FORUM_URL .'='. $post_info['forum_id'],
-
- 'L_TITLE' => $lang['TPL']['RELEASE_NAME'],
- 'L_TITLE_DESC' => $lang['TPL']['RELEASE_NAME_DESC'],
- 'L_ORIGINAL_TITLE' => $lang['TPL']['ORIGINAL_NAME'],
- 'L_ORIGINAL_TITLE_DESC' => $lang['TPL']['ORIGINAL_NAME_DESC'],
- 'L_TITLE_EXP' => $lang['TPL']['NAME_EXP'],
- ));
-
- foreach ($lang['TPL'] as $name => $val)
- {
- $template->assign_vars(array(
- 'L_'. strtoupper($name) => $val,
- ));
- }
- foreach ($lang['TPL']['GUIDE'] as $name => $guide_post_id)
- {
- $template->assign_vars(array(
- strtoupper($name) .'_HREF' => POST_URL ."$guide_post_id&single=1#$guide_post_id",
- ));
- }
-
- $tpl_file = basename($topic_tpl['tpl_template']) .'.tpl';
-
- print_page("topic_templates/$tpl_file");
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/.htaccess b/upload/includes/topic_templates/.htaccess
deleted file mode 100644
index baa56e5a3..000000000
--- a/upload/includes/topic_templates/.htaccess
+++ /dev/null
@@ -1,2 +0,0 @@
-order allow,deny
-deny from all
\ No newline at end of file
diff --git a/upload/includes/topic_templates/audiobooks.php b/upload/includes/topic_templates/audiobooks.php
deleted file mode 100644
index 744cc7982..000000000
--- a/upload/includes/topic_templates/audiobooks.php
+++ /dev/null
@@ -1,66 +0,0 @@
- "[img{$img_align}]%s[/img]",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- // Subject
- $subject = $msg['release_name'];
-
- if ($msg['author'])
- {
- $subject = $msg['author'] .' - '. $subject;
- }
-
- if ($msg['performer'])
- {
- $sbj_ext[] = $msg['performer'];
- }
- if ($msg['year'])
- {
- $sbj_ext[] = $msg['year'];
- }
- if ($sbj_ext)
- {
- $subject .= ' ['. join(', ', $sbj_ext) .']';
- }
-
- // Message
- $message = tpl_build_message($msg);
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/books.php b/upload/includes/topic_templates/books.php
deleted file mode 100644
index c00662b0e..000000000
--- a/upload/includes/topic_templates/books.php
+++ /dev/null
@@ -1,67 +0,0 @@
- "[img{$img_align}]%s[/img]\n\n",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- // Subject
- $subject = $msg['release_name'];
-
- if ($msg['author'])
- {
- $subject = $msg['author'] .' - '. $subject;
- }
-
- if ($msg['year'])
- {
- $sbj_ext[] = $msg['year'];
- }
- if ($msg['format'])
- {
- $sbj_ext[] = $msg['format'];
- }
- if ($sbj_ext)
- {
- $subject .= ' ['. join(', ', $sbj_ext) .']';
- }
-
- // Message
- $message = tpl_build_message($msg);
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/games.php b/upload/includes/topic_templates/games.php
deleted file mode 100644
index 12c9852d3..000000000
--- a/upload/includes/topic_templates/games.php
+++ /dev/null
@@ -1,68 +0,0 @@
- "[img{$img_align}]%s[/img]\n\n",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- $message = tpl_build_message($msg);
- $subject = $msg['release_name'];
- $subject .= ($msg['year']) ? ' ('. trim($msg['year'], '/') .')' : '';
- $subject .= ($msg['publisher']) ? ' ('. trim($msg['publisher'], '/') .')' : '';
-
- if ($msg['localization'] == $lang['TPL']['UI_LANG_OPTIONS'][0]) $subject .= ' (ENG+RUS)';
- if ($msg['localization'] == $lang['TPL']['UI_LANG_OPTIONS'][1]) $subject .= ' (ENG)';
- if ($msg['localization'] == $lang['TPL']['UI_LANG_OPTIONS'][2]) $subject .= ' (RUS)';
- if ($msg['localization'] == $lang['TPL']['UI_LANG_OPTIONS'][3]) $subject .= ' (DEU)';
-
- if ($msg['source_type'] == $lang['TPL']['SOURCE_TYPE_OPTIONS'][0]) $subject .= ' [L]';
- if ($msg['source_type'] == $lang['TPL']['SOURCE_TYPE_OPTIONS'][1]) $subject .= ' [P]';
- if ($msg['source_type'] == $lang['TPL']['SOURCE_TYPE_OPTIONS'][2]) $subject .= ' [Rip]';
- if ($msg['source_type'] == $lang['TPL']['SOURCE_TYPE_OPTIONS'][3]) $subject .= ' [RePack]';
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/music.php b/upload/includes/topic_templates/music.php
deleted file mode 100644
index f23d5ecf8..000000000
--- a/upload/includes/topic_templates/music.php
+++ /dev/null
@@ -1,51 +0,0 @@
- "[img{$img_align}]%s[/img]\n\n",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- 'tracklist' => "[b]{$lang['TPL']['TRACKLIST']}[/b]:\n%s\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- $message = tpl_build_message($msg);
-
- $genre = ($msg['genre']) ? '('. $msg['genre'] .') ' : '';
- $year = ($msg['year']) ? ' - '. $msg['year'] : '';
- $bitrate = ($msg['audio_bitrate']) ? ', '. $msg['audio_bitrate'] : '';
- $format = ($msg['format']) ? ', '. $msg['format'] . $bitrate .'' : '';
-
- $subject = $genre . $msg['release_name'] . $year . $format;
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/progs.php b/upload/includes/topic_templates/progs.php
deleted file mode 100644
index 94b7408b6..000000000
--- a/upload/includes/topic_templates/progs.php
+++ /dev/null
@@ -1,52 +0,0 @@
- "[size=$title_font_size]%s[/size]\n\n",
- 'picture' => "[img{$img_align}]%s[/img]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- $message = tpl_build_message($msg);
- $subject = $msg['release_name'];
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/sport.php b/upload/includes/topic_templates/sport.php
deleted file mode 100644
index f4761c635..000000000
--- a/upload/includes/topic_templates/sport.php
+++ /dev/null
@@ -1,74 +0,0 @@
- "[img{$img_align}]%s[/img]\n\n",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = @$_POST['msg'][$item];
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- // Subject
- $subject = $msg['release_name'];
-
- if ($msg['year'])
- {
- $sbj_ext[] = sprintf($lang['TPL']['Y'], $msg['year']);
- }
- if ($msg['sport_type'])
- {
- $sbj_ext[] = $msg['sport_type'];
- }
- if ($msg['quality'])
- {
- $sbj_ext[] = $msg['quality'];
- }
- if ($sbj_ext)
- {
- $subject .= ' ['. join(', ', $sbj_ext) .']';
- }
-
- // Message
- $message = tpl_build_message($msg);
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/tpl_selects.php b/upload/includes/topic_templates/tpl_selects.php
deleted file mode 100644
index 14153051f..000000000
--- a/upload/includes/topic_templates/tpl_selects.php
+++ /dev/null
@@ -1,143 +0,0 @@
- array(
- 'VHSRip',
- 'TVRip',
- 'SATRip',
- 'CamRip',
- 'TeleCine',
- 'TeleSynch',
- 'DVDScreener',
- 'DVDRip',
- 'DVDRip-AVC',
- 'DVD5',
- "DVD5 {$lang['TPL']['COMPRESSED']}",
- 'DVD9',
- 'HDTV',
- 'HDTVRip',
- 'HDTVRip-AVC',
- 'BDRip',
- 'BDRip-AVC',
- 'BDRemux',
- ),
-
- 'SEL_VIDEO_CODECS' => array(
- 'DivX',
- 'XviD',
- "{$lang['OTHER']} MPEG4",
- 'VPx',
- 'MPEG1',
- 'MPEG2',
- 'Windows Media',
- 'QuickTime',
- 'H.26x',
- 'Flash',
- ),
-
- 'SEL_VIDEO_FORMATS' => array(
- 'AVI',
- 'DVD Video',
- 'OGM',
- 'MKV',
- 'WMV',
- 'MPEG',
- 'FLV',
- ),
-
- 'SEL_AUDIO_CODECS' => array(
- 'AC3',
- 'ALAC (image + .cue)',
- 'ALAC (tracks)',
- 'APE (image + .cue)',
- 'APE (tracks)',
- 'DTS',
- 'DVD-Audio',
- 'FLAC (image + .cue)',
- 'FLAC (tracks)',
- 'M4A (image + .cue)',
- 'M4A (tracks)',
- 'MP3',
- 'MPEG Audio',
- 'OGG Vorbis',
- 'SHN (image + .cue)',
- 'SHN (tracks)',
- 'TTA (image + .cue)',
- 'TTA (tracks)',
- 'WAVPack (image + .cue)',
- 'WAVPack (tracks)',
- 'Windows Media',
- ),
-
- 'SEL_BITRATE' => array(
- 'lossless',
- '64 kbps',
- '128 kbps',
- '160 kbps',
- '192 kbps',
- '224 kbps',
- '256 kbps',
- '320 kbps',
- 'VBR 128-192 kbps',
- 'VBR 192-320 kbps',
- ),
-
- 'SEL_TEXT_FORMATS' => array(
- $lang['TPL']['SIMPLE_TEXT'],
- 'PDF',
- 'DjVu',
- 'CHM',
- 'HTML',
- 'DOC',
- ),
-
- 'SEL_TEXT_QUALITY' => array(
- $lang['TPL']['SCANNED'],
- $lang['TPL']['NATIVE'],
- $lang['TPL']['OCR_W_O_ERRORS'],
- $lang['TPL']['OCR_W_ERRORS'],
- ),
-
- 'SEL_SOURCE_TYPE' => $lang['TPL']['SOURCE_TYPE_OPTIONS'],
-
- 'SEL_LOCALIZATION' => array(
- $lang['TPL']['NOT_NEEDED'],
- $lang['TPL']['INCLUDED'],
- $lang['TPL']['NOT_INCLUDED'],
- ),
-
- 'SEL_LANG' => $lang['TPL']['LANG_OPTIONS'],
-
- 'SEL_UI_LANG' => $lang['TPL']['UI_LANG_OPTIONS'],
-
- 'SEL_UI_LANG_PS' => $lang['TPL']['UI_LANG_OPTIONS_PS'],
-
- 'SEL_AUDIOBOOK_TYPE' => $lang['TPL']['AUDIOBOOK_TYPE_OPTIONS'],
-
- 'SEL_MEDICINE' => array(
- $lang['TPL']['NOT_NEEDED'],
- $lang['TPL']['INCLUDED'],
- $lang['TPL']['NOT_INCLUDED'],
- ),
-
- 'SEL_VISTA_COMPATIBLE' => $lang['TPL']['VISTA_COMPATIBLE_OPTIONS'],
-
- 'SEL_TRANSLATION' => $lang['TPL']['TRANSLATION_OPTIONS'],
-
- 'SEL_TRANSLATION_TYPE' => $lang['TPL']['TRANSLATION_TYPES'],
-
- 'SEL_PLATFORM_PS' => array('PS', 'PS2'),
-
- 'SEL_MULTIPLAYER' => $lang['TPL']['MULTIPLAYER_OPTIONS'],
-
- 'SEL_REGION' => array('PAL', 'NTSC'),
-);
-
-foreach ($selects as $tpl_name => $sel_ary)
-{
- $template->assign_vars(array(
- $tpl_name => join("','", replace_quote($sel_ary))
- ));
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/video.php b/upload/includes/topic_templates/video.php
deleted file mode 100644
index 41d5dc9fe..000000000
--- a/upload/includes/topic_templates/video.php
+++ /dev/null
@@ -1,98 +0,0 @@
- "[img{$img_align}]%s[/img]\n\n",
- 'release_name' => "[size=$title_font_size]%s[/size]\n\n",
- );
-
- $message = $subject = '';
- $msg = $sbj_ext = array();
-
- foreach ($tpl_items as $item)
- {
- $msg[$item] = !empty($_POST['msg'][$item]) ? $_POST['msg'][$item] : '';
- }
- array_deep($msg, 'trim');
-
- if ($msg)
- {
- if ($msg['original_name'])
- {
- $msg['release_name'] .= ' / '. trim($msg['original_name'], '/');
- unset($msg['original_name']);
- }
-
- // Subject
- $subject = $msg['release_name'];
- $subject .= ($msg['director']) ? ' ('. trim($msg['director'], '/') .')' : '';
-
- if ($msg['year'])
- {
- $sbj_ext[] = sprintf($lang['TPL']['Y'], $msg['year']);
- }
- if ($msg['genre'])
- {
- $sbj_ext[] = $msg['genre'];
- }
- if ($msg['quality'])
- {
- $sbj_ext[] = $msg['quality'];
- }
- if ($sbj_ext)
- {
- $subject .= ' ['. join(', ', $sbj_ext) .']';
- }
-
- // Message
- $message = tpl_build_message($msg);
- }
-}
\ No newline at end of file
diff --git a/upload/includes/topic_templates/video_guide.php b/upload/includes/topic_templates/video_guide.php
deleted file mode 100644
index ed54ba8c4..000000000
--- a/upload/includes/topic_templates/video_guide.php
+++ /dev/null
@@ -1,22 +0,0 @@
- POST_ID (with guide)
- 'title' => 330880,
- 'picture' => 330951,
- 'country' => 330955,
- 'director' => 330959,
- 'genre' => 330965,
- 'playtime' => 330966,
- 'year' => 330969,
- 'translation' => 330970,
- 'casting' => 330972,
- 'description' => 330974,
- 'moreinfo' => 330978,
- 'format' => 330980,
- 'video' => 330982,
- 'audio' => 330984,
- 'torrent' => 330985,
-);
-
-$lang['TPL']['GUIDE'] = array();
\ No newline at end of file
diff --git a/upload/index.php b/upload/index.php
index 67f0d8628..de5295624 100644
--- a/upload/index.php
+++ b/upload/index.php
@@ -113,7 +113,6 @@ $sql = "
LEFT JOIN ". BB_USERS ." u ON(u.user_id = p.poster_id)
ORDER BY c.cat_order, f.forum_order
";
-$cat_forums = array();
$replace_in_parent = array(
'last_post_id',
@@ -128,6 +127,7 @@ $replace_in_parent = array(
$cache_name = 'index_sql_' . md5($sql);
if (!$cat_forums = CACHE('bb_cache')->get($cache_name))
{
+ $cat_forums = array();
foreach (DB()->fetch_rowset($sql) as $row)
{
if (!$cat_id = $row['cat_id'] OR !$forum_id = $row['forum_id'])
@@ -242,17 +242,17 @@ $template->assign_vars(array(
// Build index page
foreach ($cat_forums as $cid => $c)
{
- $template->assign_block_vars('h_c', array(
+ $template->assign_block_vars('h_c', array(
'H_C_ID' => $cid,
'H_C_TITLE' => $cat_title_html[$cid],
'H_C_CHEKED' => in_array($cid, preg_split("/[-]+/", $hide_cat_opt)) ? 'checked' : '',
));
- $template->assign_vars(array(
+ $template->assign_vars(array(
'H_C_AL_MESS' => ($hide_cat_opt && !$showhide) ? true : false
));
- if (!$showhide && isset($hide_cat_user[$cid]))
+ if (!$showhide && isset($hide_cat_user[$cid]))
{
continue;
}
@@ -349,25 +349,25 @@ if ($bb_cfg['show_latest_news'])
// Network news
if ($bb_cfg['show_network_news'])
{
- if (!$network_news = $datastore->get('network_news'))
+ if (!$network_news = $datastore->get('network_news'))
{
- $datastore->update('network_news');
+ $datastore->update('network_news');
$network_news = $datastore->get('network_news');
}
- $template->assign_vars(array(
- 'SHOW_NETWORK_NEWS' => true,
- ));
+ $template->assign_vars(array(
+ 'SHOW_NETWORK_NEWS' => true,
+ ));
- foreach ($network_news as $net)
- {
- $template->assign_block_vars('net', array(
+ foreach ($network_news as $net)
+ {
+ $template->assign_block_vars('net', array(
'NEWS_TOPIC_ID' => $net['topic_id'],
'NEWS_TITLE' => str_short($net['topic_title'], $bb_cfg['max_net_title']),
'NEWS_TIME' => bb_date($net['topic_time'], 'd-M', 'false'),
'NEWS_IS_NEW' => is_unread($net['topic_time'], $net['topic_id'], $net['forum_id']),
- ));
- }
+ ));
+ }
}
if ($bb_cfg['birthday_check_day'] && $bb_cfg['birthday_enabled'])
diff --git a/upload/language/lang_english/lang_main.php b/upload/language/lang_english/lang_main.php
index 19f06395d..1643b58f2 100644
--- a/upload/language/lang_english/lang_main.php
+++ b/upload/language/lang_english/lang_main.php
@@ -2680,32 +2680,11 @@ $lang['BT_UNSET_DLTYPE_ON_TOR_UNREG'] = 'Change topic status to "Normal" while u
//
// Release
//
-$lang['LIST_FORUMS'] = 'List Forums';
-$lang['LIST_OF_PATTERNS'] = 'List of patterns';
-$lang['ADD_TEMPLATE'] = 'Add the template';
$lang['TEMPLATE_DISABLE'] = 'Template disabled';
$lang['FOR_NEW_TEMPLATE'] = 'for new patterns!';
$lang['CHANGED'] = 'Changed';
$lang['REMOVED'] = 'Removed';
$lang['QUESTION'] = 'Are you sure want to delete?';
-$lang['NOT_CHOOSE'] = 'you do not choose';
-
-$lang['RELEASE_EXP'] = 'This page displays all forums. For each of them you can set the release type which should be posted in the forum.';
-$lang['TPL_NONE'] = 'Don\'t use templates';
-$lang['TPL_VIDEO'] = 'Video (basic)';
-$lang['TPL_VIDEO_HOME'] = 'Video (home)';
-$lang['TPL_VIDEO_SIMPLE'] = 'Video (simple)';
-$lang['TPL_VIDEO_LESSON'] = 'Video (lesson)';
-$lang['TPL_GAMES'] = 'Games';
-$lang['TPL_GAMES_PS'] = 'Games PS/PS2';
-$lang['TPL_GAMES_PSP'] = 'Games PSP';
-$lang['TPL_GAMES_XBOX'] = 'Games XBOX';
-$lang['TPL_PROGS'] = 'Programs';
-$lang['TPL_PROGS_MAC'] = 'Programs Mac OS';
-$lang['TPL_MUSIC'] = 'Music';
-$lang['TPL_BOOKS'] = 'Books';
-$lang['TPL_AUDIOBOOKS'] = 'Audiobooks';
-$lang['TPL_SPORT'] = 'Sport';
$lang['CRON_LIST'] = 'Cron list';
$lang['CRON_ID'] = 'ID';
@@ -2739,8 +2718,8 @@ $lang['CRON_EDIT_HEAD_EDIT'] = 'Edit job';
$lang['CRON_EDIT_HEAD_ADD'] = 'Add job';
$lang['CRON_SCRIPT_EXPL'] = 'name of the script from "includes/cron/jobs/"';;
$lang['SCHEDULE'] = array(
- 'select' => '» Select start',
- 'hourly' => 'hourly',
+ 'select' => '» Select start',
+ 'hourly' => 'hourly',
'daily' => 'daily',
'weekly' => 'weekly',
'monthly' => 'monthly',
@@ -2930,149 +2909,6 @@ $lang['NEW_RELEASE'] = 'New release';
$lang['NEXT'] = 'Continue';
$lang['OTHER'] = 'Other';
-$lang['TPL']['AGE'] = 'Age';
-$lang['TPL']['ANNOTATION'] = 'Annotation';
-$lang['TPL']['AUDIO'] = 'Audio';
-$lang['TPL']['AUDIO_BITRATE'] = 'Audio bitrate';
-$lang['TPL']['AUDIO_CODEC'] = 'Audio codec';
-$lang['TPL']['AUDIOBOOK_TYPE'] = 'Type';
-$lang['TPL']['AUTHOR'] = 'Author';
-$lang['TPL']['BITRATE'] = 'Bitrate';
-$lang['TPL']['CAN_PLAY_XBOX360'] = 'Plays on xbox 360';
-$lang['TPL']['CASTING'] = 'Starring';
-$lang['TPL']['CD_IMAGE_TYPE'] = 'Image type';
-$lang['TPL']['COMMENTS'] = 'Comments';
-$lang['TPL']['COMPRESSED'] = '(compressed)';
-$lang['TPL']['COUNTRY'] = 'Country';
-$lang['TPL']['COVER'] = 'Cover';
-$lang['TPL']['DESCRIPTION'] = 'Description';
-$lang['TPL']['DEVELOPER'] = 'Developer';
-$lang['TPL']['DEVELOPER_URL'] = "Developer's Site";
-$lang['TPL']['DIRECTOR'] = 'Director';
-$lang['TPL']['EDITION'] = 'Edition';
-$lang['TPL']['FIRMWARE'] = 'Firmware';
-$lang['TPL']['FORMAT'] = 'Format';
-$lang['TPL']['FRAMESIZE'] = 'Frame size';
-$lang['TPL']['FRAMESIZE_EXP'] = 'Frame size must be expressed in numbers';
-$lang['TPL']['GENRE'] = 'Genre';
-$lang['TPL']['INCLUDED'] = 'Included';
-$lang['TPL']['ISBN'] = 'ISBN';
-$lang['TPL']['KBPS'] = 'kbps';
-$lang['TPL']['LANG'] = 'Language';
-$lang['TPL']['LOCAL'] = 'loc.';
-$lang['TPL']['LOCALIZATION'] = 'Localization';
-$lang['TPL']['LOCAL_VOICE'] = 'Sound language';
-$lang['TPL']['MANUFACTURER'] = 'Manufacturer';
-$lang['TPL']['MANUFACTURER_URL'] = "Manufacturer's Site";
-$lang['TPL']['MED'] = 'fix.';
-$lang['TPL']['MEDICINE'] = 'Crack';
-$lang['TPL']['MEDIUM'] = 'Medium';
-$lang['TPL']['MINUTES'] = 'min';
-$lang['TPL']['MOREINFO'] = 'Additional info';
-$lang['TPL']['MOREINFO_EXP'] = 'Enter URL where the additional info can be found';
-$lang['TPL']['MULTIPLAYER'] = 'Multiplayer';
-$lang['TPL']['NAME_EXP'] = 'Release title is required';
-$lang['TPL']['NATIVE'] = 'eBook (originally)';
-$lang['TPL']['NOT_INCLUDED'] = 'N/A';
-$lang['TPL']['NOT_NEEDED'] = 'Not needed';
-$lang['TPL']['OCR_W_ERRORS'] = 'OCR with errors';
-$lang['TPL']['OCR_W_O_ERRORS'] = 'OCR without errors';
-$lang['TPL']['ORIGINAL_NAME'] = 'Original Title';
-$lang['TPL']['ORIGINAL_NAME_DESC'] = '';
-$lang['TPL']['OS'] = 'OS';
-$lang['TPL']['PAGES_COUNT'] = 'Pages count';
-$lang['TPL']['PARTICIPANTS'] = 'Participants';
-$lang['TPL']['PERFORMER'] = 'Performer';
-$lang['TPL']['PICTURE'] = 'Poster';
-$lang['TPL']['PICTURE_EXP'] = 'Enter a working URL for picture';
-$lang['TPL']['PIXELS'] = 'pixels';
-$lang['TPL']['PLATFORM'] = 'Platform';
-$lang['TPL']['PLAYTIME'] = 'Playtime';
-$lang['TPL']['PUBLISHER'] = 'Publisher';
-$lang['TPL']['PUBLISHER_1'] = 'Publisher';
-$lang['TPL']['QUALITY'] = 'Quality';
-$lang['TPL']['REGION'] = 'Region';
-$lang['TPL']['RELEASE_NAME'] = 'Title';
-$lang['TPL']['RELEASE_NAME_DESC'] = '';
-$lang['TPL']['REQUIRED'] = 'required';
-$lang['TPL']['SCANNED'] = 'Scanned pages';
-$lang['TPL']['SCREEN_SHOT'] = 'Screenshot';
-$lang['TPL']['SCREEN_SHOTS'] = 'Screenshots';
-$lang['TPL']['SIMPLE_TEXT'] = 'Simple text';
-$lang['TPL']['SONGLIST'] = 'Songlist';
-$lang['TPL']['SOURCE_TYPE'] = 'Source type';
-$lang['TPL']['SPORT_TYPE'] = 'Sport Type';
-$lang['TPL']['SYS_REQUIREMENTS'] = 'System Requirements';
-$lang['TPL']['SYSREQ'] = 'System requirements';
-$lang['TPL']['TOR_SIZE_EXP'] = 'Filesize is too big';
-$lang['TPL']['TORRENT'] = 'Torrent';
-$lang['TPL']['TORRENT_EXP'] = 'Select torrent file that you want to release';
-$lang['TPL']['TRACKLIST'] = 'Tracklist';
-$lang['TPL']['TRANSLATION_TYPE'] = 'Translation type';
-$lang['TPL']['UNCOMPRESSED'] = '(uncompressed)';
-$lang['TPL']['VERSION'] = 'Version';
-$lang['TPL']['VIDEO'] = 'Video';
-$lang['TPL']['VIDEO_BITRATE'] = 'Video bitrate';
-$lang['TPL']['VIDEO_CODEC'] = 'Video codec';
-$lang['TPL']['VISTA_COMPATIBLE'] = 'Windows7 compatibility';
-$lang['TPL']['Y'] = '%s y.';
-$lang['TPL']['YEAR'] = 'Year';
-$lang['TPL']['YEAR_EXP'] = 'Year must a four-digit number';
-
-$lang['TPL']['TRANSLATION'] = 'Translation';
-$lang['TPL']['TRANSLATION_OPTIONS'] = array(
- 'N/A',
- 'Subtitles only',
- 'Single voice',
- 'Full dubbing',
- 'Double vioce',
- 'Professional',
-);
-
-$lang['TPL']['TRANSLATION_TYPES'] = array(
- 'text',
- 'text + voice',
- 'none',
-);
-
-$lang['TPL']['LANG_OPTIONS'] = array(
- 'english',
-);
-
-$lang['TPL']['UI_LANG_OPTIONS'] = array(
- 0 => 'english',
-);
-
-$lang['TPL']['UI_LANG_OPTIONS_PS'] = array(
- 'japanese',
- 'english',
- 'Multi5',
-);
-
-$lang['TPL']['AUDIOBOOK_TYPE_OPTIONS'] = array(
- 'audiobook',
-);
-
-$lang['TPL']['SOURCE_TYPE_OPTIONS'] = array(
- 0 => 'licensed',
- 1 => 'pirated',
- 2 => 'Rip',
- 3 => 'RePack',
-);
-
-$lang['TPL']['MULTIPLAYER_OPTIONS'] = array(
- 'no',
- '2x',
- '4x',
- 'more',
-);
-
-$lang['TPL']['VISTA_COMPATIBLE_OPTIONS'] = array(
- 'yes',
- 'no',
- 'unknown',
-);
-
$lang['TPL_EMPTY_FIELD'] = 'You must fill the field %s';
$lang['TPL_EMPTY_SEL'] = 'You must select %s';
$lang['TPL_NOT_NUM'] = '%s - Not a num';
diff --git a/upload/language/lang_russian/lang_main.php b/upload/language/lang_russian/lang_main.php
index d918161a3..d50419f3d 100644
--- a/upload/language/lang_russian/lang_main.php
+++ b/upload/language/lang_russian/lang_main.php
@@ -2695,32 +2695,11 @@ $lang['BT_UNSET_DLTYPE_ON_TOR_UNREG'] = 'Изменять статус топи
//
// Release
//
-$lang['LIST_FORUMS'] = 'Список форумов';
-$lang['LIST_OF_PATTERNS'] = 'Список шаблонов';
-$lang['ADD_TEMPLATE'] = 'Добавить шаблон';
$lang['TEMPLATE_DISABLE'] = 'Шаблон отключен';
$lang['FOR_NEW_TEMPLATE'] = 'для новых шаблонов!';
$lang['CHANGED'] = 'Изменено';
$lang['REMOVED'] = 'Удалено';
$lang['QUESTION'] = 'Вы уверены, что хотите удалить?';
-$lang['NOT_CHOOSE'] = 'вы ничего не выбрали';
-
-$lang['RELEASE_EXP'] = 'На этой странице отображаются форумы, для которых можно выбрать шаблон нового топика (релиза).';
-$lang['TPL_NONE'] = 'Не использовать шаблоны';
-$lang['TPL_VIDEO'] = 'Видео, с указанием перевода';
-$lang['TPL_VIDEO_HOME'] = 'Видео, без указания перевода';
-$lang['TPL_VIDEO_SIMPLE'] = 'Видео, без подробностей';
-$lang['TPL_VIDEO_LESSON'] = 'Видеоуроки';
-$lang['TPL_GAMES'] = 'Игры';
-$lang['TPL_GAMES_PS'] = 'Игры PS/PS2';
-$lang['TPL_GAMES_PSP'] = 'Игры PSP';
-$lang['TPL_GAMES_XBOX'] = 'Игры XBOX';
-$lang['TPL_PROGS'] = 'Программы';
-$lang['TPL_PROGS_MAC'] = 'Программы Mac OS';
-$lang['TPL_MUSIC'] = 'Музыка';
-$lang['TPL_BOOKS'] = 'Книги';
-$lang['TPL_AUDIOBOOKS'] = 'Аудиокниги';
-$lang['TPL_SPORT'] = 'Спорт';
$lang['CRON_LIST'] = 'Список задач';
$lang['CRON_ID'] = 'ID';
@@ -2754,8 +2733,8 @@ $lang['CRON_EDIT_HEAD_EDIT'] = 'Редактировать задачу';
$lang['CRON_EDIT_HEAD_ADD'] = 'Добавить задачу';
$lang['CRON_SCRIPT_EXPL'] = 'название в папке "includes/cron/jobs/"';
$lang['SCHEDULE'] = array(
- 'select' => '» Выберите запуск',
- 'hourly' => 'ежечасно',
+ 'select' => '» Выберите запуск',
+ 'hourly' => 'ежечасно',
'daily' => 'ежедневно',
'weekly' => 'еженедельно',
'monthly' => 'ежемесячно',
@@ -2942,163 +2921,6 @@ $lang['NEW_RELEASE'] = 'Новый релиз';
$lang['NEXT'] = 'Продолжить';
$lang['OTHER'] = 'Другой';
-$lang['TPL']['AGE'] = 'Возраст';
-$lang['TPL']['ANNOTATION'] = 'Аннотация';
-$lang['TPL']['AUDIO'] = 'Аудио';
-$lang['TPL']['AUDIO_BITRATE'] = 'Битрейт аудио';
-$lang['TPL']['AUDIO_CODEC'] = 'Аудио кодек';
-$lang['TPL']['AUDIOBOOK_TYPE'] = 'Тип';
-$lang['TPL']['AUTHOR'] = 'Автор';
-$lang['TPL']['BITRATE'] = 'Битрейт';
-$lang['TPL']['CAN_PLAY_XBOX360'] = 'Работает на xbox 360';
-$lang['TPL']['CASTING'] = 'В ролях';
-$lang['TPL']['CD_IMAGE_TYPE'] = 'Тип образа';
-$lang['TPL']['COMMENTS'] = 'Комментарий';
-$lang['TPL']['COMPRESSED'] = '(сжатый)';
-$lang['TPL']['COUNTRY'] = 'Страна';
-$lang['TPL']['COVER'] = 'Обложка';
-$lang['TPL']['DESCRIPTION'] = 'Описание';
-$lang['TPL']['DEVELOPER'] = 'Разработчик';
-$lang['TPL']['DEVELOPER_URL'] = 'Сайт разработчика';
-$lang['TPL']['DIRECTOR'] = 'Режиссер';
-$lang['TPL']['EDITION'] = 'Серия';
-$lang['TPL']['FIRMWARE'] = 'Прошивка';
-$lang['TPL']['FORMAT'] = 'Формат';
-$lang['TPL']['FRAMESIZE'] = 'Размер кадра';
-$lang['TPL']['FRAMESIZE_EXP'] = 'Размер кадра должен выражаться в числах';
-$lang['TPL']['GENRE'] = 'Жанр';
-$lang['TPL']['INCLUDED'] = 'Присутствует';
-$lang['TPL']['ISBN'] = 'ISBN';
-$lang['TPL']['KBPS'] = 'kbps';
-$lang['TPL']['LANG'] = 'Язык';
-$lang['TPL']['LOCAL'] = 'рус.';
-$lang['TPL']['LOCALIZATION'] = 'Язык интерфейса';
-$lang['TPL']['LOCAL_VOICE'] = 'Язык озвучки';
-$lang['TPL']['MANUFACTURER'] = 'Производитель';
-$lang['TPL']['MANUFACTURER_URL'] = 'Сайт производителя';
-$lang['TPL']['MED'] = 'таб.';
-$lang['TPL']['MEDICINE'] = 'Таблэтка';
-$lang['TPL']['MEDIUM'] = 'Носитель';
-$lang['TPL']['MINUTES'] = 'минут';
-$lang['TPL']['MOREINFO'] = 'Доп. информация';
-$lang['TPL']['MOREINFO_EXP'] = 'Введите адрес URL, по которму можно получить дополнительную информацию о содержании релиза';
-$lang['TPL']['MULTIPLAYER'] = 'Мультиплейер';
-$lang['TPL']['NAME_EXP'] = 'Название релиза является обязательным для заполнения';
-$lang['TPL']['NATIVE'] = 'eBook (изначально компьютерное)';
-$lang['TPL']['NOT_INCLUDED'] = 'Отсутствует';
-$lang['TPL']['NOT_NEEDED'] = 'Не требуется';
-$lang['TPL']['OCR_W_ERRORS'] = 'OCR с ошибками';
-$lang['TPL']['OCR_W_O_ERRORS'] = 'OCR без ошибок';
-$lang['TPL']['ORIGINAL_NAME'] = 'Оригинальное название';
-$lang['TPL']['ORIGINAL_NAME_DESC'] = 'на английском';
-$lang['TPL']['OS'] = 'Операционные системы';
-$lang['TPL']['PAGES_COUNT'] = 'Количество страниц';
-$lang['TPL']['PARTICIPANTS'] = 'Участники';
-$lang['TPL']['PERFORMER'] = 'Исполнитель';
-$lang['TPL']['PICTURE'] = 'Постер';
-$lang['TPL']['PICTURE_EXP'] = 'Введите рабочий URL картинки';
-$lang['TPL']['PIXELS'] = 'точек';
-$lang['TPL']['PLATFORM'] = 'Платформа';
-$lang['TPL']['PLAYTIME'] = 'Продолжительность';
-$lang['TPL']['PUBLISHER'] = 'Издательство';
-$lang['TPL']['PUBLISHER_1'] = 'Издатель';
-$lang['TPL']['QUALITY'] = 'Качество';
-$lang['TPL']['REGION'] = 'Регион';
-$lang['TPL']['RELEASE_NAME'] = 'Название';
-$lang['TPL']['RELEASE_NAME_DESC'] = 'на русском';
-$lang['TPL']['REQUIRED'] = 'это поле необходимо заполнить';
-$lang['TPL']['SCANNED'] = 'Отсканированные страницы';
-$lang['TPL']['SCREEN_SHOT'] = 'Скриншот';
-$lang['TPL']['SCREEN_SHOTS'] = 'Скриншоты';
-$lang['TPL']['SIMPLE_TEXT'] = 'Обычный текст';
-$lang['TPL']['SONGLIST'] = 'Список песен';
-$lang['TPL']['SOURCE_TYPE'] = 'Тип издания';
-$lang['TPL']['SPORT_TYPE'] = 'Вид спорта';
-$lang['TPL']['SYS_REQUIREMENTS'] = 'Системные требования';
-$lang['TPL']['SYSREQ'] = 'Системные требования';
-$lang['TPL']['TOR_SIZE_EXP'] = 'Слишком большой размер торрент-файла. Вам необходимо увеличить размер частей и создать торрент заново';
-$lang['TPL']['TORRENT'] = 'Торрент';
-$lang['TPL']['TORRENT_EXP'] = 'Выберите торрент-файл, который будете использовать для релиза';
-$lang['TPL']['TRACKLIST'] = 'Трэклист';
-$lang['TPL']['TRANSLATION_TYPE'] = 'Тип перевода';
-$lang['TPL']['UNCOMPRESSED'] = '(несжатый)';
-$lang['TPL']['VERSION'] = 'Версия';
-$lang['TPL']['VIDEO'] = 'Видео';
-$lang['TPL']['VIDEO_BITRATE'] = 'Битрейт видео';
-$lang['TPL']['VIDEO_CODEC'] = 'Видео кодек';
-$lang['TPL']['VISTA_COMPATIBLE'] = 'Совместимость с Windows7';
-$lang['TPL']['Y'] = '%s г.';
-$lang['TPL']['YEAR'] = 'Год выпуска';
-$lang['TPL']['YEAR_EXP'] = 'Год выпуска должен быть четырехзначным числом';
-
-$lang['TPL']['TRANSLATION'] = 'Перевод';
-$lang['TPL']['TRANSLATION_OPTIONS'] = array(
- 'Любительский (одноголосый)',
- 'Любительский (двухголосый)',
- 'Любительский (Гоблинa)',
- 'Профессиональный (одноголосый)',
- 'Профессиональный (двухголосый)',
- 'Профессиональный (многоголосый, закадровый)',
- 'Профессиональный (полное дублирование)',
- 'Субтитры',
- 'Отсутствует',
- 'Не требуется',
-);
-
-$lang['TPL']['TRANSLATION_TYPES'] = array(
- 'текст',
- 'текст + звук',
- 'нет',
-);
-
-$lang['TPL']['LANG_OPTIONS'] = array(
- 'русский',
- 'английский',
- 'немецкий',
- 'другой',
-);
-
-$lang['TPL']['UI_LANG_OPTIONS_PS'] = array(
- 'японский',
- 'английский',
- 'русский',
- 'Multi5',
-);
-
-$lang['TPL']['UI_LANG_OPTIONS'] = array(
- 0 => 'английский + русский',
- 1 => 'только английский',
- 2 => 'только русский',
- 3 => 'немецкий',
-);
-
-$lang['TPL']['AUDIOBOOK_TYPE_OPTIONS'] = array(
- 'аудиокнига',
- 'аудиоспектакль',
- 'модель для сборки',
-);
-
-$lang['TPL']['SOURCE_TYPE_OPTIONS'] = array(
- 0 => 'лицензия',
- 1 => 'пиратка',
- 2 => 'Rip',
- 3 => 'RePack',
-);
-
-$lang['TPL']['MULTIPLAYER_OPTIONS'] = array(
- 'нет',
- '2x',
- '4x',
- 'более',
-);
-
-$lang['TPL']['VISTA_COMPATIBLE_OPTIONS'] = array(
- 'полная',
- 'да',
- 'нет',
- 'неизвестно',
-);
-
$lang['TPL_EMPTY_FIELD'] = 'Вы должны заполнить поле %s';
$lang['TPL_EMPTY_SEL'] = 'Вы должны выбрать %s';
$lang['TPL_NOT_NUM'] = '%s - должно быть число';
diff --git a/upload/modcp.php b/upload/modcp.php
index 05a3f980c..8fb4457f9 100644
--- a/upload/modcp.php
+++ b/upload/modcp.php
@@ -501,8 +501,10 @@ switch ($mode)
DB()->sql_freeresult($result);
- $sql = "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
- VALUES ('" . DB()->escape($post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
+ $first_post_id = min(explode(',', $post_id_sql));
+
+ $sql = "INSERT INTO " . BB_TOPICS . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_first_post_id)
+ VALUES ('" . DB()->escape($post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ", $first_post_id)";
if (!(DB()->sql_query($sql)))
{
message_die(GENERAL_ERROR, 'Could not insert new topic', '', __LINE__, __FILE__, $sql);
diff --git a/upload/posting.php b/upload/posting.php
index 40b6e163a..ae712f752 100644
--- a/upload/posting.php
+++ b/upload/posting.php
@@ -8,14 +8,11 @@ require(INC_DIR .'bbcode.php');
require(INC_DIR .'functions_post.php');
require(BB_ROOT .'attach_mod/attachment_mod.php');
-$page_cfg['load_tpl_vars'] = array(
- 'post_icons',
-);
+$page_cfg['load_tpl_vars'] = array('post_icons');
$submit = (bool) @$_REQUEST['post'];
$preview = (bool) @$_REQUEST['preview'];
$delete = (bool) @$_REQUEST['delete'];
-$topic_tpl = (bool) @$_REQUEST['tpl'];
$forum_id = (int) @$_REQUEST[POST_FORUM_URL];
$topic_id = (int) @$_REQUEST[POST_TOPIC_URL];
@@ -46,17 +43,12 @@ $user->session_start();
set_die_append_msg($forum_id, $topic_id);
-if ($mode == 'new_rel')
-{
- require(INC_DIR .'posting_tpl.php');
- exit;
-}
-
// What auth type do we need to check?
$is_auth = array();
switch ($mode)
{
case 'newtopic':
+ case 'new_rel':
if (bf($userdata['user_opt'], 'user_opt', 'allow_topic'))
{
bb_die($lang['RULES_POST_CANNOT']);
@@ -108,6 +100,7 @@ $post_data = array();
switch ($mode)
{
case 'newtopic':
+ case 'new_rel':
if (!$forum_id)
{
message_die(GENERAL_MESSAGE, $lang['FORUM_NOT_EXIST']);
@@ -169,7 +162,7 @@ if ($post_info = DB()->fetch_row($sql))
{
message_die(GENERAL_MESSAGE, $lang['FORUM_LOCKED']);
}
- elseif ($mode != 'newtopic' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
+ elseif ($mode != 'newtopic' && $mode != 'new_rel' && $post_info['topic_status'] == TOPIC_LOCKED && !$is_auth['auth_mod'])
{
message_die(GENERAL_MESSAGE, $lang['TOPIC_LOCKED']);
}
@@ -231,6 +224,9 @@ if (!$is_auth[$is_auth_type])
case 'newtopic':
$redirect = "mode=newtopic&f=$forum_id";
break;
+ case 'new_rel':
+ $redirect = "mode=new_rel&f=$forum_id";
+ break;
case 'reply':
$redirect = "mode=reply&t=$topic_id";
break;
@@ -241,10 +237,10 @@ if (!$is_auth[$is_auth_type])
default:
$redirect = '';
}
- redirect(LOGIN_URL . "?redirect=/posting.php?$redirect");
+ redirect(LOGIN_URL . "?redirect=/". POSTING_URL ."?$redirect");
}
-if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
+if ($mode == 'new_rel')
{
if ($tor_status = join(',', $bb_cfg['tor_cannot_new']))
{
@@ -263,7 +259,8 @@ if ($mode == 'newtopic' && $topic_tpl && $post_info['topic_tpl_id'])
}
if ($topics) bb_die($topics . $lang['UNEXECUTED_RELEASE']);
}
- require(INC_DIR .'topic_templates.php');
+ require(INC_DIR .'posting_tpl.php');
+ exit;
}
// Notify
@@ -277,12 +274,7 @@ else
if (!IS_GUEST && $mode != 'newtopic' && !$notify_user)
{
- $notify_user = (int) DB()->fetch_row("
- SELECT topic_id
- FROM ". BB_TOPICS_WATCH ."
- WHERE topic_id = $topic_id
- AND user_id = ". $userdata['user_id'] ."
- ");
+ $notify_user = (int) DB()->fetch_row("SELECT topic_id FROM ". BB_TOPICS_WATCH ." WHERE topic_id = $topic_id AND user_id = ". $userdata['user_id']);
}
}
diff --git a/upload/robots.txt b/upload/robots.txt
index ba43338aa..fe4d87309 100644
--- a/upload/robots.txt
+++ b/upload/robots.txt
@@ -8,8 +8,6 @@ Disallow: /posting.php
Disallow: /privmsg.php
Disallow: /profile.php
Disallow: /viewonline.php
-Crawl-delay: 0.3
-Host: torrentpier.me
-Clean-param: sid /*.php
+Host: torrentpier.me
Sitemap: http://torrentpier.me/sitemap.php
\ No newline at end of file
diff --git a/upload/templates/admin/admin_extensions.tpl b/upload/templates/admin/admin_extensions.tpl
index 1d269595e..2978e7c0a 100644
--- a/upload/templates/admin/admin_extensions.tpl
+++ b/upload/templates/admin/admin_extensions.tpl
@@ -77,7 +77,7 @@
{L_ALLOWED} |
{L_DOWNLOAD_MODE} |
{L_UPLOAD_ICON} |
- {L_MAX_FILESIZE} |
+ {L_MAX_FILESIZE_ATTACH} |
{L_ALLOWED_FORUMS} |
{L_ADD_NEW} |
diff --git a/upload/templates/admin/admin_topic_templates.tpl b/upload/templates/admin/admin_topic_templates.tpl
deleted file mode 100644
index 41b08e3c8..000000000
--- a/upload/templates/admin/admin_topic_templates.tpl
+++ /dev/null
@@ -1,102 +0,0 @@
-{L_RELEASE_TEMPLATES}
-
-{L_LIST_FORUMS} ·
-{L_LIST_OF_PATTERNS} ·
-{L_ADD_TEMPLATE}
-
-
-
-{L_RELEASE_EXP}
-
-
-
-
-
-
-На этой странице отображаются шаблоны
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/css/main.css b/upload/templates/default/css/main.css
index dee4acd03..709051300 100644
--- a/upload/templates/default/css/main.css
+++ b/upload/templates/default/css/main.css
@@ -70,7 +70,7 @@ body, th, td, font {
font: 12px Verdana,Arial,sans-serif;
}
-#body_container { background: #E3E3E3; padding: 0 2px 4px; }
+#body_container { background: #E3E3E3; padding: 0 0 4px; }
#page_container {
margin: 0 auto;
background: #FFFFFF; border: 1px solid #CFD4D8;
@@ -128,10 +128,10 @@ wbr { display: inline-block; }
.adm, a.adm, a.adm:visited { color: #800000; text-decoration: none; font-size: 11px; }
-.dlWill { color: #0066CC; }
+.dlWill { color: #0066CC; }
.dlDown, .leech, .leechmed, .leechsmall { color: #800000; }
.dlComplete, .seed, .seedmed, .seedsmall { color: #006600; }
-.dlCancel { color: #666666; }
+.dlCancel { color: #666666; }
a.dlWill, a.dlWill:visited { color: #0066CC; text-decoration: none; }
a.dlDown, a.dlDown:visited { color: #800000; text-decoration: none; }
@@ -139,13 +139,11 @@ a.dlComplete, a.dlComplete:visited { color: #006600; text-decoration: none
a.dlCancel, a.dlCancel:visited { color: #666666; text-decoration: none; }
a.leech, a.leechmed, a.leechsmall,
-a.leech:visited, a.leechmed:visited, a.leechsmall:visited
-{
+a.leech:visited, a.leechmed:visited, a.leechsmall:visited {
color: #800000; text-decoration: none;
}
a.seed, a.seedmed, a.seedsmall,
-a.seed:visited, a.seedmed:visited, a.seedsmall:visited
-{
+a.seed:visited, a.seedmed:visited, a.seedsmall:visited {
color: #006600; text-decoration: none;
}
a.points, a.pointsmed, a.pointssmall,
@@ -175,12 +173,16 @@ a.topictitle:visited, a.torTopic:visited, a.tLink:visited {
/* ---------------------------------- *
Backgrounds
* ---------------------------------- */
-.row1, .row1 td { background: #eff0f3; }
-.row2, .row2 td { background: #e3e8ed; }
-.row3, .row3 td { background: #d2d7e2; }
+.row1, .row1 td { background: #EFEFEF; }
+.row2, .row2 td { background: #DEE3E7; }
+.row3, .row3 td { background: #D1D7DC; }
.row4, .row4 td { background: #ECECEC; }
.row5, .row5 td { background: #E7E7E7; }
-.row6, .row6 td { background: #E9E9E6; }
+.row6, .row6 td { background: #DDDDDD; }
+
+.prow1 { background: #ECECEC; }
+.prow2 { background: #E7E7E7; }
+.prow3 { background: #DEE3E7; }
.p-body tr { background: #ECECEC; }
.p-body tr:hover { background: #DEE3E7; }
@@ -270,6 +272,9 @@ a.small, a.gensmall { color: #006699; text-decoration: none; }
margin: 8px auto 8px 8px;
}
.post_body li { margin: 0px 4px 1px 24px; }
+ul[type="1"] { list-style-type: decimal; }
+ul[type="a"] { list-style-type: lower-alpha; }
+ul[type="i"] { list-style-type: lower-roman; }
/* ---------------------------------- *
Post images
* ---------------------------------- */
@@ -317,7 +322,7 @@ input.mainoption, input.main {
}
/* The buttons used for bbCode styling in message post */
-input.button, .buttons input { border:1px dotted; background: #F6F6FF; }
+input.button, .buttons input { border: 1px solid; background: #F5F5F5; }
input.long { padding-left: 20px; padding-right: 20px; }
.buttons input:hover {border:1px solid #DEDEDE; background:#FFF;}
input.button, .buttons input,
@@ -325,9 +330,10 @@ input.mainoption, input.main, input.liteoption, input.lite {
color: #000000; border-color: #ABABAB;
}
-/* "gte IE 7" in page_header.tpl */
-input[type="checkbox"] { margin-bottom: 0px; }
-input[type="radio"] { margin-bottom: -2px; }
+input[type="checkbox"], input[type="radio"] {
+ cursor: pointer; margin: 1px 2px 1px 1px; padding: 0; height: 13px; width: 13px; vertical-align: text-top;
+ box-sizing: border-box; -moz-box-sizing: border-box;
+}
input[disabled="disabled"] { color: #808080; }
input.hint { color: #999999; font-style: italic; text-indent: 0.3em; }
@@ -405,6 +411,8 @@ table.forumline {
}
.forumline th {
border: 1px solid #B7C0C5; border-width: 1px; border-top-color: #92A3A4;
+ padding: 6px 3px 4px; color: #000000; background-color: #CFD4D8;
+ font-size: 10px; text-transform: uppercase;
}
.forumline td {
border: 1px solid #B7C0C5; border-width: 0 1px 1px;
@@ -516,7 +524,7 @@ table.smilies td { padding: 3px; text-align: center; }
* ---------------------------------- */
#main-nav {
padding: 4px 10px; margin: 0px;
- border: solid #C3CBD1 /*#CFD4D8*/; border-width: 0 0 1px 0px; background: #eff0f3 url('../images/cellpic.gif');
+ border: solid #C3CBD1 /*#CFD4D8*/; border-width: 0 0 1px 0px; background: #eff0f3 /*url('../images/cellpic.gif')*/;
}
#main-nav b { padding: 0 4px 0 1px; }
#main-nav a { color: #444; text-decoration: none; }
@@ -547,10 +555,11 @@ table.smilies td { padding: 3px; text-align: center; }
Search input
* ---------------------------------- */
#search-text {
- background: white;
- border: 1px solid silver;
- padding: 1px;
- width: 250px;
+ background: white; border: 1px solid silver;
+ padding: 1px; width: 300px;
+}
+@media screen and (max-width: 1200px) {
+ #search-text { width: 180px; }
}
#search-text:hover {
border: 1px solid #aaaaaa;
@@ -630,7 +639,7 @@ table.forums { width: 100%; }
padding: 0 !important; font-size: 10px; font-weight: normal; color: #3C3C3C;
}
.forums td {
- padding: 3px 4px; font-size: 11px;
+ padding: 2px 4px 3px; font-size: 11px;
}
.forums em { /* titles like: "Subforums:", "Moderators:" */
color: #5E5E5E; font-style: italic;
@@ -781,7 +790,7 @@ table.topic { width: 100%; }
.poster_info .nick { margin: 0 0 4px; color: #333333; line-height: 110%; }
.poster_info .avatar { margin: 5px 0 4px; max-width: 100px; max-height: 100px; overflow: hidden; }
.poster_info .birthday { margin: 5px 0; text-align: center !important;}
- .avatar imgreflect { display: block; }
+ .avatar img { display: block; }
.poster_info em { font-style: normal; color: #000000; }
table.topic, .topic .td1, .topic .td2, .topic .td3, .post_head, .post_btn_2 {
@@ -812,7 +821,7 @@ table.topic { width: 100%; }
#poll { border: solid #B7C0C5; border-width: 1px; margin-bottom: -1px; }
- .quick_reply_box { width: 640px; }
+ .quick_reply_box { width: 800px; }
.hl-selected-post { background-color: #FFEFD5 !important; }
/* ---------------------------------- *
Torrent status
@@ -879,6 +888,7 @@ img.topic_icon { width: 19px; height: 18px; }
img.pm_box_icon { width: 28px; height: 25px; }
img.icon1 { width: 12px; height: 9px; }
img.icon2 { width: 18px; height: 9px; }
+img.feed-small { width: 12px; height: 12px; }
img.spacer { display: block; height: 1px; }
/* ================================================================ *
Page footer
@@ -911,10 +921,6 @@ a.menu-root, a.menu-root:visited, a.menu-root:hover {
.menu-sub legend { font-weight: bold; }
.menu-sub label { display: block; padding-right: 2px; margin-right: 1px; }
.menu-sub label:hover { background: #D1D7DC; color: #993300; }
- .menu-sub iframe.ie-fix-select-overlap {
- display: none;
- display: block;
- position: absolute; z-index: -1; filter: mask(); }
.menu-a { background: #FFFFFF; border: 1px solid #92A3A4; }
.menu-a a { color: #0000A0; background: #E7E7E7; padding: 4px 10px 5px; margin: 1px; display: block; text-decoration: none !important; }
.menu-a a:hover { color: #0000FF; background: #D1D7DC; text-decoration: none !important; }
diff --git a/upload/templates/default/posting_tpl.tpl b/upload/templates/default/posting_tpl.tpl
index d1b26b1a4..a8305935b 100644
--- a/upload/templates/default/posting_tpl.tpl
+++ b/upload/templates/default/posting_tpl.tpl
@@ -1564,12 +1564,12 @@ TPL.selects = {
maps_lang_abr: [
'',
'ENG + RUS', // Английский + Русский
- 'ENG', // Английский
- 'RUS', // Русский
- 'GER', // Немецкий
- 'MULTILANG +RUS', // Мультиязычный (русский присутствует)
- 'MULTILANG -RUS', // Мультиязычный (русский отсутствует)
- ''
+ 'ENG', // Английский
+ 'RUS', // Русский
+ 'GER', // Немецкий
+ 'MULTILANG +RUS', // Мультиязычный (русский присутствует)
+ 'MULTILANG -RUS', // Мультиязычный (русский отсутствует)
+ ''
],
gui_lang_new: [
'',
@@ -4855,4 +4855,4 @@ $(function(){
-
+
\ No newline at end of file
diff --git a/upload/templates/default/topic_templates/audiobooks.tpl b/upload/templates/default/topic_templates/audiobooks.tpl
deleted file mode 100644
index 29222f6b3..000000000
--- a/upload/templates/default/topic_templates/audiobooks.tpl
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/books.tpl b/upload/templates/default/topic_templates/books.tpl
deleted file mode 100644
index bac1f6171..000000000
--- a/upload/templates/default/topic_templates/books.tpl
+++ /dev/null
@@ -1,141 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/games.tpl b/upload/templates/default/topic_templates/games.tpl
deleted file mode 100644
index 7a087a837..000000000
--- a/upload/templates/default/topic_templates/games.tpl
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/games_ps.tpl b/upload/templates/default/topic_templates/games_ps.tpl
deleted file mode 100644
index c5d579646..000000000
--- a/upload/templates/default/topic_templates/games_ps.tpl
+++ /dev/null
@@ -1,150 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/games_psp.tpl b/upload/templates/default/topic_templates/games_psp.tpl
deleted file mode 100644
index 8e90b089c..000000000
--- a/upload/templates/default/topic_templates/games_psp.tpl
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/games_xbox.tpl b/upload/templates/default/topic_templates/games_xbox.tpl
deleted file mode 100644
index 7abdce71a..000000000
--- a/upload/templates/default/topic_templates/games_xbox.tpl
+++ /dev/null
@@ -1,146 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/music.tpl b/upload/templates/default/topic_templates/music.tpl
deleted file mode 100644
index a26f9a23e..000000000
--- a/upload/templates/default/topic_templates/music.tpl
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/progs.tpl b/upload/templates/default/topic_templates/progs.tpl
deleted file mode 100644
index 4d0282810..000000000
--- a/upload/templates/default/topic_templates/progs.tpl
+++ /dev/null
@@ -1,143 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/progs_mac.tpl b/upload/templates/default/topic_templates/progs_mac.tpl
deleted file mode 100644
index 570ef26a2..000000000
--- a/upload/templates/default/topic_templates/progs_mac.tpl
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/sport.tpl b/upload/templates/default/topic_templates/sport.tpl
deleted file mode 100644
index cec02ab86..000000000
--- a/upload/templates/default/topic_templates/sport.tpl
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/video.tpl b/upload/templates/default/topic_templates/video.tpl
deleted file mode 100644
index 737511deb..000000000
--- a/upload/templates/default/topic_templates/video.tpl
+++ /dev/null
@@ -1,164 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/video_home.tpl b/upload/templates/default/topic_templates/video_home.tpl
deleted file mode 100644
index 764280084..000000000
--- a/upload/templates/default/topic_templates/video_home.tpl
+++ /dev/null
@@ -1,152 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/video_lesson.tpl b/upload/templates/default/topic_templates/video_lesson.tpl
deleted file mode 100644
index 80de1948e..000000000
--- a/upload/templates/default/topic_templates/video_lesson.tpl
+++ /dev/null
@@ -1,129 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/topic_templates/video_simple.tpl b/upload/templates/default/topic_templates/video_simple.tpl
deleted file mode 100644
index 92ffcb17e..000000000
--- a/upload/templates/default/topic_templates/video_simple.tpl
+++ /dev/null
@@ -1,144 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/upload/templates/default/tpl_config.php b/upload/templates/default/tpl_config.php
index bb66d2238..786e5b6e9 100644
--- a/upload/templates/default/tpl_config.php
+++ b/upload/templates/default/tpl_config.php
@@ -160,7 +160,7 @@ if (!empty($page_cfg['load_tpl_vars']) AND $vars = array_flip($page_cfg['load_tp
'EMAIL_URL' => BB_ROOT ."profile.php?mode=email&u=",
'FORUM_URL' => BB_ROOT . FORUM_URL,
- 'ICQ_URL' => 'http://www.icq.com/people/&uin=',
+ 'ICQ_URL' => 'http://www.icq.com/people/',
'PM_URL' => BB_ROOT . PM_URL,
'PROFILE_URL' => BB_ROOT . PROFILE_URL,
));