diff --git a/blog.py b/blog.py index b0681a5e6..418821163 100644 --- a/blog.py +++ b/blog.py @@ -10,7 +10,6 @@ import os from datetime import datetime from content import replaceEmojiFromTags -from webapp_utils import getIconsWebPath from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import getPostAttachmentsAsHtml @@ -392,7 +391,6 @@ def htmlBlogPost(authorized: bool, None, False) # show rss links - iconsPath = getIconsWebPath(baseDir) blogStr += '
'
blogStr += ''
+ 'icons/logorss.png" />'
# blogStr += ''
# blogStr += ''
+ # 'icons/rss3.png" />'
blogStr += '
'
if pageNumber > 1:
# show previous button
@@ -460,7 +457,7 @@ def htmlBlogPage(authorized: bool, session,
domainFull + '/blog/' + \
nickname + '?page=' + str(pageNumber-1) + '">' + \
'\n'
if len(timelineJson['orderedItems']) >= noOfItems:
# show next button
@@ -468,7 +465,7 @@ def htmlBlogPage(authorized: bool, session,
domainFull + '/blog/' + nickname + \
'?page=' + str(pageNumber + 1) + '">' + \
'
\n'
navigateStr += '
'
+ 'class="emojicalendar" src="/icons/calendar.png"/>'
dateAndLocation += \
''
dateAndLocation += ''
@@ -797,7 +791,7 @@ def htmlEditBlog(mediaInstance: bool, translate: {},
editBlogForm += '
Test1 test2 ' '#YetAnotherExcessivelyLongwindedAndBorin\ngHashtag
') + exampleText = \ + "Don't remove a p2p link " + \ + "rad:git:hwd1yrerc3mcgn8ga9rho3dqi4w33nep7kxmqezss4topyfgmexihp" + \ + "33xcw
" + resultText = removeLongWords(addWebLinks(exampleText), 40, []) + assert resultText == exampleText + def testAddEmoji(): print('testAddEmoji') @@ -2396,6 +2417,11 @@ def testFirstParagraphFromString(): def testParseFeedDate(): print('testParseFeedDate') + + pubDate = "Tue, 08 Dec 2020 06:24:38 -0600" + publishedDate = parseFeedDate(pubDate) + assert publishedDate == "2020-12-08 12:24:38+00:00" + pubDate = "2020-08-27T16:12:34+00:00" publishedDate = parseFeedDate(pubDate) assert publishedDate == "2020-08-27 16:12:34+00:00" diff --git a/theme/blue/icons/avatar_default.png b/theme/blue/icons/avatar_default.png new file mode 100644 index 000000000..f8cbb8f38 Binary files /dev/null and b/theme/blue/icons/avatar_default.png differ diff --git a/theme/debian/icons/avatar_default.png b/theme/debian/icons/avatar_default.png new file mode 100644 index 000000000..07599baeb Binary files /dev/null and b/theme/debian/icons/avatar_default.png differ diff --git a/theme/default/icons/avatar_default.png b/theme/default/icons/avatar_default.png new file mode 100644 index 000000000..f8cbb8f38 Binary files /dev/null and b/theme/default/icons/avatar_default.png differ diff --git a/theme/hacker/icons/avatar_default.png b/theme/hacker/icons/avatar_default.png new file mode 100644 index 000000000..66c11c47b Binary files /dev/null and b/theme/hacker/icons/avatar_default.png differ diff --git a/theme/henge/icons/avatar_default.png b/theme/henge/icons/avatar_default.png new file mode 100644 index 000000000..34e898654 Binary files /dev/null and b/theme/henge/icons/avatar_default.png differ diff --git a/theme/indymediaclassic/icons/avatar_default.png b/theme/indymediaclassic/icons/avatar_default.png new file mode 100644 index 000000000..261ae6239 Binary files /dev/null and b/theme/indymediaclassic/icons/avatar_default.png differ diff --git a/theme/indymediamodern/icons/avatar_default.png b/theme/indymediamodern/icons/avatar_default.png new file mode 100644 index 000000000..9089a1b66 Binary files /dev/null and b/theme/indymediamodern/icons/avatar_default.png differ diff --git a/theme/lcd/icons/avatar_default.png b/theme/lcd/icons/avatar_default.png new file mode 100644 index 000000000..74cc49969 Binary files /dev/null and b/theme/lcd/icons/avatar_default.png differ diff --git a/theme/light/icons/avatar_default.png b/theme/light/icons/avatar_default.png new file mode 100644 index 000000000..0196a526e Binary files /dev/null and b/theme/light/icons/avatar_default.png differ diff --git a/theme/night/icons/avatar_default.png b/theme/night/icons/avatar_default.png new file mode 100644 index 000000000..7b770cd0b Binary files /dev/null and b/theme/night/icons/avatar_default.png differ diff --git a/theme/purple/icons/avatar_default.png b/theme/purple/icons/avatar_default.png new file mode 100644 index 000000000..db87e722a Binary files /dev/null and b/theme/purple/icons/avatar_default.png differ diff --git a/theme/rc3/icons/avatar_default.png b/theme/rc3/icons/avatar_default.png new file mode 100644 index 000000000..b4eed9aed Binary files /dev/null and b/theme/rc3/icons/avatar_default.png differ diff --git a/theme/solidaric/icons/avatar_default.png b/theme/solidaric/icons/avatar_default.png new file mode 100644 index 000000000..bb95103d5 Binary files /dev/null and b/theme/solidaric/icons/avatar_default.png differ diff --git a/theme/starlight/icons/avatar_default.png b/theme/starlight/icons/avatar_default.png new file mode 100644 index 000000000..1a173f348 Binary files /dev/null and b/theme/starlight/icons/avatar_default.png differ diff --git a/theme/zen/icons/avatar_default.png b/theme/zen/icons/avatar_default.png new file mode 100644 index 000000000..31df35fc6 Binary files /dev/null and b/theme/zen/icons/avatar_default.png differ diff --git a/translations/ar.json b/translations/ar.json index b3752456c..2a96a612f 100644 --- a/translations/ar.json +++ b/translations/ar.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "حدد رمز التحرير لإضافة موجز ويب لـ RSS", "Select the edit icon to add web links": "حدد رمز التحرير لإضافة روابط الويب", - "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed" + "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed", + "Ask about a shared item.": "اسأل عن عنصر مشترك." } diff --git a/translations/ca.json b/translations/ca.json index 45a703b61..7ff65aab7 100644 --- a/translations/ca.json +++ b/translations/ca.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Seleccioneu la icona d'edició per afegir canals RSS", "Select the edit icon to add web links": "Seleccioneu la icona d'edició per afegir enllaços web", - "Hashtag Categories RSS Feed": "Feed RSS de categories de hashtag" + "Hashtag Categories RSS Feed": "Feed RSS de categories de hashtag", + "Ask about a shared item.": "Pregunteu sobre un element compartit." } diff --git a/translations/cy.json b/translations/cy.json index fd9d78d3f..b10bb537e 100644 --- a/translations/cy.json +++ b/translations/cy.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Dewiswch yr eicon golygu i ychwanegu porthwyr RSS", "Select the edit icon to add web links": "Dewiswch yr eicon golygu i ychwanegu dolenni gwe", - "Hashtag Categories RSS Feed": "Categorïau Hashtag RSS Feed" + "Hashtag Categories RSS Feed": "Categorïau Hashtag RSS Feed", + "Ask about a shared item.": "Gofynnwch am eitem a rennir." } diff --git a/translations/de.json b/translations/de.json index 27500796b..ebd9e4e5a 100644 --- a/translations/de.json +++ b/translations/de.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Wählen Sie das Bearbeitungssymbol, um RSS-Feeds hinzuzufügen", "Select the edit icon to add web links": "Wählen Sie das Bearbeitungssymbol, um Weblinks hinzuzufügen", - "Hashtag Categories RSS Feed": "Hashtag Kategorien RSS Feed" + "Hashtag Categories RSS Feed": "Hashtag Kategorien RSS Feed", + "Ask about a shared item.": "Fragen Sie nach einem gemeinsamen Artikel." } diff --git a/translations/en.json b/translations/en.json index cdf939477..45e450a1e 100644 --- a/translations/en.json +++ b/translations/en.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Select the edit icon to add RSS feeds", "Select the edit icon to add web links": "Select the edit icon to add web links", - "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed" + "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed", + "Ask about a shared item.": "Ask about a shared item." } diff --git a/translations/es.json b/translations/es.json index 7a8471633..12e541e78 100644 --- a/translations/es.json +++ b/translations/es.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Seleccione el icono de edición para agregar fuentes RSS", "Select the edit icon to add web links": "Seleccione el icono de edición para agregar enlaces web", - "Hashtag Categories RSS Feed": "Feed RSS de categorías de hashtags" + "Hashtag Categories RSS Feed": "Feed RSS de categorías de hashtags", + "Ask about a shared item.": "Pregunte por un elemento compartido." } diff --git a/translations/fr.json b/translations/fr.json index 0b00ed4b1..7816fc8f8 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Sélectionnez l'icône d'édition pour ajouter des flux RSS", "Select the edit icon to add web links": "Sélectionnez l'icône de modification pour ajouter des liens Web", - "Hashtag Categories RSS Feed": "Flux RSS des catégories Hashtag" + "Hashtag Categories RSS Feed": "Flux RSS des catégories Hashtag", + "Ask about a shared item.": "Renseignez-vous sur un élément partagé." } diff --git a/translations/ga.json b/translations/ga.json index 118845962..ac41d0205 100644 --- a/translations/ga.json +++ b/translations/ga.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Roghnaigh an deilbhín eagar chun fothaí RSS a chur leis", "Select the edit icon to add web links": "Roghnaigh an deilbhín eagar chun naisc ghréasáin a chur leis", - "Hashtag Categories RSS Feed": "Catagóirí Hashtag RSS Feed" + "Hashtag Categories RSS Feed": "Catagóirí Hashtag RSS Feed", + "Ask about a shared item.": "Fiafraigh faoi earra roinnte." } diff --git a/translations/hi.json b/translations/hi.json index 1bca2fa83..65fec21ff 100644 --- a/translations/hi.json +++ b/translations/hi.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "RSS फ़ीड जोड़ने के लिए संपादन आइकन का चयन करें", "Select the edit icon to add web links": "वेब लिंक जोड़ने के लिए संपादन आइकन का चयन करें", - "Hashtag Categories RSS Feed": "हैशटैग श्रेणियाँ आरएसएस फ़ीड" + "Hashtag Categories RSS Feed": "हैशटैग श्रेणियाँ आरएसएस फ़ीड", + "Ask about a shared item.": "एक साझा आइटम के बारे में पूछें।" } diff --git a/translations/it.json b/translations/it.json index 1c05b8908..fabd4f973 100644 --- a/translations/it.json +++ b/translations/it.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Seleziona l'icona di modifica per aggiungere feed RSS", "Select the edit icon to add web links": "Seleziona l'icona di modifica per aggiungere link web", - "Hashtag Categories RSS Feed": "Feed RSS delle categorie hashtag" + "Hashtag Categories RSS Feed": "Feed RSS delle categorie hashtag", + "Ask about a shared item.": "Chiedi informazioni su un elemento condiviso." } diff --git a/translations/ja.json b/translations/ja.json index 4e1065001..7bed89c46 100644 --- a/translations/ja.json +++ b/translations/ja.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "編集アイコンを選択してRSSフィードを追加します", "Select the edit icon to add web links": "編集アイコンを選択してWebリンクを追加します", - "Hashtag Categories RSS Feed": "ハッシュタグカテゴリRSSフィード" + "Hashtag Categories RSS Feed": "ハッシュタグカテゴリRSSフィード", + "Ask about a shared item.": "共有アイテムについて質問します。" } diff --git a/translations/oc.json b/translations/oc.json index b8fd14c6d..a224b833a 100644 --- a/translations/oc.json +++ b/translations/oc.json @@ -334,5 +334,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Select the edit icon to add RSS feeds", "Select the edit icon to add web links": "Select the edit icon to add web links", - "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed" + "Hashtag Categories RSS Feed": "Hashtag Categories RSS Feed", + "Ask about a shared item.": "Ask about a shared item." } diff --git a/translations/pt.json b/translations/pt.json index eda0cfe87..305243eac 100644 --- a/translations/pt.json +++ b/translations/pt.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Selecione o ícone de edição para adicionar feeds RSS", "Select the edit icon to add web links": "Selecione o ícone de edição para adicionar links da web", - "Hashtag Categories RSS Feed": "Feed RSS das categorias de hashtag" + "Hashtag Categories RSS Feed": "Feed RSS das categorias de hashtag", + "Ask about a shared item.": "Pergunte sobre um item compartilhado." } diff --git a/translations/ru.json b/translations/ru.json index 043800408..3c0155cea 100644 --- a/translations/ru.json +++ b/translations/ru.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "Щелкните значок редактирования, чтобы добавить RSS-каналы", "Select the edit icon to add web links": "Щелкните значок редактирования, чтобы добавить веб-ссылки", - "Hashtag Categories RSS Feed": "RSS-канал категорий хэштегов" + "Hashtag Categories RSS Feed": "RSS-канал категорий хэштегов", + "Ask about a shared item.": "Спросите об общем элементе." } diff --git a/translations/zh.json b/translations/zh.json index 38b30eabc..470be2cd5 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -338,5 +338,6 @@ "Debian": "Debian", "Select the edit icon to add RSS feeds": "选择编辑图标以添加RSS feed", "Select the edit icon to add web links": "选择编辑图标以添加Web链接", - "Hashtag Categories RSS Feed": "标签类别RSS提要" + "Hashtag Categories RSS Feed": "标签类别RSS提要", + "Ask about a shared item.": "询问共享项目。" } diff --git a/webapp_calendar.py b/webapp_calendar.py index f0a90d67a..7b5b25bd3 100644 --- a/webapp_calendar.py +++ b/webapp_calendar.py @@ -20,7 +20,6 @@ from happening import getCalendarEvents from webapp_utils import htmlHeaderWithExternalStyle from webapp_utils import htmlFooter from webapp_utils import getAltPath -from webapp_utils import getIconsWebPath def htmlCalendarDeleteConfirm(cssCache: {}, translate: {}, baseDir: str, @@ -122,8 +121,6 @@ def htmlCalendarDay(cssCache: {}, translate: {}, calendarStr += '\n' calendarStr += '\n' - iconsPath = getIconsWebPath(baseDir) - if dayEvents: for eventPost in dayEvents: eventTime = None @@ -156,7 +153,7 @@ def htmlCalendarDay(cssCache: {}, translate: {}, '">\n' + lineStr + '
\n' + lineStr = lineStr.strip() + words = lineStr.split(' ') + # get the link + linkStr = None + for word in words: + if word == '#': + continue + if word == '*': + continue + if '://' in word: + linkStr = word + break + if linkStr: + lineStr = lineStr.replace(linkStr, '').strip() + # avoid any dubious scripts being added + if '<' not in lineStr: + # remove trailing comma if present + if lineStr.endswith(','): + lineStr = lineStr[:len(lineStr)-1] + # add link to the returned html + htmlStr += \ + ' \n' linksFileContainsEntries = True + else: + if lineStr.startswith('#') or lineStr.startswith('*'): + lineStr = lineStr[1:].strip() + if firstSeparatorAdded: + htmlStr += separatorStr + firstSeparatorAdded = True + htmlStr += \ + '' + lineStr + '
\n' + linksFileContainsEntries = True if firstSeparatorAdded: htmlStr += separatorStr @@ -215,8 +263,6 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - iconsPath = getIconsWebPath(baseDir) - # is the user a site editor? if nickname == 'news': editor = False @@ -238,12 +284,12 @@ def htmlLinksMobile(cssCache: {}, baseDir: str, htmlStr += '' + \ @@ -324,8 +323,6 @@ def htmlCitations(baseDir: str, nickname: str, domain: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - # iconsPath = getIconsWebPath(baseDir) - htmlStr = htmlHeaderWithExternalStyle(cssFilename) # top banner @@ -422,8 +419,6 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, if os.path.isfile(baseDir + '/epicyon.css'): cssFilename = baseDir + '/epicyon.css' - iconsPath = getIconsWebPath(baseDir) - if nickname == 'news': editor = False moderator = False @@ -449,12 +444,12 @@ def htmlNewswireMobile(cssCache: {}, baseDir: str, nickname: str, htmlStr += '
\n'
+ 'icons/calendar.png"/>\n'
# select a date and time for this post
dateAndLocation += '\n'
@@ -506,7 +507,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dateAndLocation += \
'
\n'
+ 'icons/calendar.png"/>\n'
# select start time for the event
dateAndLocation += '\n'
@@ -519,7 +520,7 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dateAndLocation += \
'
\n'
+ 'icons/calendar.png"/>\n'
dateAndLocation += '\n'
dateAndLocation += '\n'
@@ -612,12 +613,11 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dropdownReportSuffix += '?mention=' + mentionedActor
dropDownContent = ''
- if not reportUrl:
+ if not reportUrl and not shareDescription:
dropDownContent = \
htmlNewPostDropDown(scopeIcon, scopeDescription,
replyStr,
translate,
- iconsPath,
showPublicOnDropdown,
defaultTimeline,
pathBase,
@@ -630,7 +630,9 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
dropdownEventSuffix,
dropdownReportSuffix)
else:
- mentionsStr = 'Re: ' + reportUrl + '\n\n' + mentionsStr
+ if not shareDescription:
+ # reporting a post to moderator
+ mentionsStr = 'Re: ' + reportUrl + '\n\n' + mentionsStr
newPostForm += \
'