=========================================================================
Шаблон Pixel
Автор: неизвестно
Автор адаптации: belomaxorka
Версия: v2.0.0
Шаблон создан на основе: v2.1.5-ALPHA5
Совместимость: последняя версия LTS (LTS 2.1.5-2025.04 [Final v11])
=========================================================================

=========== Открыть library/config.php и заменить значения на ===========
$bb_cfg['show_rank_text']         = true;         // показывать название лычки в топиках
$bb_cfg['text_buttons']           = true;         // использоваться текстовые кнопки вместо иконок
=========================================================================

=========== Открыть index.php и найти ===========
'SHOW_LAST_TOPIC'       => $show_last_topic,
===============================================

=========== Ниже вставить ===========
// Статистика в сайдбаре
'TORRENTS_STAT_R'       => ($bb_cfg['tor_stats']) ? sprintf($lang['TORRENTS_STAT_R'], $stats['torrentcount']) : '',
'TORRENTS_STAT_S'       => ($bb_cfg['tor_stats']) ? sprintf($lang['TORRENTS_STAT_S'], humn_size($stats['size'])) : '',
'PEERS_STAT_P'          => ($bb_cfg['tor_stats']) ? sprintf($lang['PEERS_STAT_P'], $stats['peers']) : '',
'PEERS_STAT_S'          => ($bb_cfg['tor_stats']) ? sprintf($lang['PEERS_STAT_S'], $stats['seeders']) : '',
'PEERS_STAT_L'          => ($bb_cfg['tor_stats']) ? sprintf($lang['PEERS_STAT_L'], $stats['leechers']) : '',

'TOTAL_TOPICS_T'        => sprintf($lang['POSTED_TOPICS_TOTAL_T'], $stats['topiccount']),
'TOTAL_POSTS_T'         => sprintf($lang['POSTED_ARTICLES_TOTAL_T'], $stats['postcount']),
'TOTAL_USERS_T'         => sprintf($lang['REGISTERED_USERS_TOTAL_T'], $stats['usercount']),
'NEWEST_USER_T'         => sprintf($lang['NEWEST_USER_T'], profile_url($stats['newestuser'])),
'RECORD_USERS_T'        => sprintf($lang['RECORD_ONLINE_USERS_T'], $bb_cfg['record_online_users']),
=====================================

=========== Открыть memberlist.php и найти ===========
// <select> mode
$select_sort_mode = '<select name="mode">';
====================================================

=========== Заменить на ===========
// <select> mode
$select_sort_mode = '<select class="form-control m-b-1" name="mode">';
===================================

=========== Далее найти ===========
// <select> order
$select_sort_order = '<select name="order">';
===================================

=========== Заменить на ===========
// <select> order
$select_sort_order = '<select class="form-control m-b-1" name="order">';
===================================

=========== Открыть posting.php и найти ===========
// Topic type selection
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
	$template->assign_block_vars('switch_type_toggle', array());

	if( $is_auth['auth_sticky'] )
	{
		$topic_type_toggle .= '<label><input type="radio" name="topictype" value="' . POST_STICKY . '"';
		if ( isset($post_data['topic_type']) && ($post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY) )
		{
			$topic_type_toggle .= ' checked="checked"';
		}
		$topic_type_toggle .= ' /> ' . $lang['POST_STICKY'] . '</label>&nbsp;&nbsp;';
	}

	if( $is_auth['auth_announce'] )
	{
		$topic_type_toggle .= '<label><input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
		if ( isset($post_data['topic_type']) && ($post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE) )
		{
			$topic_type_toggle .= ' checked="checked"';
		}
		$topic_type_toggle .= ' /> ' . $lang['POST_ANNOUNCEMENT'] . '</label>&nbsp;&nbsp;';
	}

	if ( $topic_type_toggle != '' )
	{
		$topic_type_toggle = $lang['POST_TOPIC_AS'] . ': <label><input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( (!isset($post_data['topic_type']) || $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL) ? ' checked="checked"' : '' ) . ' /> ' . $lang['POST_NORMAL'] . '</label>&nbsp;&nbsp;' . $topic_type_toggle;
	}
}
===================================================

