Autor Tópico: [Favicon] Site 2  (Lida 3179 vezes)

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

Offline candidosa2

  • Suporte Tecnico
  • Fundador
  • *
  • Mensagens: 5072
  • Rank: 1658
  • Sexo: Masculino
  • Suporte
    • Hosting Moçambique
[Favicon] Site 2
« em: 05 de Março de 2009, 06:14 »
Original em En
http://custom.simplemachines.org/mods/index.php?mod=702

$themedir/Settings.template.php

Pesquisar
Código: [Seleccione]
array(
'id' => 'header_logo_url',
'label' => $txt['header_logo_url'],
'description' => $txt['header_logo_url_desc'],
'type' => 'text',
),

Adicionar trocando o script acima por este abaixo
Código: [Seleccione]
array(
'id' => 'header_icon_url',
'label' => $txt['header_icon_url'],
'description' => $txt['header_icon_url_desc'],
'type' => 'text',
),
array(
'id' => 'header_icon_type',
'label' => $txt['header_icon_type'],
'description' => $txt['header_icon_type_desc'],
'type' => 'list',
'options' => array(
0 => $txt['ico'],
1 => $txt['gif'],
2 => $txt['png'],
),
),

$themedir/index.template.php

Pesquisar
Código: [Seleccione]
<title>', $context['page_title'], '</title>';
Adicionar
Código: [Seleccione]
// IF WE HAVE AN ICON, SHOW IT
if ((!empty($settings['header_icon_url'])) && (!empty($settings['header_icon_type']))) {

if ($settings['header_icon_type'] == 0) {
// ICO SO USE THE OLD FASHIONED CODE
  echo '
  <link rel="shortcut icon" type="image/x-icon" href="' , $settings['header_icon_url'] , '"/>';
} else {
// ELSE ITS A NEWER ICON FOR MODERN BROWSERS (GIF/PNG)
echo '
<link rel="icon" type="image/' , ($settings['header_icon_type'] == 1) ? 'gif' : 'png' , '" href="' , $settings['header_icon_url'] , '"/>';
}
}


$languagedir/Themes.portuguese_pt.php

Antes do

Código: [Seleccione]
?>
Colocar este código

Código: [Seleccione]
$txt['header_icon_url'] = 'FavIcon Image Url:';
$txt['header_icon_url_desc'] = '(deixe em branco para mostrar não favicon.)
<br/>Favicon Must be 16x16 and either .ico, .gif or .png
<br/>(<a href="http://en.wikipedia.org/wiki/Favicon" target="_blank">Help</a>)';
$txt['header_icon_type'] = 'FavIcon Image Type:';
$txt['header_icon_type_desc'] = 'A fim de mostrar o seu favicon corretamente, selecione se a um .ico/.gif/.png';
$txt['ico'] = 'ico';
$txt['gif'] = 'gif';
$txt['png'] = 'png';