SMFPT - Suporte e Manutenção de Fórum em Português

SMF 1.1.x (Móbulos Manual) => SMF 1.1.x Módulos Manual => Tópico iniciado por: Sharkman em 10 de Janeiro de 2008, 18:16

Título: Colocar Idade e localidade nos Post!
Enviado por: Sharkman em 10 de Janeiro de 2008, 18:16
Deixo aqui como adicionar A idade e Localidade ao perfil nos tópicos.

(http://img260.imageshack.us/img260/9159/localidadeeidadeem4.jpg)

Na pasta source/Load.php

Procurar :

Código: [Seleccione]
);

return true;
}

Substituir por:

Código: [Seleccione]
);

// ===== Begin modification - Display Age and Location next to posts =====
if (!empty($profile['birthdate']) && $profile['birthdate'] !== '0001-01-01')
{
list ($birth_year, $birth_month, $birth_day) = sscanf($profile['birthdate'], '%d-%d-%d');
$datearray = getdate(forum_time());
$memberContext[$user] += array(
'age' => $birth_year <= 4 ? $txt[470] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1)
);
}
// ===== End modification =====

return true;
}

Na pasta theme/Display.template.php

Procurar por:


Código: [Seleccione]
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

Colocar Antes :

Código: [Seleccione]
// ===== Begin modification - Display Age and Location next to posts =====
loadLanguage('Profile');
// Show the member's age
if (isset($message['member']['age']))
echo '
', $txt[420], ': ', $message['member']['age'], '<br />';

// Show the member's location
if ($message['member']['location'] != '')
echo '
', $txt[227], ': ', $message['member']['location'], '<br />';
// ===== End modification =====

Na pasta language/index.portuguese-utf8.php

Procurar por:

Código: [Seleccione]
$txt[227] = 'Localidade';
Adicionar Antes:

Código: [Seleccione]
// ===== Begin modification - Display Age and Location next to posts =====
// This was copied from Profile.english.php
$txt[420] = 'Idade';
// ===== End modification =====

Título: Re: Colocar Idade e localidade nos Post!
Enviado por: candidosa2 em 10 de Janeiro de 2008, 21:27
 :palmas :palmas :palmas
Bom trabalho
Título: Re: Colocar Idade e localidade nos Post!
Enviado por: patrijosa em 17 de Janeiro de 2008, 19:10
valeu a diga

Muito bom

 :palmas  :palmas  :palmas