]> git.mxchange.org Git - friendica.git/blobdiff - view/theme/vier/theme.php
Add Theme::getBackgroundColor and Theme::getThemeColor methods
[friendica.git] / view / theme / vier / theme.php
index 30b7536ab52dcb8fbffd5f085ea57db194631034..fcbb148dc7a3518c5eacf3ac194b143e1e089a85 100644 (file)
@@ -12,7 +12,6 @@
 use Friendica\App;
 use Friendica\Content\ForumManager;
 use Friendica\Core\Addon;
-use Friendica\Core\Config;
 use Friendica\Core\Renderer;
 use Friendica\Core\Search;
 use Friendica\Database\DBA;
@@ -95,7 +94,7 @@ function get_vier_config($key, $default = false, $admin = false)
                }
        }
 
-       $result = Config::get("vier", $key);
+       $result = DI::config()->get("vier", $key);
        if (!is_null($result)) {
                return $result;
        }
@@ -141,14 +140,14 @@ function vier_community_info()
 
        // last 9 users
        if ($show_lastusers) {
-               $publish = (Config::get('system', 'publish_all') ? '' : " AND `publish` = 1 ");
+               $publish = (DI::config()->get('system', 'publish_all') ? '' : "`publish` = 1");
                $order = " ORDER BY `register_date` DESC ";
 
                $tpl = Renderer::getMarkupTemplate('ch_directory_item.tpl');
 
-               $r = q("SELECT `profile`.*, `profile`.`uid` AS `profile_uid`, `user`.`nickname`
+               $r = q("SELECT `profile`.*, `user`.`nickname`
                                FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid`
-                               WHERE `is-default` = 1 $publish AND `user`.`blocked` = 0 $order LIMIT %d , %d ",
+                               WHERE $publish AND `user`.`blocked` = 0 $order LIMIT %d , %d ",
                        0,
                        9
                );
@@ -158,7 +157,7 @@ function vier_community_info()
                        $aside['$lastusers_items'] = [];
 
                        foreach ($r as $rr) {
-                               $profile_link = 'profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
+                               $profile_link = 'profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['uid']);
                                $entry = Renderer::replaceMacros($tpl, [
                                        '$id' => $rr['id'],
                                        '$profile_link' => $profile_link,
@@ -240,7 +239,7 @@ function vier_community_info()
        if ($show_helpers) {
                $r = [];
 
-               $helperlist = Config::get("vier", "helperlist");
+               $helperlist = DI::config()->get("vier", "helperlist");
 
                $helpers = explode(",", $helperlist);
 
@@ -338,7 +337,7 @@ function vier_community_info()
                        $r[] = ["photo" => "images/wordpress.png", "name" => "Wordpress"];
                }
 
-               if (function_exists("imap_open") && !Config::get("system", "imap_disabled") && !Config::get("system", "dfrn_only")) {
+               if (function_exists("imap_open") && !DI::config()->get("system", "imap_disabled") && !DI::config()->get("system", "dfrn_only")) {
                        $r[] = ["photo" => "images/mail.png", "name" => "E-Mail"];
                }
 
@@ -365,3 +364,25 @@ function vier_community_info()
        $tpl = Renderer::getMarkupTemplate('communityhome.tpl');
        DI::page()['right_aside'] = Renderer::replaceMacros($tpl, $aside);
 }
+
+/**
+ * @param int|null $uid
+ * @return null
+ * @see \Friendica\Core\Theme::getBackgroundColor()
+ * @TODO Implement this function
+ */
+function vier_get_background_color(int $uid = null)
+{
+       return null;
+}
+
+/**
+ * @param int|null $uid
+ * @return null
+ * @see \Friendica\Core\Theme::getThemeColor()
+ * @TODO Implement this function
+ */
+function vier_get_theme_color(int $uid = null)
+{
+       return null;
+}