X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=doc%2Fthemes.md;h=531ff9c166eb5bcb79bec69a8fe7d939fe9f16e0;hb=c4d3ab68785122ff070c65a444aaa0833b746b2b;hp=589c882c6539f263cb7bbde016d5c1528b15d06d;hpb=4c75c59039cc9788eb351e74c637019a5361a021;p=friendica.git diff --git a/doc/themes.md b/doc/themes.md index 589c882c65..531ff9c166 100644 --- a/doc/themes.md +++ b/doc/themes.md @@ -130,7 +130,7 @@ The selected 1st part will be saved in the database by the theme_post function. // if the one specific submit button was pressed then proceed if (isset($_POST['duepuntozero-settings-submit'])){ // and save the selection key into the personal config of the user - set_pconfig(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']); + PConfig::set(local_user(), 'duepuntozero', 'colorset', $_POST['duepuntozero_colorset']); } } @@ -138,9 +138,9 @@ Now that this information is set in the database, what should friendica do with For this, have a look at the theme.php file of the *duepunto zero*. There you'll find somethink alike - $colorset = get_pconfig( local_user(), 'duepuntozero','colorset'); + $colorset = PConfig::get( local_user(), 'duepuntozero','colorset'); if (!$colorset) - $colorset = get_config('duepuntozero', 'colorset'); + $colorset = Config::get('duepuntozero', 'colorset'); if ($colorset) { if ($colorset == 'greenzero') $a->page['htmlhead'] .= ''."\n"; @@ -172,7 +172,7 @@ The content of this file should be something like $a-> theme_info = array( 'extends' => 'duepuntozero'. ); - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); /* and more stuff e.g. the JavaScript function for the header */ } @@ -253,7 +253,7 @@ So in the case of quattro it is function quattro_init(App $a) { $a->theme_info = array(); - set_template_engine($a, 'smarty3'); + $a->set_template_engine('smarty3'); } Here we have set the basic theme information, in this case they are empty.