]> git.mxchange.org Git - friendica.git/blob - include/profile_advanced.php
don't make -desc so obnoxious looking
[friendica.git] / include / profile_advanced.php
1 <?php
2
3 function advanced_profile(&$a) {
4
5         $o = '';
6
7         $o .= '<h2>' . t('Profile') . '</h2>';
8
9         if($a->profile['name']) {
10
11                 $tpl = get_markup_template('profile_advanced.tpl');
12                 
13                 $profile = array();
14                 
15                 $profile['fullname'] = array( t('Full Name:'), $a->profile['name'] ) ;
16                 
17                 if($a->profile['gender']) $profile['gender'] = array( t('Gender:'),  $a->profile['gender'] );
18                 
19
20                 if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) {
21                 
22                         $year_bd_format = t('j F, Y');
23                         $short_bd_format = t('j F');
24
25                 
26                         $val = ((intval($a->profile['dob'])) 
27                                 ? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00',$year_bd_format))
28                                 : day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00',$short_bd_format)));
29                         
30                         $profile['birthday'] = array( t('Birthday:'), $val);
31
32                 }
33
34                 if($age = age($a->profile['dob'],$a->profile['timezone'],''))  $profile['age'] = array( t('Age:'), $age );
35                         
36
37                 if($a->profile['marital']) $profile['marital'] = array( t('Status:'), $a->profile['marital']);
38
39
40                 if($a->profile['with']) $profile['marital']['with'] = $a->profile['with'];
41
42
43                 if($a->profile['sexual']) $profile['sexual'] = array( t('Sexual Preference:'), $a->profile['sexual'] );
44
45                 if($a->profile['homepage']) $profile['homepage'] = array( t('Homepage:'), linkify($a->profile['homepage']) );
46
47                 if($a->profile['pub_keywords']) $profile['pub_keywords'] = array( t('Tags:'), $a->profile['pub_keywords']);
48
49                 if($a->profile['politic']) $profile['politic'] = array( t('Political Views:'), $a->profile['politic']);
50
51                 if($a->profile['religion']) $profile['religion'] = array( t('Religion:'), $a->profile['religion']);
52
53                 if($txt = prepare_text($a->profile['about'])) $profile['about'] = array( t('About:'), $txt );
54
55                 if($txt = prepare_text($a->profile['interest'])) $profile['interest'] = array( t('Hobbies/Interests:'), $txt);
56
57                 if($txt = prepare_text($a->profile['contact'])) $profile['contact'] = array( t('Contact information and Social Networks:'), $txt);
58
59                 if($txt = prepare_text($a->profile['music'])) $profile['music'] = array( t('Musical interests:'), $txt);
60                 
61                 if($txt = prepare_text($a->profile['book'])) $profile['book'] = array( t('Books, literature:'), $txt);
62
63                 if($txt = prepare_text($a->profile['tv'])) $profile['tv'] = array( t('Television:'), $txt);
64
65                 if($txt = prepare_text($a->profile['film'])) $profile['film'] = array( t('Film/dance/culture/entertainment:'), $txt);
66
67                 if($txt = prepare_text($a->profile['romance'])) $profile['romance'] = array( t('Love/Romance:'), $txt);
68                 
69                 if($txt = prepare_text($a->profile['work'])) $profile['work'] = array( t('Work/employment:'), $txt);
70
71                 if($txt = prepare_text($a->profile['education'])) $profile['education'] = array( t('School/education:'), $txt );
72
73         return replace_macros($tpl, array(
74             '$title' => t('Profile'),
75             '$profile' => $profile,
76         ));
77     }
78
79         return '';
80 }