Autor Tópico: Subdivisões regulares Smf 2.1  (Lida 37 vezes)

0 Membros e 1 Visitante estão a ver este tópico.

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5086
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
Subdivisões regulares Smf 2.1
« em: 03 de Dezembro de 2025, 18:18 »


Abra o ficheiro: Theme/css/index.css Adicione no final:

Código: [Seleccione]
/* Enter Pretty Sub Boards */
.children > a,.children > span {float: left;width: 30%;}
.subtxt {display: block;font-weight: bold;padding-bottom: 5px;}
.subtxt::before {content: "\f07c";}
.children > a::before, .children > span::before {content: "\f07c";}
.children > a::before, .children > span::before,.subtxt::before {
  font-weight: 100;
  font-family: 'Font Awesome 5 Free';
  padding-right: 5px;
  display: inline-block;
  }
/* End Pretty Sub Boards */

Abra o ficheiro:
Theme/BoardIndex.template.php Nota: Se /BoardIndex.template.php não estiver no seu tema padrão, copie-o do tema padrão e adicione-o ao seu tema. Em seguida, siga este passo. Procure por "children" no código.

Encontrará estes códigos:
Pesquisar
Código: [Seleccione]
            // Has it posts awaiting approval?
            if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
                $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

            $children[] = $child['new'] ? '<span class="strong">' . $child['link'] . '</span>' : '<span>' . $child['link'] . '</span>';
        }

        echo '
                    <div id="board_', $board['id'], '_children" class="children">
                        <p><strong id="child_list_', $board['id'], '">', $txt['sub_boards'], '</strong>', implode($children), '</p>
                    </div>';
    }
}

Trocar por este

Código: [Seleccione]
// Has it posts awaiting approval?
            if ($child['can_approve_posts'] && ($child['unapproved_posts'] || $child['unapproved_topics']))
                $child['link'] .= ' <a href="' . $scripturl . '?action=moderate;area=postmod;sa=' . ($child['unapproved_topics'] > 0 ? 'topics' : 'posts') . ';brd=' . $child['id'] . ';' . $context['session_var'] . '=' . $context['session_id'] . '" title="' . sprintf($txt['unapproved_posts'], $child['unapproved_topics'], $child['unapproved_posts']) . '" class="moderation_link">(!)</a>';

            $children[] = $child['new'] ? '<span class="strong subtxt">' . $child['link'] . '</span>' : '<span class="subtxt">' . $child['link'] . '</span>';
        }

        echo '
                    <div id="board_', $board['id'], '_children" class="children">
                        <h1 id="child_list_', $board['id'], '">', $txt['sub_boards'], '</h1>', implode($children), '
                    </div>';
    }
}
« Última modificação: 03 de Dezembro de 2025, 18:20 por candidosa2 »