"Button Image"

Started by brman, September 26, 2007, 03:46:32 PM

Previous topic - Next topic

brman

Olá a todos,

estou tentando colocar imagens ao invés de texto em "Responder", "Novo Tópico", etc.

Já ativei o "Mostrar botões como imagens em vez de texto", mas não está funcionando.

Obs: uso tema padrão e idioma "brazilian".

Desde já grato. :D

margarett

Isso obriga-te a mudar bastantes coisas no código, penso eu de que...

Essa opção, não sei bem o que faz, mas não é para esses botões garantidamente...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

M4ST3R™

para novo topico envia a imagem para este sitio:
Themes/....../images/portuguese/new_topic.gif
reply:
Themes/....../images/portuguese/reply.gif

pelo menos eu no meu tema fiz assim


margarett

Mas isso é para o teu tema, que já tem botões, só vais é alterá-los. No caso do tema default, o código está construído para ter texto, e é necessário alterar esse código para incluir botões...
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

duzzzstar

Ainda não sabem como resolver isso?
Além do meu fórum não ter os botões, ainda tem aquela mensagem "Novo" logo após o nome dos tópicos, por falta da tua imagem ://

Ajudem!

Costa

Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

duzzzstar

No index.template.php do tema Analsys...

Se trocar a parte abaixo:
// Generate a strip of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>';

$button_strip[$key] = $buttons[$key];
}

if (empty($button_strip))
return '<td> </td>';

echo '
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode('  |  ', $button_strip) , '</td>
<td class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}

?>


Por esta parte do index.template.php do tema clássico:
// Generate a strip of buttons, out of buttons.
function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;

if (empty($button_strip))
return '';

// Create the buttons...
foreach ($button_strip as $key => $value)
{
if (isset($value['test']) && empty($context[$value['test']]))
{
unset($button_strip[$key]);
continue;
}
elseif (!isset($buttons[$key]) || $force_reset)
$buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . ($value['lang'] ? $context['user']['language'] . '/' : '') . $value['image'] . '" alt="' . $txt[$value['text']] . '" border="0" />' : $txt[$value['text']]) . '</a>';

$button_strip[$key] = $buttons[$key];
}

echo '
<td ', $custom_td, '>', implode($context['menu_separator'], $button_strip) , '</td>';
}

?>


... todas as imagens aparecem perfeitamente.

Maaaaaaaaaas... o que quero é deixar o texto + imagem, já que as imagens desse tema para Novo tópico, Responder etc são ícones que devem ficar ao lado do seu respectivo texto.

Então a pergunta é; como fazer as imagens aparecerem deixando o texto das mesmas logo ao lado?

Obs: Meu fórum é o www.ljcgames.com

Costa

All copyright notices within source files and as generated by the Software as output are retained, unchanged.

Todos os avisos de direitos autorais nos arquivos de origem e gerados pelo software têm de ser mantidas, inalteradas.

Acabou o suporte para ti até o copyright ser reposto!

Lock!
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Advertisement: