]> git.mxchange.org Git - friendica.git/blob - include/profile_advanced.php
c1dfad66f4e2c6f2dbc4e75a9887f3edf45417bc
[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         $lbl_fullname = t('Full Name:');
11         $fullname = $a->profile['name'];
12
13 $o .= <<< EOT
14 <div id="advanced-profile-name-wrapper" >
15 <div id="advanced-profile-name-text">$lbl_fullname</div>
16 <div id="advanced-profile-name">$fullname</div>
17 </div>
18 <div id="advanced-profile-name-end"></div>
19 EOT;
20 }
21
22 if($a->profile['gender']) {
23         $lbl_gender = t('Gender:');
24         $gender = $a->profile['gender'];
25
26 $o .= <<< EOT
27 <div id="advanced-profile-gender-wrapper" >
28 <div id="advanced-profile-gender-text">$lbl_gender</div>
29 <div id="advanced-profile-gender">$gender</div>
30 </div>
31 <div id="advanced-profile-gender-end"></div>
32 EOT;
33 }
34
35 if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) {
36         $lbl_birthday = t('Birthday:');
37
38 $o .= <<< EOT
39 <div id="advanced-profile-dob-wrapper" >
40 <div id="advanced-profile-dob-text">$lbl_birthday</div>
41 EOT;
42
43 // If no year, add an arbitrary one so just we can parse the month and day.
44
45 $year_bd_format = t('j F, Y');
46 $short_bd_format = t('j F');
47
48 $o .= '<div id="advanced-profile-dob">' 
49         . ((intval($a->profile['dob'])) 
50                 ? day_translate(datetime_convert('UTC','UTC',$a->profile['dob'] . ' 00:00 +00:00',$year_bd_format))
51                 : day_translate(datetime_convert('UTC','UTC','2001-' . substr($a->profile['dob'],6) . ' 00:00 +00:00',$short_bd_format))) 
52         . "</div>\r\n</div>";
53
54 $o .= '<div id="advanced-profile-dob-end"></div>';
55
56 }
57
58 if($age = age($a->profile['dob'],$a->profile['timezone'],'')) {
59         $lbl_age = t('Age:');
60 $o .= <<< EOT
61 <div id="advanced-profile-age-wrapper" >
62 <div id="advanced-profile-age-text">$lbl_age</div>
63 <div id="advanced-profile-age">$age</div>
64 </div>
65 <div id="advanced-profile-age-end"></div>
66 EOT;
67 }
68
69 if($a->profile['marital']) {
70         $lbl_marital = t('<span class="heart">&hearts;</span> Status:');
71         $marital = $a->profile['marital'];
72
73 $o .= <<< EOT
74 <div id="advanced-profile-marital-wrapper" >
75 <div id="advanced-profile-marital-text">$lbl_marital</div>
76 <div id="advanced-profile-marital">$marital</div>
77 EOT;
78
79 if($a->profile['with']) {
80         $with = $a->profile['with'];
81         $o .= "<div id=\"advanced-profile-with\">($with)</div>";
82 }
83 $o .= <<< EOT
84 </div>
85 <div id="advanced-profile-marital-end"></div>
86 EOT;
87 }
88
89 if($a->profile['sexual']) {
90         $lbl_sexual = t('Sexual Preference:');
91         $sexual = $a->profile['sexual'];
92
93 $o .= <<< EOT
94 <div id="advanced-profile-sexual-wrapper" >
95 <div id="advanced-profile-sexual-text">$lbl_sexual</div>
96 <div id="advanced-profile-sexual">$sexual</div>
97 </div>
98 <div id="advanced-profile-sexual-end"></div>
99 EOT;
100 }
101
102 if($a->profile['homepage']) {
103         $lbl_homepage = t('Homepage:');
104         $homepage = linkify($a->profile['homepage']);
105 $o .= <<< EOT
106 <div id="advanced-profile-homepage-wrapper" >
107 <div id="advanced-profile-homepage-text">$lbl_homepage</div>
108 <div id="advanced-profile-homepage">$homepage</div>
109 </div>
110 <div id="advanced-profile-homepage-end"></div>
111 EOT;
112 }
113
114 if($a->profile['politic']) {
115         $lbl_politic = t('Political Views:');
116         $politic = $a->profile['politic'];
117 $o .= <<< EOT
118 <div id="advanced-profile-politic-wrapper" >
119 <div id="advanced-profile-politic-text">$lbl_politic</div>
120 <div id="advanced-profile-politic">$politic</div>
121 </div>
122 <div id="advanced-profile-politic-end"></div>
123 EOT;
124 }
125
126 if($a->profile['religion']) {
127         $lbl_religion = t('Religion:');
128         $religion = $a->profile['religion'];
129 $o .= <<< EOT
130 <div id="advanced-profile-religion-wrapper" >
131 <div id="advanced-profile-religion-text">$lbl_religion</div>
132 <div id="advanced-profile-religion">$religion</div>
133 </div>
134 <div id="advanced-profile-religion-end"></div>
135 EOT;
136 }
137 if($txt = prepare_text($a->profile['about'])) {
138         $lbl_about = t('About:');
139 $o .= <<< EOT
140 <div id="advanced-profile-about-wrapper" >
141 <div id="advanced-profile-about-text">$lbl_about</div>
142 <br />
143 <div id="advanced-profile-about">$txt</div>
144 </div>
145 <div id="advanced-profile-about-end"></div>
146 EOT;
147 }
148
149 if($txt = prepare_text($a->profile['interest'])) {
150         $lbl_interests = t('Hobbies/Interests:');
151 $o .= <<< EOT
152 <div id="advanced-profile-interest-wrapper" >
153 <div id="advanced-profile-interest-text">$lbl_interests</div>
154 <br />
155 <div id="advanced-profile-interest">$txt</div>
156 </div>
157 <div id="advanced-profile-interest-end"></div>
158 EOT;
159 }
160
161 if($txt = prepare_text($a->profile['contact'])) {
162         $lbl_contact = t('Contact information and Social Networks:');
163 $o .= <<< EOT
164 <div id="advanced-profile-contact-wrapper" >
165 <div id="advanced-profile-contact-text">$lbl_contact</div>
166 <br />
167 <div id="advanced-profile-contact">$txt</div>
168 </div>
169 <div id="advanced-profile-contact-end"></div>
170 EOT;
171 }
172
173 if($txt = prepare_text($a->profile['music'])) {
174         $lbl_music = t('Musical interests:');
175 $o .= <<< EOT
176 <div id="advanced-profile-music-wrapper" >
177 <div id="advanced-profile-music-text">$lbl_music</div>
178 <br />
179 <div id="advanced-profile-music">$txt</div>
180 </div>
181 <div id="advanced-profile-music-end"></div>
182 EOT;
183 }
184
185 if($txt = prepare_text($a->profile['book'])) {
186         $lbl_book = t('Books, literature:');
187 $o .= <<< EOT
188 <div id="advanced-profile-book-wrapper" >
189 <div id="advanced-profile-book-text">$lbl_book</div>
190 <br />
191 <div id="advanced-profile-book">$txt</div>
192 </div>
193 <div id="advanced-profile-book-end"></div>
194 EOT;
195 }
196
197 if($txt = prepare_text($a->profile['tv'])) {
198         $lbl_tv = t('Television:');
199 $o .= <<< EOT
200 <div id="advanced-profile-tv-wrapper" >
201 <div id="advanced-profile-tv-text">$lbl_tv</div>
202 <br />
203 <div id="advanced-profile-tv">$txt</div>
204 </div>
205 <div id="advanced-profile-tv-end"></div>
206 EOT;
207 }
208
209 if($txt = prepare_text($a->profile['film'])) {
210         $lbl_film = t('Film/dance/culture/entertainment:');
211 $o .= <<< EOT
212 <div id="advanced-profile-film-wrapper" >
213 <div id="advanced-profile-film-text">$lbl_film</div>
214 <br />
215 <div id="advanced-profile-film">$txt</div>
216 </div>
217 <div id="advanced-profile-film-end"></div>
218 EOT;
219 }
220
221 if($txt = prepare_text($a->profile['romance'])) {
222         $lbl_romance = t('Love/Romance:');
223 $o .= <<< EOT
224 <div id="advanced-profile-romance-wrapper" >
225 <div id="advanced-profile-romance-text">$lbl_romance</div>
226 <br />
227 <div id="advanced-profile-romance">$txt</div>
228 </div>
229 <div id="advanced-profile-romance-end"></div>
230 EOT;
231 }
232
233 if($txt = prepare_text($a->profile['work'])) {
234         $lbl_work = t('Work/employment:');
235 $o .= <<< EOT
236 <div id="advanced-profile-work-wrapper" >
237 <div id="advanced-profile-work-text">$lbl_work</div>
238 <br />
239 <div id="advanced-profile-work">$txt</div>
240 </div>
241 <div id="advanced-profile-work-end"></div>
242 EOT;
243 }
244
245 if($txt = prepare_text($a->profile['education'])) {
246         $lbl_education = t('School/education:');
247 $o .= <<< EOT
248 <div id="advanced-profile-education-wrapper" >
249 <div id="advanced-profile-education-text">$lbl_education</div>
250 <br />
251 <div id="advanced-profile-education">$txt</div>
252 </div>
253 <div id="advanced-profile-education-end"></div>
254 EOT;
255 }
256
257 return $o;
258 }