mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Merge pull request #1715 from rabuzarus/theme_uid
use local theme settings for visitors
This commit is contained in:
commit
5a23bd400c
8 changed files with 161 additions and 80 deletions
30
view/theme/vier/style.php
Normal file
30
view/theme/vier/style.php
Normal file
|
@ -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;
|
||||
|
||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue