diff options
author | Thomas Willingham <founder@kakste.com> | 2013-10-03 02:39:49 +0100 |
---|---|---|
committer | Thomas Willingham <founder@kakste.com> | 2013-10-03 02:39:49 +0100 |
commit | 89c1fc75407f27a31146554f92d98a90e43605d1 (patch) | |
tree | 78272bc9cd91b21fa6e3a2688e091b3b1f6e2aae /view/theme/redbasic | |
parent | 6224a5e458dd06c791e073c7b21a3b0fefd5e4d6 (diff) | |
download | volse-hubzilla-89c1fc75407f27a31146554f92d98a90e43605d1.tar.gz volse-hubzilla-89c1fc75407f27a31146554f92d98a90e43605d1.tar.bz2 volse-hubzilla-89c1fc75407f27a31146554f92d98a90e43605d1.zip |
Fix a gotcha in theme defaults.
Diffstat (limited to 'view/theme/redbasic')
-rw-r--r-- | view/theme/redbasic/php/style.php | 41 |
1 files changed, 26 insertions, 15 deletions
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index aff592a05..88bf2ceb0 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -1,20 +1,5 @@ <?php -//Set some defaults - - $nav_colour = "red"; - $nav_bg_1 = "#f88"; - $nav_bg_2 = "#b00"; - $nav_bg_3 = "#f00"; - $nav_bg_4 = "#b00"; - $background_colour = "fff"; - $background_image =''; - $item_colour = "fff"; - $item_opacity = "1"; - $font_size = "12"; - $font_colour = "000"; - $radius = "5"; - // Get the UID of the channel owner $uid = get_theme_uid(); @@ -49,6 +34,32 @@ $font_colour = get_pconfig($uid, "redbasic", "font_colour"); $radius = get_pconfig($uid, "redbasic", "radius"); +//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. + + if (! $nav_colour) { + $nav_colour = "red"; + $nav_bg_1 = "#f88"; + $nav_bg_2 = "#b00"; + $nav_bg_3 = "#f00"; + $nav_bg_4 = "#b00"; + } + if (! $background_colour) + $background_colour = "fff"; + if (! $background_image) + $background_image =''; + if (! $item_colour) + $item_colour = "fff"; + if (! $item_opacity) + $item_opacity = "1"; + if (! $font_size) + $font_size = "12"; + if (! $font_colour) + $font_colour = "000"; + if (! $radius) + $radius = "5"; + + // Apply the settings if(file_exists('view/theme/' . current_theme() . '/css/style.css')) { |