diff options
author | tommy tomson <thomas.bierey@gmx.de> | 2012-05-08 03:29:25 +0200 |
---|---|---|
committer | tommy tomson <thomas.bierey@gmx.de> | 2012-05-08 03:29:25 +0200 |
commit | 88443ed3fb3c4d91f93d3520f260aa40eb6ec694 (patch) | |
tree | 172ae2afa88c93450f292ff4dc2e401874dac4eb /view/theme/diabook/config.php | |
parent | 8a4e3cc3701c3278e35d917de526fd8b032709ab (diff) | |
download | volse-hubzilla-88443ed3fb3c4d91f93d3520f260aa40eb6ec694.tar.gz volse-hubzilla-88443ed3fb3c4d91f93d3520f260aa40eb6ec694.tar.bz2 volse-hubzilla-88443ed3fb3c4d91f93d3520f260aa40eb6ec694.zip |
diabook-themes: state of the boxes at right_aside are now stored in db, instead of cookie.
Diffstat (limited to 'view/theme/diabook/config.php')
-rw-r--r-- | view/theme/diabook/config.php | 103 |
1 files changed, 98 insertions, 5 deletions
diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index 40a539079..84dd64834 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -17,8 +17,19 @@ function theme_content(&$a){ $ELZoom = get_pconfig(local_user(), 'diabook', 'ELZoom' ); $ELPosX = get_pconfig(local_user(), 'diabook', 'ELPosX' ); $ELPosY = get_pconfig(local_user(), 'diabook', 'ELPosY' ); + $close_pages = get_pconfig(local_user(), 'diabook', 'close_pages' ); + $close_mapquery = get_pconfig(local_user(), 'diabook', 'close_mapquery' ); + $close_profiles = get_pconfig(local_user(), 'diabook', 'close_profiles' ); + $close_helpers = get_pconfig(local_user(), 'diabook', 'close_helpers' ); + $close_services = get_pconfig(local_user(), 'diabook', 'close_services' ); + $close_friends = get_pconfig(local_user(), 'diabook', 'close_friends' ); + $close_twitter = get_pconfig(local_user(), 'diabook', 'close_twitter' ); + $close_lastusers = get_pconfig(local_user(), 'diabook', 'close_lastusers' ); + $close_lastphotos = get_pconfig(local_user(), 'diabook', 'close_lastphotos' ); + $close_lastlikes = get_pconfig(local_user(), 'diabook', 'close_lastlikes' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); + + 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); } function theme_post(&$a){ @@ -34,6 +45,18 @@ function theme_post(&$a){ set_pconfig(local_user(), 'diabook', 'ELZoom', $_POST['diabook_ELZoom']); set_pconfig(local_user(), 'diabook', 'ELPosX', $_POST['diabook_ELPosX']); set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']); + set_pconfig(local_user(), 'diabook', 'ELPosY', $_POST['diabook_ELPosY']); + set_pconfig(local_user(), 'diabook', 'close_pages', $_POST['diabook_close_pages']); + set_pconfig(local_user(), 'diabook', 'close_mapquery', $_POST['diabook_close_mapquery']); + set_pconfig(local_user(), 'diabook', 'close_profiles', $_POST['diabook_close_profiles']); + set_pconfig(local_user(), 'diabook', 'close_helpers', $_POST['diabook_close_helpers']); + set_pconfig(local_user(), 'diabook', 'close_services', $_POST['diabook_close_services']); + set_pconfig(local_user(), 'diabook', 'close_friends', $_POST['diabook_close_friends']); + set_pconfig(local_user(), 'diabook', 'close_twitter', $_POST['diabook_close_twitter']); + set_pconfig(local_user(), 'diabook', 'close_lastusers', $_POST['diabook_close_lastusers']); + set_pconfig(local_user(), 'diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']); + set_pconfig(local_user(), 'diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']); + } } @@ -47,8 +70,18 @@ function theme_admin(&$a){ $ELZoom = get_config('diabook', 'ELZoom' ); $ELPosX = get_config('diabook', 'ELPosX' ); $ELPosY = get_config('diabook', 'ELPosY' ); + $close_pages = get_config('diabook', 'close_pages' ); + $close_mapquery = get_config('diabook', 'close_mapquery' ); + $close_profiles = get_config('diabook', 'close_profiles' ); + $close_helpers = get_config('diabook', 'close_helpers' ); + $close_services = get_config('diabook', 'close_services' ); + $close_friends = get_config('diabook', 'close_friends' ); + $close_twitter = get_config('diabook', 'close_twitter' ); + $close_lastusers = get_config('diabook', 'close_lastusers' ); + $close_lastphotos = get_config('diabook', 'close_lastphotos' ); + $close_lastlikes = get_config('diabook', 'close_lastlikes' ); - return diabook_form($a,$font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY); + 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); } function theme_admin_post(&$a){ @@ -60,12 +93,22 @@ function theme_admin_post(&$a){ set_config('diabook', 'TSearchTerm', $_POST['diabook_TSearchTerm']); set_config('diabook', 'ELZoom', $_POST['diabook_ELZoom']); set_config('diabook', 'ELPosX', $_POST['diabook_ELPosX']); - set_config('diabook', 'ELPosY', $_POST['diabook_ELPosY']); + set_config('diabook', 'close_pages', $_POST['diabook_close_pages']); + set_config('diabook', 'close_mapquery', $_POST['diabook_close_mapquery']); + set_config('diabook', 'close_profiles', $_POST['diabook_close_profiles']); + set_config('diabook', 'close_helpers', $_POST['diabook_close_helpers']); + set_config('diabook', 'close_services', $_POST['diabook_close_services']); + set_config('diabook', 'close_friends', $_POST['diabook_close_friends']); + set_config('diabook', 'close_twitter', $_POST['diabook_close_twitter']); + set_config('diabook', 'close_lastusers', $_POST['diabook_close_lastusers']); + set_config('diabook', 'close_lastphotos', $_POST['diabook_close_lastphotos']); + set_config('diabook', 'close_lastlikes', $_POST['diabook_close_lastlikes']); + } } -function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSearchTerm, $ELZoom, $ELPosX, $ELPosY){ +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){ $line_heights = array( "1.3"=>"1.3", "---"=>"---", @@ -99,7 +142,47 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear 'red'=>'red', 'dark'=>'dark', ); - + $close_pagesC = array( + '1'=>'hide', + '0'=>'show', + ); + $close_mapqueryC = array( + '1'=>'hide', + '0'=>'show', + ); + $close_profilesC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_helpersC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_servicesC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_friendsC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_twitterC = array( + '1'=>'hide', + '0'=>'show', + ); + $close_lastusersC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_lastphotosC = array( + '0'=>'show', + '1'=>'hide', + ); + $close_lastlikesC = array( + '0'=>'show', + '1'=>'hide', + ); + $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" ); @@ -115,6 +198,16 @@ function diabook_form(&$a, $font_size, $line_height, $resolution, $color, $TSear '$ELZoom' => array('diabook_ELZoom', t('Set zoomfactor for Earth Layer'), $ELZoom, '', $ELZoom), '$ELPosX' => array('diabook_ELPosX', t('Set longitude (X) for Earth Layer'), $ELPosX, '', $ELPosX), '$ELPosY' => array('diabook_ELPosY', t('Set latitude (Y) for Earth Layer'), $ELPosY, '', $ELPosY), + '$close_pages' => array('diabook_close_pages', t('Show "Cummunity Pages" at right-hand coloumn?'), $close_pages, '', $close_pagesC), + '$close_mapquery' => array('diabook_close_mapquery', t('Show "Earth Layers" at right-hand coloumn?'), $close_mapquery, '', $close_mapqueryC), + '$close_profiles' => array('diabook_close_profiles', t('Show "Cummunity Profiles" at right-hand coloumn?'), $close_profiles, '', $close_profilesC), + '$close_helpers' => array('diabook_close_helpers', t('Show "Help or @NewHere" at right-hand coloumn?'), $close_helpers, '', $close_helpersC), + '$close_services' => array('diabook_close_services', t('Show "Connect Services" at right-hand coloumn?'), $close_services, '', $close_servicesC), + '$close_friends' => array('diabook_close_friends', t('Show "Find Friends" at right-hand coloumn?'), $close_friends, '', $close_friendsC), + '$close_twitter' => array('diabook_close_twitter', t('Show "Last Tweets" at right-hand coloumn?'), $close_twitter, '', $close_twitterC), + '$close_lastusers' => array('diabook_close_lastusers', t('Show "Last Users" at right-hand coloumn?'), $close_lastusers, '', $close_lastusersC), + '$close_lastphotos' => array('diabook_close_lastphotos', t('Show "Last Photos" at right-hand coloumn?'), $close_lastphotos, '', $close_lastphotosC), + '$close_lastlikes' => array('diabook_close_lastlikes', t('Show "Last Likes" at right-hand coloumn?'), $close_lastlikes, '', $close_lastlikesC), )); return $o; } |