=========== Заменить на ===========
// Topic type selection
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
	$template->assign_block_vars('switch_type_toggle', array());

	if( $is_auth['auth_sticky'] )
	{
		$topic_type_toggle .= '<label class="custom-control custom-radio radio-inline"><input class="custom-control-input" type="radio" name="topictype" value="' . POST_STICKY . '"';
		if ( isset($post_data['topic_type']) && ($post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY) )
		{
			$topic_type_toggle .= ' checked="checked"';
		}
		$topic_type_toggle .= ' /><span class="custom-control-indicator"></span> ' . $lang['POST_STICKY'] . '</label>&nbsp;&nbsp;';
	}

	if( $is_auth['auth_announce'] )
	{
		$topic_type_toggle .= '<label class="custom-control custom-radio radio-inline"><input class="custom-control-input" type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
		if ( isset($post_data['topic_type']) && ($post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE) )
		{
			$topic_type_toggle .= ' checked="checked"';
		}
		$topic_type_toggle .= ' /><span class="custom-control-indicator"></span> ' . $lang['POST_ANNOUNCEMENT'] . '</label>&nbsp;&nbsp;';
	}

	if ( $topic_type_toggle != '' )
	{
		$topic_type_toggle = ' <label class="custom-control custom-radio radio-inline"><input class="custom-control-input" type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( (!isset($post_data['topic_type']) || $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL) ? ' checked="checked"' : '' ) . ' /><span class="custom-control-indicator"></span> ' . $lang['POST_NORMAL'] . '</label>&nbsp;&nbsp;' . $topic_type_toggle;
	}
}
===================================

=========== Далее найти ===========
$topic_type_toggle = $lang['POST_TOPIC_AS'] . ': ';
===================================

=========== Заменить на ===========
$topic_type_toggle = ' ';
===================================

=========== Далее найти ===========
$topic_type_toggle .= '<nobr><input type="checkbox" name="'. $dl_type_name .'" id="topic_dl_type_id" '. $dl_ds . $dl_ch .' /><label for="topic_dl_type_id"> '.$lang['POST_DOWNLOAD'].'</label></nobr>';
===================================

=========== Заменить на ===========
$topic_type_toggle .= '<label class="custom-control custom-checkbox checkbox-inline" for="topic_dl_type_id"><input class="custom-control-input" type="checkbox" name="'. $dl_type_name .'" id="topic_dl_type_id" '. $dl_ds . $dl_ch .' /><span class="custom-control-indicator"></span> '.$lang['POST_DOWNLOAD'].'</label>';
===================================

=========== Открыть privmsg.php и найти ===========
//
// Define the box image links
//
$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=inbox".'">'. $lang['INBOX'] .'</a>' : $lang['INBOX'];
$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=outbox".'">'. $lang['OUTBOX'] .'</a>' : $lang['OUTBOX'];
$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=sentbox".'">'. $lang['SENTBOX'] .'</a>' : $lang['SENTBOX'];
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=savebox".'">'. $lang['SAVEBOX'] .'</a>' : $lang['SAVEBOX'];
===================================================

=========== Заменить на ===========
//
// Define the box image links
//
$inbox_url = ( $folder != 'inbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=inbox".'" class="list-group-item"><i class="list-group-icon fa fa-inbox"></i>'. $lang['INBOX'] .'</a>' : '<a href="' . PM_URL . "?folder=inbox".'" class="list-group-item active"><i class="list-group-icon fa fa-inbox"></i>'. $lang['INBOX'] .'</a>';
$outbox_url = ( $folder != 'outbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=outbox".'" class="list-group-item"><i class="list-group-icon fa fa-reply"></i>'. $lang['OUTBOX'] .'</a>' : '<a href="' . PM_URL . "?folder=outbox".'" class="list-group-item active"><i class="list-group-icon fa fa-reply"></i>'. $lang['OUTBOX'] .'</a>';
$sentbox_url = ( $folder != 'sentbox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=sentbox".'" class="list-group-item"><i class="list-group-icon fa fa-share"></i>'. $lang['SENTBOX'] .'</a>' : '<a href="' . PM_URL . "?folder=sentbox".'" class="list-group-item active"><i class="list-group-icon fa fa-share"></i>'. $lang['SENTBOX'] .'</a>';
$savebox_url = ( $folder != 'savebox' || $mode != '' ) ? '<a href="' . PM_URL . "?folder=savebox".'" class="list-group-item"><i class="list-group-icon fa fa-floppy-o"></i>'. $lang['SAVEBOX'] .'</a>' : '<a href="' . PM_URL . "?folder=savebox".'" class="list-group-item active"><i class="list-group-icon fa fa-floppy-o"></i>'. $lang['SAVEBOX'] .'</a>';
===================================

=========== Далее найти ===========
$post_icons = array(
	'post_img' => '<a href="' . $post_urls['post'] . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['POST_NEW_PM'] . '" border="0" /></a>',
	'post' => '<a href="' . $post_urls['post'] . '">' . $lang['POST_NEW_PM'] . '</a>',
	'reply_img' => '<a href="' . $post_urls['reply'] . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['POST_REPLY_PM'] . '" border="0" /></a>',
	'reply' => '<a href="' . $post_urls['reply'] . '">' . $lang['POST_REPLY_PM'] . '</a>',
	'quote_img' => '<a href="' . $post_urls['quote'] . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['POST_QUOTE_PM'] . '" border="0" /></a>',
	'quote' => '<a href="' . $post_urls['quote'] . '">' . $lang['POST_QUOTE_PM'] . '</a>',
	'edit_img' => '<a href="' . $post_urls['edit'] . '"><img src="' . $images['pm_editmsg'] . '" alt="' . $lang['EDIT_PM'] . '" border="0" /></a>',
	'edit' => '<a href="' . $post_urls['edit'] . '">' . $lang['EDIT_PM'] . '</a>'
);
===================================

=========== Заменить на ===========
$post_icons = array(
	'post_img' => '<a href="' . $post_urls['post'] . '"><img src="' . $images['pm_postmsg'] . '" alt="' . $lang['POST_NEW_PM'] . '" border="0" /></a>',
	'post' => '<a href="' . $post_urls['post'] . '">' . $lang['POST_NEW_PM'] . '</a>',
	'reply_img' => '<a href="' . $post_urls['reply'] . '"><img src="' . $images['pm_replymsg'] . '" alt="' . $lang['POST_REPLY_PM'] . '" border="0" /></a>',
	'reply' => '<a href="' . $post_urls['reply'] . '" class="btn btn-block btn-primary"><span class="btn-label-icon left fa fa-pencil-square-o"></span>' . $lang['POST_REPLY_PM'] . '</a>',
	'quote_img' => '<a href="' . $post_urls['quote'] . '"><img src="' . $images['pm_quotemsg'] . '" alt="' . $lang['POST_QUOTE_PM'] . '" border="0" /></a>',
	'quote' => '<a href="' . $post_urls['quote'] . '" class="btn">' . $lang['POST_QUOTE_PM'] . '</a>',
	'edit_img' => '<a href="' . $post_urls['edit'] . '"><img src="' . $images['pm_editmsg'] . '" alt="' . $lang['EDIT_PM'] . '" border="0" /></a>',
	'edit' => '<a href="' . $post_urls['edit'] . '" class="btn">' . $lang['EDIT_PM'] . '</a>'
);
===================================

=========== Далее найти ===========
$post_pm = '<a href="' . $post_pm . '">' . $lang['POST_NEW_PM'] . '</a>';
===================================

=========== Заменить на ===========
$post_pm = '<a href="' . $post_pm . '" class="btn btn-block btn-primary"><span class="btn-label-icon left fa fa-pencil-square-o"></span>' . $lang['POST_NEW_PM'] . '</a>';
===================================

=========== Открыть search.php и найти ===========
$forum_select = get_forum_select($forum_select_mode, "{$forum_key}[]", $search_all, $max_forum_name_len, $forum_select_size, 'style="width: 95%;"', $search_all);
==================================================

=========== Заменить на ===========
$forum_select = get_forum_select($forum_select_mode, "{$forum_key}[]", $search_all, $max_forum_name_len, $forum_select_size, $search_all);
===================================

=========== Открыть viewforum.php и найти ===========
$sort_list = '<select name="sort">'. get_forum_display_sort_option($sort_value, 'list', 'sort') .'</select>';
$order_list = '<select name="order">'. get_forum_display_sort_option($order_value, 'list', 'order') .'</select>';
=====================================================

=========== Заменить на ===========
$sort_list = '<select class="custom-select form-control" name="sort">'. get_forum_display_sort_option($sort_value, 'list', 'sort') .'</select>';
$order_list = '<select class="custom-select form-control" name="order">'. get_forum_display_sort_option($order_value, 'list', 'order') .'</select>';
===================================

=========== Открыть library\language\ru\main.php и найти ===========
$lang['SPEED_STAT'] = 'Скорость обмена: <b>%s</b>&nbsp;'; // %s = total speed.
====================================================================

=========== Заменить на ===========
$lang['SPEED_STAT'] = 'Скорость обмена: <span class="label pull-right">%s</span>'; // %s = total speed.
===================================

=========== Далее найти ===========
$lang['POST_NEW_PM'] = 'Написать новое сообщение';
$lang['POST_REPLY_PM'] = 'Ответить на сообщение';
===================================

=========== Заменить на ===========
$lang['POST_NEW_PM'] = 'Новое сообщение';
$lang['POST_REPLY_PM'] = 'Ответить';
===================================

=========== В конец файла добавить ===========
// Статистика в сайдбаре
$lang['TORRENTS_STAT_R'] = 'Раздач: <span class="label pull-right">%s</span>';
$lang['TORRENTS_STAT_S'] = 'Общий размер: <span class="label pull-right">%s</span>';
$lang['PEERS_STAT_P'] = 'Пиров: <span class="label pull-right">%s</span>';
$lang['PEERS_STAT_S'] = 'Сидов: <span class="label pull-right">%s</span>';
$lang['PEERS_STAT_L'] = 'Личеров: <span class="label pull-right">%s</span>';

$lang['POSTED_TOPICS_TOTAL_T'] = 'Тем: <span class="label pull-right">%s</span>';
$lang['POSTED_ARTICLES_TOTAL_T'] = 'Сообщений: <span class="label pull-right">%s</span>';
$lang['REGISTERED_USERS_TOTAL_T'] = 'Всего пользователей: <span class="label pull-right">%s</span>';
$lang['NEWEST_USER_T'] = 'Новый пользователь: <span class="label pull-right">%s</span>';
$lang['RECORD_ONLINE_USERS_T'] = 'Рекорд посетителей онлайн: <span class="label pull-right">%s</span>';
==============================================

=========== Открыть library\includes\functions.php и найти ===========
return "\n<select $select_params>\n". $this->options ."</select>\n";
======================================================================

=========== Заменить на ===========
return "\n<select class=\"custom-select form-control\" $select_params>\n". $this->options ."</select>\n";
===================================

=========== Далее найти ===========
return '<label><input type="checkbox" '. $id . $name . $value . $checked . $disabled .' />&nbsp;'. $title .'&nbsp;</label>';
===================================

=========== Заменить на ===========
return '<label class="custom-control custom-checkbox"><input class="custom-control-input" type="checkbox" '. $id . $name . $value . $checked . $disabled .' /><span class="custom-control-indicator"></span>'. $title .'</label>';
===================================

=========== Далее найти ===========
//
// Pagination routine, generates
// page number sequence
//
function generate_pagination ($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
	global $lang, $template;

// Pagination Mod
	$begin_end = 3;
	$from_middle = 1;
/*
	By default, $begin_end is 3, and $from_middle is 1, so on page 6 in a 12 page view, it will look like this:

	a, d = $begin_end = 3
	b, c = $from_middle = 1

 "begin"        "middle"           "end"
    |              |                 |
    |     a     b  |  c     d        |
    |     |     |  |  |     |        |
    v     v     v  v  v     v        v
    1, 2, 3 ... 5, 6, 7 ... 10, 11, 12

	Change $begin_end and $from_middle to suit your needs appropriately
*/

	$total_pages = ceil($num_items/$per_page);

	if ($total_pages == 1 || $num_items == 0)
	{
		return '';
	}

	$on_page = floor($start_item / $per_page) + 1;

	if (strpos($base_url, '?') === false)
	{
		$base_url = $base_url . '?';
	}

	$page_string = '';
	if ($total_pages > ((2*($begin_end + $from_middle)) + 2))
	{
		$init_page_max = ( $total_pages > $begin_end ) ? $begin_end : $total_pages;
		for ($i = 1; $i < $init_page_max + 1; $i++)
		{
			$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
			if ($i <  $init_page_max)
			{
				$page_string .= ", ";
			}
		}
		if ($total_pages > $begin_end)
		{
			if ($on_page > 1  && $on_page < $total_pages)
			{
				$page_string .= ( $on_page > ($begin_end + $from_middle + 1) ) ? ' ... ' : ', ';

				$init_page_min = ( $on_page > ($begin_end + $from_middle) ) ? $on_page : ($begin_end + $from_middle + 1);

				$init_page_max = ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? $on_page : $total_pages - ($begin_end + $from_middle);

				for ($i = $init_page_min - $from_middle; $i < $init_page_max + ($from_middle + 1); $i++)
				{
					$page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
					if ($i <  $init_page_max + $from_middle)
					{
						$page_string .= ', ';
					}
				}
				$page_string .= ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? ' ... ' : ', ';
			}
			else
			{
				$page_string .= '&nbsp;...&nbsp;';
			}
			for ($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++)
			{
				$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>'  : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
				if ($i <  $total_pages)
				{
					$page_string .= ", ";
				}
			}
		}
	}
	else
	{
		for ($i = 1; $i < $total_pages + 1; $i++)
		{
			$page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a>';
			if ($i <  $total_pages)
			{
				$page_string .= ', ';
			}
		}
	}

	if ($add_prevnext_text)
	{
		if ($on_page > 1)
		{
			$page_string = ' <a href="' . $base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS_PAGE'] . '</a>&nbsp;&nbsp;' . $page_string;
		}

		if ($on_page < $total_pages)
		{
			$page_string .= '&nbsp;&nbsp;<a href="' . $base_url . "&amp;start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT_PAGE'] . '</a>';
		}

	}

	$pagination = ($page_string) ? '<a class="menu-root" href="#pg-jump">'. $lang['GOTO_PAGE'] .'</a> :&nbsp;&nbsp;'. $page_string : '';
	$pagination = str_replace('&amp;start=0', '', $pagination);

	$template->assign_vars(array(
		'PAGINATION'   => $pagination,
		'PAGE_NUMBER'  => sprintf($lang['PAGE_OF'], ( floor($start_item/$per_page) + 1 ), ceil( $num_items / $per_page )),
		'PG_BASE_URL'  => $base_url,
		'PG_PER_PAGE'  => $per_page,
	));

	return $pagination;
}
===================================

=========== Заменить на ===========
//
// Pagination routine, generates
// page number sequence
//
function generate_pagination ($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
{
	global $lang, $template;

// Pagination Mod
	$begin_end = 3;
	$from_middle = 1;
/*
	By default, $begin_end is 3, and $from_middle is 1, so on page 6 in a 12 page view, it will look like this:

	a, d = $begin_end = 3
	b, c = $from_middle = 1

 "begin"        "middle"           "end"
    |              |                 |
    |     a     b  |  c     d        |
    |     |     |  |  |     |        |
    v     v     v  v  v     v        v
    1, 2, 3 ... 5, 6, 7 ... 10, 11, 12

	Change $begin_end and $from_middle to suit your needs appropriately
*/

	$total_pages = ceil($num_items/$per_page);

	if ($total_pages == 1 || $num_items == 0)
	{
		return '';
	}

	$on_page = floor($start_item / $per_page) + 1;

	if (strpos($base_url, '?') === false)
	{
		$base_url = $base_url . '?';
	}

	$page_string = '';
	if ($total_pages > ((2*($begin_end + $from_middle)) + 2))
	{
		$init_page_max = ( $total_pages > $begin_end ) ? $begin_end : $total_pages;
		for ($i = 1; $i < $init_page_max + 1; $i++)
		{
			$page_string .= ( $i == $on_page ) ? '<li class="active"><a href>' . $i . '</a></li>' : '<li><a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a></li>';
			if ($i <  $init_page_max)
			{
				$page_string .= " ";
			}
		}
		if ($total_pages > $begin_end)
		{
			if ($on_page > 1  && $on_page < $total_pages)
			{
				$page_string .= ( $on_page > ($begin_end + $from_middle + 1) ) ? ' ... ' : ', ';

				$init_page_min = ( $on_page > ($begin_end + $from_middle) ) ? $on_page : ($begin_end + $from_middle + 1);

				$init_page_max = ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? $on_page : $total_pages - ($begin_end + $from_middle);

				for ($i = $init_page_min - $from_middle; $i < $init_page_max + ($from_middle + 1); $i++)
				{
					$page_string .= ($i == $on_page) ? '<li class="active"><a href>' . $i . '</a></li>' : '<li><a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a></li>';
					if ($i <  $init_page_max + $from_middle)
					{
						$page_string .= ' ';
					}
				}
				$page_string .= ( $on_page < $total_pages - ($begin_end + $from_middle) ) ? ' ... ' : ' ';
			}
			else
			{
				$page_string .= '&nbsp;...&nbsp;';
			}
			for ($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++)
			{
				$page_string .= ( $i == $on_page ) ? '<li class="active"><a href>' . $i . '</a></li>'  : '<li><a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a></li>';
				if ($i <  $total_pages)
				{
					$page_string .= " ";
				}
			}
		}
	}
	else
	{
		for ($i = 1; $i < $total_pages + 1; $i++)
		{
			$page_string .= ( $i == $on_page ) ? '<li class="active"><a href>' . $i . '</a></li>' : '<li><a href="' . $base_url . "&amp;start=" . ( ( $i - 1 ) * $per_page ) . '">' . $i . '</a></li>';
			if ($i <  $total_pages)
			{
				$page_string .= ' ';
			}
		}
	}

	if ($add_prevnext_text)
	{
		if ($on_page > 1)
		{
			$page_string = ' <li><a href="' . $base_url . "&amp;start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS_PAGE'] . '</a></li>' . $page_string;
		}

		if ($on_page < $total_pages)
		{
			$page_string .= '<li><a href="' . $base_url . "&amp;start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT_PAGE'] . '</a></li>';
		}

	}

	$pagination = ($page_string) ? '<li><a class="dropdown-toggle" data-toggle="modal" data-target="#pg-jump" href="#">'. $lang['GOTO_PAGE'] .'</a></li>'. $page_string : '';
	$pagination = str_replace('&amp;start=0', '', $pagination);

	$template->assign_vars(array(
		'PAGINATION'   => $pagination,
		'PAGE_NUMBER'  => sprintf($lang['PAGE_OF'], ( floor($start_item/$per_page) + 1 ), ceil( $num_items / $per_page )),
		'PG_BASE_URL'  => $base_url,
		'PG_PER_PAGE'  => $per_page,
	));

	return $pagination;
}
===================================

=========== Далее найти ===========
	return '<a title="'.$lang['MAGNET'].'" href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['bt_announce_url'] . $passkey_url) .'&dn='. urlencode($name) .'"><img src="'. $images['icon_magnet'] .'" width="12" height="12" border="0" /></a>';
}
===================================

=========== Заменить на ===========
	return '<a title="'.$lang['MAGNET'].'" class="box-cell p-a-1 valign-middle bg-primary darken" href="magnet:?xt=urn:btih:'. bin2hex($infohash) .'&tr='. urlencode($bb_cfg['bt_announce_url'] . $passkey_url) .'&dn='. urlencode($name) .'">MAGNET<i class="box-icon pull-xs-right fa fa-magnet"></i></a>';
}
===================================

=========== Открыть library\includes\page_footer.php найти и удалить ===========
echo '
	</div><!--/body_container-->
';
================================================================================
