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