]> git.mxchange.org Git - friendica.git/commitdiff
[vier] Restore network page right sidebar forum widget feature
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 16 Oct 2020 12:43:13 +0000 (08:43 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 16 Oct 2020 12:43:13 +0000 (08:43 -0400)
view/theme/vier/theme.php
view/theme/vier/wide.css

index c6441652465982ce8ecd088dfd901ab52e885080..b57d7dc1c3d84557636761924da7901554a8432f 100644 (file)
@@ -102,8 +102,6 @@ function get_vier_config($key, $default = false, $admin = false)
 
 function vier_community_info()
 {
-       $a = DI::app();
-
        $show_pages      = get_vier_config("show_pages", 1);
        $show_profiles   = get_vier_config("show_profiles", 1);
        $show_helpers    = get_vier_config("show_helpers", 1);
@@ -184,49 +182,7 @@ function vier_community_info()
 
        //Community_Pages at right_aside
        if ($show_pages && local_user()) {
-               $cid = $_GET['cid'] ?? null;
-
-               //sort by last updated item
-               $lastitem = true;
-
-               $contacts = ForumManager::getList($a->user['uid'], $lastitem, true, true);
-               $total = count($contacts);
-               $visible_forums = 10;
-
-               if (count($contacts)) {
-                       $id = 0;
-
-                       foreach ($contacts as $contact) {
-                               $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
-
-                               $entry = [
-                                       'url'          => 'network?contactid=' . $contact['id'],
-                                       'external_url' => Contact::magicLink($contact['url']),
-                                       'name'         => $contact['name'],
-                                       'cid'          => $contact['id'],
-                                       'selected'     => $selected,
-                                       'micro'        => Contact::getMicro($contact),
-                                       'id'           => ++$id,
-                               ];
-                               $entries[] = $entry;
-                       }
-
-
-                       $tpl = Renderer::getMarkupTemplate('widget_forumlist_right.tpl');
-
-                       $page = Renderer::replaceMacros(
-                               $tpl,
-                               [
-                                       '$title'          => DI::l10n()->t('Forums'),
-                                       '$forums'         => $entries,
-                                       '$link_desc'      => DI::l10n()->t('External link to forum'),
-                                       '$total'          => $total,
-                                       '$visible_forums' => $visible_forums,
-                                       '$showmore'       => DI::l10n()->t('show more')]
-                       );
-
-                       $aside['$page'] = $page;
-               }
+               $aside['$page'] = ForumManager::widget('network/forum', local_user());;
        }
        // END Community Page
 
index 774c3b1d8e0807f90191bc6f79ab3b13ae6a30f4..dc0fda50ab1f4bfc0da7366cd975f201ac614433 100644 (file)
@@ -2,8 +2,9 @@ right_aside {
   display: block;
 }
 
-#forumlist-sidebar-frame,
-#forumlist-sidebar {
+aside #forumlist-sidebar-frame,
+aside #forumlist-sidebar,
+#forumlist-sidebar-inflated {
   display: none;
 }