Browse Source

make supported themes compatible with get_theme_uid

pull/1715/head
rabuzarus 7 years ago
parent
commit
36abf624d8
  1. 20
      view/theme/duepuntozero/style.php
  2. 14
      view/theme/quattro/style.php
  3. 30
      view/theme/vier/style.php
  4. 19
      view/theme/vier/theme.php

20
view/theme/duepuntozero/style.php

@ -2,10 +2,28 @@
if (file_exists("$THEMEPATH/style.css")){
echo file_get_contents("$THEMEPATH/style.css");
}
$uid = get_theme_uid();
$s_colorset = get_config('duepuntozero','colorset');
$uid = local_user();
$colorset = get_pconfig( $uid, 'duepuntozero', 'colorset');
if (!x($colorset))
$colorset = $s_colorset;
if ($colorset) {
if ($colorset == 'greenzero')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/greenzero.css');
if ($colorset == 'purplezero')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/purplezero.css');
if ($colorset == 'easterbunny')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/easterbunny.css');
if ($colorset == 'darkzero')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/darkzero.css');
if ($colorset == 'comix')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/comix.css');
if ($colorset == 'slackr')
$setcss = file_get_contents('view/theme/duepuntozero/deriv/slackr.css');
}
echo $setcss;
?>

14
view/theme/quattro/style.php

@ -1,12 +1,14 @@
<?php
$uid = get_theme_uid();
$color=false;
$quattro_align=false;
$site_color = get_config("quattro","color");
$site_quattro_align = get_config("quattro", "align" );
if (local_user()) {
$color = get_pconfig(local_user(), "quattro","color");
$quattro_align = get_pconfig(local_user(), 'quattro', 'align' );
if ($uid) {
$color = get_pconfig( $uid, "quattro","color");
$quattro_align = get_pconfig( $uid, 'quattro', 'align' );
}
if ($color===false) $color=$site_color;
@ -39,9 +41,9 @@
if ($site_textarea_font_size===false) $site_textarea_font_size="20";
if ($site_post_font_size===false) $site_post_font_size="12";
if (local_user()) {
$textarea_font_size = get_pconfig(local_user(), "quattro","tfs");
$post_font_size = get_pconfig(local_user(), "quattro","pfs");
if ($uid) {
$textarea_font_size = get_pconfig( $uid, "quattro","tfs");
$post_font_size = get_pconfig( $uid, "quattro","pfs");
}
if ($textarea_font_size===false) $textarea_font_size = $site_textarea_font_size;

30
view/theme/vier/style.php

@ -0,0 +1,30 @@
<?php
if (file_exists("$THEMEPATH//style.css")){
echo file_get_contents("$THEMEPATH//style.css");
}
$uid = get_theme_uid();
$style = get_pconfig( $uid, 'vier', 'style');
if ($style == "")
$style = get_config('vier', 'style');
if ($style == "")
$style = "plus";
if ($style == "flat")
$stylecss = file_get_contents('view/theme/vier/flat.css');
else if ($style == "netcolour")
$stylecss = file_get_contents('view/theme/vier/netcolour.css');
else if ($style == "breathe")
$stylecss = file_get_contents('view/theme/vier/breathe.css');
else if ($style == "plus")
$stylecss = file_get_contents('view/theme/vier/plus.css');
else if ($style == "dark")
$stylecss = file_get_contents('view/theme/vier/dark.css');
echo $stylecss;

19
view/theme/vier/theme.php

@ -16,25 +16,6 @@ $baseurl = $a->get_baseurl();
$a->theme_info = array();
$style = get_pconfig(local_user(), 'vier', 'style');
if ($style == "")
$style = get_config('vier', 'style');
if ($style == "")
$style = "plus";
if ($style == "flat")
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/flat.css" type="text/css" media="screen"/>'."\n";
else if ($style == "netcolour")
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/netcolour.css" type="text/css" media="screen"/>'."\n";
else if ($style == "breathe")
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/breathe.css" type="text/css" media="screen"/>'."\n";
else if ($style == "plus")
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/plus.css" type="text/css" media="screen"/>'."\n";
else if ($style == "dark")
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/vier/dark.css" type="text/css" media="screen"/>'."\n";
$a->page['htmlhead'] .= <<< EOT
<script type="text/javascript">

Loading…
Cancel
Save