]> 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 8c1f566671fa64f4f107bc24a4a9da5931fb4521..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;
@@ -141,14 +140,14 @@ function vier_community_info()
 
        // last 9 users
        if ($show_lastusers) {
-               $publish = (DI::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,
@@ -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;
+}