2011-01-21 10:39:15 +01:00
|
|
|
<?php
|
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
function advanced_profile(&$a) {
|
2011-01-21 10:39:15 +01:00
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
$o .= '';
|
2011-01-21 10:39:15 +01:00
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
$o .= '<h2>' . t('Profile') . '</h2>';
|
2011-01-21 10:39:15 +01:00
|
|
|
|
|
|
|
if($a->profile['name']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_fullname = t('Full Name:');
|
|
|
|
$fullname = $a->profile['name'];
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-name-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-name-text">$lbl_fullname</div>
|
|
|
|
<div id="advanced-profile-name">$fullname</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-name-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['gender']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_gender = t('Gender:');
|
|
|
|
$gender = $a->profile['gender'];
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-gender-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-gender-text">$lbl_gender</div>
|
|
|
|
<div id="advanced-profile-gender">$gender</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-gender-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_birthday = t('Birthday:');
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-dob-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-dob-text">$lbl_birthday</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
EOT;
|
|
|
|
|
|
|
|
// If no year, add an arbitrary one so just we can parse the month and day.
|
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
$year_bd_format = t('j F, Y');
|
|
|
|
$short_bd_format = t('j F');
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= '<div id="advanced-profile-dob">'
|
|
|
|
. ((intval($a->profile['dob']))
|
2011-04-08 08:10:43 +02:00
|
|
|
? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00',$year_bd_format))
|
|
|
|
: day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00',$short_bd_format)))
|
2011-01-21 10:39:15 +01:00
|
|
|
. "</div>\r\n</div>";
|
|
|
|
|
|
|
|
$o .= '<div id="advanced-profile-dob-end"></div>';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if($age = age($a->profile['dob'],$a->profile['timezone'],'')) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_age = t('Age:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-age-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-age-text">$lbl_age</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<div id="advanced-profile-age">$age</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-age-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['marital']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_marital = t('<span class="heart">♥</span> Status:');
|
|
|
|
$marital = $a->profile['marital'];
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-marital-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-marital-text">$lbl_marital</div>
|
|
|
|
<div id="advanced-profile-marital">$marital</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
EOT;
|
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
if($a->profile['with']) {
|
|
|
|
$with = $a->profile['with'];
|
|
|
|
$o .= "<div id=\"advanced-profile-with\">($with)</div>";
|
|
|
|
}
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-marital-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['sexual']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_sexual = t('Sexual Preference:');
|
|
|
|
$sexual = $a->profile['sexual'];
|
|
|
|
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-sexual-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-sexual-text">$lbl_sexual</div>
|
|
|
|
<div id="advanced-profile-sexual">$sexual</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-sexual-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['homepage']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_homepage = t('Homepage:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$homepage = linkify($a->profile['homepage']);
|
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-homepage-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-homepage-text">$lbl_homepage</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<div id="advanced-profile-homepage">$homepage</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-homepage-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['politic']) {
|
2011-04-08 12:35:42 +02:00
|
|
|
$lbl_politic = t('Political Views:');
|
2011-04-08 08:10:43 +02:00
|
|
|
$politic = $a->profile['politic'];
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-politic-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-politic-text">$lbl_politic</div>
|
|
|
|
<div id="advanced-profile-politic">$politic</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-politic-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
|
|
|
if($a->profile['religion']) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_religion = t('Religion:');
|
|
|
|
$religion = $a->profile['religion'];
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-religion-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-religion-text">$lbl_religion</div>
|
|
|
|
<div id="advanced-profile-religion">$religion</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-religion-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['about'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_about = t('About:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-about-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-about-text">$lbl_about</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-about">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-about-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['interest'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_interests = t('Hobbies/Interests:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-interest-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-interest-text">$lbl_interests</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-interest">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-interest-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['contact'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_contact = t('Contact information and Social Networks:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-contact-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-contact-text">$lbl_contact</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-contact">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-contact-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['music'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_music = t('Musical interests:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-music-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-music-text">$lbl_music</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-music">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-music-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['book'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_book = t('Books, literature:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-book-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-book-text">$lbl_book</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-book">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-book-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['tv'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_tv = t('Television:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-tv-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-tv-text">$lbl_tv</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-tv">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-tv-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['film'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_film = t('Film/dance/culture/entertainment:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-film-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-film-text">$lbl_film</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-film">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-film-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['romance'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_romance = t('Love/Romance:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-romance-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-romance-text">$lbl_romance</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-romance">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-romance-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['work'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_work = t('Work/employment:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-work-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-work-text">$lbl_work</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-work">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-work-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-03-04 08:13:16 +01:00
|
|
|
if($txt = prepare_text($a->profile['education'])) {
|
2011-04-08 08:10:43 +02:00
|
|
|
$lbl_education = t('School/education:');
|
2011-01-21 10:39:15 +01:00
|
|
|
$o .= <<< EOT
|
|
|
|
<div id="advanced-profile-education-wrapper" >
|
2011-04-08 08:10:43 +02:00
|
|
|
<div id="advanced-profile-education-text">$lbl_education</div>
|
2011-01-21 10:39:15 +01:00
|
|
|
<br />
|
|
|
|
<div id="advanced-profile-education">$txt</div>
|
|
|
|
</div>
|
|
|
|
<div id="advanced-profile-education-end"></div>
|
|
|
|
EOT;
|
|
|
|
}
|
|
|
|
|
2011-04-08 08:10:43 +02:00
|
|
|
return $o;
|
|
|
|
}
|