49ca4658be090d91151e83ea322d2dbfe85d4c72
[atutor.git] / mods / wiki / plugins / auth-liveuser / liveuser_setup_prefs.php
1 <?php
2
3 /**
4  * Copyright (c) 2003, The Burgiss Group, LLC
5  * This source code is part of eWiki LiveUser Plugin.
6  *
7  * eWiki LiveUser Plugin is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or (at your
10  * option) any later version.
11  *
12  * eWiki LiveUser Plugin is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with Wiki LiveUser Plugin; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20  */
21
22 require_once(dirname(__FILE__).'/pref_liveuser.php');
23
24 /*
25  * key points to value which will later be used for the public variable; if there
26  * is a default value, point to an array
27  */
28 $prefs = array( 
29     'Email'     => true,
30     'FirstName' => true,
31     'MiddleName'=> true,
32     'LastName'  => true,
33     'Company'   => true,
34     'Phone'     => true,
35     'Address'   => true,
36     'City'      => true,
37     'State'     => true,
38     'ZipCode'   => true,
39     'Country'   => true
40 );
41
42 $prefs_default_value = array( 
43     'Country'   => 'USA'
44 );
45
46 $prefs_possible_values = array(
47     'State'     => array(
48         'Alabama',
49         'Alaska',
50         'Arizona',
51         'Arkansas',
52         'California',
53         'Colorado',
54         'Connecticut',
55         'Delaware',
56         'Florida',
57         'Georgia',
58         'Hawaii',
59         'Idaho',
60         'Illinois',
61         'Indiana',
62         'Iowa',
63         'Kansas',
64         'Kentucky',
65         'Louisiana',
66         'Maine',
67         'Maryland',
68         'Massachusetts',
69         'Michigan',
70         'Minnesota',
71         'Mississippi',
72         'Missouri',
73         'Montana',
74         'Nebraska',
75         'Nevada',
76         'New Hampshire',
77         'New Jersey',
78         'New Mexico',
79         'New York',
80         'North Carolina',
81         'North Dakota',
82         'Ohio',
83         'Oklahoma',
84         'Oregon',
85         'Pennsylvania',
86         'Rhode Island',
87         'South Carolina',
88         'South Dakota',
89         'Tennessee',
90         'Texas',
91         'Utah',
92         'Vermont',
93         'Virginia',
94         'Washington',
95         'West Virginia',
96         'Wisconsin',
97         'Wyoming'
98     )
99 );
100
101 // iterate through list of prefs and add them as user preference fields
102 foreach ($prefs as $pref => $public) {
103     liveuser_pref_setField($pref, $public, $prefs_default_value[$pref], $prefs_possible_values[$pref]);
104     echo 'Added field '.$pref."\n";         
105 }
106
107 ?>