Misleading variable name

main
Bob Mottram 2020-11-14 13:08:34 +00:00
parent 64348c5161
commit 98218f8dbb
11 changed files with 143 additions and 143 deletions

22
blog.py
View File

@ -391,7 +391,7 @@ def htmlBlogPost(authorized: bool,
None, False)
# show rss links
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
blogStr += '<p class="rssfeed">'
blogStr += '<a href="' + httpPrefix + '://' + \
@ -399,14 +399,14 @@ def htmlBlogPost(authorized: bool,
blogStr += '<img style="width:3%;min-width:50px" ' + \
'loading="lazy" alt="RSS 2.0" ' + \
'title="RSS 2.0" src="/' + \
iconsDir + '/logorss.png" /></a>'
iconsPath + '/logorss.png" /></a>'
# blogStr += '<a href="' + httpPrefix + '://' + \
# domainFull + '/blog/' + nickname + '/rss.txt">'
# blogStr += '<img style="width:3%;min-width:50px" ' + \
# 'loading="lazy" alt="RSS 3.0" ' + \
# 'title="RSS 3.0" src="/' + \
# iconsDir + '/rss3.png" /></a>'
# iconsPath + '/rss3.png" /></a>'
blogStr += '</p>'
@ -451,7 +451,7 @@ def htmlBlogPage(authorized: bool, session,
# show previous and next buttons
if pageNumber is not None:
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
navigateStr = '<p>'
if pageNumber > 1:
# show previous button
@ -459,7 +459,7 @@ def htmlBlogPage(authorized: bool, session,
domainFull + '/blog/' + \
nickname + '?page=' + str(pageNumber-1) + '">' + \
'<img loading="lazy" alt="<" title="<" ' + \
'src="/' + iconsDir + \
'src="/' + iconsPath + \
'/prev.png" class="buttonprev"/></a>\n'
if len(timelineJson['orderedItems']) >= noOfItems:
# show next button
@ -467,7 +467,7 @@ def htmlBlogPage(authorized: bool, session,
domainFull + '/blog/' + nickname + \
'?page=' + str(pageNumber + 1) + '">' + \
'<img loading="lazy" alt=">" title=">" ' + \
'src="/' + iconsDir + \
'src="/' + iconsPath + \
'/prev.png" class="buttonnext"/></a>\n'
navigateStr += '</p>'
blogStr += navigateStr
@ -492,13 +492,13 @@ def htmlBlogPage(authorized: bool, session,
domainFull + '/blog/' + nickname + '/rss.xml">'
blogStr += '<img loading="lazy" alt="RSS 2.0" ' + \
'title="RSS 2.0" src="/' + \
iconsDir + '/logorss.png" /></a>'
iconsPath + '/logorss.png" /></a>'
# blogStr += '<a href="' + httpPrefix + '://' + \
# domainFull + '/blog/' + nickname + '/rss.txt">'
# blogStr += '<img loading="lazy" alt="RSS 3.0" ' + \
# 'title="RSS 3.0" src="/' + \
# iconsDir + '/rss3.png" /></a>'
# iconsPath + '/rss3.png" /></a>'
blogStr += '</p>'
return blogStr + htmlFooter()
@ -722,7 +722,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
print('Edit blog: json not loaded for ' + postFilename)
return None
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
editBlogText = '<p class="new-post-text">' + \
translate['Write your post text below.'] + '</p>'
@ -767,7 +767,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
dateAndLocation += \
'<p><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>'
iconsPath + '/calendar.png"/>'
dateAndLocation += \
'<label class="labels">' + translate['Date'] + ': </label>'
dateAndLocation += '<input type="date" name="eventDate">'
@ -798,7 +798,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
editBlogForm += ' <div class="dropbtn">'
editBlogForm += \
' <img loading="lazy" alt="" title="" src="/' + iconsDir + \
' <img loading="lazy" alt="" title="" src="/' + iconsPath + \
'/' + scopeIcon + '"/><b class="scope-desc">' + \
scopeDescription + '</b>'
editBlogForm += ' </div>'

View File

@ -146,7 +146,7 @@ def htmlDeletePost(cssCache: {},
"""
if '/statuses/' not in messageId:
return None
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
actor = messageId.split('/statuses/')[0]
nickname = getNicknameFromActor(actor)
domain, port = getDomainFromActor(actor)
@ -176,7 +176,7 @@ def htmlDeletePost(cssCache: {},
deletePostStr = htmlHeaderWithExternalStyle(cssFilename)
deletePostStr += \
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
iconsDir, translate, pageNumber,
iconsPath, translate, pageNumber,
baseDir, session, wfRequest, personCache,
nickname, domain, port, postJsonObject,
None, True, False,

View File

@ -122,7 +122,7 @@ def htmlCalendarDay(cssCache: {}, translate: {},
calendarStr += '</caption>\n'
calendarStr += '<tbody>\n'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
if dayEvents:
for eventPost in dayEvents:
@ -156,7 +156,7 @@ def htmlCalendarDay(cssCache: {}, translate: {},
'">\n<img class="calendardayicon" loading="lazy" alt="' + \
translate['Delete this event'] + ' |" title="' + \
translate['Delete this event'] + '" src="/' + \
iconsDir + '/delete.png" /></a></td>\n'
iconsPath + '/delete.png" /></a></td>\n'
if eventTime and eventDescription and eventPlace:
calendarStr += \
@ -201,7 +201,7 @@ def htmlCalendar(cssCache: {}, translate: {},
httpPrefix: str, domainFull: str) -> str:
"""Show the calendar for a person
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
domain = domainFull
if ':' in domainFull:
domain = domainFull.split(':')[0]
@ -302,7 +302,7 @@ def htmlCalendar(cssCache: {}, translate: {},
'?month=' + str(prevMonthNumber) + '">'
calendarStr += \
' <img loading="lazy" alt="' + translate['Previous month'] + \
'" title="' + translate['Previous month'] + '" src="/' + iconsDir + \
'" title="' + translate['Previous month'] + '" src="/' + iconsPath + \
'/prev.png" class="buttonprev"/></a>\n'
calendarStr += ' <a href="' + calActor + '/inbox" title="'
calendarStr += translate['Switch to timeline view'] + '">'
@ -312,7 +312,7 @@ def htmlCalendar(cssCache: {}, translate: {},
'?month=' + str(nextMonthNumber) + '">'
calendarStr += \
' <img loading="lazy" alt="' + translate['Next month'] + \
'" title="' + translate['Next month'] + '" src="/' + iconsDir + \
'" title="' + translate['Next month'] + '" src="/' + iconsPath + \
'/prev.png" class="buttonnext"/></a>\n'
calendarStr += '</caption>\n'
calendarStr += '<thead>\n'

View File

@ -23,7 +23,7 @@ from webapp_utils import getBannerFile
def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {},
iconsDir: str, editor: bool,
iconsPath: str, editor: bool,
showBackButton: bool, timelinePath: str,
rssIconAtTop: bool, showHeaderImage: bool,
frontPage: bool) -> str:
@ -91,7 +91,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
'" loading="lazy" alt="' + \
translate['Edit Links'] + '" title="' + \
translate['Edit Links'] + '" src="/' + \
iconsDir + '/edit.png" /></a>\n'
iconsPath + '/edit.png" /></a>\n'
# RSS icon
if nickname != 'news':
@ -110,7 +110,7 @@ def getLeftColumnContent(baseDir: str, nickname: str, domainFull: str,
'<img class="' + editImageClass + \
'" loading="lazy" alt="' + rssTitle + \
'" title="' + rssTitle + \
'" src="/' + iconsDir + '/logorss.png" /></a>\n'
'" src="/' + iconsPath + '/logorss.png" /></a>\n'
if rssIconAtTop:
htmlStr += rssIconStr
htmlStr += ' </div>\n'
@ -200,7 +200,7 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
if os.path.isfile(baseDir + '/epicyon.css'):
cssFilename = baseDir + '/epicyon.css'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
# is the user a site editor?
if nickname == 'news':
@ -222,11 +222,11 @@ def htmlLinksMobile(cssCache: {}, baseDir: str,
htmlStr += '<center>' + \
headerButtonsFrontScreen(translate, nickname,
'links', authorized,
iconsAsButtons, iconsDir) + '</center>'
iconsAsButtons, iconsPath) + '</center>'
htmlStr += \
getLeftColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate,
iconsDir, editor,
iconsPath, editor,
False, timelinePath,
rssIconAtTop, False, False)
htmlStr += '</div>\n' + htmlFooter()

View File

@ -43,7 +43,7 @@ def votesIndicator(totalVotes: int, positiveVoting: bool) -> str:
def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {},
iconsDir: str, moderator: bool, editor: bool,
iconsPath: str, moderator: bool, editor: bool,
newswire: {}, positiveVoting: bool,
showBackButton: bool, timelinePath: str,
showPublishButton: bool,
@ -142,7 +142,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
'" loading="lazy" alt="' + \
translate['Edit newswire'] + '" title="' + \
translate['Edit newswire'] + '" src="/' + \
iconsDir + '/edit_notify.png" /></a>\n'
iconsPath + '/edit_notify.png" /></a>\n'
else:
# show the edit icon
htmlStr += \
@ -152,7 +152,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
'" loading="lazy" alt="' + \
translate['Edit newswire'] + '" title="' + \
translate['Edit newswire'] + '" src="/' + \
iconsDir + '/edit.png" /></a>\n'
iconsPath + '/edit.png" /></a>\n'
# show the RSS icon
rssIconStr = \
@ -161,7 +161,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
'" loading="lazy" alt="' + \
translate['Newswire RSS Feed'] + '" title="' + \
translate['Newswire RSS Feed'] + '" src="/' + \
iconsDir + '/logorss.png" /></a>\n'
iconsPath + '/logorss.png" /></a>\n'
if rssIconAtTop:
htmlStr += rssIconStr
@ -175,7 +175,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
'" loading="lazy" alt="' + \
translate['Publish a news article'] + '" title="' + \
translate['Publish a news article'] + '" src="/' + \
iconsDir + '/publish.png" /></a>\n'
iconsPath + '/publish.png" /></a>\n'
if editImageClass == 'rightColEdit':
htmlStr += ' </center>\n'
@ -189,7 +189,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
# show the newswire lines
newswireContentStr = \
htmlNewswire(baseDir, newswire, nickname, moderator, translate,
positiveVoting, iconsDir)
positiveVoting, iconsPath)
htmlStr += newswireContentStr
# show the rss icon at the bottom, typically on the right hand side
@ -199,7 +199,7 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
translate: {}, positiveVoting: bool, iconsDir: str) -> str:
translate: {}, positiveVoting: bool, iconsPath: str) -> str:
"""Converts a newswire dict into html
"""
separatorStr = htmlPostSeparator(baseDir, 'right')
@ -232,7 +232,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
'/newswireunvote=' + dateStrLink + '" ' + \
'title="' + translate['Remove Vote'] + '">'
htmlStr += '<img loading="lazy" class="voteicon" src="/' + \
iconsDir + '/vote.png" /></a></p>\n'
iconsPath + '/vote.png" /></a></p>\n'
else:
htmlStr += ' <span class="newswireDateVotedOn">'
htmlStr += dateShown + '</span></p>\n'
@ -257,7 +257,7 @@ def htmlNewswire(baseDir: str, newswire: {}, nickname: str, moderator: bool,
'/newswirevote=' + dateStrLink + '" ' + \
'title="' + translate['Vote'] + '">'
htmlStr += '<img class="voteicon" src="/' + \
iconsDir + '/vote.png" /></a>'
iconsPath + '/vote.png" /></a>'
htmlStr += '</p>\n'
else:
htmlStr += '<p class="newswireItem">' + \
@ -304,7 +304,7 @@ def htmlCitations(baseDir: str, nickname: str, domain: str,
if os.path.isfile(baseDir + '/epicyon.css'):
cssFilename = baseDir + '/epicyon.css'
# iconsDir = getIconsWebPath(baseDir)
# iconsPath = getIconsWebPath(baseDir)
htmlStr = htmlHeaderWithExternalStyle(cssFilename)
@ -394,7 +394,7 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
if os.path.isfile(baseDir + '/epicyon.css'):
cssFilename = baseDir + '/epicyon.css'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
if nickname == 'news':
editor = False
@ -419,11 +419,11 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str,
htmlStr += '<center>' + \
headerButtonsFrontScreen(translate, nickname,
'newswire', authorized,
iconsAsButtons, iconsDir) + '</center>'
iconsAsButtons, iconsPath) + '</center>'
htmlStr += \
getRightColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate,
iconsDir, moderator, editor,
iconsPath, moderator, editor,
newswire, positiveVoting,
False, timelinePath, showPublishButton,
showPublishAsIcon, rssIconAtTop, False,

View File

@ -59,7 +59,7 @@ def htmlFollowingDataList(baseDir: str, nickname: str,
def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
replyStr: str,
translate: {},
iconsDir: str,
iconsPath: str,
showPublicOnDropdown: bool,
defaultTimeline: str,
pathBase: str,
@ -79,7 +79,7 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
dropDownContent += ' <label for="my-newPostDropdown"\n'
dropDownContent += ' data-toggle="newPostDropdown">\n'
dropDownContent += ' <img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/' + scopeIcon + '"/><b>' + \
iconsPath + '/' + scopeIcon + '"/><b>' + \
scopeDescription + '</b></label>\n'
dropDownContent += ' <ul>\n'
@ -87,58 +87,58 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
dropDownContent += \
'<li><a href="' + pathBase + dropdownNewPostSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_public.png"/><b>' + \
iconsPath + '/scope_public.png"/><b>' + \
translate['Public'] + '</b><br>' + \
translate['Visible to anyone'] + '</a></li>\n'
if defaultTimeline == 'tlnews':
dropDownContent += \
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_blog.png"/><b>' + \
iconsPath + '/scope_blog.png"/><b>' + \
translate['Article'] + '</b><br>' + \
translate['Create an article'] + '</a></li>\n'
else:
dropDownContent += \
'<li><a href="' + pathBase + dropdownNewBlogSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_blog.png"/><b>' + \
iconsPath + '/scope_blog.png"/><b>' + \
translate['Blog'] + '</b><br>' + \
translate['Publicly visible post'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownUnlistedSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_unlisted.png"/><b>' + \
iconsPath + '/scope_unlisted.png"/><b>' + \
translate['Unlisted'] + '</b><br>' + \
translate['Not on public timeline'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownFollowersSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_followers.png"/><b>' + \
iconsPath + '/scope_followers.png"/><b>' + \
translate['Followers'] + '</b><br>' + \
translate['Only to followers'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownDMSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_dm.png"/><b>' + \
iconsPath + '/scope_dm.png"/><b>' + \
translate['DM'] + '</b><br>' + \
translate['Only to mentioned people'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownReminderSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_reminder.png"/><b>' + \
iconsPath + '/scope_reminder.png"/><b>' + \
translate['Reminder'] + '</b><br>' + \
translate['Scheduled note to yourself'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownEventSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_event.png"/><b>' + \
iconsPath + '/scope_event.png"/><b>' + \
translate['Event'] + '</b><br>' + \
translate['Create an event'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + dropdownReportSuffix + \
'"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_report.png"/><b>' + \
iconsPath + '/scope_report.png"/><b>' + \
translate['Report'] + '</b><br>' + \
translate['Send to moderators'] + '</a></li>\n'
@ -146,13 +146,13 @@ def htmlNewPostDropDown(scopeIcon: str, scopeDescription: str,
dropDownContent += \
'<li><a href="' + pathBase + \
'/newshare"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_share.png"/><b>' + \
iconsPath + '/scope_share.png"/><b>' + \
translate['Shares'] + '</b><br>' + \
translate['Describe a shared item'] + '</a></li>\n'
dropDownContent += \
'<li><a href="' + pathBase + \
'/newquestion"><img loading="lazy" alt="" title="" src="/' + \
iconsDir + '/scope_question.png"/><b>' + \
iconsPath + '/scope_question.png"/><b>' + \
translate['Question'] + '</b><br>' + \
translate['Ask a question'] + '</a></li>\n'
@ -171,7 +171,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
defaultTimeline: str, newswire: {}) -> str:
"""New post screen
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
replyStr = ''
showPublicOnDropdown = True
@ -490,7 +490,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dateAndLocation += \
'<p><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>\n'
iconsPath + '/calendar.png"/>\n'
# select a date and time for this post
dateAndLocation += '<label class="labels">' + \
translate['Date'] + ': </label>\n'
@ -505,7 +505,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dateAndLocation += \
'<p><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>\n'
iconsPath + '/calendar.png"/>\n'
# select start time for the event
dateAndLocation += '<label class="labels">' + \
translate['Start Date'] + ': </label>\n'
@ -518,7 +518,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dateAndLocation += \
'<br><img loading="lazy" alt="" title="" ' + \
'class="emojicalendar" src="/' + \
iconsDir + '/calendar.png"/>\n'
iconsPath + '/calendar.png"/>\n'
dateAndLocation += '<label class="labels">' + \
translate['End Date'] + ': </label>\n'
dateAndLocation += '<input type="date" name="endDate">\n'
@ -616,7 +616,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
htmlNewPostDropDown(scopeIcon, scopeDescription,
replyStr,
translate,
iconsDir,
iconsPath,
showPublicOnDropdown,
defaultTimeline,
pathBase,

View File

@ -108,7 +108,7 @@ def saveIndividualPostAsHtmlToCache(baseDir: str,
def individualPostAsHtml(allowDownloads: bool,
recentPostsCache: {}, maxRecentPosts: int,
iconsDir: str, translate: {},
iconsPath: str, translate: {},
pageNumber: int, baseDir: str,
session, wfRequest: {}, personCache: {},
nickname: str, domain: str, port: int,
@ -391,7 +391,7 @@ def individualPostAsHtml(allowDownloads: bool,
if showDMicon:
titleStr = \
titleStr + ' <img loading="lazy" src="/' + \
iconsDir + '/dm.png" class="DMicon"/>\n'
iconsPath + '/dm.png" class="DMicon"/>\n'
replyStr = ''
# check if replying is permitted
@ -445,7 +445,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" title="' + \
translate['Reply to this post'] + '" alt="' + \
translate['Reply to this post'] + \
' |" src="/' + iconsDir + '/reply.png"/></a>\n'
' |" src="/' + iconsPath + '/reply.png"/></a>\n'
# benchmark 10
if not allowDownloads:
@ -480,7 +480,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" title="' + \
translate['Edit blog post'] + '" alt="' + \
translate['Edit blog post'] + \
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
else:
editStr += \
' ' + \
@ -492,7 +492,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" title="' + \
translate['Edit blog post'] + '" alt="' + \
translate['Edit blog post'] + \
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
elif isEvent:
eventPostId = postJsonObject['object']['id']
editStr += \
@ -505,7 +505,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" title="' + \
translate['Edit event'] + '" alt="' + \
translate['Edit event'] + \
' |" src="/' + iconsDir + '/edit.png"/></a>\n'
' |" src="/' + iconsPath + '/edit.png"/></a>\n'
announceStr = ''
if not isModerationPost and showRepeatIcon:
@ -531,7 +531,7 @@ def individualPostAsHtml(allowDownloads: bool,
' ' + \
'<img loading="lazy" title="' + translate['Repeat this post'] + \
'" alt="' + translate['Repeat this post'] + \
' |" src="/' + iconsDir + '/' + announceIcon + '"/></a>\n'
' |" src="/' + iconsPath + '/' + announceIcon + '"/></a>\n'
# benchmark 12
if not allowDownloads:
@ -597,7 +597,7 @@ def individualPostAsHtml(allowDownloads: bool,
' ' + \
'<img loading="lazy" title="' + likeTitle + likeCountStr + \
'" alt="' + likeTitle + \
' |" src="/' + iconsDir + '/' + likeIcon + '"/></a>\n'
' |" src="/' + iconsPath + '/' + likeIcon + '"/></a>\n'
# benchmark 12.5
if not allowDownloads:
@ -629,7 +629,7 @@ def individualPostAsHtml(allowDownloads: bool,
bookmarkStr += \
' ' + \
'<img loading="lazy" title="' + bookmarkTitle + '" alt="' + \
bookmarkTitle + ' |" src="/' + iconsDir + \
bookmarkTitle + ' |" src="/' + iconsPath + \
'/' + bookmarkIcon + '"/></a>\n'
# benchmark 12.9
@ -663,7 +663,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" alt="' + \
translate['Delete this post'] + \
' |" title="' + translate['Delete this post'] + \
'" src="/' + iconsDir + '/delete.png"/></a>\n'
'" src="/' + iconsPath + '/delete.png"/></a>\n'
else:
if not isMuted:
muteStr = \
@ -676,7 +676,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" alt="' + \
translate['Mute this post'] + \
' |" title="' + translate['Mute this post'] + \
'" src="/' + iconsDir + '/mute.png"/></a>\n'
'" src="/' + iconsPath + '/mute.png"/></a>\n'
else:
muteStr = \
' <a class="imageAnchor" href="/users/' + \
@ -688,7 +688,7 @@ def individualPostAsHtml(allowDownloads: bool,
' ' + \
'<img loading="lazy" alt="' + translate['Undo mute'] + \
' |" title="' + translate['Undo mute'] + \
'" src="/' + iconsDir+'/unmute.png"/></a>\n'
'" src="/' + iconsPath+'/unmute.png"/></a>\n'
# benchmark 13.1
if not allowDownloads:
@ -708,7 +708,7 @@ def individualPostAsHtml(allowDownloads: bool,
' <img loading="lazy" title="' + \
translate['announces'] + \
'" alt="' + translate['announces'] + \
'" src="/' + iconsDir + \
'" src="/' + iconsPath + \
'/repeat_inactive.png" class="announceOrReply"/>\n'
else:
# benchmark 13.2
@ -755,7 +755,7 @@ def individualPostAsHtml(allowDownloads: bool,
'<img loading="lazy" title="' + \
translate['announces'] + '" alt="' + \
translate['announces'] + '" src="/' + \
iconsDir + '/repeat_inactive.png" ' + \
iconsPath + '/repeat_inactive.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
postJsonObject['object']['id'] + '">' + \
@ -800,7 +800,7 @@ def individualPostAsHtml(allowDownloads: bool,
' <img loading="lazy" title="' + \
translate['announces'] + \
'" alt="' + translate['announces'] + \
'" src="/' + iconsDir + \
'" src="/' + iconsPath + \
'/repeat_inactive.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
@ -811,7 +811,7 @@ def individualPostAsHtml(allowDownloads: bool,
titleStr += \
' <img loading="lazy" title="' + \
translate['announces'] + '" alt="' + \
translate['announces'] + '" src="/' + iconsDir + \
translate['announces'] + '" src="/' + iconsPath + \
'/repeat_inactive.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
@ -822,7 +822,7 @@ def individualPostAsHtml(allowDownloads: bool,
' ' + \
'<img loading="lazy" title="' + translate['announces'] + \
'" alt="' + translate['announces'] + \
'" src="/' + iconsDir + \
'" src="/' + iconsPath + \
'/repeat_inactive.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
@ -836,7 +836,7 @@ def individualPostAsHtml(allowDownloads: bool,
' <img loading="lazy" title="' + \
translate['replying to themselves'] + \
'" alt="' + translate['replying to themselves'] + \
'" src="/' + iconsDir + \
'" src="/' + iconsPath + \
'/reply.png" class="announceOrReply"/>\n'
else:
if '/statuses/' in postJsonObject['object']['inReplyTo']:
@ -888,7 +888,7 @@ def individualPostAsHtml(allowDownloads: bool,
'" alt="' + \
translate['replying to'] + \
'" src="/' + \
iconsDir + '/reply.png" ' + \
iconsPath + '/reply.png" ' + \
'class="announceOrReply"/>\n' + \
' ' + \
'<a href="' + inReplyTo + \
@ -950,7 +950,7 @@ def individualPostAsHtml(allowDownloads: bool,
'" alt="' + \
translate['replying to'] + \
'" src="/' + \
iconsDir + '/reply.png" ' + \
iconsPath + '/reply.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
inReplyTo + '">@' + \
@ -963,7 +963,7 @@ def individualPostAsHtml(allowDownloads: bool,
'" alt="' + \
translate['replying to'] + \
'" src="/' + \
iconsDir + \
iconsPath + \
'/reply.png" class="announceOrReply"/>\n' + \
' <a href="' + \
postJsonObject['object']['inReplyTo'] + \
@ -982,7 +982,7 @@ def individualPostAsHtml(allowDownloads: bool,
translate['replying to'] + \
'" alt="' + translate['replying to'] + \
'" src="/' + \
iconsDir + '/reply.png" ' + \
iconsPath + '/reply.png" ' + \
'class="announceOrReply"/>\n' + \
' <a href="' + \
postJsonObject['object']['inReplyTo'] + \
@ -1235,7 +1235,7 @@ def htmlIndividualPost(cssCache: {},
showPublishedDateOnly: bool) -> str:
"""Show an individual post as html
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
postStr = ''
if likedBy:
likedByNickname = getNicknameFromActor(likedBy)
@ -1271,7 +1271,7 @@ def htmlIndividualPost(cssCache: {},
postStr += \
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest, personCache,
nickname, domain, port, postJsonObject,
None, True, False,
@ -1294,7 +1294,7 @@ def htmlIndividualPost(cssCache: {},
postStr = \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest,
personCache,
nickname, domain, port,
@ -1323,7 +1323,7 @@ def htmlIndividualPost(cssCache: {},
postStr += \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest,
personCache,
nickname, domain, port, item,
@ -1350,14 +1350,14 @@ def htmlPostReplies(cssCache: {},
showPublishedDateOnly: bool) -> str:
"""Show the replies to an individual post as html
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
repliesStr = ''
if repliesJson.get('orderedItems'):
for item in repliesJson['orderedItems']:
repliesStr += \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest, personCache,
nickname, domain, port, item,
None, True, False,

View File

@ -245,7 +245,7 @@ def htmlProfileAfterSearch(cssCache: {},
profileStr += ' </form>\n'
profileStr += '</div>\n'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
i = 0
for item in parseUserFeed(session, outboxUrl, asHeader,
projectVersion, httpPrefix, domain):
@ -257,7 +257,7 @@ def htmlProfileAfterSearch(cssCache: {},
continue
profileStr += \
individualPostAsHtml(True, recentPostsCache, maxRecentPosts,
iconsDir, translate, None, baseDir,
iconsPath, translate, None, baseDir,
session, cachedWebfingers, personCache,
nickname, domain, port,
item, avatarUrl, False, False,
@ -273,7 +273,7 @@ def htmlProfileAfterSearch(cssCache: {},
def getProfileHeader(baseDir: str, nickname: str, domain: str,
domainFull: str, translate: {}, iconsDir: str,
domainFull: str, translate: {}, iconsPath: str,
defaultTimeline: str,
displayName: str,
avatarDescription: str,
@ -302,7 +302,7 @@ def getProfileHeader(baseDir: str, nickname: str, domain: str,
' <a href="/users/' + nickname + \
'/qrcode.png" alt="' + translate['QR Code'] + '" title="' + \
translate['QR Code'] + '">' + \
'<img class="qrcode" src="/' + iconsDir + \
'<img class="qrcode" src="/' + iconsPath + \
'/qrcode.png" /></a></p>\n'
htmlStr += ' <p>' + profileDescriptionShort + '</p>\n'
htmlStr += loginButton
@ -451,21 +451,21 @@ def htmlProfile(rssIconAtTop: bool,
donateSection += ' </center>\n'
donateSection += '</div>\n'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
if not authorized:
loginButton = headerButtonsFrontScreen(translate, nickname,
'features', authorized,
iconsAsButtons, iconsDir)
iconsAsButtons, iconsPath)
else:
editProfileStr = \
'<a class="imageAnchor" href="' + usersPath + '/editprofile">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/edit.png" title="' + translate['Edit'] + \
'" alt="| ' + translate['Edit'] + '" class="timelineicon"/></a>\n'
logoutStr = \
'<a class="imageAnchor" href="/logout">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/logout.png" title="' + translate['Logout'] + \
'" alt="| ' + translate['Logout'] + \
'" class="timelineicon"/></a>\n'
@ -553,11 +553,11 @@ def htmlProfile(rssIconAtTop: bool,
profileHeaderStr += ' <tbody>\n'
profileHeaderStr += ' <tr>\n'
profileHeaderStr += ' <td valign="top" class="col-left">\n'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
profileHeaderStr += \
getLeftColumnContent(baseDir, 'news', domainFull,
httpPrefix, translate,
iconsDir, False,
iconsPath, False,
False, None, rssIconAtTop, True,
True)
profileHeaderStr += ' </td>\n'
@ -566,7 +566,7 @@ def htmlProfile(rssIconAtTop: bool,
avatarUrl = profileJson['icon']['url']
profileHeaderStr = \
getProfileHeader(baseDir, nickname, domain,
domainFull, translate, iconsDir,
domainFull, translate, iconsPath,
defaultTimeline, displayName,
avatarDescription,
profileDescriptionShort,
@ -668,11 +668,11 @@ def htmlProfile(rssIconAtTop: bool,
if isSystemAccount(nickname):
profileFooterStr = ' </td>\n'
profileFooterStr += ' <td valign="top" class="col-right">\n'
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
profileFooterStr += \
getRightColumnContent(baseDir, 'news', domainFull,
httpPrefix, translate,
iconsDir, False, False,
iconsPath, False, False,
newswire, False,
False, None, False, False,
False, True, authorized, True)
@ -699,7 +699,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
"""Shows posts on the profile screen
These should only be public posts
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
separatorStr = htmlPostSeparator(baseDir, None)
profileStr = ''
maxItems = 4
@ -723,7 +723,7 @@ def htmlProfilePosts(recentPostsCache: {}, maxRecentPosts: int,
postStr = \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest,
personCache,
nickname, domain, port, item,
@ -754,7 +754,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
"""
profileStr = ''
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
if authorized and pageNumber:
if authorized and pageNumber > 1:
# page up arrow
@ -763,7 +763,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
' <a href="' + actor + '/' + feedName + \
'?page=' + str(pageNumber - 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pageup.png" title="' + \
iconsPath + '/pageup.png" title="' + \
translate['Page up'] + '" alt="' + \
translate['Page up'] + '"></a>\n' + \
' </center>\n'
@ -783,7 +783,7 @@ def htmlProfileFollowing(translate: {}, baseDir: str, httpPrefix: str,
' <a href="' + actor + '/' + feedName + \
'?page=' + str(pageNumber + 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pagedown.png" title="' + \
iconsPath + '/pagedown.png" title="' + \
translate['Page down'] + '" alt="' + \
translate['Page down'] + '"></a>\n' + \
' </center>\n'

View File

@ -100,7 +100,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
callingDomain: str) -> str:
"""Search results for shared items
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
currPage = 1
ctr = 0
sharedItemsForm = ''
@ -211,7 +211,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
'" type="submit" name="submitSearch">\n'
sharedItemsForm += \
' <img loading="lazy" ' + \
'class="pageicon" src="/' + iconsDir + \
'class="pageicon" src="/' + iconsPath + \
'/pageup.png" title="' + \
translate['Page up'] + \
'" alt="' + translate['Page up'] + \
@ -245,7 +245,7 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
'" type="submit" name="submitSearch">\n'
sharedItemsForm += \
' <img loading="lazy" ' + \
'class="pageicon" src="/' + iconsDir + \
'class="pageicon" src="/' + iconsPath + \
'/pagedown.png" title="' + \
translate['Page down'] + \
'" alt="' + translate['Page down'] + \
@ -479,7 +479,7 @@ def htmlHashtagSearch(cssCache: {},
print('WARN: hashtag file not found ' + hashtagIndexFile)
return None
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
separatorStr = htmlPostSeparator(baseDir, None)
# check that the directory for the nickname exists
@ -527,7 +527,7 @@ def htmlHashtagSearch(cssCache: {},
'<img style="width:3%;min-width:50px" ' + \
'loading="lazy" alt="RSS 2.0" ' + \
'title="RSS 2.0" src="/' + \
iconsDir + '/logorss.png" /></a></center>'
iconsPath + '/logorss.png" /></a></center>'
if startIndex > 0:
# previous page link
@ -536,7 +536,7 @@ def htmlHashtagSearch(cssCache: {},
' <a href="/tags/' + hashtag + '?page=' + \
str(pageNumber - 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pageup.png" title="' + \
iconsPath + '/pageup.png" title="' + \
translate['Page up'] + \
'" alt="' + translate['Page up'] + \
'"></a>\n </center>\n'
@ -571,7 +571,7 @@ def htmlHashtagSearch(cssCache: {},
postStr = \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest,
personCache,
nickname, domain, port,
@ -594,7 +594,7 @@ def htmlHashtagSearch(cssCache: {},
' <center>\n' + \
' <a href="/tags/' + hashtag + \
'?page=' + str(pageNumber + 1) + \
'"><img loading="lazy" class="pageicon" src="/' + iconsDir + \
'"><img loading="lazy" class="pageicon" src="/' + iconsPath + \
'/pagedown.png" title="' + translate['Page down'] + \
'" alt="' + translate['Page down'] + '"></a>' + \
' </center>'
@ -878,7 +878,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
'</h5></center>'
return historySearchForm
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
separatorStr = htmlPostSeparator(baseDir, None)
# ensure that the page number is in bounds
@ -909,7 +909,7 @@ def htmlHistorySearch(cssCache: {}, translate: {}, baseDir: str,
postStr = \
individualPostAsHtml(True, recentPostsCache,
maxRecentPosts,
iconsDir, translate, None,
iconsPath, translate, None,
baseDir, session, wfRequest,
personCache,
nickname, domain, port,

View File

@ -101,7 +101,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# directory where icons are found
# This changes depending upon theme
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
separatorStr = ''
if boxName != 'tlmedia':
@ -212,7 +212,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
'class="timelineicon" alt="' + \
translate['Approve follow requests'] + \
'" title="' + translate['Approve follow requests'] + \
'" src="/' + iconsDir + '/person.png"/></a>\n'
'" src="/' + iconsPath + '/person.png"/></a>\n'
break
# benchmark 3
@ -275,7 +275,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/newdm"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \
iconsPath + '/newpost.png" title="' + \
translate['Create a new DM'] + \
'" alt="| ' + translate['Create a new DM'] + \
'" class="timelineicon"/></a>\n'
@ -289,7 +289,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/newblog"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \
iconsPath + '/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \
translate['Create a new post'] + \
'" class="timelineicon"/></a>\n'
@ -303,7 +303,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/newevent"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \
iconsPath + '/newpost.png" title="' + \
translate['Create a new event'] + '" alt="| ' + \
translate['Create a new event'] + \
'" class="timelineicon"/></a>\n'
@ -318,7 +318,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/newpost"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \
iconsPath + '/newpost.png" title="' + \
translate['Create a new post'] + '" alt="| ' + \
translate['Create a new post'] + \
'" class="timelineicon"/></a>\n'
@ -332,7 +332,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
newPostButtonStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/newfollowers"><img loading="lazy" src="/' + \
iconsDir + '/newpost.png" title="' + \
iconsPath + '/newpost.png" title="' + \
translate['Create a new post'] + \
'" alt="| ' + translate['Create a new post'] + \
'" class="timelineicon"/></a>\n'
@ -367,7 +367,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
sharesButtonStr, bookmarksButtonStr,
eventsButtonStr, moderationButtonStr,
newPostButtonStr, baseDir, nickname,
domain, iconsDir, timelineStartTime,
domain, iconsPath, timelineStartTime,
newCalendarEvent, calendarPath,
calendarImage, followApprovals,
iconsAsButtons)
@ -390,7 +390,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# left column
leftColumnStr = \
getLeftColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, iconsDir,
httpPrefix, translate, iconsPath,
editor, False, None, rssIconAtTop,
True, False)
tlStr += ' <td valign="top" class="col-left">' + \
@ -408,7 +408,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
sharesButtonStr, bookmarksButtonStr,
eventsButtonStr, moderationButtonStr,
newPostButtonStr, baseDir, nickname,
domain, iconsDir, timelineStartTime,
domain, iconsPath, timelineStartTime,
newCalendarEvent, calendarPath,
calendarImage, followApprovals,
iconsAsButtons)
@ -482,7 +482,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
' <a href="' + usersPath + '/' + boxName + \
'?page=' + str(pageNumber - 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pageup.png" title="' + \
iconsPath + '/pageup.png" title="' + \
translate['Page up'] + '" alt="' + \
translate['Page up'] + '"></a>\n' + \
' </center>\n'
@ -542,7 +542,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
currTlStr = \
individualPostAsHtml(False, recentPostsCache,
maxRecentPosts,
iconsDir, translate, pageNumber,
iconsPath, translate, pageNumber,
baseDir, session, wfRequest,
personCache,
nickname, domain, port,
@ -579,7 +579,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
' <a href="' + usersPath + '/' + boxName + '?page=' + \
str(pageNumber + 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pagedown.png" title="' + \
iconsPath + '/pagedown.png" title="' + \
translate['Page down'] + '" alt="' + \
translate['Page down'] + '"></a>\n' + \
' </center>\n'
@ -589,7 +589,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
# right column
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
httpPrefix, translate, iconsDir,
httpPrefix, translate, iconsPath,
moderator, editor,
newswire, positiveVoting,
False, None, True,
@ -662,13 +662,13 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
timelineStr = ''
if pageNumber > 1:
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
timelineStr += \
' <center>\n' + \
' <a href="' + actor + '/tlshares?page=' + \
str(pageNumber - 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pageup.png" title="' + translate['Page up'] + \
iconsPath + '/pageup.png" title="' + translate['Page up'] + \
'" alt="' + translate['Page up'] + '"></a>\n' + \
' </center>\n'
@ -685,13 +685,13 @@ def htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
showContactButton, showRemoveButton)
if not lastPage:
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
timelineStr += \
' <center>\n' + \
' <a href="' + actor + '/tlshares?page=' + \
str(pageNumber + 1) + \
'"><img loading="lazy" class="pageicon" src="/' + \
iconsDir + '/pagedown.png" title="' + translate['Page down'] + \
iconsPath + '/pagedown.png" title="' + translate['Page down'] + \
'" alt="' + translate['Page down'] + '"></a>\n' + \
' </center>\n'
@ -731,7 +731,7 @@ def headerButtonsTimeline(defaultTimeline: str,
newPostButtonStr: str,
baseDir: str,
nickname: str, domain: str,
iconsDir: str,
iconsPath: str,
timelineStartTime,
newCalendarEvent: bool,
calendarPath: str,
@ -910,7 +910,7 @@ def headerButtonsTimeline(defaultTimeline: str,
tlStr += \
'<a class="imageAnchor" href="' + usersPath + \
'/search"><img loading="lazy" src="/' + \
iconsDir + '/search.png" title="' + \
iconsPath + '/search.png" title="' + \
translate['Search and follow'] + '" alt="| ' + \
translate['Search and follow'] + \
'" class="timelineicon"/></a>'
@ -937,7 +937,7 @@ def headerButtonsTimeline(defaultTimeline: str,
tlStr += \
' <a class="imageAnchor" href="' + \
usersPath + calendarPath + \
'"><img loading="lazy" src="/' + iconsDir + '/' + \
'"><img loading="lazy" src="/' + iconsPath + '/' + \
calendarImage + '" title="' + translate['Calendar'] + \
'" alt="| ' + calendarAltText + \
'" class="timelineicon"/></a>\n'
@ -954,7 +954,7 @@ def headerButtonsTimeline(defaultTimeline: str,
tlStr += \
' <a class="imageAnchor" href="' + \
usersPath + '/minimal' + \
'"><img loading="lazy" src="/' + iconsDir + \
'"><img loading="lazy" src="/' + iconsPath + \
'/showhide.png" title="' + translate['Show/Hide Buttons'] + \
'" alt="| ' + translate['Show/Hide Buttons'] + \
'" class="timelineicon"/></a>\n'
@ -976,7 +976,7 @@ def headerButtonsTimeline(defaultTimeline: str,
tlStr += \
'<a class="imageAnchorMobile" href="' + \
usersPath + '/newswiremobile">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/newswire.png" title="' + translate['News'] + \
'" alt="| ' + translate['News'] + \
'" class="timelineicon"/></a>'
@ -994,7 +994,7 @@ def headerButtonsTimeline(defaultTimeline: str,
tlStr += \
'<a class="imageAnchorMobile" href="' + \
usersPath + '/linksmobile">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/links.png" title="' + translate['Edit Links'] + \
'" alt="| ' + translate['Edit Links'] + \
'" class="timelineicon"/></a>'

View File

@ -283,12 +283,12 @@ def getPersonAvatarUrl(baseDir: str, personUrl: str, personCache: {},
def getIconsWebPath(baseDir: str) -> str:
"""Returns the web path where icons exist
"""
iconsDir = 'icons'
iconsPath = 'icons'
theme = getConfigParam(baseDir, 'theme')
if theme:
if os.path.isdir(baseDir + '/theme/' + theme + '/icons'):
iconsDir = 'icons/' + theme
return iconsDir
iconsPath = 'icons/' + theme
return iconsPath
def scheduledPostsExist(baseDir: str, nickname: str, domain: str) -> bool:
@ -725,7 +725,7 @@ def getPostAttachmentsAsHtml(postJsonObject: {}, boxName: str, translate: {},
def htmlPostSeparator(baseDir: str, column: str) -> str:
"""Returns the html for a timeline post separator image
"""
iconsDir = getIconsWebPath(baseDir)
iconsPath = getIconsWebPath(baseDir)
theme = getConfigParam(baseDir, 'theme')
filename = 'separator.png'
if column:
@ -735,7 +735,7 @@ def htmlPostSeparator(baseDir: str, column: str) -> str:
if os.path.isfile(separatorImageFilename):
separatorStr = \
'<div class="postSeparatorImage"><center>' + \
'<img src="/' + iconsDir + '/' + filename + '"/>' + \
'<img src="/' + iconsPath + '/' + filename + '"/>' + \
'</center></div>\n'
return separatorStr
@ -744,7 +744,7 @@ def headerButtonsFrontScreen(translate: {},
nickname: str, boxName: str,
authorized: bool,
iconsAsButtons: bool,
iconsDir: bool) -> str:
iconsPath: bool) -> str:
"""Returns the header buttons for the front page of a news instance
"""
headerStr = ''
@ -785,13 +785,13 @@ def headerButtonsFrontScreen(translate: {},
headerStr += \
' <a href="' + \
'/users/news/newswiremobile">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/newswire.png" title="' + translate['Newswire'] + \
'" alt="| ' + translate['Newswire'] + '"/></a>\n'
headerStr += \
' <a href="' + \
'/users/news/linksmobile">' + \
'<img loading="lazy" src="/' + iconsDir + \
'<img loading="lazy" src="/' + iconsPath + \
'/links.png" title="' + translate['Links'] + \
'" alt="| ' + translate['Links'] + '"/></a>\n'
else: