diff options
author | redmatrix <git@macgirvin.com> | 2016-03-08 06:03:55 +1100 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-03-08 06:03:55 +1100 |
commit | a2e0574fcea3c041e3865597b0eecea682289e94 (patch) | |
tree | 97a548343141a58a0ded084e08407c11d0664ed3 /view | |
parent | 68d7ab6b55d34e19055aaab30966c4827c63e370 (diff) | |
parent | 1f56ff5407fcbee3037e449a1b96261ab483aac9 (diff) | |
download | volse-hubzilla-a2e0574fcea3c041e3865597b0eecea682289e94.tar.gz volse-hubzilla-a2e0574fcea3c041e3865597b0eecea682289e94.tar.bz2 volse-hubzilla-a2e0574fcea3c041e3865597b0eecea682289e94.zip |
Merge pull request #312 from jeroenpraat/master
Redbasic: Fix the issue with derived themes and schemas
Diffstat (limited to 'view')
-rw-r--r-- | view/theme/redbasic/php/config.php | 1 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 5 | ||||
-rw-r--r-- | view/theme/redbasic/tpl/theme_settings.tpl | 2 |
3 files changed, 8 insertions, 0 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index 6bea5bddb..66597332c 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -98,6 +98,7 @@ if(feature_enabled(local_channel(),'expert')) $o .= replace_macros($t, array( '$submit' => t('Submit'), '$baseurl' => $a->get_baseurl(), + '$theme' => $a->channel['channel_theme'], '$expert' => $expert, '$title' => t("Theme settings"), '$schema' => array('redbasic_schema', t('Select scheme'), $arr['schema'], '', $scheme_choices), diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 0ca47b1fb..ef1450681 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -215,3 +215,8 @@ if($align_left && file_exists('view/theme/redbasic/css/align_left.css')) { if($schemecss) { echo $schemecss; } + +// Set the schema to the default schema in derived themes. See the documentation for creating derived themes how to override this. + +if($a->channel['channel_theme'] != 'redbasic') + set_pconfig(local_channel(), 'redbasic', 'schema', '---'); diff --git a/view/theme/redbasic/tpl/theme_settings.tpl b/view/theme/redbasic/tpl/theme_settings.tpl index cdc9de489..0ec6d1741 100644 --- a/view/theme/redbasic/tpl/theme_settings.tpl +++ b/view/theme/redbasic/tpl/theme_settings.tpl @@ -1,4 +1,6 @@ +{{if $theme == redbasic}} {{include file="field_select.tpl" field=$schema}} +{{/if}} {{include file="field_checkbox.tpl" field=$align_left}} {{include file="field_checkbox.tpl" field=$narrow_navbar}} {{include file="field_input.tpl" field=$converse_width}} |