Colocar Idade e localidade nos Post!

Iniciado por Sharkman, 10 de Janeiro de 2008, 18:16

Tópico anterior - Tópico seguinte

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

Sharkman

Deixo aqui como adicionar A idade e Localidade ao perfil nos tópicos.



Na pasta source/Load.php

Procurar :

);

return true;
}


Substituir por:

);

// ===== 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:


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


Colocar Antes :

// ===== 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:

$txt[227] = 'Localidade';

Adicionar Antes:

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



candidosa2


patrijosa

valeu a diga

Muito bom

:palmas  :palmas  :palmas
O verdadeiro sábio é um eterno aprendiz!