aboutsummaryrefslogtreecommitdiffstats
path: root/view/theme/redbasic/php
diff options
context:
space:
mode:
Diffstat (limited to 'view/theme/redbasic/php')
-rw-r--r--view/theme/redbasic/php/config.php9
-rw-r--r--view/theme/redbasic/php/style.php7
2 files changed, 12 insertions, 4 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php
index dc79b654f..0007d8c24 100644
--- a/view/theme/redbasic/php/config.php
+++ b/view/theme/redbasic/php/config.php
@@ -15,8 +15,9 @@ function theme_content(&$a) {
$shadow = get_pconfig(local_user(),'redbasic', 'photo_shadow' );
$section_width=get_pconfig(local_user(),"redbasic","section_width");
$nav_min_opacity=get_pconfig(local_user(),"redbasic","nav_min_opacity");
+ $sloppy_photos=get_pconfig(local_user(),"redbasic","sloppy_photos");
return redbasic_form($a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity);
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos);
}
function theme_post(&$a) {
@@ -35,13 +36,14 @@ function theme_post(&$a) {
set_pconfig(local_user(), 'redbasic', 'photo_shadow', $_POST['redbasic_shadow']);
set_pconfig(local_user(), 'redbasic', 'section_width', $_POST['redbasic_section_width']);
set_pconfig(local_user(), 'redbasic', 'nav_min_opacity', $_POST['redbasic_nav_min_opacity']);
+ set_pconfig(local_user(), 'redbasic', 'sloppy_photos', $_POST['redbasic_sloppy_photos']);
}
}
// FIXME - this really should be an array
function redbasic_form(&$a, $schema, $nav_colour, $bgcolour, $background_image, $item_colour, $item_opacity,
- $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity) {
+ $font_size, $font_colour, $radius, $shadow, $section_width,$nav_min_opacity,$sloppy_photos) {
$scheme_choices = array();
$scheme_choices["---"] = t("Default");
@@ -82,7 +84,8 @@ if(feature_enabled(local_user(),'expert'))
'$radius' => array('redbasic_radius', t('Set radius of corners'), $radius),
'$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $shadow),
'$section_width' => array('redbasic_section_width',t('Set width of main section'),$section_width),
- '$nav_min_opacity' => array('nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$nav_min_opacity),
+ '$nav_min_opacity' => array('redbasic_nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$nav_min_opacity),
+ '$sloppy_photos' => array('redbasic_sloppy_photos',t('Sloppy photo albums'),$sloppy_photos,t('Are you a clean desk or a messy desk person?')),
));
return $o;
diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php
index 88bd660c9..56df0f4f2 100644
--- a/view/theme/redbasic/php/style.php
+++ b/view/theme/redbasic/php/style.php
@@ -23,6 +23,7 @@
$shadow = get_pconfig($uid,"redbasic","photo_shadow");
$section_width=get_pconfig($uid,"redbasic","section_width");
$nav_min_opacity=get_pconfig($uid,'redbasic','nav_min_opacity');
+ $sloppy_photos=get_pconfig($uid,'redbasic','sloppy_photos');
// 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
@@ -73,7 +74,7 @@
$active_colour = '#FFFFFF';
if (! $section_width)
$section_width="72%";
- if($nav_min_opacity === false) {
+ if($nav_min_opacity === false || $nav_min_opacity === '') {
$nav_float_min_opacity = 1.0;
$nav_percent_min_opacity = 100;
}
@@ -133,3 +134,7 @@ $options = array (
echo str_replace(array_keys($options), array_values($options), $x);
}
+
+if($sloppy_photos && file_exists('view/theme/redbasic/css/sloppy_photos.css')) {
+ echo file_get_contents('view/theme/redbasic/css/sloppy_photos.css');
+} \ No newline at end of file