Informazioni personali nei post [risolto]

Started by Elisa, October 28, 2004, 07:34:18 AM

Previous topic - Next topic

Elisa

Come faccio a fare in modo che nei post oltre al sesso, al numero dei post, all'avatar... si veda anche l'età?
Sono riuscita a far vedere la location con questa mod che ho trovato girovagando sul forum:

// Show their location?
            if (!empty($message['member']['location']))
                echo 'Location: 
            <br />
                        ', $message['member']['location'], '<br />
                  <br />';


ma non riesco a fare la stessa cosa con l'età.

edi67

devi specificare prima dove hai inserito questo codice in che file
CrazyZone - My SMF Forum


From the difficult the hardening of the man you can see

Elisa

Ops!! Scusate!
Il file è display.template.php

Elisa


                            // Set the age...
if (!empty($message['member']['birth_date']))
{
list ($birth_year, $birth_month, $birth_day) = sscanf($message['member']['birth_date'], '%d-%d-%d');
$datearray = getdate(forum_time());
$message['member'] += array(
'age' => empty($birth_year) ? $txt[470] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 0 : 1),
'today_is_birthday' => $datearray['mon'] == $birth_month && $datearray['mday'] == $birth_day
);
}
            // Age
            if (!empty($message['member']['age']))
                echo 'Età:
                        ', $message['member']['age'], '<br />
                  <br />';


Beato chi sa l'inglese!!!!

Advertisement: