forked from indymedia/epicyon
Tidying
parent
91f8466acc
commit
6035321888
|
@ -1281,6 +1281,13 @@ def addEmbeddedVideoFromSites(content: str,width=400,height=300) -> str:
|
||||||
return content
|
return content
|
||||||
return content
|
return content
|
||||||
|
|
||||||
|
def addEmbeddedElements(content: str) -> str:
|
||||||
|
"""Adds embedded elements for various media types
|
||||||
|
"""
|
||||||
|
content=addEmbeddedVideoFromSites(content)
|
||||||
|
content=addEmbeddedAudio(content)
|
||||||
|
return addEmbeddedVideo(content)
|
||||||
|
|
||||||
def individualPostAsHtml(baseDir: str, \
|
def individualPostAsHtml(baseDir: str, \
|
||||||
session,wfRequest: {},personCache: {}, \
|
session,wfRequest: {},personCache: {}, \
|
||||||
nickname: str,domain: str,port: int, \
|
nickname: str,domain: str,port: int, \
|
||||||
|
@ -1545,9 +1552,7 @@ def individualPostAsHtml(baseDir: str, \
|
||||||
|
|
||||||
if not postJsonObject['object']['sensitive']:
|
if not postJsonObject['object']['sensitive']:
|
||||||
contentStr=postJsonObject['object']['content']+attachmentStr
|
contentStr=postJsonObject['object']['content']+attachmentStr
|
||||||
contentStr=addEmbeddedVideoFromSites(contentStr)
|
contentStr=addEmbeddedElements(contentStr)
|
||||||
contentStr=addEmbeddedAudio(contentStr)
|
|
||||||
contentStr=addEmbeddedVideo(contentStr)
|
|
||||||
else:
|
else:
|
||||||
postID='post'+str(createPassword(8))
|
postID='post'+str(createPassword(8))
|
||||||
contentStr=''
|
contentStr=''
|
||||||
|
@ -1560,9 +1565,7 @@ def individualPostAsHtml(baseDir: str, \
|
||||||
contentStr+='<button class="cwButton" onclick="showContentWarning('+"'"+postID+"'"+')">SHOW MORE</button>'
|
contentStr+='<button class="cwButton" onclick="showContentWarning('+"'"+postID+"'"+')">SHOW MORE</button>'
|
||||||
contentStr+='<div class="cwText" id="'+postID+'">'
|
contentStr+='<div class="cwText" id="'+postID+'">'
|
||||||
contentStr+=postJsonObject['object']['content']+attachmentStr
|
contentStr+=postJsonObject['object']['content']+attachmentStr
|
||||||
contentStr=addEmbeddedVideoFromSites(contentStr)
|
contentStr=addEmbeddedElements(contentStr)
|
||||||
contentStr=addEmbeddedAudio(contentStr)
|
|
||||||
contentStr=addEmbeddedVideo(contentStr)
|
|
||||||
contentStr+='</div>'
|
contentStr+='</div>'
|
||||||
|
|
||||||
if postJsonObject['object'].get('tag'):
|
if postJsonObject['object'].get('tag'):
|
||||||
|
|
Loading…
Reference in New Issue