diff --git a/view/theme/vier/config.php b/view/theme/vier/config.php index 9df9088ed..5084a2605 100644 --- a/view/theme/vier/config.php +++ b/view/theme/vier/config.php @@ -17,7 +17,15 @@ function theme_content(&$a){ if ($style == "") $style = "plus"; - return vier_form($a,$style); + $show_pages = get_vier_config('show_pages', true); + $show_profiles = get_vier_config('show_profiles', true); + $show_helpers = get_vier_config('show_helpers', true); + $show_services = get_vier_config('show_services', true); + $show_friends = get_vier_config('show_friends', true); + $show_lastusers = get_vier_config('show_lastusers', true); + + return vier_form($a,$style, $show_pages, $show_profiles, $show_helpers, + $show_services, $show_friends, $show_lastusers); } function theme_post(&$a){ @@ -26,23 +34,56 @@ function theme_post(&$a){ if (isset($_POST['vier-settings-submit'])){ set_pconfig(local_user(), 'vier', 'style', $_POST['vier_style']); + set_pconfig(local_user(), 'vier', 'show_pages', $_POST['vier_show_pages']); + set_pconfig(local_user(), 'vier', 'show_profiles', $_POST['vier_show_profiles']); + set_pconfig(local_user(), 'vier', 'show_helpers', $_POST['vier_show_helpers']); + set_pconfig(local_user(), 'vier', 'show_services', $_POST['vier_show_services']); + set_pconfig(local_user(), 'vier', 'show_friends', $_POST['vier_show_friends']); + set_pconfig(local_user(), 'vier', 'show_lastusers', $_POST['vier_show_lastusers']); } } function theme_admin(&$a){ $style = get_config('vier', 'style'); - return vier_form($a,$style); + + $helperlist = get_config('vier', 'helperlist'); + + if ($helperlist == "") + $helperlist = "https://helpers.pyxis.uberspace.de/profile/helpers"; + + $t = get_markup_template("theme_admin_settings.tpl"); + $o .= replace_macros($t, array( + '$helperlist' => array('vier_helperlist', t('Comma separated list of helper forums'), $helperlist, '', ''), + )); + + $show_pages = get_vier_config('show_pages', true, true); + $show_profiles = get_vier_config('show_profiles', true, true); + $show_helpers = get_vier_config('show_helpers', true, true); + $show_services = get_vier_config('show_services', true, true); + $show_friends = get_vier_config('show_friends', true, true); + $show_lastusers = get_vier_config('show_lastusers', true, true); + $o .= vier_form($a,$style, $show_pages, $show_profiles, $show_helpers, $show_services, + $show_friends, $show_lastusers); + + return $o; } function theme_admin_post(&$a){ if (isset($_POST['vier-settings-submit'])){ set_config('vier', 'style', $_POST['vier_style']); + set_config('vier', 'show_pages', $_POST['vier_show_pages']); + set_config('vier', 'show_profiles', $_POST['vier_show_profiles']); + set_config('vier', 'show_helpers', $_POST['vier_show_helpers']); + set_config('vier', 'show_services', $_POST['vier_show_services']); + set_config('vier', 'show_friends', $_POST['vier_show_friends']); + set_config('vier', 'show_lastusers', $_POST['vier_show_lastusers']); + set_config('vier', 'helperlist', $_POST['vier_helperlist']); } } -function vier_form(&$a, $style){ +function vier_form(&$a, $style, $show_pages, $show_profiles, $show_helpers, $show_services, $show_friends, $show_lastusers){ $styles = array( "plus"=>"Plus", "breathe"=>"Breathe", @@ -51,12 +92,21 @@ function vier_form(&$a, $style){ "netcolour"=>"Coloured Networks", "flat"=>"Flat" ); - $t = get_markup_template("theme_settings.tpl" ); + + $show_or_not = array('0'=>t("don't show"), '1'=>t("show"),); + + $t = get_markup_template("theme_settings.tpl"); $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), '$title' => t("Theme settings"), '$style' => array('vier_style',t ('Set style'),$style,'',$styles), + '$show_pages' => array('vier_show_pages', t('Community Pages'), $show_pages, '', $show_or_not), + '$show_profiles' => array('vier_show_profiles', t('Community Profiles'), $show_profiles, '', $show_or_not), + '$show_helpers' => array('vier_show_helpers', t('Help or @NewHere ?'), $show_helpers, '', $show_or_not), + '$show_services' => array('vier_show_services', t('Connect Services'), $show_services, '', $show_or_not), + '$show_friends' => array('vier_show_friends', t('Find Friends'), $show_friends, '', $show_or_not), + '$show_lastusers' => array('vier_show_lastusers', t('Last users'), $show_lastusers, '', $show_or_not) )); return $o; } diff --git a/view/theme/vier/style.css b/view/theme/vier/style.css index 031413ea9..aadd09c61 100644 --- a/view/theme/vier/style.css +++ b/view/theme/vier/style.css @@ -390,7 +390,7 @@ code { } .sidebar-group-li:hover, #sidebar-new-group:hover, #hide-forum-list:hover, -#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forum-list div:hover, +#sidebar-ungrouped:hover, .side-link:hover, .nets-ul li:hover, #forum-list div:hover, #forum-list-right div:hover, .nets-all:hover, .saved-search-li:hover, li.tool:hover, .admin.link:hover, aside h4 a:hover, right_aside h4 a:hover, #message-new:hover { /* background-color: #ddd; */ /* background-color: #e5e5e5; */ @@ -409,7 +409,7 @@ code { font-weight: bold; } -#sidebar-new-group, #hide-forum-list, #forum-list, #sidebar-ungrouped, +#sidebar-new-group, #hide-forum-list, #forum-list, #forum-list-right, #sidebar-ungrouped, .side-link, #peoplefind-desc, #connect-desc, .nets-all, .admin.link, #message-new { padding-left: 10px; padding-top: 3px; @@ -445,11 +445,11 @@ a.sidebar-group-element { color: black; } -#forum-list a, .tool a, .admin.link a { +#forum-list a, #forum-list-right a, .tool a, .admin.link a { color: #737373; } -#forum-list { +#forum-list, #forum-list-right { margin-top: 2px; } @@ -970,7 +970,7 @@ aside #profiles-menu { left: 10px; } -aside #search-text, aside #side-follow-url, aside #side-peoplefind-url { +aside #search-text, aside #side-follow-url, aside #side-peoplefind-url, right_aside input { width: 140px; height: 17px; padding-left: 10px; diff --git a/view/theme/vier/templates/ch_connectors.tpl b/view/theme/vier/templates/ch_connectors.tpl new file mode 100644 index 000000000..2ca114807 --- /dev/null +++ b/view/theme/vier/templates/ch_connectors.tpl @@ -0,0 +1,2 @@ + + diff --git a/view/theme/vier/templates/ch_helpers.tpl b/view/theme/vier/templates/ch_helpers.tpl new file mode 100644 index 000000000..e10011e04 --- /dev/null +++ b/view/theme/vier/templates/ch_helpers.tpl @@ -0,0 +1 @@ +