From d26d37b51d8da77fcafb0e49f11f5e2302ca038f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Nov 2020 10:53:32 +0000 Subject: [PATCH] Function for getting the right column image --- webinterface.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/webinterface.py b/webinterface.py index 55fb4ffb9..d7ce87aff 100644 --- a/webinterface.py +++ b/webinterface.py @@ -5859,9 +5859,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, # show a column header image, eg. title of the theme or newswire banner editImageClass = '' if showHeaderImage: - rightColumnImageFilename = \ - baseDir + '/accounts/' + nickname + '@' + domain + \ - '/right_col_image.png' + rightImageFile, rightColumnImageFilename = \ + getRightImageFile(baseDir, nickname, domain) if not os.path.isfile(rightColumnImageFilename): theme = getConfigParam(baseDir, 'theme').lower() if theme == 'default': @@ -5873,6 +5872,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, if os.path.isfile(themeRightColumnImageFilename): copyfile(themeRightColumnImageFilename, rightColumnImageFilename) + rightImageFile = 'right_col_image.png' # show the image at the top of the column editImageClass = 'rightColEdit' @@ -5882,7 +5882,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str, '\n
\n' + \ ' \n' + \ + nickname + '/' + rightImageFile + '" />\n' + \ '
\n' if (showPublishButton or editor or rssIconAtTop) and not showHeaderImage: @@ -6124,6 +6124,11 @@ def getLeftImageFile(baseDir: str, return getImageFile(baseDir, 'left_col_image', nickname, domain) +def getRightImageFile(baseDir: str, + nickname: str, domain: str) -> (str, str): + return getImageFile(baseDir, 'right_col_image', nickname, domain) + + def headerButtonsFrontScreen(translate: {}, nickname: str, boxName: str, authorized: bool,