0 Membros e 1 Visitante estão a ver este tópico.
?>
//For tidying boards; examine the children and realign into groups for tidyingfunction tidyBoards(&$board) { global $modSettings, $context, $settings; $limit = ceil(count($board['children']) / $modSettings['tidy_child_boards']); $children = array(); $this_count = $limit + 1; $this_division = 0; foreach($board['children'] as $child) { if($this_count >= $limit) { $this_division++; $this_count = 0; } $children[$this_division][] = $child; $this_count++; } $board['tidy_children'] = $children; // We don't need the original children (plus this means way less mess in templates) unset($board['children']);}
// Find all boards
if(empty($context['added_tidy_header']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) { if(empty($context['html_headers'])) $context['html_headers'] = ''; $context['html_headers'] .= ' <link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/tidyboards.css?1110" /> <style type="text/css">.tidy_child { width:' . floor(100/$modSettings['tidy_child_boards']) . '%; }</style>'; $context['added_tidy_header'] = 1; }
// Aren't children
array('check', 'enableVBStyleLogin'),
'', array('select', 'tidy_child_boards', array(1 => &$txt['tidy_child_boards_no'], 2 => &$txt['tidy_child_boards_2col'], 3 => &$txt['tidy_child_boards_3col'], 4 => &$txt['tidy_child_boards_4col'])), array('check', 'tidy_child_boards_bold'), array('check', 'tidy_child_boards_icon'), array('check', 'tidy_child_boards_new'),
foreach ($category['boards'] as $board) {
if(!empty($board['children']) && !empty($modSettings['tidy_child_boards']) && $modSettings['tidy_child_boards'] > 1) tidyBoards($board);
// Show some basic
if(!empty($board['tidy_children'])) { $context['tidy_board'] = $board; template_tidy_children(); }
function template_tidy_children() { global $context, $settings, $txt, $modSettings; echo ' <div class="board_children">'; foreach($context['tidy_board']['tidy_children'] as $key => $child_block) { echo ' <div class="tidy_child"> <ul>'; foreach($child_block as $child) { echo ' <li>'; if(!empty($modSettings['tidy_child_boards_icon'])) echo '<img src="', $settings['images_url'], '/', ($child['new'] ? 'on' : 'off'), '.gif" width="12" height="12" alt=""> '; $child['link'] = '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="new_posts" ' : '') . 'title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>'; if (!empty($modSettings['tidy_child_boards_new']) && $child['new']) $child['link'] .= ' <a href="' . $child['href'] . '" title="' . ($child['new'] ? $txt[333] : $txt[334]) . ' (' . $txt[330] . ': ' . comma_format($child['topics']) . ', ' . $txt[21] . ': ' . comma_format($child['posts']) . ')"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" class="new_posts" alt="" /></a>'; if(!empty($modSettings['tidy_child_boards_bold']) && $child['new']) $child['link'] = '<strong>' . $child['link'] . '</strong>'; echo $child['link'], '</li>'; } echo ' </ul> </div>'; } echo ' </div>';}
foreach ($context['boards'] as $board) {
// Smfpt Suporte translate candidosa2$txt['tidy_child_boards'] = 'Organizar os Sub-quadros em colunas';$txt['tidy_child_boards_no'] = 'Não coloque nas colunas';$txt['tidy_child_boards_2col'] = 'Duas colunas';$txt['tidy_child_boards_3col'] = 'Três colunas';$txt['tidy_child_boards_4col'] = 'Quatro coluna';$txt['tidy_child_boards_icon'] = 'Exibe o ícone de pequena do quadro ao lado do Sub-quadro';$txt['tidy_child_boards_bold'] = 'Mostrar os sub-quadro não lidas em negrito';$txt['tidy_child_boards_new'] = 'Mostrar imagem [novo] ao lado de sub-quadro não lida.';