Various schema issues.

This commit is contained in:
Thomas Willingham 2013-10-10 19:18:33 +01:00
parent d05899fb50
commit cdf608898a
4 changed files with 22 additions and 22 deletions

View File

@ -10,11 +10,11 @@
body { body {
font-family: arial,freesans,sans-serif; font-family: arial,freesans,sans-serif;
font-size: 12px; font-size: 12px;
background-color: #$background_colour; background-color: $bgcolour;
background-image: url('$background_image'); background-image: url('$background_image');
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
color: #$font_colour; color: $font_colour;
margin: 0px; margin: 0px;
} }
.jslider { .jslider {
@ -117,7 +117,7 @@ blockquote {
filter:alpha(opacity=100); filter:alpha(opacity=100);
} }
nav {background-image: linear-gradient(bottom, #$nav_bg_1 26%, #$nav_bg_2 82%); nav {background-image: linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
background-image: -o-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%); background-image: -o-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
background-image: -moz-linear-gradient(bottom,$nav_bg_1 26%, $nav_bg_2 82%); background-image: -moz-linear-gradient(bottom,$nav_bg_1 26%, $nav_bg_2 82%);
background-image: -webkit-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%); background-image: -webkit-linear-gradient(bottom, $nav_bg_1 26%, $nav_bg_2 82%);
@ -823,7 +823,7 @@ footer {
margin-top: 10px; margin-top: 10px;
position: relative; position: relative;
border-radius: $radiuspx; border-radius: $radiuspx;
background-color: #$item_colour; background-color: $item_colour;
opacity: $item_opacity; opacity: $item_opacity;
} }

View File

@ -5,7 +5,7 @@ function theme_content(&$a) {
$schema = get_pconfig(local_user(),'redbasic', 'schema' ); $schema = get_pconfig(local_user(),'redbasic', 'schema' );
$nav_colour = get_pconfig(local_user(),'redbasic', 'nav_colour' ); $nav_colour = get_pconfig(local_user(),'redbasic', 'nav_colour' );
$background_colour = get_pconfig(local_user(),'redbasic', 'background_colour' ); $bgcolour = get_pconfig(local_user(),'redbasic', 'bgcolour' );
$background_image = get_pconfig(local_user(),'redbasic', 'background_image' ); $background_image = get_pconfig(local_user(),'redbasic', 'background_image' );
$item_colour = get_pconfig(local_user(),'redbasic', 'item_colour' ); $item_colour = get_pconfig(local_user(),'redbasic', 'item_colour' );
$item_opacity = get_pconfig(local_user(),'redbasic', 'item_opacity' ); $item_opacity = get_pconfig(local_user(),'redbasic', 'item_opacity' );
@ -13,7 +13,7 @@ function theme_content(&$a) {
$font_colour = get_pconfig(local_user(),'redbasic', 'font_colour' ); $font_colour = get_pconfig(local_user(),'redbasic', 'font_colour' );
$radius = get_pconfig(local_user(),'redbasic', 'radius' ); $radius = get_pconfig(local_user(),'redbasic', 'radius' );
$shadow = get_pconfig(local_user(),'redbasic', 'photo_shadow' ); $shadow = get_pconfig(local_user(),'redbasic', 'photo_shadow' );
return redbasic_form($a, $schema, $nav_colour, $background_colour, $background_image, $item_colour, $item_opacity, return redbasic_form($a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
$font_size, $font_colour, $radius, $shadow); $font_size, $font_colour, $radius, $shadow);
} }
@ -34,7 +34,7 @@ function theme_post(&$a) {
} }
} }
function redbasic_form(&$a, $schema, $nav_colour, $background_colour, $background_image, $item_colour, $item_opacity, function redbasic_form(&$a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
$font_size, $font_colour, $radius, $shadow) { $font_size, $font_colour, $radius, $shadow) {
$scheme_choices = array(); $scheme_choices = array();
@ -66,7 +66,7 @@ if(feature_enabled(local_user(),'expert'))
'$title' => t("Theme settings"), '$title' => t("Theme settings"),
'$schema' => array('redbasic_schema', t('Set scheme'), $schema, '', $scheme_choices), '$schema' => array('redbasic_schema', t('Set scheme'), $schema, '', $scheme_choices),
'$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $nav_colour, '', $nav_colours), '$nav_colour' => array('redbasic_nav_colour', t('Navigation bar colour'), $nav_colour, '', $nav_colours),
'$background_colour' => array('redbasic_background_colour', t('Set the background colour'), $background_colour), '$bgcolour' => array('redbasic_background_colour', t('Set the background colour'), $bgcolour),
'$background_image' => array('redbasic_background_image', t('Set the background image'), $background_image), '$background_image' => array('redbasic_background_image', t('Set the background image'), $background_image),
'$item_colour' => array('redbasic_item_colour', t('Set the background colour of items'), $item_colour), '$item_colour' => array('redbasic_item_colour', t('Set the background colour of items'), $item_colour),
'$item_opacity' => array('redbasic_item_opacity', t('Set the opacity of items'), $item_opacity), '$item_opacity' => array('redbasic_item_opacity', t('Set the opacity of items'), $item_opacity),

View File

@ -30,7 +30,7 @@
} }
// Load the owners pconfig // Load the owners pconfig
$background_colour = get_pconfig($uid, "redbasic", "background_colour"); $bgcolour = get_pconfig($uid, "redbasic", "background_colour");
$background_image = get_pconfig($uid, "redbasic", "background_image"); $background_image = get_pconfig($uid, "redbasic", "background_image");
$item_colour = get_pconfig($uid, "redbasic", "item_colour"); $item_colour = get_pconfig($uid, "redbasic", "item_colour");
$item_opacity = get_pconfig($uid, "redbasic", "item_opacity"); $item_opacity = get_pconfig($uid, "redbasic", "item_opacity");
@ -47,15 +47,15 @@
if (($schema) && ($schema != '---')) { if (($schema) && ($schema != '---')) {
$schemefile = 'view/theme/' . current_theme() . '/schema/' . $schema . '.php'; $schemefile = 'view/theme/' . current_theme() . '/schema/' . $schema . '.php';
require_once ($schemefile); require_once ($schemefile);
}
// If we haven't got a schema, load the default. We shouldn't touch this - we
// 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.
// should leave it for admins to define for themselves. if (! $schema) {
if (! $schema) { if(file_exists('view/theme/' . current_theme() . '/schema/default.php')) {
if(file_exists('view/theme/' . current_theme() . '/schema/default.php')) { $schemefile = 'view/theme/' . current_theme() . '/schema/' . 'default.php';
$schemefile = 'view/theme/' . current_theme() . '/schema/' . 'default.php'; require_once ($schemefile);
require_once ($schemefile); }
} }
} }
//Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting //Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting
@ -68,8 +68,8 @@
$nav_bg_3 = "#f00"; $nav_bg_3 = "#f00";
$nav_bg_4 = "#b00"; $nav_bg_4 = "#b00";
} }
if (! $background_colour) if (! $bgcolour)
$background_colour = "fff"; $bgcolour = "fff";
if (! $background_image) if (! $background_image)
$background_image =''; $background_image ='';
if (! $item_colour) if (! $item_colour)
@ -97,7 +97,7 @@ $options = array (
'$nav_bg_3' => $nav_bg_3, '$nav_bg_3' => $nav_bg_3,
'$nav_bg_4' => $nav_bg_4, '$nav_bg_4' => $nav_bg_4,
'$search_background' => $search_background, '$search_background' => $search_background,
'$background_colour' => $background_colour, '$bgcolour' => $bgcolour,
'$background_image' => $background_image, '$background_image' => $background_image,
'$item_colour' => $item_colour, '$item_colour' => $item_colour,
'$item_opacity' => $item_opacity, '$item_opacity' => $item_opacity,

View File

@ -5,7 +5,7 @@
{{if $expert}} {{if $expert}}
{{include file="field_select.tpl" field=$nav_colour}} {{include file="field_select.tpl" field=$nav_colour}}
{{include file="field_input.tpl" field=$background_colour}} {{include file="field_input.tpl" field=$bgcolour}}
{{include file="field_input.tpl" field=$background_image}} {{include file="field_input.tpl" field=$background_image}}
{{include file="field_input.tpl" field=$item_colour}} {{include file="field_input.tpl" field=$item_colour}}
{{include file="field_input.tpl" field=$item_opacity}} {{include file="field_input.tpl" field=$item_opacity}}