Merge branch 'rewrites/app_get_baseurl_static' into develop
Signed-off-by: Roland Häder <roland@mxchange.org> Conflicts: mod/admin.php mod/bookmarklet.php mod/community.php mod/contacts.php mod/crepair.php mod/editpost.php mod/events.php mod/install.php mod/lostpass.php mod/network.php mod/notify.php mod/suggest.php mod/uexport.php mod/videos.php view/theme/duepuntozero/config.php view/theme/frio/config.php view/theme/quattro/config.php view/theme/vier/config.php
This commit is contained in:
commit
20e71d21a6
11 changed files with 44 additions and 40 deletions
|
@ -4,7 +4,6 @@
|
|||
*/
|
||||
|
||||
|
||||
|
||||
function theme_content(App &$a){
|
||||
if (!local_user()) {
|
||||
return;
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
* Theme settings
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function theme_content(App &$a){
|
||||
if (!local_user()) {
|
||||
return;
|
||||
|
@ -35,8 +33,8 @@ function theme_post(App &$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);
|
||||
}
|
||||
|
@ -45,31 +43,35 @@ 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue