mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Continued a bit:
- converted some else if to elseif (only PHP) - converted some space -> tab (intending) Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
c2d8738285
commit
d9c22c7f3e
6 changed files with 42 additions and 30 deletions
|
@ -4,23 +4,30 @@ function duepuntozero_init(App $a) {
|
|||
|
||||
set_template_engine($a, 'smarty3');
|
||||
|
||||
$colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
|
||||
if (!$colorset)
|
||||
$colorset = get_config('duepuntozero', 'colorset'); // user setting have priority, then node settings
|
||||
if ($colorset) {
|
||||
if ($colorset == 'greenzero')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
|
||||
if ($colorset == 'purplezero')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
|
||||
if ($colorset == 'easterbunny')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
|
||||
if ($colorset == 'darkzero')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
|
||||
if ($colorset == 'comix')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
|
||||
if ($colorset == 'slackr')
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
$colorset = get_pconfig( local_user(), 'duepuntozero','colorset');
|
||||
if (!$colorset) {
|
||||
$colorset = get_config('duepuntozero', 'colorset'); // user setting have priority, then node settings
|
||||
}
|
||||
if ($colorset) {
|
||||
if ($colorset == 'greenzero') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/greenzero.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
if ($colorset == 'purplezero') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/purplezero.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
if ($colorset == 'easterbunny') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/easterbunny.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
if ($colorset == 'darkzero') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/darkzero.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
if ($colorset == 'comix') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/comix.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
if ($colorset == 'slackr') {
|
||||
$a->page['htmlhead'] .= '<link rel="stylesheet" href="view/theme/duepuntozero/deriv/slackr.css" type="text/css" media="screen" />'."\n";
|
||||
}
|
||||
}
|
||||
$a->page['htmlhead'] .= <<< EOT
|
||||
<script>
|
||||
function insertFormatting(BBcode, id) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
/**
|
||||
* A color utility that helps manipulate HEX colors
|
||||
* @todo convert space -> tab
|
||||
*/
|
||||
class Color {
|
||||
|
||||
|
@ -35,7 +36,7 @@ class Color {
|
|||
// Make sure it's 6 digits
|
||||
if ( strlen($color) === 3 ) {
|
||||
$color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2];
|
||||
} else if ( strlen($color) != 6 ) {
|
||||
} elseif ( strlen($color) != 6 ) {
|
||||
throw new Exception("HEX color needs to be 6 or 3 digits long");
|
||||
}
|
||||
|
||||
|
@ -483,7 +484,7 @@ class Color {
|
|||
// Make sure it's 6 digits
|
||||
if ( strlen($color) == 3 ) {
|
||||
$color = $color[0].$color[0].$color[1].$color[1].$color[2].$color[2];
|
||||
} else if ( strlen($color) != 6 ) {
|
||||
} elseif ( strlen($color) != 6 ) {
|
||||
throw new Exception("HEX color needs to be 6 or 3 digits long");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue