hubzilla 8
This commit is contained in:
@@ -11,20 +11,19 @@ if(! App::$install) {
|
||||
|
||||
// Load the owners pconfig
|
||||
$nav_bg = get_pconfig($uid, 'ussrbasicpub', 'nav_bg');
|
||||
$nav_icon_colour = get_pconfig($uid, 'ussrbasicpub', 'nav_icon_colour');
|
||||
$nav_active_icon_colour = get_pconfig($uid, 'ussrbasicpub', 'nav_active_icon_colour');
|
||||
$banner_colour = get_pconfig($uid,'ussrbasicpub','banner_colour');
|
||||
$nav_bg_dark = get_pconfig($uid, 'ussrbasicpub', 'nav_bg_dark');
|
||||
$narrow_navbar = get_pconfig($uid,'ussrbasicpub','narrow_navbar');
|
||||
$link_colour = get_pconfig($uid, 'ussrbasicpub', 'link_colour');
|
||||
$link_color = get_pconfig($uid, 'ussrbasicpub', 'link_color');
|
||||
$link_color_dark = get_pconfig($uid, 'ussrbasicpub', 'link_color_dark');
|
||||
$link_hover_color = get_pconfig($uid, 'ussrbasicpub', 'link_hover_color');
|
||||
$link_hover_color_dark = get_pconfig($uid, 'ussrbasicpub', 'link_hover_color_dark');
|
||||
$bgcolor = get_pconfig($uid, 'ussrbasicpub', 'background_color');
|
||||
$bgcolor_dark = get_pconfig($uid, 'ussrbasicpub', 'background_color_dark');
|
||||
$schema = get_pconfig($uid,'ussrbasicpub','schema');
|
||||
$bgcolour = get_pconfig($uid, 'ussrbasicpub', 'background_colour');
|
||||
$background_image = get_pconfig($uid, 'ussrbasicpub', 'background_image');
|
||||
$item_colour = get_pconfig($uid, 'ussrbasicpub', 'item_colour');
|
||||
$comment_item_colour = get_pconfig($uid, 'ussrbasicpub', 'comment_item_colour');
|
||||
$background_image_dark = get_pconfig($uid, 'ussrbasicpub', 'background_image_dark');
|
||||
$font_size = get_pconfig($uid, 'ussrbasicpub', 'font_size');
|
||||
$font_colour = get_pconfig($uid, 'ussrbasicpub', 'font_colour');
|
||||
$radius = get_pconfig($uid, 'ussrbasicpub', 'radius');
|
||||
$shadow = get_pconfig($uid,'ussrbasicpub','photo_shadow');
|
||||
$converse_width=get_pconfig($uid,'ussrbasicpub','converse_width');
|
||||
$top_photo=get_pconfig($uid,'ussrbasicpub','top_photo');
|
||||
$reply_photo=get_pconfig($uid,'ussrbasicpub','reply_photo');
|
||||
@@ -63,6 +62,7 @@ if ((!$schema) || ($schema == '---')) {
|
||||
require_once ($schemefile);
|
||||
}
|
||||
|
||||
$schemecss = '';
|
||||
if(file_exists('view/theme/ussrbasicpub/schema/default.css')) {
|
||||
$schemecss = file_get_contents('view/theme/ussrbasicpub/schema/default.css');
|
||||
}
|
||||
@@ -72,37 +72,47 @@ if ((!$schema) || ($schema == '---')) {
|
||||
//Set some defaults - we have to do this after pulling owner settings, and we have to check for each setting
|
||||
//individually. If we don't, we'll have problems if a user has set one, but not all options.
|
||||
if (! $nav_bg)
|
||||
$nav_bg = '#343a40';
|
||||
if (! $nav_icon_colour)
|
||||
$nav_icon_colour = 'rgba(255, 255, 255, 0.55)';
|
||||
if (! $nav_active_icon_colour)
|
||||
$nav_active_icon_colour = 'rgba(255, 255, 255, 0.75)';
|
||||
if (! $link_colour)
|
||||
$link_colour = '#0d6efd';
|
||||
if (! $banner_colour)
|
||||
$banner_colour = '#fff';
|
||||
if (! $bgcolour)
|
||||
$bgcolour = 'rgb(254,254,254)';
|
||||
$nav_bg = 'rgba(248, 249, 250, 1)';
|
||||
|
||||
if (! $nav_bg_dark)
|
||||
$nav_bg_dark = 'rgba(43, 48, 53, 1)';
|
||||
|
||||
if (! $link_color)
|
||||
$link_color = '#0d6efd';
|
||||
|
||||
if (! $link_color_dark)
|
||||
$link_color_dark = '#6ea8fe';
|
||||
|
||||
if (! $link_hover_color)
|
||||
$link_hover_color = '#0a58ca';
|
||||
|
||||
if (! $link_hover_color_dark)
|
||||
$link_hover_color_dark = '#9ec5fe';
|
||||
|
||||
if (! $bgcolor)
|
||||
$bgcolor = '#fff';
|
||||
|
||||
if (! $bgcolor_dark)
|
||||
$bgcolor_dark = '#212529';
|
||||
|
||||
if (! $background_image)
|
||||
$background_image ='';
|
||||
if (! $item_colour)
|
||||
$item_colour = 'rgb(238,238,238)';
|
||||
if (! $comment_item_colour)
|
||||
$comment_item_colour = 'rgb(255,255,255)';
|
||||
if (! $item_opacity)
|
||||
$item_opacity = '1';
|
||||
$background_image = '';
|
||||
|
||||
if (! $background_image_dark)
|
||||
$background_image_dark = '';
|
||||
|
||||
if (! $font_size)
|
||||
$font_size = '0.875rem';
|
||||
if (! $font_colour)
|
||||
$font_colour = '#4d4d4d';
|
||||
|
||||
if (! $radius)
|
||||
$radius = '0.25rem';
|
||||
if (! $shadow)
|
||||
$shadow = '0';
|
||||
$radius = '0.375rem';
|
||||
|
||||
if (! $converse_width)
|
||||
$converse_width = '52'; //unit: rem
|
||||
|
||||
if(! $top_photo)
|
||||
$top_photo = '2.3rem';
|
||||
|
||||
if(! $reply_photo)
|
||||
$reply_photo = '2.3rem';
|
||||
|
||||
@@ -111,10 +121,6 @@ if(file_exists('view/theme/ussrbasicpub/css/style.css')) {
|
||||
|
||||
$x = file_get_contents('view/theme/ussrbasicpub/css/style.css');
|
||||
|
||||
if($schema === 'dark' && file_exists('view/theme/ussrbasicpub/schema/bootstrap-nightfall.css')) {
|
||||
$x .= file_get_contents('view/theme/ussrbasicpub/schema/bootstrap-nightfall.css');
|
||||
}
|
||||
|
||||
if($narrow_navbar && file_exists('view/theme/ussrbasicpub/css/narrow_navbar.css')) {
|
||||
$x .= file_get_contents('view/theme/ussrbasicpub/css/narrow_navbar.css');
|
||||
}
|
||||
@@ -133,31 +139,26 @@ if(file_exists('view/theme/ussrbasicpub/css/style.css')) {
|
||||
|
||||
$options = array (
|
||||
'$nav_bg' => $nav_bg,
|
||||
'$nav_icon_colour' => $nav_icon_colour,
|
||||
'$nav_active_icon_colour' => $nav_active_icon_colour,
|
||||
'$link_colour' => $link_colour,
|
||||
'$banner_colour' => $banner_colour,
|
||||
'$bgcolour' => $bgcolour,
|
||||
'$nav_bg_dark' => $nav_bg_dark,
|
||||
'$link_color' => $link_color,
|
||||
'$link_color_dark' => $link_color_dark,
|
||||
'$link_hover_color' => $link_hover_color,
|
||||
'$link_hover_color_dark' => $link_hover_color_dark,
|
||||
'$bgcolor' => $bgcolor,
|
||||
'$bgcolor_dark' => $bgcolor_dark,
|
||||
'$background_image' => $background_image,
|
||||
'$item_colour' => $item_colour,
|
||||
'$comment_item_colour' => $comment_item_colour,
|
||||
'$background_image_dark' => $background_image_dark,
|
||||
'$font_size' => $font_size,
|
||||
'$font_colour' => $font_colour,
|
||||
'$radius' => $radius,
|
||||
'$shadow' => $shadow,
|
||||
'$converse_width' => $converse_width,
|
||||
'$nav_float_min_opacity' => $nav_float_min_opacity,
|
||||
'$nav_percent_min_opacity' => $nav_percent_min_opacity,
|
||||
'$top_photo' => $top_photo,
|
||||
'$reply_photo' => $reply_photo,
|
||||
'$pmenu_top' => $pmenu_top,
|
||||
'$pmenu_reply' => $pmenu_reply,
|
||||
'$main_width' => $main_width,
|
||||
'$left_aside_width' => $left_aside_width,
|
||||
'$right_aside_width' => $right_aside_width
|
||||
);
|
||||
|
||||
echo str_replace(array_keys($options), array_values($options), $x);
|
||||
echo strtr($x, $options);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user