Merge branch 'develop' into issue/#3062
This commit is contained in:
commit
479180ca8e
162 changed files with 766 additions and 683 deletions
|
@ -3,9 +3,7 @@
|
|||
* Theme settings
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function theme_content(&$a){
|
||||
function theme_content(App &$a){
|
||||
if (!local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -18,7 +16,7 @@ function theme_content(&$a){
|
|||
return quattro_form($a,$align, $color, $tfs, $pfs);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
function theme_post(App &$a){
|
||||
if (! local_user()) {
|
||||
return;
|
||||
}
|
||||
|
@ -31,45 +29,48 @@ function theme_post(&$a){
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function theme_admin(&$a){
|
||||
function theme_admin(App &$a){
|
||||
$align = get_config('quattro', 'align' );
|
||||
$color = get_config('quattro', 'color' );
|
||||
$tfs = get_config("quattro","tfs");
|
||||
$pfs = get_config("quattro","pfs");
|
||||
$tfs = get_config("quattro","tfs");
|
||||
$pfs = get_config("quattro","pfs");
|
||||
|
||||
return quattro_form($a,$align, $color, $tfs, $pfs);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
function theme_admin_post(App &$a){
|
||||
if (isset($_POST['quattro-settings-submit'])){
|
||||
set_config('quattro', 'align', $_POST['quattro_align']);
|
||||
set_config('quattro', 'color', $_POST['quattro_color']);
|
||||
set_config('quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
set_config('quattro', 'tfs', $_POST['quattro_tfs']);
|
||||
set_config('quattro', 'pfs', $_POST['quattro_pfs']);
|
||||
}
|
||||
}
|
||||
|
||||
/// @TODO $a is no longer used here
|
||||
function quattro_form(&$a, $align, $color, $tfs, $pfs){
|
||||
function quattro_form(App &$a, $align, $color, $tfs, $pfs){
|
||||
$colors = array(
|
||||
"dark"=>"Quattro",
|
||||
"lilac"=>"Lilac",
|
||||
"green"=>"Green"
|
||||
"dark" => "Quattro",
|
||||
"lilac" => "Lilac",
|
||||
"green" => "Green",
|
||||
);
|
||||
|
||||
if ($tfs===false) $tfs="20";
|
||||
if ($pfs===false) $pfs="12";
|
||||
|
||||
|
||||
if ($tfs === false) {
|
||||
$tfs = "20";
|
||||
}
|
||||
if ($pfs === false) {
|
||||
$pfs = "12";
|
||||
}
|
||||
|
||||
$t = get_markup_template("theme_settings.tpl" );
|
||||
$o .= replace_macros($t, array(
|
||||
'$submit' => t('Submit'),
|
||||
'$submit' => t('Submit'),
|
||||
'$baseurl' => App::get_baseurl(),
|
||||
'$title' => t("Theme settings"),
|
||||
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
|
||||
'$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
|
||||
'$pfs' => array('quattro_pfs', t('Posts font size'), $pfs),
|
||||
'$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs),
|
||||
'$title' => t("Theme settings"),
|
||||
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
|
||||
'$color' => array('quattro_color', t('Color scheme'), $color, '', $colors),
|
||||
'$pfs' => array('quattro_pfs', t('Posts font size'), $pfs),
|
||||
'$tfs' => array('quattro_tfs',t('Textareas font size'), $tfs),
|
||||
));
|
||||
return $o;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* Maintainer: Tobias <https://diekershoff.homeunix.net/friendica/profile/tobias>
|
||||
*/
|
||||
|
||||
function quattro_init(&$a) {
|
||||
function quattro_init(App &$a) {
|
||||
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/tinycon.min.js"></script>';
|
||||
$a->page['htmlhead'] .= '<script src="'.App::get_baseurl().'/view/theme/quattro/js/quattro.js"></script>';;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue