From 3713a79433e0b44d9135abc6bb44d8b8a11a1720 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 13 Oct 2020 14:29:36 +0100 Subject: [PATCH] Show newswire on front page of news instance --- daemon.py | 6 ++++++ webinterface.py | 10 ++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index e7762833..b773e5a5 100644 --- a/daemon.py +++ b/daemon.py @@ -5887,6 +5887,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, YTReplacementDomain, self.server.showPublishedDateOnly, + self.server.newswire, actorJson['roles'], None, None) msg = msg.encode('utf-8') @@ -5960,6 +5961,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, YTReplacementDomain, showPublishedDateOnly, + self.server.newswire, actorJson['skills'], None, None) msg = msg.encode('utf-8') @@ -7422,6 +7424,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, self.server.YTReplacementDomain, self.server.showPublishedDateOnly, + self.server.newswire, shares, pageNumber, sharesPerPage) msg = msg.encode('utf-8') @@ -7509,6 +7512,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, self.server.YTReplacementDomain, self.server.showPublishedDateOnly, + self.server.newswire, following, pageNumber, followsPerPage).encode('utf-8') @@ -7596,6 +7600,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, self.server.YTReplacementDomain, self.server.showPublishedDateOnly, + self.server.newswire, followers, pageNumber, followsPerPage).encode('utf-8') @@ -7658,6 +7663,7 @@ class PubServer(BaseHTTPRequestHandler): self.server.personCache, self.server.YTReplacementDomain, self.server.showPublishedDateOnly, + self.server.newswire, None, None).encode('utf-8') self._set_headers('text/html', len(msg), cookie, callingDomain) diff --git a/webinterface.py b/webinterface.py index fb4bd619..f7406d8d 100644 --- a/webinterface.py +++ b/webinterface.py @@ -3233,7 +3233,7 @@ def htmlProfile(defaultTimeline: str, session, wfRequest: {}, personCache: {}, YTReplacementDomain: str, showPublishedDateOnly: bool, - extraJson=None, + newswire: {}, extraJson=None, pageNumber=None, maxItemsPerPage=None) -> str: """Show the profile page as html """ @@ -3562,7 +3562,13 @@ def htmlProfile(defaultTimeline: str, if isSystemAccount(nickname): profileFooterStr = ' \n' profileFooterStr += ' \n' - # TODO add newswire + iconsDir = getIconsDir(baseDir) + profileFooterStr += \ + getRightColumnContent(baseDir, 'news', domainFull, + httpPrefix, translate, + iconsDir, False, False, + newswire, False, + False, None) profileFooterStr += ' \n' profileFooterStr += ' \n' profileFooterStr += ' \n'