mirror of https://github.com/friendica/friendica
parent
eb9b832c3a
commit
3bfa6facfc
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
Before Width: | Height: | Size: 750 KiB After Width: | Height: | Size: 750 KiB |
@ -1,41 +1,41 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @brief: Get info header of the shema
|
||||
* @brief: Get info header of the scheme
|
||||
*
|
||||
* This function parses the header of the shemename.php file for inormations like
|
||||
* 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 shema.
|
||||
* 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 seperated) in the shema header under Overwrites:
|
||||
* This seemst not to be the best solution. We need to investigate further.
|
||||
* listed (comma separated) in the scheme header under Overwrites:
|
||||
* This seems not to be the best solution. We need to investigate further.
|
||||
*
|
||||
* @param string $schema Name of the shema
|
||||
* @param string $scheme Name of the scheme
|
||||
* @return array With theme information
|
||||
* 'author' => Author Name
|
||||
* 'description' => Schema description
|
||||
* 'version' => Schema version
|
||||
* 'description' => Scheme description
|
||||
* 'version' => Scheme version
|
||||
* 'overwrites' => Variables which overwriting custom settings
|
||||
*/
|
||||
use Friendica\Core\PConfig;
|
||||
|
||||
function get_schema_info($schema)
|
||||
function get_scheme_info($scheme)
|
||||
{
|
||||
$theme = current_theme();
|
||||
$themepath = 'view/theme/' . $theme . '/';
|
||||
$schema = PConfig::get(local_user(), 'frio', 'schema');
|
||||
$scheme = PConfig::get(local_user(), 'frio', 'scheme');
|
||||
|
||||
$info = [
|
||||
'name' => $schema,
|
||||
'name' => $scheme,
|
||||
'description' => '',
|
||||
'author' => [],
|
||||
'version' => '',
|
||||
'overwrites' => []
|
||||
];
|
||||
|
||||
if (!is_file($themepath . 'schema/' . $schema . '.php')) return $info;
|
||||
if (!is_file($themepath . 'scheme/' . $scheme . '.php')) return $info;
|
||||
|
||||
$f = file_get_contents($themepath . 'schema/' . $schema . '.php');
|
||||
$f = file_get_contents($themepath . 'scheme/' . $scheme . '.php');
|
||||
|
||||
$r = preg_match('|/\*.*\*/|msU', $f, $m);
|
||||
|
@ -0,0 +1,16 @@
|
||||
<?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;
|
||||
|
@ -1,13 +1,13 @@
|
||||
<?php
|
||||
/* Licence: AGP
|
||||
* Author: rabuzarus
|
||||
* Overwrites: nav_bg, nav_icon_color, link_color, bgcolor, contentbg_transp, background_image, bg_image_option, link_hover_color
|
||||
* 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";
|
||||
$bgcolor = "#fff";
|
||||
$background_color = "#fff";
|
||||
$contentbg_transp = 100;
|
||||
$background_image = "img/bg_circle.png";
|
||||
$bg_image_option = "repeat";
|
Loading…
Reference in new issue