]> git.mxchange.org Git - friendica.git/blob - include/profile_advanced.php
fix typo
[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" class="advanced-profile-label">$lbl_fullname</div>
16 <div id="advanced-profile-name" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_gender</div>
29 <div id="advanced-profile-gender" class="advanced-profile-content">$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" class="advanced-profile-label">$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" class="advanced-profile-content">' 
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" class="advanced-profile-label">$lbl_age</div>
63 <div id="advanced-profile-age" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_marital</div>
76 <div id="advanced-profile-marital" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_sexual</div>
96 <div id="advanced-profile-sexual" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_homepage</div>
108 <div id="advanced-profile-homepage" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_politic</div>
120 <div id="advanced-profile-politic" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_religion</div>
132 <div id="advanced-profile-religion" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_about</div>
142 <br />
143 <div id="advanced-profile-about" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_interests</div>
154 <br />
155 <div id="advanced-profile-interest" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_contact</div>
166 <br />
167 <div id="advanced-profile-contact" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_music</div>
178 <br />
179 <div id="advanced-profile-music" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_book</div>
190 <br />
191 <div id="advanced-profile-book" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_tv</div>
202 <br />
203 <div id="advanced-profile-tv" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_film</div>
214 <br />
215 <div id="advanced-profile-film" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_romance</div>
226 <br />
227 <div id="advanced-profile-romance" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_work</div>
238 <br />
239 <div id="advanced-profile-work" class="advanced-profile-content">$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" class="advanced-profile-label">$lbl_education</div>
250 <br />
251 <div id="advanced-profile-education" class="advanced-profile-content">$txt</div>
252 </div>
253 <div id="advanced-profile-education-end"></div>
254 EOT;
255 }
256
257 return $o;
258 }