diff options
author | friendica <info@friendica.com> | 2013-10-10 16:15:54 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-10-10 16:15:54 -0700 |
commit | 6ac0a84fac9d477c2c1347bd057692c21cc0db3f (patch) | |
tree | e59d3871536d942fe824e901a56472a1dd1eab5e /view/theme/redbasic/php/style.php | |
parent | a92e1c617b5584329939081c85e35ee60e3f1332 (diff) | |
parent | 71f22b20f44563a19ba242ba941e2fc452fe56ce (diff) | |
download | volse-hubzilla-6ac0a84fac9d477c2c1347bd057692c21cc0db3f.tar.gz volse-hubzilla-6ac0a84fac9d477c2c1347bd057692c21cc0db3f.tar.bz2 volse-hubzilla-6ac0a84fac9d477c2c1347bd057692c21cc0db3f.zip |
Merge https://github.com/friendica/red into zpull
Diffstat (limited to 'view/theme/redbasic/php/style.php')
-rw-r--r-- | view/theme/redbasic/php/style.php | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index cb17f8298..0245680d7 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -29,15 +29,35 @@ $search_background = '#EEEEEE'; } - $background_colour = get_pconfig($uid, "redbasic", "background_colour"); +// Load the owners pconfig + $bgcolour = get_pconfig($uid, "redbasic", "background_colour"); $background_image = get_pconfig($uid, "redbasic", "background_image"); $item_colour = get_pconfig($uid, "redbasic", "item_colour"); $item_opacity = get_pconfig($uid, "redbasic", "item_opacity"); $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. @@ -48,8 +68,8 @@ $nav_bg_3 = "#f00"; $nav_bg_4 = "#b00"; } - if (! $background_colour) - $background_colour = "fff"; + if (! $bgcolour) + $bgcolour = "fff"; if (! $background_image) $background_image =''; if (! $item_colour) @@ -77,7 +97,7 @@ $options = array ( '$nav_bg_3' => $nav_bg_3, '$nav_bg_4' => $nav_bg_4, '$search_background' => $search_background, -'$background_colour' => $background_colour, +'$bgcolour' => $bgcolour, '$background_image' => $background_image, '$item_colour' => $item_colour, '$item_opacity' => $item_opacity, |