diff --git a/install/sql/mysql.sql b/install/sql/mysql.sql index 8d378e2de..faab82a0c 100644 --- a/install/sql/mysql.sql +++ b/install/sql/mysql.sql @@ -639,10 +639,6 @@ INSERT INTO `bb_config` VALUES ('report_new_window', '0'); INSERT INTO `bb_config` VALUES ('cron_enabled', '1'); INSERT INTO `bb_config` VALUES ('cron_check_interval', '300'); INSERT INTO `bb_config` VALUES ('reports_enabled', '1'); -INSERT INTO `bb_config` VALUES ('gallery_enabled', '1'); -INSERT INTO `bb_config` VALUES ('pic_dir', 'pictures/'); -INSERT INTO `bb_config` VALUES ('pic_max_size', '3'); -INSERT INTO `bb_config` VALUES ('auto_delete_posted_pics', '1'); INSERT INTO `bb_config` VALUES ('magnet_links_enabled', '1'); INSERT INTO `bb_config` VALUES ('no_avatar', 'images/avatars/gallery/noavatar.png'); INSERT INTO `bb_config` VALUES ('gender', '1'); diff --git a/upload/admin/admin_board.php b/upload/admin/admin_board.php index adf82b1c1..67068656d 100644 --- a/upload/admin/admin_board.php +++ b/upload/admin/admin_board.php @@ -78,10 +78,6 @@ switch($mode) 'CONFIG_MODS' => true, 'REPORTS_ENABLED' => $new['reports_enabled'], - 'GALLERY_ENABLED' => $new['gallery_enabled'], - 'PIC_DIR' => $new['pic_dir'], - 'PIC_MAX_SIZE' => $new['pic_max_size'], - 'AUTO_DELETE_POSTED_PICS' => $new['auto_delete_posted_pics'], 'MAGNET_LINKS_ENABLED' => $new['magnet_links_enabled'], 'GENDER' => $new['gender'], 'CALLSEED' => $new['callseed'], diff --git a/upload/config.php b/upload/config.php index c95d2d406..ba414f63c 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.5 (unstable)'; -$bb_cfg['tp_release_date'] = '03-11-2013'; -$bb_cfg['tp_release_state'] = 'R553'; +$bb_cfg['tp_release_date'] = '12-01-2014'; +$bb_cfg['tp_release_state'] = 'R554'; // Database $charset = 'utf8'; diff --git a/upload/gallery.php b/upload/gallery.php deleted file mode 100644 index 581c5e4ef..000000000 --- a/upload/gallery.php +++ /dev/null @@ -1,194 +0,0 @@ -session_start(array('req_login' => true)); - -if (!$bb_cfg['gallery_enabled']) bb_die($lang['GALLERY_DISABLED']); - -require(LANG_ROOT_DIR ."lang_{$userdata['user_lang']}/lang_gallery.php"); - -if(bf($userdata['user_opt'], 'user_opt', 'allow_gallery')) -{ - bb_die($lang['USE_GALLERY_OFF']); -} - -$go = isset($_GET['go']) ? $_GET['go'] : ''; -$max_size = $bb_cfg['pic_max_size']*1024*1024; -$dir = $bb_cfg['pic_dir']; -$url = make_url('/'); - -$msg = ''; -$links_all = $thumbs_all = array(); - -// DON'T CHANGE THIS FILE TYPEs -$allowed_ext = array('jpeg', 'jpg', 'png', 'gif'); - -function create_thumb ($dir, $name, $att) -{ - $infile = $dir . $name . $att; - if ($att == ".jpg" || $att == ".jpeg") - $im = imagecreatefromjpeg($infile); - elseif ($att == ".png") - $im = imagecreatefrompng($infile); - elseif ($att == ".gif") - $im = imagecreatefromgif($infile); - - $oh = imagesy($im); - $ow = imagesx($im); - $r = $oh/$ow; - $newh = 200; - $neww = $newh/$r; - $outfile = $dir ."thumb_". $name . $att; - $im1 = imagecreatetruecolor($neww,$newh); - imagecopyresampled($im1, $im, 0, 0, 0, 0, $neww, $newh, imagesx($im), imagesy($im)); - imagejpeg($im1, $outfile, 75); - imagedestroy($im); - imagedestroy($im1); -} - -function paste_links($links, $thumbs = '') -{ - global $links_all, $thumbs_all, $lang; - - if (is_array($links)) - { - $link = implode(' ', $links); - $img = '[img]'. implode('[/img] [img]', $links) .'[/img]'; - - if ($thumbs) - { - $thumb = ''; - for ($i = 0; $i < count($links); $i++) - { - $thumb .= '[url='.$links[$i].'][img]'. $thumbs[$i] .'[/img][/url]'; - } - } - } - else - { - $link = trim($links); - $img = '[img]'. $links .'[/img]'; - - $thumb = '[url='.$link.'][img]'. $thumbs .'[/img][/url]'; - } - $spoiler = '[spoiler="'. $lang['GALLERY_SCREENSHOTS'] .'"]' . $img . '[/spoiler]'; - - $text = (!is_array($links)) ? '
'. $link .'
' : ''; - $text .= (!is_array($links)) ? '
'. $lang['GALLERY_YOUR_IMAGE'] .'' : ''; - $text .= '

'. $lang['GALLERY_LINK_URL'] .':

'; - $text .= '

'. $lang['GALLERY_TAG_SCREEN'] .':

'; - if ($thumbs) - { - $text .='

'. $lang['GALLERY_TAG_SCREEN_THUMB'] .':

'; - } - $text .= (!is_array($links)) ? '

'. $lang['GALLERY_TAG_POSTER_RIGHT'] .':

' : ''; - $text .= '

'. $lang['GALLERY_TAG_SPOILER'] .':

'; - - $links_all[] = $links; - $thumbs ? ($thumbs_all[] = $thumbs) : null; - - return $text; -} - -function upload_file ($files_ary, $idx) -{ - global $max_size, $allowed_ext, $create_thumb, $dir, $url, $lang; - - if (empty($files_ary)) - message_die(GENERAL_ERROR, "

". $lang['GALLERY_FILE_NOT_UPLOADED'] ."



". $lang['GALLERY_BACK'] ."


"); - if ($files_ary['size'][$idx] > $max_size) - message_die(GENERAL_ERROR, "

". $lang['GALLERY_IMAGE_OVERLOAD'] ."



". $lang['GALLERY_BACK'] ."


"); - - $name = strtolower($files_ary['name'][$idx]); - $ext = substr(strrchr($name, '.'), 1); - - $allow = in_array($ext, $allowed_ext); - $att = '.'. $ext; - - $thumb = false; - - if ($allow) - { - $name = md5_file($files_ary['tmp_name'][$idx]); - - if (file_exists($dir . $name . $att)) - { - if ($create_thumb && !file_exists($dir .'thumb_'. $name . $att)) - { - create_thumb($dir, $name, $att); - $thumb = $url . $dir ."thumb_". $name . $att; - } - $msg = '
'. $lang['GALLERY_FILE_EXIST'] . paste_links($url . $dir . $name . $att, $thumb) .''; - } - else - { - if (copy($files_ary['tmp_name'][$idx], $dir.$name.$att)) - { - if ($create_thumb) - { - create_thumb($dir, $name, $att); - $thumb = $url . $dir ."thumb_". $name . $att; - } - $msg = '
'. $lang['GALLERY_UPLOAD_SUCCESSFUL'] . paste_links($url . $dir . $name . $att, $thumb) .''; - } - else $msg = "
". $lang['GALLERY_UPLOAD_FAILED'] .""; - } - if (IS_ADMIN) - { - $msg .= "

"; - $msg .= "". $lang['GALLERY_DEL_LINK'] .":    "; - $msg .= "".$url."gallery.php?go=delete&fn=".$name.$att.""; - } - } - else $msg = "
". $lang['GALLERY_INVALID_TYPE'] .""; - - return $msg; -} - -if ($go == 'upload') -{ - @ini_set("memory_limit", "512M"); - - $create_thumb = (isset($_POST['create_thumb'])) ? true : false; - - for ($i = 0; $i < count($_FILES['imgfile']['name']); $i++) - { - $msg .= upload_file ($_FILES['imgfile'], $i); - } - - if (count($_FILES['imgfile']['name']) > 1) - { - $msg .= '
'. paste_links ($links_all, $thumbs_all); - } -} - -if ($go == 'delete' && IS_ADMIN && !empty($_GET['fn'])) -{ - global $lang; - - $fn = clean_filename($_GET['fn']); - - $pic = $dir . $fn; - $prev = $dir ."thumb_". $fn; - if (!is_file($pic)) message_die(GENERAL_ERROR, $lang['GALLERY_FILE_NOT_EXIST']); - - if (unlink($pic)) - { - @unlink($prev); - message_die(GENERAL_MESSAGE, "

". $lang['GALLERY_FILE_DELETE'] ."


". $lang['GALLERY_BACK'] ."
"); - } - else - message_die(GENERAL_ERROR, "

". $lang['GALLERY_FAILURE'] ."


". $lang['GALLERY_BACK'] ."
"); -} - -$template->assign_vars(array( - 'MSG' => $msg, - 'MAX_SIZE' => humn_size($max_size), -)); - -print_page('gallery.tpl'); \ No newline at end of file diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 303406a24..896d10175 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -239,7 +239,7 @@ $bf['user_opt'] = array( 'notify_pm' => 6, // Сообщать о новых ЛС 'allow_passkey' => 7, // Запрет на добавление passkey, он же запрет на скачивание торрентов 'hide_porn_forums' => 8, // Скрывать pron форумы - 'allow_gallery' => 9, // Запрет на использование галереи + 'allow_gallery' => 9, // Не используемое (запрет использования галереи) 'hide_ads' => 10, // Запрет на показ рекламы 'allow_topic' => 11, // Запрет на создание новых тем 'allow_post' => 12, // Запрет на отправку сообщений diff --git a/upload/includes/functions_admin.php b/upload/includes/functions_admin.php index fd78e7059..db6b94cd5 100644 --- a/upload/includes/functions_admin.php +++ b/upload/includes/functions_admin.php @@ -293,36 +293,6 @@ function topic_delete ($mode_or_topic_id, $forum_id = null, $prune_time = 0, $pr LEFT JOIN ". BB_VOTE_USERS ." vu USING(vote_id) "); - if ($bb_cfg['auto_delete_posted_pics']) - { - $result = DB()->sql_query(" - SELECT ph.post_id, ph.post_html - FROM $tmp_delete_topics tmp - LEFT JOIN ". BB_POSTS ." p USING(topic_id) - LEFT JOIN ". BB_POSTS_HTML ." ph ON(p.post_id = ph.post_id) - "); - - while ( $post = DB()->sql_fetchrow($result) ) - { - preg_match_all('#fetch_row(" - SELECT post_id - FROM ". BB_POSTS_HTML ." - WHERE post_html LIKE '%". DB()->escape($match[1]). "%' - AND post_id != {$post['post_id']} - "); - - if(empty($have)) - { - @unlink(BB_ROOT . $bb_cfg['pic_dir'] . end(explode('/', $match[1]))); - } - } - } - } - // Delete attachments (from disk) $attach_dir = get_attachments_dir(); @@ -674,35 +644,6 @@ function post_delete ($mode_or_post_id, $user_id = null, $exclude_first = true) return 0; } - if ($bb_cfg['auto_delete_posted_pics']) - { - $result = DB()->sql_query(" - SELECT ph.post_id, ph.post_html - FROM $tmp_delete_posts tmp - LEFT JOIN ". BB_POSTS_HTML ." ph USING(post_id) - "); - - while ( $post = DB()->sql_fetchrow($result) ) - { - preg_match_all('#fetch_row(" - SELECT post_id - FROM ". BB_POSTS_HTML ." - WHERE post_html LIKE '%". DB()->escape($match[1]). "%' - AND post_id != {$post['post_id']} - "); - - if(empty($have)) - { - @unlink(BB_ROOT . $bb_cfg['pic_dir']. end(explode('/', $match[1]))); - } - } - } - } - // Delete attachments (from disk) $attach_dir = get_attachments_dir(); diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php index 5fc1427c8..e9c89ae9d 100644 --- a/upload/includes/page_header.php +++ b/upload/includes/page_header.php @@ -169,7 +169,6 @@ else $report_list = ''; $template->assign_vars(array( 'SEO_LINK_INDEX_PAGE' => seo_link_header('index'), 'SEO_LINK_TRACKER_PAGE' => seo_link_header('tracker'), - 'SEO_LINK_GALLERY_PAGE' => seo_link_header('gallery'), 'SEO_LINK_SEARCH_PAGE' => seo_link_header('search'), 'SEO_LINK_FAQ_PAGE' => seo_link_header('faq'), 'SEO_LINK_GROUP_PAGE' => seo_link_header('groupcp'), @@ -243,7 +242,6 @@ $template->assign_vars(array( 'U_SEND_PASSWORD' => "profile.php?mode=sendpassword", 'U_TERMS' => $bb_cfg['terms_and_conditions_url'], 'U_TRACKER' => "tracker.php", - 'U_GALLERY' => "gallery.php", 'SHOW_SIDEBAR1' => (!empty($page_cfg['show_sidebar1'][BB_SCRIPT]) || $bb_cfg['show_sidebar1_on_every_page']), 'SHOW_SIDEBAR2' => (!empty($page_cfg['show_sidebar2'][BB_SCRIPT]) || $bb_cfg['show_sidebar2_on_every_page']), diff --git a/upload/language/lang_english/lang_admin.php b/upload/language/lang_english/lang_admin.php index b13973876..2b4a878b4 100644 --- a/upload/language/lang_english/lang_admin.php +++ b/upload/language/lang_english/lang_admin.php @@ -651,9 +651,6 @@ $lang['NEWS_FORUM_ID'] = 'From what forums to display
Of the several $lang['NOAVATAR'] = 'No avatar'; $lang['TRACKER_STATS'] = 'Statistics on the tracker'; $lang['WHOIS_INFO'] = 'Information about IP address'; -$lang['PIC_GALLERY'] = 'Directory for the images'; -$lang['PIC_SIZE'] = 'The maximum size of images'; -$lang['AUTO_DELETE_POSTED_PICS'] = 'Delete Images hosted in remote positions'; $lang['SHOW_MOD_HOME_PAGE'] = 'Show on moderators the index.php'; $lang['PREMOD_HELP'] = '

Pre-moderation

If you do not have distributions to the status of v, #, or T in this section, including subsections, the distribution will automatically receive this status
'; $lang['TOR_COMMENT'] = '

Commentary on the status of distribution

Comment successfully allows you to specify releasers mistakes. When nedooformlennyh statuses releasers available form of the response of the correction release
'; diff --git a/upload/language/lang_english/lang_gallery.php b/upload/language/lang_english/lang_gallery.php deleted file mode 100644 index 02eb3ef78..000000000 --- a/upload/language/lang_english/lang_gallery.php +++ /dev/null @@ -1,30 +0,0 @@ -You do not have bonuses availab $lang['BONUS_RETURN'] = 'Return to the Seed Exchange Bonus'; $lang['TRACKER'] = 'Tracker'; -$lang['GALLERY'] = 'Gallery'; $lang['OPEN_TOPICS'] = 'Open topics'; $lang['OPEN_IN_SAME_WINDOW'] = 'open in same window'; $lang['SHOW_TIME_TOPICS'] = 'show time of the creation topics'; diff --git a/upload/language/lang_russian/lang_admin.php b/upload/language/lang_russian/lang_admin.php index cdd3f21bd..44d45bd8e 100644 --- a/upload/language/lang_russian/lang_admin.php +++ b/upload/language/lang_russian/lang_admin.php @@ -649,9 +649,6 @@ $lang['NEWS_FORUM_ID'] = 'Из каких форумов выводить
$lang['NOAVATAR'] = 'Нет аватара'; $lang['TRACKER_STATS'] = 'Статистика по трекеру'; $lang['WHOIS_INFO'] = 'Информация о IP адресе'; -$lang['PIC_GALLERY'] = 'Директория для изображений'; -$lang['PIC_SIZE'] = 'Максимальный размер изображений'; -$lang['AUTO_DELETE_POSTED_PICS'] = 'Удалять изображения размещенные в удаленных постах'; $lang['SHOW_MOD_HOME_PAGE'] = 'Показывать модераторов на главной'; $lang['PREMOD_HELP'] = '

Премодерация

Если у релизера нет раздач со статусом , # или T в текущем разделе, включая подразделы, то раздача автоматически получает данный статус
'; $lang['TOR_COMMENT'] = '

Комментарий к статусу раздачи

Комметарий позволяет указать релизеру допущенные ошибки. При недооформленных статусах релизеру доступна форма ответа о исправлении релиза
'; diff --git a/upload/language/lang_russian/lang_gallery.php b/upload/language/lang_russian/lang_gallery.php deleted file mode 100644 index 8b227c041..000000000 --- a/upload/language/lang_russian/lang_gallery.php +++ /dev/null @@ -1,30 +0,0 @@ -У вас недостаточ $lang['BONUS_RETURN'] = 'Вернуться к обмену Сид бонусов'; $lang['TRACKER'] = 'Трекер'; -$lang['GALLERY'] = 'Галерея'; $lang['OPEN_TOPICS'] = 'Открывать топики'; $lang['OPEN_IN_SAME_WINDOW'] = 'открывать в этом же окне'; $lang['SHOW_TIME_TOPICS'] = 'показывать время создания темы'; diff --git a/upload/pictures/.htaccess b/upload/pictures/.htaccess deleted file mode 100644 index 34ed2a11e..000000000 --- a/upload/pictures/.htaccess +++ /dev/null @@ -1,3 +0,0 @@ -php_flag engine off -RemoveHandler .php .php5 .php4 .php3 .phtml .pl .asp -AddType text/plain .php .php .htm .html .phtml .pl .asp \ No newline at end of file diff --git a/upload/templates/admin/admin_board.tpl b/upload/templates/admin/admin_board.tpl index ab50a45ca..54c948151 100644 --- a/upload/templates/admin/admin_board.tpl +++ b/upload/templates/admin/admin_board.tpl @@ -361,32 +361,6 @@ - - {L_GALLERY} - - -

{L_GALLERY}

- -    - - - - -

{L_PIC_GALLERY}

- - - -

{L_PIC_SIZE}

-  {L_MB} - - -

{L_AUTO_DELETE_POSTED_PICS}

- -    - - - - {L_BIRTHDAY} diff --git a/upload/templates/default/gallery.tpl b/upload/templates/default/gallery.tpl deleted file mode 100644 index 2c26e2a26..000000000 --- a/upload/templates/default/gallery.tpl +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - -
{L_GALLERY}
- -

{L_GALLERY_MAX_FILE_SIZE} {MAX_SIZE}

- {MSG} -
-
-
-
{L_GALLERY_MORE_LINK}
-
- -
- -
-
-
-
\ No newline at end of file diff --git a/upload/templates/default/page_header.tpl b/upload/templates/default/page_header.tpl index a17c6cae2..6e681faed 100644 --- a/upload/templates/default/page_header.tpl +++ b/upload/templates/default/page_header.tpl @@ -376,7 +376,6 @@ if (top != self) { {L_HOME}| {L_TRACKER}| - {L_GALLERY}| {L_SEARCH}| {L_TERMS}| {L_FAQ}|