aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php/config.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-08-15 22:45:07 -0700
committerredmatrix <git@macgirvin.com>2016-08-15 22:45:07 -0700
commit8a89cfb158986dd6be4c820188326f10f0bc1a94 (patch)
treef7a73e63ba508bfbebe7451abf2f288996949e17 /view/theme/redbasic/php/config.php
parent7fc254a81c5648653a03a7a631195d7c5212dcba (diff)
downloadvolse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.tar.gz
volse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.tar.bz2
volse-hubzilla-8a89cfb158986dd6be4c820188326f10f0bc1a94.zip
move schema settings into the display settings main so we can set theme:schema theme selectors in settings
Diffstat (limited to 'view/theme/redbasic/php/config.php')
-rw-r--r--view/theme/redbasic/php/config.php36
1 files changed, 21 insertions, 15 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index 04cf4f904..8f256bde4 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -1,11 +1,30 @@
<?php
+class RedbasicConfig {
+ function get_schemas() {
+ $scheme_choices = array();
+ $scheme_choices["---"] = t("Focus (Hubzilla default)");
+ $files = glob('view/theme/redbasic/schema/*.php');
+ if($files) {
+ foreach($files as $file) {
+ $f = basename($file, ".php");
+ if($f != 'default') {
+ $scheme_name = $f;
+ $scheme_choices[$f] = $scheme_name;
+ }
+ }
+ }
+ return $scheme_choices;
+ }
+}
+
+
function theme_content(&$a) {
if(!local_channel()) { return;}
$arr = array();
- $arr['schema'] = get_pconfig(local_channel(),'redbasic', 'schema' );
+// $arr['schema'] = get_pconfig(local_channel(),'redbasic', 'schema' );
$arr['narrow_navbar'] = get_pconfig(local_channel(),'redbasic', 'narrow_navbar' );
$arr['nav_bg'] = get_pconfig(local_channel(),'redbasic', 'nav_bg' );
$arr['nav_gradient_top'] = get_pconfig(local_channel(),'redbasic', 'nav_gradient_top' );
@@ -42,7 +61,7 @@ function theme_post(&$a) {
if(!local_channel()) { return;}
if (isset($_POST['redbasic-settings-submit'])) {
- set_pconfig(local_channel(), 'redbasic', 'schema', $_POST['redbasic_schema']);
+// set_pconfig(local_channel(), 'redbasic', 'schema', $_POST['redbasic_schema']);
set_pconfig(local_channel(), 'redbasic', 'narrow_navbar', $_POST['redbasic_narrow_navbar']);
set_pconfig(local_channel(), 'redbasic', 'nav_bg', $_POST['redbasic_nav_bg']);
set_pconfig(local_channel(), 'redbasic', 'nav_gradient_top', $_POST['redbasic_nav_gradient_top']);
@@ -78,18 +97,6 @@ function theme_post(&$a) {
function redbasic_form(&$a, $arr) {
- $scheme_choices = array();
- $scheme_choices["---"] = t("Focus (Hubzilla default)");
- $files = glob('view/theme/redbasic/schema/*.php');
- if($files) {
- foreach($files as $file) {
- $f = basename($file, ".php");
- if($f != 'default') {
- $scheme_name = $f;
- $scheme_choices[$f] = $scheme_name;
- }
- }
- }
if(feature_enabled(local_channel(),'expert'))
$expert = 1;
@@ -101,7 +108,6 @@ if(feature_enabled(local_channel(),'expert'))
'$theme' => App::$channel['channel_theme'],
'$expert' => $expert,
'$title' => t("Theme settings"),
- '$schema' => array('redbasic_schema', t('Select scheme'), $arr['schema'], '', $scheme_choices),
'$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))),
'$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
'$nav_gradient_top' => array('redbasic_nav_gradient_top', t('Navigation bar gradient top color'), $arr['nav_gradient_top']),