8 function theme_content(&$a){
12 $font_size = get_pconfig(local_user(), 'diabook', 'font_size' );
13 $line_height = get_pconfig(local_user(), 'diabook', 'line_height' );
14 $resolution = get_pconfig(local_user(), 'diabook', 'resolution' );
15 $color = get_pconfig(local_user(), 'diabook', 'color' );
16 $TSearchTerm = get_pconfig(local_user(), 'diabook', 'TSearchTerm' );
17 $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' );
18 $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' );
19 $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' );
20 $close_pages = get_pconfig(local_user(), 'diabook', 'close_pages' );
21 $close_mapquery = get_pconfig(local_user(), 'diabook', 'close_mapquery' );
22 $close_profiles = get_pconfig(local_user(), 'diabook', 'close_profiles' );
23 $close_helpers = get_pconfig(local_user(), 'diabook', 'close_helpers' );
24 $close_services = get_pconfig(local_user(), 'diabook', 'close_services' );
25 $close_friends = get_pconfig(local_user(), 'diabook', 'close_friends' );
26 $close_twitter = get_pconfig(local_user(), 'diabook', 'close_twitter' );
27 $close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' );
28 $close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' );
29 $close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' );
32 return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes);
35 function theme_post(&$a){
39 if (isset($_POST['diabook-settings-submit'])){
40 set_pconfig(local_user(), 'diabook', 'font_size', $_POST['diabook_font_size']);
41 set_pconfig(local_user(), 'diabook', 'line_height', $_POST['diabook_line_height']);
42 set_pconfig(local_user(), 'diabook', 'resolution', $_POST['diabook_resolution']);
43 set_pconfig(local_user(), 'diabook', 'color', $_POST['diabook_color']);
44 set_pconfig(local_user(), 'diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
45 set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']);
46 set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']);
47 set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']);
48 set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']);
49 set_pconfig(local_user(), 'diabook', 'close_pages', $_POST['diabook_close_pages']);
50 set_pconfig(local_user(), 'diabook', 'close_mapquery', $_POST['diabook_close_mapquery']);
51 set_pconfig(local_user(), 'diabook', 'close_profiles', $_POST['diabook_close_profiles']);
52 set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']);
53 set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']);
54 set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']);
55 set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']);
56 set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
57 set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
58 set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
64 function theme_admin(&$a){
65 $font_size = get_config('diabook', 'font_size' );
66 $line_height = get_config('diabook', 'line_height' );
67 $resolution = get_config('diabook', 'resolution' );
68 $color = get_config('diabook', 'color' );
69 $TSearchTerm = get_config('diabook', 'TSearchTerm' );
70 $ELZoom = get_config('diabook', 'ELZoom' );
71 $ELPosX = get_config('diabook', 'ELPosX' );
72 $ELPosY = get_config('diabook', 'ELPosY' );
73 $close_pages = get_config('diabook', 'close_pages' );
74 $close_mapquery = get_config('diabook', 'close_mapquery' );
75 $close_profiles = get_config('diabook', 'close_profiles' );
76 $close_helpers = get_config('diabook', 'close_helpers' );
77 $close_services = get_config('diabook', 'close_services' );
78 $close_friends = get_config('diabook', 'close_friends' );
79 $close_twitter = get_config('diabook', 'close_twitter' );
80 $close_lastusers = get_config('diabook', 'close_lastusers' );
81 $close_lastphotos = get_config('diabook', 'close_lastphotos' );
82 $close_lastlikes = get_config('diabook', 'close_lastlikes' );
84 return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes);
87 function theme_admin_post(&$a){
88 if (isset($_POST['diabook-settings-submit'])){
89 set_config('diabook', 'font_size', $_POST['diabook_font_size']);
90 set_config('diabook', 'line_height', $_POST['diabook_line_height']);
91 set_config('diabook', 'resolution', $_POST['diabook_resolution']);
92 set_config('diabook', 'color', $_POST['diabook_color']);
93 set_config('diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']);
94 set_config('diabook', 'ELZoom', $_POST['diabook_ELZoom']);
95 set_config('diabook', 'ELPosX', $_POST['diabook_ELPosX']);
96 set_config('diabook', 'close_pages', $_POST['diabook_close_pages']);
97 set_config('diabook', 'close_mapquery', $_POST['diabook_close_mapquery']);
98 set_config('diabook', 'close_profiles', $_POST['diabook_close_profiles']);
99 set_config('diabook', 'close_helpers', $_POST['diabook_close_helpers']);
100 set_config('diabook', 'close_services', $_POST['diabook_close_services']);
101 set_config('diabook', 'close_friends', $_POST['diabook_close_friends']);
102 set_config('diabook', 'close_twitter', $_POST['diabook_close_twitter']);
103 set_config('diabook', 'close_lastusers', $_POST['diabook_close_lastusers']);
104 set_config('diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']);
105 set_config('diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']);
111 function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY, $close_pages, $close_mapquery, $close_profiles, $close_helpers, $close_services, $close_friends, $close_twitter, $close_lastusers, $close_lastphotos, $close_lastlikes){
112 $line_heights = array(
132 $resolutions = array(
137 'diabook'=>'diabook',
145 $close_pagesC = array(
149 $close_mapqueryC = array(
153 $close_profilesC = array(
157 $close_helpersC = array(
161 $close_servicesC = array(
165 $close_friendsC = array(
169 $close_twitterC = array(
173 $close_lastusersC = array(
177 $close_lastphotosC = array(
181 $close_lastlikesC = array(
188 $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
189 $o .= replace_macros($t, array(
190 '$submit' => t('Submit'),
191 '$baseurl' => $a->get_baseurl(),
192 '$title' => t("Theme settings"),
193 '$font_size' => array('diabook_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes),
194 '$line_height' => array('diabook_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights),
195 '$resolution' => array('diabook_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),
196 '$color' => array('diabook_color', t('Set color scheme'), $color, '', $colors),
197 '$TSearchTerm' => array('diabook_TSearchTerm', t('Set twitter search term'), $TSearchTerm, '', $TSearchTerm),
198 '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom),
199 '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layers'), $ELPosX, '', $ELPosX),
200 '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layers'), $ELPosY, '', $ELPosY),
201 '$close_pages' => array('diabook_close_pages', t('Community Pages'), $close_pages, '', $close_pagesC),
202 '$close_mapquery' => array('diabook_close_mapquery', t('Earth Layers'), $close_mapquery, '', $close_mapqueryC),
203 '$close_profiles' => array('diabook_close_profiles', t('Community Profiles'), $close_profiles, '', $close_profilesC),
204 '$close_helpers' => array('diabook_close_helpers', t('Help or @NewHere ?'), $close_helpers, '', $close_helpersC),
205 '$close_services' => array('diabook_close_services', t('Connect Services'), $close_services, '', $close_servicesC),
206 '$close_friends' => array('diabook_close_friends', t('Find Friends'), $close_friends, '', $close_friendsC),
207 '$close_twitter' => array('diabook_close_twitter', t('Last tweets'), $close_twitter, '', $close_twitterC),
208 '$close_lastusers' => array('diabook_close_lastusers', t('Last users'), $close_lastusers, '', $close_lastusersC),
209 '$close_lastphotos' => array('diabook_close_lastphotos', t('Last photos'), $close_lastphotos, '', $close_lastphotosC),
210 '$close_lastlikes' => array('diabook_close_lastlikes', t('Last likes'), $close_lastlikes, '', $close_lastlikesC),