← SMF

Adicionar campo na Tab de cima ou top menu

Lida 2616 vezes

Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Index Template:
Código: [Seleccione]
// Show the start of the tab section.
echo '
        <div id="topmenu">
           <ul>';
                    // Show the [home] button.
echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';

                    // Show the [help] button.
                              echo '<li><a' , $current_action=='help' ? ' class="current"' : '' , ' href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';

                    // How about the [search] button?
if ($context['allow_search'])
echo '<li><a' , $current_action=='search' ? ' class="current"' : '' , ' href="', $scripturl, '?action=search"><span>' , $txt[182] , '</span></a></li>';

                    // The [calendar]!
if ($context['allow_calendar'])
echo '<li><a' , $current_action=='calendar' ? ' class="current"' : '' , ' href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';

                    // Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li><a' , $current_action=='admin' ? ' class="current"' : '' , ' href="', $scripturl, '?action=admin"><span>' , $txt[2] , '</span></a></li>';

              // Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li><a' , $current_action=='profile' ? ' class="current"' : '' , ' href="', $scripturl, '?action=profile"><span>' , $txt[79] , '</span></a></li>';

                    // Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li><a' , $current_action=='pm' ? ' class="current"' : '' , ' href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';

                   // the [member] list button
                        if ($context['allow_memberlist'])
                        echo '<li><a ' , $current_action=='mlist' ? ' class="current"' : '' , ' href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

                   // If the user is a guest, show [login] button.
                        if ($context['user']['is_guest'])
                        echo '<li><a ' , $current_action=='login' ? ' class="current"' : '' , ' href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';

                    // If the user is a guest, also show [register] button.
                        if ($context['user']['is_guest'])
                        echo '<li><a ' , $current_action=='register' ? ' class="current"' : '' , ' href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';

                    // Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li><a ' , $current_action=='logout' ? ' class="current"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';

echo '
</ul>
        </div>';

}
Agora que tenho o portal queria por uma tabzinha para ir para o portal, só consigo adicionar por exemplo mais um help, copiando o help, depois editei, mas ai não dá para por link, é so por directrizes, e o $txt para mudar o nome da tab está relativo a outro ficheiro que não consigo encontrar, resumindo quero adicionar mais uma tab ao top menu a dizer Portal.
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Código: [Seleccione]
// Show the [amaru] button.

echo '<li><a href="http://amaru.com">Amaru rocks</a></li>';

Vê se funciona...
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Já vi que fica com um erro, tenta assim

Código: [Seleccione]
// Show the [Portal] button.
               echo '<li><a href="http://www.fnintendo.info" target="_parent"><span>Portal</span></a></li>';
Offline

Nuno 
Administrador
Mensagens 7780 Gostos 216
Feedback +2

Troféus totais: 42
Trófeus: (Ver todos)
100 Poll Votes Level 7 Search Mobile User Level 6 Super Combination Combination Topic Starter 50 Poll Votes 10 Poll Votes

Muda isto:
 
Código: [Seleccione]
$current_action=='Forum' para
Código: [Seleccione]
$current_action=='home'
Offline

amaru 
Membro
Mensagens 600 Gostos 0
Troféus totais: 27
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Epah exit es o maior, obrigado :obrigado: :obrigado: :obrigado: :obrigado:
Aserio este forum é o melhor que me podia ter acontecido, em termos de registos em comunidades da web :-( Tenho de contribuir em alguma coisa.