X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=view%2Ftheme%2Fsmoothly%2Ftheme.php;h=994fe8c8562831626344731a4f1fb30ff82c6eea;hb=f114ad188353910f1714a2df04affb7e5ee58253;hp=7e8744f0d170e307d6fd9d727e7c9da29a90929d;hpb=05a2989ecbb290188c4dcc280fc93483a9852645;p=friendica.git
diff --git a/view/theme/smoothly/theme.php b/view/theme/smoothly/theme.php
index 7e8744f0d1..994fe8c856 100644
--- a/view/theme/smoothly/theme.php
+++ b/view/theme/smoothly/theme.php
@@ -10,45 +10,23 @@
* Screenshot: Screenshot
*/
+use Friendica\App;
+use Friendica\Core\Renderer;
+use Friendica\DI;
+
+/*
+ * This script can be included even when the app is in maintenance mode which requires us to avoid any config call
+ */
+
function smoothly_init(App $a) {
- set_template_engine($a, 'smarty3');
+ Renderer::setActiveTemplateEngine('smarty3');
$cssFile = null;
- $ssl_state = null;
- $baseurl = App::get_baseurl($ssl_state);
-$a->page['htmlhead'] .= <<< EOT
+ $ssl_state = false;
+ $baseurl = DI::baseUrl()->get($ssl_state);
+ DI::page()['htmlhead'] .= <<< EOT
EOT;
- /** custom css **/
+ /** custom css **/
if (!is_null($cssFile)) {
- $a->page['htmlhead'] .= sprintf('', $cssFile);
+ DI::page()['htmlhead'] .= sprintf('', $cssFile);
}
-_js_in_foot();
-
+ _js_in_foot();
}
-if(! function_exists('_js_in_foot')) {
+if (! function_exists('_js_in_foot')) {
function _js_in_foot() {
/** @purpose insert stuff in bottom of page
*/
- $a = get_app();
- $ssl_state = null;
- $baseurl = App::get_baseurl($ssl_state);
+ $ssl_state = false;
+ $baseurl = DI::baseUrl()->get($ssl_state);
$bottom['$baseurl'] = $baseurl;
- $tpl = get_markup_template('bottom.tpl');
+ $tpl = Renderer::getMarkupTemplate('bottom.tpl');
- return $a->page['bottom'] = replace_macros($tpl, $bottom);
+ return DI::page()['bottom'] = Renderer::replaceMacros($tpl, $bottom);
}
}
+
+/**
+ * @param int|null $uid
+ * @return null
+ * @see \Friendica\Core\Theme::getBackgroundColor()
+ * @TODO Implement this function
+ */
+function smoothly_get_background_color(int $uid = null)
+{
+ return null;
+}
+
+/**
+ * @param int|null $uid
+ * @return null
+ * @see \Friendica\Core\Theme::getThemeColor()
+ * @TODO Implement this function
+ */
+function smoothly_get_theme_color(int $uid = null)
+{
+ return null;
+}