mirror of
https://github.com/friendica/friendica
synced 2024-12-23 16:40:17 +00:00
32 lines
676 B
PHP
32 lines
676 B
PHP
|
<?php
|
||
|
/**
|
||
|
* Theme settings
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
function theme_content(&$a){
|
||
|
if(!local_user())
|
||
|
return;
|
||
|
|
||
|
$align = get_pconfig(local_user(), 'quattro', 'align' );
|
||
|
|
||
|
$t = file_get_contents( dirname(__file__). "/theme_settings.tpl" );
|
||
|
$o .= replace_macros($t, array(
|
||
|
'$submit' => t('Submit'),
|
||
|
'$baseurl' => $a->get_baseurl(),
|
||
|
'$title' => t("Theme settings"),
|
||
|
'$align' => array('quattro_align', t('Alignment'), $align, '', array('left'=>t('Left'), 'center'=>t('Center'))),
|
||
|
));
|
||
|
return $o;
|
||
|
}
|
||
|
|
||
|
function theme_post(&$a){
|
||
|
if(! local_user())
|
||
|
return;
|
||
|
if (isset($_POST['quattro-settings-submit'])){
|
||
|
set_pconfig(local_user(), 'quattro', 'align', $_POST['quattro_align']);
|
||
|
}
|
||
|
}
|
||
|
|