make corner radius configurable in redbasic expert mode
This commit is contained in:
@@ -16,7 +16,9 @@ function theme_content(&$a) {
|
||||
$iconset = get_pconfig(local_user(), 'redbasic', 'iconset');
|
||||
$shiny = get_pconfig(local_user(), 'redbasic', 'shiny');
|
||||
$colour_scheme = get_pconfig(local_user(), 'redbasic', 'colour_scheme');
|
||||
return redbasic_form($a, $font_size, $line_height, $colour, $shadow, $navcolour, $opaquenav, $displaystyle, $linkcolour, $iconset, $shiny, $colour_scheme);
|
||||
$radius = get_pconfig(local_user(),'redbasic','radius');
|
||||
|
||||
return redbasic_form($a, $font_size, $line_height, $colour, $shadow, $navcolour, $opaquenav, $displaystyle, $linkcolour, $iconset, $shiny, $colour_scheme,$radius);
|
||||
}
|
||||
|
||||
function theme_post(&$a) {
|
||||
@@ -33,6 +35,7 @@ function theme_post(&$a) {
|
||||
set_pconfig(local_user(), 'redbasic', 'iconset', $_POST['redbasic_iconset']);
|
||||
set_pconfig(local_user(), 'redbasic', 'shiny', $_POST['redbasic_shiny']);
|
||||
set_pconfig(local_user(), 'redbasic', 'colour_scheme', $_POST['redbasic_colour_scheme']);
|
||||
set_pconfig(local_user(), 'redbasic', 'radius', $_POST['redbasic_radius']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +70,7 @@ function theme_post(&$a) {
|
||||
//}
|
||||
|
||||
// These aren't all used yet, but they're not bloat - we'll use drop down menus in idiot mode.
|
||||
function redbasic_form(&$a, $font_size, $line_height, $colour, $shadow, $navcolour, $opaquenav, $displaystyle, $linkcolour, $iconset, $shiny, $colour_scheme) {
|
||||
function redbasic_form(&$a, $font_size, $line_height, $colour, $shadow, $navcolour, $opaquenav, $displaystyle, $linkcolour, $iconset, $shiny, $colour_scheme,$radius) {
|
||||
$line_heights = array(
|
||||
"1.3" => "1.3",
|
||||
"---" => "---",
|
||||
@@ -141,6 +144,7 @@ function redbasic_form(&$a, $font_size, $line_height, $colour, $shadow, $navcolo
|
||||
'$linkcolour' => array('redbasic_linkcolour', t('Display colour of links - hex value, do not include the #'), $linkcolour, '', $linkcolours),
|
||||
'$iconset' => array('redbasic_iconset', t('Icons'), $iconset, '', $iconsets),
|
||||
'$shiny' => array('redbasic_shiny', t('Shiny style'), $shiny, '', $shinys),
|
||||
'$radius' => array('redbasic_radius', t('Corner radius'), $radius, t('0-99 default: 5')),
|
||||
));}
|
||||
|
||||
if(! feature_enabled(local_user(),'expert')) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
$displaystyle = false;
|
||||
$linkcolour = false;
|
||||
$shiny = false;
|
||||
$radius = 5;
|
||||
$site_line_height = get_config("redbasic","line_height");
|
||||
$site_redbasic_font_size = get_config("redbasic", "font_size" );
|
||||
$site_colour = get_config("redbasic", "colour" );
|
||||
@@ -25,6 +26,10 @@
|
||||
$displaystyle = get_config("redbasic", "displaystyle" );
|
||||
$linkcolour = get_config("redbasic", "linkcolour" );
|
||||
$shiny = get_config("redbasic", "shiny" );
|
||||
|
||||
$x = get_config('redbasic','radius');
|
||||
if($x !== false)
|
||||
$radius = $x;
|
||||
|
||||
if (local_user()) {
|
||||
$line_height = get_pconfig(local_user(), "redbasic","line_height");
|
||||
@@ -35,6 +40,10 @@
|
||||
$displaystyle = get_pconfig(local_user(), "redbasic", "displaystyle");
|
||||
$linkcolour = get_pconfig(local_user(), "redbasic", "linkcolour");
|
||||
$shiny = get_pconfig(local_user(), "redbasic", "shiny");
|
||||
$x = get_pconfig(local_user(),'redbasic','radius');
|
||||
if($x !== false)
|
||||
$radius = $x;
|
||||
|
||||
if (! feature_enabled(local_user(),'expert')) {$colour_scheme = get_pconfig(local_user(), "redbasic", "colour_scheme");}
|
||||
}
|
||||
|
||||
@@ -70,7 +79,7 @@
|
||||
$x = str_replace("\n","",$x);
|
||||
logger('pcss compress: final size: ' . strlen($x), LOGGER_DEBUG);
|
||||
}
|
||||
echo $x;
|
||||
echo str_replace(array('$radius'),array($radius),$x);
|
||||
}
|
||||
echo "\r\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user