← SMF

[Dúvida] Criar aba ou link

Lida 3204 vezes

Offline

SurferBoy 
Membro
Mensagens 518 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

Olá a todos,

Estou com umas dúvidas aqui com o SMF... Como é a primeira vez que estou a trabalhar com SMF as dúvidas vão surgindo...

Eu queria criar no meu fórum uma aba ou hiperligação para o site, mas não sei qual o ficheiro em que devo colocar essa hiperligação...

Aqui no fórum colocar no canto superior direito, por exemplo a hiperligação para o blog, equipa e etc... A minha ideia era criar uma hiperligação desses não tendo que ser na posição que está neste template do fórum.

Para verem o fórum, vejam aqui.

 :obrigado:
Offline

SurferBoy 
Membro
Mensagens 518 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

Já agora para quem não entendeu a minha dúvida veja imagem:



O que eu quero é criar um link para o meu site apartir do Fórum...
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

isso em 1.1.x é muito fácil, só já não me lembro qual é o ficheiro já não trabalho com smf a algum tempo.. e agora também não tenho tempo para procurar vou ter exames  :-(


mas ve no ficheiro index.template.php ou cena assim

EDIT:

tu já tens la dois botões "inicio", por isso deves saber onde esta o código no template

se precisares de ajuda deixa aqui o pedaço do código php do menu
Offline

SurferBoy 
Membro
Mensagens 518 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

betanalista,

Sim, é a versão 1.1.x e é para alterar no ficheiro index.template.php já me indicaram noutro fórum... O meu problema agora é que não consigu colocar como quero, dai ter 2 inícios no fórum...

Neste fórum tem a explicar mas só para o template prédefinido pelo SMF: http://www.infodz.com.br/smf/index.php?topic=13.0

Deixo aqui o código então se me puderes ajudar por favor:

Código: [Seleccione]
// 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>';
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1



Código: [Seleccione]
// Show the [home] button.
            echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';




            echo '<li><a href="http://google.com" >Google</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>';



experimenta dessa foram, muda o google para o que quiseres
Offline

SurferBoy 
Membro
Mensagens 518 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

Já dá qualquer coisa mas o icon fica desconfigurado vê aqui.
Offline

Pedro Lopes 
Beta tester
Mensagens 3568 Gostos 18
Feedback +6

Troféus totais: 32
Trófeus: (Ver todos)
Level 6 Windows User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3

Código: [Seleccione]
// Show the [home] button.
            echo '<li><a' , $current_action=='home' ? ' class="current"' : '' , ' href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';




            echo '<li><a href="http://site.com"><span>Bla Bla</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>';
Offline

betanalista 
Membro
Mensagens 2564 Gostos 0
Feedback +18

Troféus totais: 26
Trófeus: (Ver todos)
Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Level 5 Level 4 Level 3 Level 2 Level 1

Já dá qualquer coisa mas o icon fica desconfigurado vê aqui.

bem isso foi porque eu retirei o "<span>...</span>" pensei que não fosse fazer falta, testa como o oRion deixou aqui o código
Offline

SurferBoy 
Membro
Mensagens 518 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

Está perfeito já! Obrigado aos dois! ;)