**Theme - Settings**

-**Red schema**
-
+**Red scheme**
+
-**Love Music schema**
-
+**Love Music scheme**
+
**frio on mobile**
}
if (isset($_POST['frio-settings-submit'])) {
- PConfig::set(local_user(), 'frio', 'schema', $_POST['frio_schema']);
+ PConfig::set(local_user(), 'frio', 'scheme', $_POST['frio_scheme']);
PConfig::set(local_user(), 'frio', 'nav_bg', $_POST['frio_nav_bg']);
PConfig::set(local_user(), 'frio', 'nav_icon_color', $_POST['frio_nav_icon_color']);
PConfig::set(local_user(), 'frio', 'link_color', $_POST['frio_link_color']);
}
if (isset($_POST['frio-settings-submit'])) {
- Config::set('frio', 'schema', $_POST['frio_schema']);
+ Config::set('frio', 'scheme', $_POST['frio_scheme']);
Config::set('frio', 'nav_bg', $_POST['frio_nav_bg']);
Config::set('frio', 'nav_icon_color', $_POST['frio_nav_icon_color']);
Config::set('frio', 'link_color', $_POST['frio_link_color']);
}
$arr = [];
- $arr['schema'] = PConfig::get(local_user(), 'frio', 'schema');
+ $arr['scheme'] = PConfig::get(local_user(), 'frio', 'scheme');
$arr['nav_bg'] = PConfig::get(local_user(), 'frio', 'nav_bg');
$arr['nav_icon_color'] = PConfig::get(local_user(), 'frio', 'nav_icon_color');
$arr['link_color'] = PConfig::get(local_user(), 'frio', 'link_color');
}
$arr = [];
- $arr['schema'] = Config::get('frio', 'schema');
+ $arr['scheme'] = Config::get('frio', 'scheme');
$arr['nav_bg'] = Config::get('frio', 'nav_bg');
$arr['nav_icon_color'] = Config::get('frio', 'nav_icon_color');
$arr['link_color'] = Config::get('frio', 'link_color');
function frio_form($arr)
{
- require_once 'view/theme/frio/php/schema.php';
+ require_once 'view/theme/frio/php/scheme.php';
- $scheme_info = get_schema_info($arr['schema']);
+ $scheme_info = get_scheme_info($arr['scheme']);
$disable = $scheme_info['overwrites'];
if (!is_array($disable)) {
$disable = [];
$scheme_choices = [];
$scheme_choices['---'] = L10n::t('Default');
- $files = glob('view/theme/frio/schema/*.php');
+ $files = glob('view/theme/frio/scheme/*.php');
if ($files) {
foreach ($files as $file) {
$f = basename($file, '.php');
'$submit' => L10n::t('Submit'),
'$baseurl' => System::baseUrl(),
'$title' => L10n::t('Theme settings'),
- '$schema' => ['frio_schema', L10n::t('Select scheme'), $arr['schema'], '', $scheme_choices],
+ '$scheme' => ['frio_scheme', L10n::t('Select scheme'), $arr['scheme'], '', $scheme_choices],
'$nav_bg' => array_key_exists('nav_bg', $disable) ? '' : ['frio_nav_bg', L10n::t('Navigation bar background color'), $arr['nav_bg'], '', false],
'$nav_icon_color' => array_key_exists('nav_icon_color', $disable) ? '' : ['frio_nav_icon_color', L10n::t('Navigation bar icon color '), $arr['nav_icon_color'], '', false],
'$link_color' => array_key_exists('link_color', $disable) ? '' : ['frio_link_color', L10n::t('Link color'), $arr['link_color'], '', false],
if (is_null($uid)) {
$uid = Profile::getThemeUid();
}
- $schema = PConfig::get($uid, 'frio', 'schema');
- if (($schema) && ($schema != '---')) {
- if (file_exists('view/theme/frio/schema/' . $schema . '.php')) {
- $schemefile = 'view/theme/frio/schema/' . $schema . '.php';
+ $scheme = PConfig::get($uid, 'frio', 'scheme');
+ if (($scheme) && ($scheme != '---')) {
+ if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
+ $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
require_once $schemefile;
}
} else {
+++ /dev/null
-<?php
-
-/**
- * @brief: Get info header of the shema
- *
- * This function parses the header of the shemename.php file for inormations like
- * Author, Description and Overwrites. Most of the code comes from the Addon::getInfo()
- * function. We use this to get the variables which get overwritten through the shema.
- * All color variables which get overwritten through the theme have to be
- * listed (comma seperated) in the shema header under Overwrites:
- * This seemst not to be the best solution. We need to investigate further.
- *
- * @param string $schema Name of the shema
- * @return array With theme information
- * 'author' => Author Name
- * 'description' => Schema description
- * 'version' => Schema version
- * 'overwrites' => Variables which overwriting custom settings
- */
-use Friendica\Core\PConfig;
-
-function get_schema_info($schema)
-{
- $theme = current_theme();
- $themepath = 'view/theme/' . $theme . '/';
- $schema = PConfig::get(local_user(), 'frio', 'schema');
-
- $info = [
- 'name' => $schema,
- 'description' => '',
- 'author' => [],
- 'version' => '',
- 'overwrites' => []
- ];
-
- if (!is_file($themepath . 'schema/' . $schema . '.php')) return $info;
-
- $f = file_get_contents($themepath . 'schema/' . $schema . '.php');
-
- $r = preg_match('|/\*.*\*/|msU', $f, $m);
-
- if ($r) {
- $ll = explode("\n", $m[0]);
- foreach ($ll as $l) {
- $l = trim($l, "\t\n\r */");
- if ($l != '') {
- list($k, $v) = array_map('trim', explode(':', $l, 2));
- $k = strtolower($k);
- if ($k == 'author') {
- $r = preg_match('|([^<]+)<([^>]+)>|', $v, $m);
- if ($r) {
- $info['author'][] = ['name' => $m[1], 'link' => $m[2]];
- } else {
- $info['author'][] = ['name' => $v];
- }
- } elseif ($k == 'overwrites') {
- $theme_settings = explode(',', str_replace(' ', '', $v));
- foreach ($theme_settings as $key => $value) {
- $info['overwrites'][$value] = true;
- }
- } else {
- if (array_key_exists($k, $info)) {
- $info[$k] = $v;
- }
- }
- }
- }
- }
-
- return $info;
-}
--- /dev/null
+<?php
+
+/**
+ * @brief: Get info header of the scheme
+ *
+ * This function parses the header of the schemename.php file for informations like
+ * Author, Description and Overwrites. Most of the code comes from the Addon::getInfo()
+ * function. We use this to get the variables which get overwritten through the scheme.
+ * All color variables which get overwritten through the theme have to be
+ * listed (comma separated) in the scheme header under Overwrites:
+ * This seems not to be the best solution. We need to investigate further.
+ *
+ * @param string $scheme Name of the scheme
+ * @return array With theme information
+ * 'author' => Author Name
+ * 'description' => Scheme description
+ * 'version' => Scheme version
+ * 'overwrites' => Variables which overwriting custom settings
+ */
+use Friendica\Core\PConfig;
+
+function get_scheme_info($scheme)
+{
+ $theme = current_theme();
+ $themepath = 'view/theme/' . $theme . '/';
+ $scheme = PConfig::get(local_user(), 'frio', 'scheme');
+
+ $info = [
+ 'name' => $scheme,
+ 'description' => '',
+ 'author' => [],
+ 'version' => '',
+ 'overwrites' => []
+ ];
+
+ if (!is_file($themepath . 'scheme/' . $scheme . '.php')) return $info;
+
+ $f = file_get_contents($themepath . 'scheme/' . $scheme . '.php');
+
+ $r = preg_match('|/\*.*\*/|msU', $f, $m);
+
+ if ($r) {
+ $ll = explode("\n", $m[0]);
+ foreach ($ll as $l) {
+ $l = trim($l, "\t\n\r */");
+ if ($l != '') {
+ list($k, $v) = array_map('trim', explode(':', $l, 2));
+ $k = strtolower($k);
+ if ($k == 'author') {
+ $r = preg_match('|([^<]+)<([^>]+)>|', $v, $m);
+ if ($r) {
+ $info['author'][] = ['name' => $m[1], 'link' => $m[2]];
+ } else {
+ $info['author'][] = ['name' => $v];
+ }
+ } elseif ($k == 'overwrites') {
+ $theme_settings = explode(',', str_replace(' ', '', $v));
+ foreach ($theme_settings as $key => $value) {
+ $info['overwrites'][$value] = true;
+ }
+ } else {
+ if (array_key_exists($k, $info)) {
+ $info[$k] = $v;
+ }
+ }
+ }
+ }
+ }
+
+ return $info;
+}
+++ /dev/null
-/*
- Licence : AGPL
-
- Created on : 28.03.2016, 03:13:19
- Author : rabuzarus
-*/
-
-body {
- color: #000;
-}
-
-/*
- * Navbar
- */
-#topbar-first,
-nav.navbar {
- box-shadow: 0 -1px 5px 2px #000;
-}
-#topbar-first .nav>li>a:hover,
-nav.navbar .nav>li>a:hover {
- background-color: #000;
- color: #15e3ff;
-}
-#topbar-first .nav>li>a.selected {
- background: #e355e0;
- color: #000;
- padding: 9px;
- border-radius: 8px;
-}
-#topbar-first #nav-notifications-menu li.notif-entry:hover,
-#topbar-second .nav>li>ul>li>a:hover,
-#topbar-second .nav>li>ul>li>a.active,
-#topbar-second .nav>li>a:hover,
-#topbar-second .nav .open>a,
-#topbar-second .nav>li.active,
-.nav-pills .dropdown-menu li:hover,
-.nav-tabs .dropdown-menu li:hover,
-.account .dropdown-menu li:hover,
-.contact-photo-wrapper .dropdown-menu li:hover,
-.nav-pills .dropdown-menu li.selected,
-.nav-tabs .dropdown-menu li.selected,
-.account .dropdown-menu li.selected,
-.contact-photo-wrapper .dropdown-menu li.selected,
-aside .widget li:hover,
-aside .widget li.selected,
-.nav-container .widget li:hover {
- border-left:3px solid #15e3ff !important;
-}
-
-.panel,
-aside .widget,
-.nav-container .widget,
-#profile-page, .photos-content-wrapper,
-.settings-content-wrapper {
- border-style: solid solid solid solid;
- border-width: 1px;
- border-color: #DDDDDD;
- box-shadow: none;
- border-radius: 15px;
- color: #000;
-}
-
-aside .widget li a, aside .widget li a:hover,
-.panel .panel-body .wall-item-content,
-.toplevel_item .wall-item-container .btn-link {
- color: #000;
-}
-
-.wall-item-content a:hover,
-nav.navbar .navbar-brand{
- color: #15e3ff !important;
-}
+++ /dev/null
-<?php
- /* Licence: AGP
- * Author: rabuzarus
- * Overwrites: nav_bg, nav_icon_color, link_color, bgcolor, contentbg_transp, background_image, bg_image_option, link_hover_color
- */
-
- $nav_bg = "#000";
- $nav_icon_color = "#e355e0";
- $link_color = "#e355e0";
- $bgcolor = "#fff";
- $contentbg_transp = 100;
- $background_image = "img/bg_circle.png";
- $bg_image_option = "repeat";
- $link_hover_color ="#15e3ff";
-
+++ /dev/null
-<?php
-/*
- * Name: Red
- * Author: Rabuzarus
- *
- * List here all variables which will get overwritten through this schema
- * Overwrites: nav_bg, nav_icon_color, link_color, bgcolor, contentbg_transp
- */
-
- $nav_bg = "#870000";
- $nav_icon_color = "#f5f5f5";
- $link_color = "#b50404";
- $bgcolor = "#ededed";
- $contentbg_transp = 95;
-
--- /dev/null
+<?php
+/*
+ * Name: Blue
+ * Author: Rabuzarus
+ *
+ * List here all variables which will get overwritten through this scheme
+ * Overwrites: nav_bg, nav_icon_color, link_color, background_color, login_bg_color, contentbg_transp
+ */
+
+ $nav_bg = "#708fa0";
+ $nav_icon_color = "#fff";
+ $link_color = "#6fdbe8";
+ $background_color = "#ededed";
+ $login_bg_color = "#ededed";
+ $contentbg_transp = 100;
+
--- /dev/null
+/*
+ Licence : AGPL
+
+ Created on : 28.03.2016, 03:13:19
+ Author : rabuzarus
+*/
+
+body {
+ color: #000;
+}
+
+/*
+ * Navbar
+ */
+#topbar-first,
+nav.navbar {
+ box-shadow: 0 -1px 5px 2px #000;
+}
+#topbar-first .nav>li>a:hover,
+nav.navbar .nav>li>a:hover {
+ background-color: #000;
+ color: #15e3ff;
+}
+#topbar-first .nav>li>a.selected {
+ background: #e355e0;
+ color: #000;
+ padding: 9px;
+ border-radius: 8px;
+}
+#topbar-first #nav-notifications-menu li.notif-entry:hover,
+#topbar-second .nav>li>ul>li>a:hover,
+#topbar-second .nav>li>ul>li>a.active,
+#topbar-second .nav>li>a:hover,
+#topbar-second .nav .open>a,
+#topbar-second .nav>li.active,
+.nav-pills .dropdown-menu li:hover,
+.nav-tabs .dropdown-menu li:hover,
+.account .dropdown-menu li:hover,
+.contact-photo-wrapper .dropdown-menu li:hover,
+.nav-pills .dropdown-menu li.selected,
+.nav-tabs .dropdown-menu li.selected,
+.account .dropdown-menu li.selected,
+.contact-photo-wrapper .dropdown-menu li.selected,
+aside .widget li:hover,
+aside .widget li.selected,
+.nav-container .widget li:hover {
+ border-left:3px solid #15e3ff !important;
+}
+
+.panel,
+aside .widget,
+.nav-container .widget,
+#profile-page, .photos-content-wrapper,
+.settings-content-wrapper {
+ border-style: solid solid solid solid;
+ border-width: 1px;
+ border-color: #DDDDDD;
+ box-shadow: none;
+ border-radius: 15px;
+ color: #000;
+}
+
+aside .widget li a, aside .widget li a:hover,
+.panel .panel-body .wall-item-content,
+.toplevel_item .wall-item-container .btn-link {
+ color: #000;
+}
+
+.wall-item-content a:hover,
+nav.navbar .navbar-brand{
+ color: #15e3ff !important;
+}
--- /dev/null
+<?php
+ /* Licence: AGP
+ * Author: rabuzarus
+ * Overwrites: nav_bg, nav_icon_color, link_color, background_color, contentbg_transp, background_image, bg_image_option, link_hover_color
+ */
+
+ $nav_bg = "#000";
+ $nav_icon_color = "#e355e0";
+ $link_color = "#e355e0";
+ $background_color = "#fff";
+ $contentbg_transp = 100;
+ $background_image = "img/bg_circle.png";
+ $bg_image_option = "repeat";
+ $link_hover_color ="#15e3ff";
+
--- /dev/null
+<?php
+/*
+ * Name: Red
+ * Author: Rabuzarus
+ *
+ * List here all variables which will get overwritten through this scheme
+ * Overwrites: nav_bg, nav_icon_color, link_color, background_color, contentbg_transp
+ */
+
+ $nav_bg = "#870000";
+ $nav_icon_color = "#f5f5f5";
+ $link_color = "#b50404";
+ $background_color = "#ededed";
+ $contentbg_transp = 95;
+
PConfig::load($uid, 'frio');
// Load the profile owners pconfig.
- $schema = PConfig::get($uid, 'frio', 'schema');
+ $scheme = PConfig::get($uid, 'frio', 'scheme');
$nav_bg = PConfig::get($uid, 'frio', 'nav_bg');
$nav_icon_color = PConfig::get($uid, 'frio', 'nav_icon_color');
$link_color = PConfig::get($uid, 'frio', 'link_color');
Config::load('frio');
// Load frios system config.
- $schema = Config::get('frio', 'schema');
+ $scheme = Config::get('frio', 'scheme');
$nav_bg = Config::get('frio', 'nav_bg');
$nav_icon_color = Config::get('frio', 'nav_icon_color');
$link_color = Config::get('frio', 'link_color');
}
// Now load the scheme. If a value is changed above, we'll keep the settings
-// If not, we'll keep those defined by the schema
-// Setting $schema to '' wasn't working for some reason, so we'll check it's
+// If not, we'll keep those defined by the scheme
+// Setting $scheme to '' wasn't working for some reason, so we'll check it's
// not --- like the mobile theme does instead.
-// Allow layouts to over-ride the schema.
-if (x($_REQUEST, 'schema')) {
- $schema = $_REQUEST['schema'];
+// Allow layouts to over-ride the scheme.
+if (x($_REQUEST, 'scheme')) {
+ $scheme = $_REQUEST['scheme'];
}
// Sanitize the data.
-$schema = !empty($schema) ? basename($schema) : '';
+$scheme = !empty($scheme) ? basename($scheme) : '';
-if (($schema) && ($schema != '---')) {
- if (file_exists('view/theme/frio/schema/' . $schema . '.php')) {
- $schemefile = 'view/theme/frio/schema/' . $schema . '.php';
+if (($scheme) && ($scheme != '---')) {
+ if (file_exists('view/theme/frio/scheme/' . $scheme . '.php')) {
+ $schemefile = 'view/theme/frio/scheme/' . $scheme . '.php';
require_once $schemefile;
}
- if (file_exists('view/theme/frio/schema/' . $schema . '.css')) {
- $schemecssfile = 'view/theme/frio/schema/' . $schema . '.css';
+ if (file_exists('view/theme/frio/scheme/' . $scheme . '.css')) {
+ $schemecssfile = 'view/theme/frio/scheme/' . $scheme . '.css';
}
}
-// If we haven't got a schema, load the default. We shouldn't touch this - we
+// If we haven't got a scheme, load the default. We shouldn't touch this - we
// should leave it for admins to define for themselves.
-// default.php and default.css MUST be symlinks to existing schema files.
-if (!$schema) {
- if (file_exists('view/theme/frio/schema/default.php')) {
- $schemefile = 'view/theme/frio/schema/default.php';
+// default.php and default.css MUST be symlinks to existing scheme files.
+if (!$scheme) {
+ if (file_exists('view/theme/frio/scheme/default.php')) {
+ $schemefile = 'view/theme/frio/scheme/default.php';
require_once $schemefile;
}
- if (file_exists('view/theme/frio/schema/default.css')) {
- $schemecssfile = 'view/theme/frio/schema/default.css';
+ if (file_exists('view/theme/frio/scheme/default.css')) {
+ $schemecssfile = 'view/theme/frio/scheme/default.css';
}
}
<script src="{{$baseurl}}/view/theme/frio/frameworks/jRange/jquery.range.js"></script>
<script type="text/javascript" src="{{$baseurl}}/view/js/ajaxupload.js" ></script>
-{{include file="field_select.tpl" field=$schema}}
+{{include file="field_select.tpl" field=$scheme}}
{{if $nav_bg}}{{include file="field_colorinput.tpl" field=$nav_bg}}{{/if}}
{{if $nav_icon_color}}{{include file="field_colorinput.tpl" field=$nav_icon_color}}{{/if}}