From dcfa26819fa0913cdea31839792ba436ad6f4e66 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 6 Mar 2015 12:15:56 +0100 Subject: add ability to use css files with schemes --- view/theme/redbasic/php/style.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 5bc702d8c..7234e926f 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -59,6 +59,10 @@ 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. @@ -441,4 +445,8 @@ if($narrow_navbar && file_exists('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; +} -- cgit v1.2.3 From 83c4c5b0950b0804a9e5777405dec9ca940fbac6 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 6 Mar 2015 14:51:11 +0100 Subject: create schema/dark.css and create a sample --- view/theme/redbasic/php/style.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 7234e926f..a71ba7793 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -149,8 +149,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) -- cgit v1.2.3 From 1cea6144c90ec7e3e2cda07af655a0af36091381 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 6 Mar 2015 14:56:35 +0100 Subject: if we have not got a schema also look for default.css --- view/theme/redbasic/php/style.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index a71ba7793..30d5f0a16 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -64,14 +64,18 @@ if(! $a->install) { } } - // 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 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'); + } + } //Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting -- cgit v1.2.3 From 488d5b871407d5be6e4c38692aa7134a1a0e9899 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 8 Mar 2015 12:07:32 +0100 Subject: port boxy scheme --- view/theme/redbasic/php/style.php | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 30d5f0a16..cc67aaecc 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -282,16 +282,6 @@ if(! $a->install) { $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) -- cgit v1.2.3 From 3298b4a0cbb93d83665c411fd4f8dac267bb006e Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Sun, 8 Mar 2015 12:56:16 +0100 Subject: remove unused variables --- view/theme/redbasic/php/style.php | 5 ----- 1 file changed, 5 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index cc67aaecc..a3234862a 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -342,7 +342,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, @@ -415,10 +414,6 @@ $options = array ( '$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, -- cgit v1.2.3 From 8cb31172a9e6de1593a45bdfaeac291db2302d4d Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 18 Mar 2015 14:41:54 +0100 Subject: make every page regard max content width setting and move the setting out of experts mode --- view/theme/redbasic/php/style.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index a3234862a..9c133313d 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -304,7 +304,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 + $converse_width); + +// prevent main_width smaller than 768px +$main_width = (($main_width < 768) ? 768 : $main_width) . 'px'; $options = array ( '$nav_bg' => $nav_bg, @@ -412,7 +417,7 @@ $options = array ( '$pmenu_reply' => $pmenu_reply, '$wwtop' => $wwtop, '$comment_indent' => $comment_indent, -'$body_width' => $body_width, +'$main_width' => $main_width, '$comment_padding' => $comment_padding, '$admintable_hoverbgcol' => $admintable_hoverbgcol, '$dirpopup_txtcol' => $dirpopup_txtcol, -- cgit v1.2.3 From 096ab06dcbc3c414ec1608788df61615767eafee Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 18 Mar 2015 16:37:33 +0100 Subject: just to be sure --- view/theme/redbasic/php/style.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 9c133313d..1a2e43e0e 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -306,7 +306,7 @@ if(! $a->install) { // left aside is 231px + converse width -$main_width = (231 + $converse_width); +$main_width = (231 + intval($converse_width)); // prevent main_width smaller than 768px $main_width = (($main_width < 768) ? 768 : $main_width) . 'px'; -- cgit v1.2.3 From 463bd146dcc5538721e1db6f7406d6363bf22bdc Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 18 Mar 2015 16:42:04 +0100 Subject: remove px from default value --- view/theme/redbasic/php/style.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 1a2e43e0e..a18812857 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -244,7 +244,7 @@ if(! $a->install) { if(! $active_colour) $active_colour = "#fff"; if (! $converse_width) { - $converse_width = "1024px"; + $converse_width = "1024"; } if (! $acl_bgcolour) $acl_bgcolour = "#fff"; -- cgit v1.2.3 From db355db9a6fe2bb369ca464391a010d992b72447 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 19 Mar 2015 15:33:15 +0100 Subject: remove $abook_changebg from style.css --- view/theme/redbasic/php/style.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index a18812857..c71c1110b 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -288,8 +288,7 @@ if(! $a->install) { $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; @@ -422,7 +421,6 @@ $options = array ( '$admintable_hoverbgcol' => $admintable_hoverbgcol, '$dirpopup_txtcol' => $dirpopup_txtcol, '$dirpopup_linkcol' => $dirpopup_linkcol, -'$abook_changebg' => $abook_changebg, ); echo str_replace(array_keys($options), array_values($options), $x); -- cgit v1.2.3 From d1dd883d8868d25e1be0a67723210b5171f3a449 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 19 Mar 2015 16:17:01 +0100 Subject: remove more $vars from style.css --- view/theme/redbasic/php/style.php | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index c71c1110b..8789e2e9b 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -262,32 +262,6 @@ if(! $a->install) { $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 (!$admintable_hoverbgcol) - $admintable_hoverbgcol="#BBC7D7"; - if (!$dirpopup_txtcol) - $dirpopup_txtcol=""; - if (!$dirpopup_linkcol) - $dirpopup_linkcol=""; if($nav_min_opacity === false || $nav_min_opacity === '') { -- cgit v1.2.3 From b3ff6da6bc9dc33abf0c0d74eccf9e9484a336d2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 19 Mar 2015 16:33:15 +0100 Subject: remove more unused $vars --- view/theme/redbasic/php/style.php | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 8789e2e9b..3c6a4f0b1 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'); @@ -376,33 +375,15 @@ $options = array ( '$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, '$main_width' => $main_width, -'$comment_padding' => $comment_padding, -'$admintable_hoverbgcol' => $admintable_hoverbgcol, -'$dirpopup_txtcol' => $dirpopup_txtcol, -'$dirpopup_linkcol' => $dirpopup_linkcol, ); 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'); } -- cgit v1.2.3 From a185b555dcc6a701662a72566ed896402c63d3d0 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 19 Mar 2015 17:20:16 +0100 Subject: there are no vars to replace in converse_center.css --- view/theme/redbasic/php/style.php | 1 - 1 file changed, 1 deletion(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 3c6a4f0b1..76fad1b18 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -388,7 +388,6 @@ 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); } -- cgit v1.2.3 From 7b05c96dc5a147631f600437217a131b914e7f23 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 20 Mar 2015 13:12:55 +0100 Subject: remove more $vars from style.css --- view/theme/redbasic/php/style.php | 49 +++------------------------------------ 1 file changed, 3 insertions(+), 46 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index 76fad1b18..c2e092d03 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -174,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) @@ -226,42 +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) { + if (! $converse_width) $converse_width = "1024"; - } - if (! $acl_bgcolour) - $acl_bgcolour = "#fff"; - if (! $acl_bordercolour) - $acl_bordercolour = "#ccc"; - if (! $aclbutton_linkcolour) - $aclbutton_linkcolour = ""; - if (! $abookself_bgcolour) - $abookself_bgcolour = "#ffdddd"; 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($nav_min_opacity === false || $nav_min_opacity === '') { $nav_float_min_opacity = 1.0; @@ -331,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, @@ -359,22 +324,14 @@ $options = array ( '$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, '$pmenu_top' => $pmenu_top, '$pmenu_reply' => $pmenu_reply, '$comment_indent' => $comment_indent, -- cgit v1.2.3 From fdac8373d84845cecadbc4bd1bb9c2a00122a05a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 20 Mar 2015 14:10:22 +0100 Subject: remove unused vars --- view/theme/redbasic/php/style.php | 2 -- 1 file changed, 2 deletions(-) (limited to 'view/theme/redbasic/php/style.php') diff --git a/view/theme/redbasic/php/style.php b/view/theme/redbasic/php/style.php index c2e092d03..a1b22f583 100644 --- a/view/theme/redbasic/php/style.php +++ b/view/theme/redbasic/php/style.php @@ -322,8 +322,6 @@ $options = array ( '$notifyseen_bghover' => $notifyseen_bghover, '$notifyseen_linkhover' => $notifyseen_linkhover, '$notify_topmargin' => $notify_topmargin, -'$input_bgsubmit' => $input_bgsubmit, -'$input_linksubmit' => $input_linksubmit, '$radius' => $radius, '$shadow' => $shadow, '$active_colour' => $active_colour, -- cgit v1.2.3