[TUTORIAL] Mostrar os avatares na lista de quem está online

Started by Costa, November 12, 2008, 01:46:12 PM

Previous topic - Next topic

Costa

In4tek SMF, fórum de suporte e traduções de mods para o SMF.

Esta é uma simples dica que irá mostrar os avatares na lista de quem está on-line

Vamos começar abrindo o Who.template.php.

Code (encontre) Select
         <td nowrap="nowrap">', $member['time'], '</td>

Code (substitua por) Select
         <td nowrap="nowrap">', $member['avatar']['image'], '</td>
         <td nowrap="nowrap">', $member['time'], '</td>


Code (encontre) Select
         <td colspan="3"><b>', $txt[139], ':</b> ', $context['page_index'], '</td>

Code (substitua por) Select
         <td colspan="4"><b>', $txt[139], ':</b> ', $context['page_index'], '</td>

Code (encontre) Select
   <table cellpadding="3" cellspacing="0" border="0" width="100%" class="tborder">

Code (substitua por) Select
   <table cellpadding="4" cellspacing="0" border="0" width="100%" class="tborder">

Code (encontre) Select
         <td style="width: 14ex;"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=time', $context['sort_direction'] == 'down' && $context['sort_by'] == 'time' ? ';asc' : '', '">', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
         <td>', $txt['who_action'], '</td>


Code (susbtitua por) Select
         <td>', $txt['avatar'], '</td>
         <td style="width: 14ex;"><a href="' . $scripturl . '?action=who;start=', $context['start'], ';sort=time', $context['sort_direction'] == 'down' && $context['sort_by'] == 'time' ? ';asc' : '', '">', $txt['who_time'], ' ', $context['sort_by'] == 'time' ? '<img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" />' : '', '</a></td>
         <td>', $txt['who_action'], '</td>


Finalizadas as edições na template, vamos fazer uma pequena modificação no Modification.{nome da linguagem}.php

Adicione no final do arquivo
$txt['avatar'] = 'Avatar';
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."

margarett

Eu não o fazia num fórum meu :P , mas cá vai mais um:
--> Indice ;)
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

Costa

E quem disse que eu o fiz no meu? heuheueh
Acho isso uma perfumaria, mas pode ser que alguém goste :D
Fiz apenas no meu fórum de testes
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: