diff options
Diffstat (limited to 'view/theme/redbasic/php')
-rw-r--r-- | view/theme/redbasic/php/config.php | 13 | ||||
-rw-r--r-- | view/theme/redbasic/php/style.php | 157 | ||||
-rw-r--r-- | view/theme/redbasic/php/theme_init.php | 3 |
3 files changed, 38 insertions, 135 deletions
diff --git a/view/theme/redbasic/php/config.php b/view/theme/redbasic/php/config.php index b072f5782..8ab31efc0 100644 --- a/view/theme/redbasic/php/config.php +++ b/view/theme/redbasic/php/config.php @@ -35,7 +35,6 @@ function theme_content(&$a) { $arr['nav_min_opacity']=get_pconfig(local_channel(),"redbasic","nav_min_opacity"); $arr['top_photo']=get_pconfig(local_channel(),"redbasic","top_photo"); $arr['reply_photo']=get_pconfig(local_channel(),"redbasic","reply_photo"); - $arr['sloppy_photos']=get_pconfig(local_channel(),"redbasic","sloppy_photos"); return redbasic_form($a, $arr); } @@ -73,7 +72,6 @@ function theme_post(&$a) { set_pconfig(local_channel(), 'redbasic', 'nav_min_opacity', $_POST['redbasic_nav_min_opacity']); set_pconfig(local_channel(), 'redbasic', 'top_photo', $_POST['redbasic_top_photo']); set_pconfig(local_channel(), 'redbasic', 'reply_photo', $_POST['redbasic_reply_photo']); - set_pconfig(local_channel(), 'redbasic', 'sloppy_photos', $_POST['redbasic_sloppy_photos']); } } @@ -100,8 +98,8 @@ if(feature_enabled(local_channel(),'expert')) '$baseurl' => $a->get_baseurl(), '$expert' => $expert, '$title' => t("Theme settings"), - '$schema' => array('redbasic_schema', t('Set scheme'), $arr['schema'], '', $scheme_choices), - '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar']), + '$schema' => array('redbasic_schema', t('Select scheme'), $arr['schema'], '', $scheme_choices), + '$narrow_navbar' => array('redbasic_narrow_navbar',t('Narrow navbar'),$arr['narrow_navbar'], '', array(t('No'),t('Yes'))), '$nav_bg' => array('redbasic_nav_bg', t('Navigation bar background color'), $arr['nav_bg']), '$nav_gradient_top' => array('redbasic_nav_gradient_top', t('Navigation bar gradient top color'), $arr['nav_gradient_top']), '$nav_gradient_bottom' => array('redbasic_nav_gradient_bottom', t('Navigation bar gradient bottom color'), $arr['nav_gradient_bottom']), @@ -120,17 +118,16 @@ if(feature_enabled(local_channel(),'expert')) '$comment_indent' => array('redbasic_comment_indent', t('Set the indent for comments'), $arr['comment_indent']), '$toolicon_colour' => array('redbasic_toolicon_colour',t('Set the basic color for item icons'),$arr['toolicon_colour']), '$toolicon_activecolour' => array('redbasic_toolicon_activecolour',t('Set the hover color for item icons'),$arr['toolicon_activecolour']), - '$body_font_size' => array('redbasic_body_font_size', t('Set font-size for the entire application'), $arr['body_font_size']), + '$body_font_size' => array('redbasic_body_font_size', t('Set font-size for the entire application'), $arr['body_font_size'], t('Example: 14px')), '$font_size' => array('redbasic_font_size', t('Set font-size for posts and comments'), $arr['font_size']), '$font_colour' => array('redbasic_font_colour', t('Set font-color for posts and comments'), $arr['font_colour']), '$radius' => array('redbasic_radius', t('Set radius of corners'), $arr['radius']), '$shadow' => array('redbasic_shadow', t('Set shadow depth of photos'), $arr['shadow']), - '$converse_width' => array('redbasic_converse_width',t('Set maximum width of conversation regions'),$arr['converse_width']), - '$converse_center' => array('redbasic_converse_center',t('Center conversation regions'),$arr['converse_center']), + '$converse_width' => array('redbasic_converse_width',t('Set maximum width of content region in pixel'),$arr['converse_width'], t('Leave empty for default width')), + '$converse_center' => array('redbasic_converse_center',t('Center page content'),$arr['converse_center'], '', array(t('No'),t('Yes'))), '$nav_min_opacity' => array('redbasic_nav_min_opacity',t('Set minimum opacity of nav bar - to hide it'),$arr['nav_min_opacity']), '$top_photo' => array('redbasic_top_photo', t('Set size of conversation author photo'), $arr['top_photo']), '$reply_photo' => array('redbasic_reply_photo', t('Set size of followup author photos'), $arr['reply_photo']), - '$sloppy_photos' => array('redbasic_sloppy_photos',t('Sloppy photo albums'),$arr['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 5bc702d8c..a1b22f583 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -36,7 +36,6 @@ if(! $a->install) { $converse_width=get_pconfig($uid,"redbasic","converse_width"); $converse_center=get_pconfig($uid,"redbasic","converse_center"); $nav_min_opacity=get_pconfig($uid,'redbasic','nav_min_opacity'); - $sloppy_photos=get_pconfig($uid,'redbasic','sloppy_photos'); $top_photo=get_pconfig($uid,'redbasic','top_photo'); $reply_photo=get_pconfig($uid,'redbasic','reply_photo'); @@ -59,15 +58,23 @@ if(! $a->install) { $schemefile = 'view/theme/redbasic/schema/' . $schema . '.php'; require_once ($schemefile); } + if(file_exists('view/theme/redbasic/schema/' . $schema . '.css')) { + $schemecss = file_get_contents('view/theme/redbasic/schema/' . $schema . '.css'); + } + + } + + // 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/redbasic/schema/default.php')) { + $schemefile = 'view/theme/redbasic/schema/default.php'; + require_once ($schemefile); + } + if(file_exists('view/theme/redbasic/schema/default.css')) { + $schemecss = file_get_contents('view/theme/redbasic/schema/default.css'); + } } - // 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/redbasic/schema/default.php')) { - $schemefile = 'view/theme/redbasic/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 @@ -145,8 +152,6 @@ if(! $a->install) { $selected_active_colour = "#444"; if (! $selected_active_deco) $selected_active_deco = "none"; - if (! $widget_brdrcolour) - $widget_brdrcolour = "rgba(238,238,238,0.8)"; if (! $blockquote_colour) $blockquote_colour = "#4d4d4d"; if (! $blockquote_bgcolour) @@ -169,16 +174,6 @@ if(! $a->install) { $notif_itemcolour = "#000"; if (! $notif_itemhovercolour) $notif_itemhovercolour = "#000"; - if (! $editbuttons_bgcolour) - $editbuttons_bgcolour = "transparent"; - if (! $editbuttons_bordercolour) - $editbuttons_bordercolour = "#ccc"; - if (! $editbuttons_bordercolourhover) - $editbuttons_bordercolourhover = "#adadad"; - if (! $editbuttons_colour) - $editbuttons_colour = "#333"; - if (! $editbuttons_bghover) - $editbuttons_bghover = "#ebebeb"; if (! $dropdown_bgcolour) $dropdown_bgcolour = "#FFF"; if (! $dropdown_textcolour) @@ -221,79 +216,22 @@ if(! $a->install) { $notifyseen_linkhover = "#333"; if (! $notify_topmargin) $notify_topmargin = "1px"; - if (! $input_bgsubmit) - $input_bgsubmit = "#F0F0F0"; - if (! $input_linksubmit) - $input_linksubmit = "#0080FF"; - if (! $input_border) - $input_border = "#ccc"; - if (! $input_colourhover) - $input_colourhover = "#333"; - if (! $input_decohover) - $input_decohover = "none"; + + if (! $radius) $radius = "4"; if (! $shadow) $shadow = "0"; if(! $active_colour) $active_colour = "#fff"; - if (! $converse_width) { - $converse_width = "1024px"; - } - if (! $acl_bgcolour) - $acl_bgcolour = "#fff"; - if (! $acl_bordercolour) - $acl_bordercolour = "#ccc"; - if (! $aclbutton_linkcolour) - $aclbutton_linkcolour = ""; - if (! $abookself_bgcolour) - $abookself_bgcolour = "#ffdddd"; + if (! $converse_width) + $converse_width = "1024"; if(! $top_photo) $top_photo = '48px'; if(! $comment_indent) $comment_indent = '0px'; if(! $reply_photo) $reply_photo = '32px'; - if(! $infomess_bgcolour) - $infomess_bgcolour = "#F0F0F0"; - if(! $alert_txtcolour) - $alert_txtcolour = "#31708F"; - if(! $alert_bgcolour) - $alert_bgcolour = "#D9EDF7"; - if(! $alert_bordercol) - $alert_bordercol = "#BCE8F1"; - if(! $alert_gradientcol) - $alert_gradientcol = "#B9DEF0"; - if(! $advperm_bgcolour) - $advperm_bgcolour = "#F5F5F5"; - if(! $advperm_bordercol) - $advperm_bordercol = "#E3E3E3"; - if(! $advperm_gradientcol) - $advperm_gradientcol = "#E8E8E8"; - if(! $cal_bgcolour) - $cal_bgcolour = "#FCF8E3"; - if(! $chat_txtbgcol) - $chat_txtbgcol = "#EEE"; - if(! $fancybox_bgcolour) - $fancybox_bgcolour = "#FFFFFF"; - if (!$comment_padding) - $comment_padding="0px"; - if (!$comment_border_left) - $comment_border_left="3px solid"; - if (!$comment_border_right) - $comment_border_right="0px solid"; - if (!$comment_border_top) - $comment_border_top="0px solid"; - if (!$comment_border_bottom) - $comment_border_bottom="0px solid"; - if (!$admintable_hoverbgcol) - $admintable_hoverbgcol="#BBC7D7"; - if (!$dirpopup_txtcol) - $dirpopup_txtcol=""; - if (!$dirpopup_linkcol) - $dirpopup_linkcol=""; - if (!$abook_changebg) - $abook_changebg="orange"; if($nav_min_opacity === false || $nav_min_opacity === '') { $nav_float_min_opacity = 1.0; @@ -308,7 +246,12 @@ if(! $a->install) { if(file_exists('view/theme/redbasic/css/style.css')) { $x = file_get_contents('view/theme/redbasic/css/style.css'); -$body_width = (231 + $converse_width) . 'px'; // aside is 231px + converse width; have to find a way for calculation with 'px', cannot handle '%' + +// left aside is 231px + converse width +$main_width = (231 + intval($converse_width)); + +// prevent main_width smaller than 768px +$main_width = (($main_width < 768) ? 768 : $main_width) . 'px'; $options = array ( '$nav_bg' => $nav_bg, @@ -346,7 +289,6 @@ $options = array ( '$selected_active_colour' => $selected_active_colour, '$selected_active_deco' => $selected_active_deco, '$body_font_size' => $body_font_size, -'$widget_brdrcolour' => $widget_brdrcolour, '$blockquote_colour' => $blockquote_colour, '$blockquote_bgcolour' => $blockquote_bgcolour, '$blockquote_bordercolour' => $blockquote_bordercolour, @@ -359,11 +301,6 @@ $options = array ( '$pre_txtcolour' => $pre_txtcolour, '$notif_itemcolour' => $notif_itemcolour, '$notif_itemhovercolour' => $notif_itemhovercolour, -'$editbuttons_bgcolour' => $editbuttons_bgcolour, -'$editbuttons_bordercolour' => $editbuttons_bordercolour, -'$editbuttons_bordercolourhover' => $editbuttons_bordercolourhover, -'$editbuttons_colour' => $editbuttons_colour, -'$editbuttons_bghover' => $editbuttons_bghover, '$dropdown_bgcolour' => $dropdown_bgcolour, '$dropdown_textcolour' => $dropdown_textcolour, '$dropdown_txtcolhover' => $dropdown_txtcolhover, @@ -385,60 +322,30 @@ $options = array ( '$notifyseen_bghover' => $notifyseen_bghover, '$notifyseen_linkhover' => $notifyseen_linkhover, '$notify_topmargin' => $notify_topmargin, -'$input_bgsubmit' => $input_bgsubmit, -'$input_linksubmit' => $input_linksubmit, -'$input_border' => $input_border, -'$input_colourhover' => $input_colourhover, -'$input_decohover' => $input_decohover, '$radius' => $radius, '$shadow' => $shadow, '$active_colour' => $active_colour, '$converse_width' => $converse_width, -'$acl_bgcolour' => $acl_bgcolour, -'$acl_bordercolour' => $acl_bordercolour, -'$aclbutton_linkcolour' => $aclbutton_linkcolour, -'$abookself_bgcolour' => $abookself_bgcolour, '$nav_float_min_opacity' => $nav_float_min_opacity, '$nav_percent_min_opacity' => $nav_percent_min_opacity, '$top_photo' => $top_photo, '$reply_photo' => $reply_photo, -'$infomess_bgcolour' => $infomess_bgcolour, -'$alert_txtcolour' => $alert_txtcolour, -'$alert_bgcolour' => $alert_bgcolour, -'$alert_bordercol' => $alert_bordercol, -'$alert_gradientcol' => $alert_gradientcol, -'$advperm_bgcolour' => $advperm_bgcolour, -'$advperm_bordercol' => $advperm_bordercol, -'$advperm_gradientcol' => $advperm_gradientcol, -'$cal_bgcolour' => $cal_bgcolour, -'$chat_txtbgcol' => $chat_txtbgcol, -'$fancybox_bgcolour' => $fancybox_bgcolour, '$pmenu_top' => $pmenu_top, '$pmenu_reply' => $pmenu_reply, -'$wwtop' => $wwtop, '$comment_indent' => $comment_indent, -'$body_width' => $body_width, -'$comment_padding' => $comment_padding, -'$comment_border_left' => $comment_border_left, -'$comment_border_right' => $comment_border_right, -'$comment_border_top' => $comment_border_top, -'$comment_border_bottom' => $comment_border_bottom, -'$admintable_hoverbgcol' => $admintable_hoverbgcol, -'$dirpopup_txtcol' => $dirpopup_txtcol, -'$dirpopup_linkcol' => $dirpopup_linkcol, -'$abook_changebg' => $abook_changebg, +'$main_width' => $main_width, ); 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'); -} if($narrow_navbar && file_exists('view/theme/redbasic/css/narrow_navbar.css')) { echo file_get_contents('view/theme/redbasic/css/narrow_navbar.css'); } if($converse_center && file_exists('view/theme/redbasic/css/converse_center.css')) { - $x = file_get_contents('view/theme/redbasic/css/converse_center.css'); echo str_replace(array_keys($options), array_values($options), $x); -} +} + +if($schemecss) { + echo $schemecss; +} diff --git a/view/theme/redbasic/php/theme_init.php b/view/theme/redbasic/php/theme_init.php index dd4542e8a..498d1ee15 100644 --- a/view/theme/redbasic/php/theme_init.php +++ b/view/theme/redbasic/php/theme_init.php @@ -1,7 +1,6 @@ <?php head_add_css('library/font_awesome/css/font-awesome.min.css'); -head_add_css('library/bootstrap/css/bootstrap-theme.min.css'); head_add_css('library/bootstrap/css/bootstrap.min.css'); head_add_css('view/css/bootstrap-red.css'); head_add_css('library/datetimepicker/jquery.datetimepicker.css'); @@ -10,7 +9,7 @@ head_add_css('library/bootstrap-colorpicker/dist/css/bootstrap-colorpicker.min.c require_once('view/php/theme_init.php'); head_add_js('library/bootstrap/js/bootstrap.min.js'); -head_add_js('library/bootstrap/js/bootbox.min.js'); +head_add_js('library/bootbox/bootbox.min.js'); head_add_js('library/datetimepicker/jquery.datetimepicker.js'); //head_add_js('library/colorpicker/js/colorpicker.js'); head_add_js('library/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js'); |