← SMF

Inserir script no SMF

Lida 4247 vezes

Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Boa tarde.

Eu tentei inserir este script a um fórum SMF mas não funcionava...

A minha dúvida é: onde deveriam estar os ficheiros .js e .css e como deverei chamá-los?

Abraço

Offline

leite 
Membro
Mensagens 864 Gostos 11
Troféus totais: 29
Trófeus: (Ver todos)
Mobile User Apple User Super Combination Combination Topic Starter 10 Poll Votes Poll Voter Poll Starter Level 5 Level 4

Os ficheiros .js e .css podem estar em qualquer sítio apenas tens de os chamar correctamente no header do template dentro do <head>
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Sim, chamei-os no index.template.php na tag <head> mas apenas chamo com o nome do ficheiro ou tenho que colocar algumacoisa/css.css?
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Alguma solução?
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

Eu coloco os ficheiro numa pasta chamada de "js" e faço

Código: [Seleccione]
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/js/ficheiro.js"></script>';
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Obrigado. Vou experimentar :)
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Não funcionou :S
Offline

Carlos Gandra 
Administrador
Mensagens 3081 Gostos 97
Feedback +1

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

Provavelmente tens de adicionar (ou criar) o style do script no .CSS do teu theme ;)
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

O codigo está correcto, é assim que se chama os ficheiros, estás é a inserir mal o scritp...
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

O problema era que eu estava a inserir 2 CSS...

O JS já funciona... Agora vou juntar os CSS. Obrigado a ambos ;)

EDIT: Afinal não. Chamei os 2 CSS na mesma... Simplesmente estava a chamar no sítio errado. Obrigado :D
Offline

Carlos Gandra 
Administrador
Mensagens 3081 Gostos 97
Feedback +1

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

Tiveste uma excelente ideia em meter tabs no SMF ;)
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Tiveste uma excelente ideia em meter tabs no SMF ;)

É para organizar mais a coisa... Para a página não ficar tão esticada :)
Offline

Shaddz 
Membro
Mensagens 2324 Gostos 2
Feedback +9

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

É para organizar mais a coisa... Para a página não ficar tão esticada :)

Não percebi o que que isso faz, esclareces-me?
Offline

Thomato 
Membro
Mensagens 4125 Gostos 3
Feedback +2

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

Com todo o gosto.

Em vez de ter PERFIL, NOTÍCIAS e PESQUISA na HomePage, organizo em Tabs...
Offline

Shaddz 
Membro
Mensagens 2324 Gostos 2
Feedback +9

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

Lol sim, isto é que tava com um bug qualquer, tava esquesito. já tudo bem