root/devel/mod/community/profile.config.php

Revision 1539, 36.6 kB (checked in by renato, 1 year ago)

Setting prop svn:eol-style in LOTS of files.

  • Property svn:eol-style set to native
Line 
1 <?php
2
3         global $data;
4         $run_result = '';
5         // Initial profile data
6
7         /* Profile info WAS of the format:
8     
9         $data['profile:details'][] = array(
10                                                 Description,
11                                                 Short / unique internal name,
12                                                 Type of field,
13                                                 User instructions for entering data,
14                                                 Optional: type of user that can see this field
15                                                     (e.g. "person", "community" etc)
16                                             )
17         e.g.
18         $data['profile:details'][] = array(__gettext("Interests"),"interests","keywords",__gettext("Separated with commas."));
19         
20         It is NOW of the format:
21         
22         $obj = new stdClass;
23                                                 $obj->name              // Description
24                                                 $obj->internal_name     // Short / unique internal name
25                                                 $obj->field_type        // Type of field
26                                                 $obj->description       // User instructions for entering data
27                                                 $obj->user_type         // Type of user that can see this field
28                                                 $obj->required          // True/false: whether field is required
29                                                 $obj->category          // Category field sits in
30                                                 $obj->invisible         // If true, won't display except on edit screen
31                                                 $obj->registration      // Will appear on user registration
32         $data['profile:details'][] = $obj;
33
34         Additions to this data structure will input/output a corresponding FOAF field
35         
36         $data['foaf:profile'][] = array(
37                                             Short / unique internal name,
38                                             Corresponding FOAF schema field
39                                             "collated" or "individual" -     whether multiple data elements (eg interests)
40                                                                             should be in separate tags ("individual") or
41                                                                             in the same tag separated by commas
42                                                                             (collated = default)
43                                             "resource" or "enclosed" -         whether the data is an rdf:resource="" attribute
44                                                                             or enclosed within the tag
45                                                                             (resource = default)
46                                         )
47         e.g.
48         $data['foaf:profile'][] = array("interests","foaf:interest");
49         
50         Also present is $data['vcard:profile:adr'][] for VCard ADR elements within the FOAF file
51         e.g.
52         $data['vcard:profile:adr'][] = array("streetaddress","vCard:Street","collated");
53         */
54
55         $data['profile:details'][] = (object)(array(
56                                                                     "name" => __gettext("Profile photo"),
57                                                                     "internal_name" => "profilephoto",
58                                                                     "field_type" => "profile_photo",
59                                                                     "description" => __gettext("Photo to display at the top of your profile."),
60                                                                     "category" => __gettext("Basic details"),
61                                                                     "col1" => true,
62                                                                     "invisible" => false,
63                                                                     "required" => false,
64                                                                     "user_type" => "",
65                                                                     ));
66         
67         $data['profile:details'][] = (object)(array(
68                                                                     "name" => __gettext("Who am I?"),
69                                                                     "internal_name" => "biography",
70                                                                     "field_type" => "longtext",
71                                                                     "description" => __gettext("A short introduction for you."),
72                                                                     "user_type" => "person",
73                                                                     "category" => __gettext("Basic details"),
74                                                                     "invisible" => false,
75                                                                     "required" => false,
76                                                                     ));
77         $data['profile:details'][] = (object)(array(
78                                                                     "name" => __gettext("Introduction"),
79                                                                     "internal_name" => "biography",
80                                                                     "field_type" => "longtext",
81                                                                     "description" => __gettext("A short introduction to this community."),
82                                                                     "user_type" => "community",
83                                                                     "category" => __gettext("Basic details"),
84                                                                     "invisible" => false,
85                                                                     "required" => false,
86                                                                     ));
87
88         $data['foaf:profile'][] = array("biography","bio:olb","collated","enclosed");
89
90         $data['profile:details'][] = (object)(array(
91                                                                     "name" => __gettext("Brief description"),
92                                                                     "internal_name" => "minibio",
93                                                                     "field_type" => "text",
94                                                                     "description" => __gettext("For use in your sidebar profile."),
95                                                                     "category" => __gettext("Basic details"),
96                                                                     "invisible" => false,
97                                                                     "col1" => true,
98                                                                     "required" => false,
99                                                                     "user_type" => "",
100                                                                     ));
101
102         // $data['profile:details'][] = array(__gettext("Postal address"),"postaladdress","mediumtext");
103         $data['profile:details'][] = (object)(array(
104                                                                     "name" => __gettext("Street address"),
105                                                                     "internal_name" => "streetaddress",
106                                                                     "field_type" => "text",
107                                                                     "description" => "",
108                                                                     "category" => __gettext("Location"),
109                                                                     "invisible" => false,
110                                                                     "required" => false,
111                                                                     "user_type" => "",
112                                                                     ));
113         $data['vcard:profile:adr'][] = array("streetaddress","vCard:Street","collated","enclosed");
114
115         $data['profile:details'][] = (object)(array(
116                                                                     "name" => __gettext("Town"),
117                                                                     "internal_name" => "town",
118                                                                     "field_type" => "keywords",
119                                                                     "description" => "",
120                                                                     "category" => __gettext("Location"),
121                                                                     "col1" => true,
122                                                                     "invisible" => false,
123                                                                     "required" => false,
124                                                                     "user_type" => "",
125                                                                     ));
126         $data['vcard:profile:adr'][] = array("town","vCard:Locality","collated","enclosed");
127
128         $data['profile:details'][] = (object)(array(
129                                                                     "name" => __gettext("State / Region"),
130                                                                     "internal_name" => "state",
131                                                                     "field_type" => "keywords",
132                                                                     "description" => "",
133                                                                     "category" => __gettext("Location"),
134                                                                     "invisible" => false,
135                                                                     "required" => false,
136                                                                     "user_type" => "",
137                                                                     ));
138         $data['vcard:profile:adr'][] = array("state","vCard:Region","collated","enclosed");
139
140         $data['profile:details'][] = (object)(array(
141                                                                     "name" => __gettext("Postal code"),
142                                                                     "internal_name" => "postcode",
143                                                                     "field_type" => "text",
144                                                                     "description" => "",
145                                                                     "category" => __gettext("Location"),
146                                                                     "invisible" => false,
147                                                                     "required" => false,
148                                                                     "user_type" => "",
149                                                                     ));
150         $data['vcard:profile:adr'][] = array("postcode","vCard:Pcode","collated","enclosed");
151         
152         $data['profile:details'][] = (object)(array(
153                                                                     "name" => __gettext("Country"),
154                                                                     "internal_name" => "country",
155                                                                     "field_type" => "keywords",
156                                                                     "description" => "",
157                                                                     "category" => __gettext("Location"),
158                                                                     "invisible" => false,
159                                                                     "required" => false,
160                                                                     "user_type" => "",
161                                                                     ));
162         $data['vcard:profile:adr'][] = array("country","vCard:Country","collated","enclosed");
163         
164         $data['profile:details'][] = (object)(array(
165                                                                     "name" => __gettext("Email address"),
166                                                                     "internal_name" => "emailaddress",
167                                                                     "field_type" => "email",
168                                                                     "description" => "",
169                                                                     "category" => __gettext("Contact"),
170                                                                     "invisible" => false,
171                                                                     "required" => false,
172                                                                     "user_type" => "",
173                                                                     ));
174         
175         $data['profile:details'][] = (object)(array(
176                                                                     "name" => __gettext("Work telephone"),
177                                                                     "internal_name" => "workphone",
178                                                                     "field_type" => "text",
179                                                                     "description" => "",
180                                                                     "category" => __gettext("Contact"),
181                                                                     "invisible" => false,
182                                                                     "required" => false,
183                                                                     "user_type" => "",
184                                                                     ));
185         $data['foaf:profile'][] = array("workphone","foaf:phone","individual","resource");
186         
187         $data['profile:details'][] = (object)(array(
188                                                                     "name" => __gettext("Home telephone"),
189                                                                     "internal_name" => "homephone",
190                                                                     "field_type" => "text",
191                                                                     "description" => "",
192                                                                     "category" => __gettext("Contact"),
193                                                                     "invisible" => false,
194                                                                     "required" => false,
195                                                                     "user_type" => "",
196                                                                     ));
197         $data['foaf:profile'][] = array("homephone","foaf:phone","individual","resource");
198         
199         $data['profile:details'][] = (object)(array(
200                                                                     "name" => __gettext("Mobile telephone"),
201                                                                     "internal_name" => "mobphone",
202                                                                     "field_type" => "text",
203                                                                     "description" => "",
204                                                                     "category" => __gettext("Contact"),
205                                                                     "invisible" => false,
206                                                                     "required" => false,
207                                                                     "user_type" => "",
208                                                                     ));
209         $data['foaf:profile'][] = array("mobphone","foaf:phone","individual","resource");
210         
211         $data['profile:details'][] = (object)(array(
212                                                                     "name" => __gettext("Official website address"),
213                                                                     "internal_name" => "workweb",
214                                                                     "field_type" => "web",
215                                                                     "description" => __gettext("The URL to your official website, if you have one."),
216                                                                     "category" => __gettext("Contact"),
217                                                                     "invisible" => false,
218                                                                     "required" => false,
219                                                                     "col2" => true,
220                                                                     "user_type" => "",
221                                                                     ));
222         $data['foaf:profile'][] = array("workweb","foaf:workplaceHomepage","individual","resource");
223         
224         $data['profile:details'][] = (object)(array(
225                                                                     "name" => __gettext("Personal website address"),
226                                                                     "internal_name" => "personalweb",
227                                                                     "field_type" => "web",
228                                                                     "description" => __gettext("The URL to your personal website, if you have one."),
229                                                                     "category" => __gettext("Contact"),
230                                                                     "invisible" => false,
231                                                                     "required" => false,
232                                                                     "col2" => true,
233                                                                     "user_type" => "",
234                                                                     ));
235         $data['foaf:profile'][] = array("personalweb","foaf:homepage","individual","resource");
236         
237         $data['profile:details'][] = (object)(array(
238                                                                     "name" => __gettext("ICQ number"),
239                                                                     "internal_name" => "icq",
240                                                                     "field_type" => "icq",
241                                                                     "description" => "",
242                                                                     "category" => __gettext("Contact"),
243                                                                     "invisible" => false,
244                                                                     "required" => false,
245                                                                     "user_type" => "",
246                                                                     ));
247         $data['foaf:profile'][] = array("icq","foaf:icqChatID","individual","enclosed");
248         
249         $data['profile:details'][] = (object)(array(
250                                                                     "name" => __gettext("MSN chat"),
251                                                                     "internal_name" => "msn",
252                                                                     "field_type" => "msn",
253                                                                     "description" => "",
254                                                                     "category" => __gettext("Contact"),
255                                                                     "invisible" => false,
256                                                                     "required" => false,
257                                                                     "user_type" => "",
258                                                                     ));
259         $data['foaf:profile'][] = array("msn","foaf:msnChatID","individual","enclosed");
260         
261         $data['profile:details'][] = (object)(array(
262                                                                     "name" => __gettext("AIM screenname"),
263                                                                     "internal_name" => "aim",
264                                                                     "field_type" => "aim",
265                                                                     "description" => "",
266                                                                     "category" => __gettext("Contact"),
267                                                                     "invisible" => false,
268                                                                     "required" => false,
269                                                                     "user_type" => "",
270                                                                     ));
271         $data['foaf:profile'][] = array("aim","foaf:aimChatID","individual","enclosed");
272         
273         $data['profile:details'][] = (object)(array(
274                                                                     "name" => __gettext("Skype username"),
275                                                                     "internal_name" => "skype",
276                                                                     "field_type" => "skype",
277                                                                     "description" => "",
278                                                                     "category" => __gettext("Contact"),
279                                                                     "invisible" => false,
280                                                                     "required" => false,
281                                                                     "user_type" => "",
282                                                                     ));
283         
284         $data['profile:details'][] = (object)(array(
285                                                                     "name" => __gettext("Jabber username"),
286                                                                     "internal_name" => "jabber",
287                                                                     "field_type" => "text",
288                                                                     "description" => "",
289                                                                     "category" => __gettext("Contact"),
290                                                                     "invisible" => false,
291                                                                     "required" => false,
292                                                                     "user_type" => "",
293                                                                     ));
294         $data['foaf:profile'][] = array("jabber","foaf:jabberChatID","individual","enclosed");
295         
296         $data['profile:details'][] = (object)(array(
297                                                                     "name" => __gettext("Interests"),
298                                                                     "internal_name" => "interests",
299                                                                     "field_type" => "keywords",
300                                                                     "description" => __gettext("Separated with commas."),
301                                                                     "category" => __gettext("Basic details"),
302                                                                     "invisible" => false,