aboutsummaryrefslogblamecommitdiffstats
path: root/view/theme/quattro/config.php
blob: 02fcaf57e1bbacb7a1c4c1875ffc40d7db1a1dcc (plain) (tree)






























                                                                                                                                
<?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']);
	}
}