Описание: шаблон, являющийся аналогом стандартного шаблона XenForo (белый стиль).
- Инструкция по установке
-
1) Загрузить файлы на сервер
2) Открываем config.php
Ищем:PHP:$bb_cfg['text_buttons'] = false;
PHP:$bb_cfg['text_buttons'] = true;
PHP:$bb_cfg['user_signature_start'] = '<div class="signature"><br />_________________<br />';
PHP:$bb_cfg['user_signature_start'] = '<div class="signature">';
PHP:$bb_cfg['show_rank_text'] = false; $bb_cfg['show_rank_image'] = true;
PHP:$bb_cfg['show_rank_text'] = true; $bb_cfg['show_rank_image'] = false;
Ищем:PHP:'DL_CLASS' => isset($topic['dl_status']) ? $dl_link_css[$topic['dl_status']] : '',
PHP:'TOPIC_TIME' => bb_date($topic['topic_time'], 'd M Y'), 'TOPIC_AVATAR' => get_avatar($topic['first_user_avatar'], $topic['first_user_avatar_type'], !bf($topic['first_user_opt'], 'user_opt', 'allow_avatar'), 36, 36),
PHP:u1.user_rank as first_user_rank,
PHP:u1.user_avatar AS first_user_avatar, u1.user_avatar_type AS first_user_avatar_type, u1.user_opt AS first_user_opt,
Ищем:PHP:<script type="text/javascript" src="{#BB_ROOT}misc/js/main.js?v={$bb_cfg['js_ver']}"></script>
PHP:<script type="text/javascript" src="{#BB_ROOT}misc/js/xenforo.js?v={$bb_cfg['js_ver']}"></script> <script type="text/javascript" src="{#BB_ROOT}misc/js/discussion_list.js?v={$bb_cfg['js_ver']}"></script>
Ищем:
PHP: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; $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 . "&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 . "&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 .= ' ... '; } for($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&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 . "&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 . "&start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS'] . '</a> ' . $page_string; } if ( $on_page < $total_pages ) { $page_string .= ' <a href="' . $base_url . "&start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT'] . '</a>'; } } $pagination = ($page_string) ? '<a class="menu-root" href="#pg-jump">'. $lang['GOTO_PAGE'] .'</a> : '. $page_string : ''; $pagination = str_replace('&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; }
PHP: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; $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 . "&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 . "&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 .= ' ... '; } for($i = $total_pages - ($begin_end - 1); $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . $base_url . "&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 . "&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 . "&start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['PREVIOUS'] . '</a> ' . $page_string; } if ( $on_page < $total_pages ) { $page_string .= ' <a href="' . $base_url . "&start=" . ( $on_page * $per_page ) . '">' . $lang['NEXT'] . '</a>'; } } $pagination = ($page_string) ? '<a class="menu-root" href="#pg-jump">'. $lang['GOTO_PAGE'] .'</a> : '. $page_string : ''; $pagination = str_replace('&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; }