diff options
author | Thomas Willingham <founder@kakste.com> | 2013-10-10 18:39:28 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-10-10 18:39:28 +0100 |
commit | 41838fdfad93e6bbee54f27350f611b4c5b7e403 (patch) | |
tree | bf2717399ddd8d91a99cee1f72ea9bb65f284e2c /view/theme/redbasic/php/style.php | |
parent | 35db6ffa10c73f36b814299cf9f2231332d36c6a (diff) | |
download | volse-hubzilla-41838fdfad93e6bbee54f27350f611b4c5b7e403.tar.gz volse-hubzilla-41838fdfad93e6bbee54f27350f611b4c5b7e403.tar.bz2 volse-hubzilla-41838fdfad93e6bbee54f27350f611b4c5b7e403.zip |
Basic schema support - but no actual schemas.
Diffstat (limited to 'view/theme/redbasic/php/style.php')
-rw-r--r-- | view/theme/redbasic/php/style.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index cb17f8298..ad8dca9a2 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -29,6 +29,7 @@ $search_background = '#EEEEEE'; } +// Load the owners pconfig $background_colour = get_pconfig($uid, "redbasic", "background_colour"); $background_image = get_pconfig($uid, "redbasic", "background_image"); $item_colour = get_pconfig($uid, "redbasic", "item_colour"); @@ -36,8 +37,27 @@ $font_size = get_pconfig($uid, "redbasic", "font_size"); $font_colour = get_pconfig($uid, "redbasic", "font_colour"); $radius = get_pconfig($uid, "redbasic", "radius"); - $shadow = get_pconfig($uid,"redbasic","photo_shadow"); + $shadow = get_pconfig($uid,"redbasic","photo_shadow"); +// Now load the scheme. If a value is changed above, we'll keep the settings +// If not, we'll keep those defined by the schema +// Setting $scheme to '' wasn't working for some reason, so we'll check it's +// not --- like the mobile theme does instead. + + if (($schema) && ($schema != '---')) { + $schemefile = 'view/theme/' . current_theme() . '/schema/' . $schema . '.php'; + require_once ($schemefile); + } + +// If we haven't got a schema, load the default. We shouldn't touch this - we +// should leave it for admins to define for themselves. + if (! $schema) { + if(file_exists('view/theme/' . current_theme() . '/schema/default.php')) { + $schemefile = 'view/theme/' . current_theme() . '/schema/' . 'default.php'; + require_once ($schemefile); + } + } + //Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting //individually. If we don't, we'll have problems if a user has set one, but not all options. |