From 0014e5f6e1e626b9937bcfdfa36bd890d4448172 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 27 Nov 2020 12:29:20 +0000 Subject: [PATCH] Features timeline function --- person.py | 6 ++++++ posts.py | 9 +++++++++ webapp_profile.py | 10 +++++----- 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/person.py b/person.py index f41950a3b..86f0fe6e2 100644 --- a/person.py +++ b/person.py @@ -25,6 +25,7 @@ from posts import createRepliesTimeline from posts import createMediaTimeline from posts import createNewsTimeline from posts import createBlogsTimeline +from posts import createFeaturesTimeline from posts import createBookmarksTimeline from posts import createEventsTimeline from posts import createInbox @@ -628,6 +629,7 @@ def personBoxJson(recentPostsCache: {}, if boxname != 'inbox' and boxname != 'dm' and \ boxname != 'tlreplies' and boxname != 'tlmedia' and \ boxname != 'tlblogs' and boxname != 'tlnews' and \ + boxname != 'tlfeatures' and \ boxname != 'outbox' and boxname != 'moderation' and \ boxname != 'tlbookmarks' and boxname != 'bookmarks' and \ boxname != 'tlevents': @@ -700,6 +702,10 @@ def personBoxJson(recentPostsCache: {}, httpPrefix, noOfItems, headerOnly, newswireVotesThreshold, positiveVoting, votingTimeMins, pageNumber) + elif boxname == 'tlfeatures': + return createFeaturesTimeline(session, baseDir, nickname, domain, port, + httpPrefix, noOfItems, headerOnly, + pageNumber) elif boxname == 'tlblogs': return createBlogsTimeline(session, baseDir, nickname, domain, port, httpPrefix, noOfItems, headerOnly, diff --git a/posts.py b/posts.py index 5e16b369b..3e32b9d3b 100644 --- a/posts.py +++ b/posts.py @@ -2587,6 +2587,15 @@ def createBlogsTimeline(session, baseDir: str, nickname: str, domain: str, 0, False, 0, pageNumber) +def createFeaturesTimeline(session, baseDir: str, nickname: str, domain: str, + port: int, httpPrefix: str, itemsPerPage: int, + headerOnly: bool, pageNumber=None) -> {}: + return createBoxIndexed({}, session, baseDir, 'tlblogs', 'news', + domain, port, httpPrefix, + itemsPerPage, headerOnly, True, + 0, False, 0, pageNumber) + + def createMediaTimeline(session, baseDir: str, nickname: str, domain: str, port: int, httpPrefix: str, itemsPerPage: int, headerOnly: bool, pageNumber=None) -> {}: diff --git a/webapp_profile.py b/webapp_profile.py index 841fcd327..008f1d553 100644 --- a/webapp_profile.py +++ b/webapp_profile.py @@ -624,11 +624,10 @@ def htmlProfile(rssIconAtTop: bool, cssFilename = baseDir + '/epicyon.css' if isSystemAccount(nickname): + licenseStr = '' bannerFile, bannerFilename = \ getBannerFile(baseDir, nickname, domain) - - licenseStr = '' - if not isSystemAccount(nickname): + else: licenseStr = \ '' + \ '