mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-12 01:54:26 +02:00
first files - move to Version 0.1
This commit is contained in:
parent
69865ea843
commit
65d37a8c20
257 changed files with 40746 additions and 1 deletions
65
config.php
Normal file
65
config.php
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
require_once('view/theme/frio/php/Image.php');
|
||||
|
||||
function theme_content(&$a) {
|
||||
if(!local_user()) { return;}
|
||||
$arr = array();
|
||||
|
||||
$arr["schema"] = get_pconfig(local_user(),'frio', 'schema');
|
||||
$arr["nav_bg"] = get_pconfig(local_user(),'frio', 'nav_bg' );
|
||||
$arr["nav_icon_color"] = get_pconfig(local_user(),'frio', 'nav_icon_color' );
|
||||
$arr["link_color"] = get_pconfig(local_user(),'frio', 'link_color' );
|
||||
$arr["bgcolor"] = get_pconfig(local_user(),'frio', 'background_color' );
|
||||
$arr["contentbg_transp"] = get_pconfig(local_user(),'frio', 'contentbg_transp' );
|
||||
$arr["background_image"] = get_pconfig(local_user(),'frio', 'background_image' );
|
||||
$arr["bg_image_option"] = get_pconfig(local_user(),'frio', 'bg_image_option' );
|
||||
|
||||
return frio_form($a, $arr);
|
||||
}
|
||||
|
||||
function theme_post(&$a) {
|
||||
if(!local_user()) { return;}
|
||||
if (isset($_POST['frio-settings-submit'])) {
|
||||
set_pconfig(local_user(), 'frio', 'schema', $_POST["frio_schema"]);
|
||||
set_pconfig(local_user(), 'frio', 'nav_bg', $_POST["frio_nav_bg"]);
|
||||
set_pconfig(local_user(), 'frio', 'nav_icon_color', $_POST["frio_nav_icon_color"]);
|
||||
set_pconfig(local_user(), 'frio', 'link_color', $_POST["frio_link_color"]);
|
||||
set_pconfig(local_user(), 'frio', 'background_color', $_POST["frio_background_color"]);
|
||||
set_pconfig(local_user(), 'frio', 'contentbg_transp', $_POST["frio_contentbg_transp"]);
|
||||
set_pconfig(local_user(), 'frio', 'background_image', $_POST["frio_background_image"]);
|
||||
set_pconfig(local_user(), 'frio', 'bg_image_option', $_POST["frio_bg_image_option"]);
|
||||
}
|
||||
}
|
||||
|
||||
function frio_form(&$a, $arr) {
|
||||
$scheme_choices = array();
|
||||
$scheme_choices["---"] = t("Default");
|
||||
$files = glob('view/theme/frio/schema/*.php');
|
||||
if($files) {
|
||||
foreach($files as $file) {
|
||||
$f = basename($file, ".php");
|
||||
if($f != 'default') {
|
||||
$scheme_name = $f;
|
||||
$scheme_choices[$f] = $scheme_name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$t = get_markup_template('theme_settings.tpl');
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => $a->get_baseurl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$schema' => array('frio_schema', t("Select scheme"), $arr["schema"], '', $scheme_choices),
|
||||
'$nav_bg' => array('frio_nav_bg', t('Navigation bar background color'), $arr['nav_bg']),
|
||||
'$nav_icon_color' => array('frio_nav_icon_color', t('Navigation bar icon color '), $arr['nav_icon_color']),
|
||||
'$link_color' => array('frio_link_color', t('Link color'), $arr['link_color'], '', $link_colors),
|
||||
'$bgcolor' => array('frio_background_color', t('Set the background color'), $arr['bgcolor']),
|
||||
'$contentbg_transp' => array('frio_contentbg_transp', t("Content background transparency"), ($arr["contentbg_transp"] ? $arr["contentbg_transp"] : 0 )),
|
||||
'$background_image' => array('frio_background_image', t('Set the background image'), $arr['background_image']),
|
||||
'$bg_image_options' => Image::get_options($arr),
|
||||
));
|
||||
|
||||
return $o;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue