forked from indymedia/epicyon
Add blogging instance to profile edit screen
parent
c1a03228ce
commit
a7e0c68a96
|
@ -3205,10 +3205,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
if fields['mediaInstance'] == 'on':
|
if fields['mediaInstance'] == 'on':
|
||||||
self.server.mediaInstance = True
|
self.server.mediaInstance = True
|
||||||
|
self.server.blogsInstance = False
|
||||||
self.server.defaultTimeline = 'tlmedia'
|
self.server.defaultTimeline = 'tlmedia'
|
||||||
setConfigParam(baseDir,
|
setConfigParam(baseDir,
|
||||||
"mediaInstance",
|
"mediaInstance",
|
||||||
self.server.mediaInstance)
|
self.server.mediaInstance)
|
||||||
|
setConfigParam(baseDir,
|
||||||
|
"blogsInstance",
|
||||||
|
self.server.blogsInstance)
|
||||||
else:
|
else:
|
||||||
if self.server.mediaInstance:
|
if self.server.mediaInstance:
|
||||||
self.server.mediaInstance = False
|
self.server.mediaInstance = False
|
||||||
|
@ -3223,10 +3227,14 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
self.server.defaultTimeline = 'inbox'
|
self.server.defaultTimeline = 'inbox'
|
||||||
if fields['blogsInstance'] == 'on':
|
if fields['blogsInstance'] == 'on':
|
||||||
self.server.blogsInstance = True
|
self.server.blogsInstance = True
|
||||||
|
self.server.mediaInstance = False
|
||||||
self.server.defaultTimeline = 'tlblogs'
|
self.server.defaultTimeline = 'tlblogs'
|
||||||
setConfigParam(baseDir,
|
setConfigParam(baseDir,
|
||||||
"blogsInstance",
|
"blogsInstance",
|
||||||
self.server.blogsInstance)
|
self.server.blogsInstance)
|
||||||
|
setConfigParam(baseDir,
|
||||||
|
"mediaInstance",
|
||||||
|
self.server.mediaInstance)
|
||||||
else:
|
else:
|
||||||
if self.server.blogsInstance:
|
if self.server.blogsInstance:
|
||||||
self.server.blogsInstance = False
|
self.server.blogsInstance = False
|
||||||
|
|
|
@ -615,11 +615,15 @@ if not args.mediainstance:
|
||||||
mediaInstance = getConfigParam(baseDir, 'mediaInstance')
|
mediaInstance = getConfigParam(baseDir, 'mediaInstance')
|
||||||
if mediaInstance is not None:
|
if mediaInstance is not None:
|
||||||
args.mediainstance = mediaInstance
|
args.mediainstance = mediaInstance
|
||||||
|
if args.mediainstance:
|
||||||
|
args.blogsinstance = False
|
||||||
|
|
||||||
if not args.blogsinstance:
|
if not args.blogsinstance:
|
||||||
blogsInstance = getConfigParam(baseDir, 'blogsInstance')
|
blogsInstance = getConfigParam(baseDir, 'blogsInstance')
|
||||||
if blogsInstance is not None:
|
if blogsInstance is not None:
|
||||||
args.blogsinstance = blogsInstance
|
args.blogsinstance = blogsInstance
|
||||||
|
if args.blogsinstance:
|
||||||
|
args.mediainstance = False
|
||||||
|
|
||||||
# set the instance title in config.json
|
# set the instance title in config.json
|
||||||
title = getConfigParam(baseDir, 'instanceTitle')
|
title = getConfigParam(baseDir, 'instanceTitle')
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "علامات التجزئة المُنشأة تلقائيًا",
|
"Autogenerated Hashtags": "علامات التجزئة المُنشأة تلقائيًا",
|
||||||
"Autogenerated Content Warnings": "تحذيرات المحتوى المُنشأ تلقائيًا",
|
"Autogenerated Content Warnings": "تحذيرات المحتوى المُنشأ تلقائيًا",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag محظور"
|
"Hashtag Blocked": "Hashtag محظور",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogenerats",
|
"Autogenerated Hashtags": "Hashtags autogenerats",
|
||||||
"Autogenerated Content Warnings": "Advertiments de contingut autogenerats",
|
"Autogenerated Content Warnings": "Advertiments de contingut autogenerats",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloquejat"
|
"Hashtag Blocked": "Hashtag bloquejat",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags awtogeneiddiedig",
|
"Autogenerated Hashtags": "Hashtags awtogeneiddiedig",
|
||||||
"Autogenerated Content Warnings": "Rhybuddion Cynnwys Autogenerated",
|
"Autogenerated Content Warnings": "Rhybuddion Cynnwys Autogenerated",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag wedi'i Blocio"
|
"Hashtag Blocked": "Hashtag wedi'i Blocio",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Automatisch generierte Hashtags",
|
"Autogenerated Hashtags": "Automatisch generierte Hashtags",
|
||||||
"Autogenerated Content Warnings": "Warnungen vor automatisch generierten Inhalten",
|
"Autogenerated Content Warnings": "Warnungen vor automatisch generierten Inhalten",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag blockiert"
|
"Hashtag Blocked": "Hashtag blockiert",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
||||||
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocked"
|
"Hashtag Blocked": "Hashtag Blocked",
|
||||||
|
"This is a blogging instance": "This is a blogging instance"
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogenerados",
|
"Autogenerated Hashtags": "Hashtags autogenerados",
|
||||||
"Autogenerated Content Warnings": "Advertencias de contenido generado automáticamente",
|
"Autogenerated Content Warnings": "Advertencias de contenido generado automáticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqueada"
|
"Hashtag Blocked": "Hashtag bloqueada",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags générés automatiquement",
|
"Autogenerated Hashtags": "Hashtags générés automatiquement",
|
||||||
"Autogenerated Content Warnings": "Avertissements de contenu générés automatiquement",
|
"Autogenerated Content Warnings": "Avertissements de contenu générés automatiquement",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqué"
|
"Hashtag Blocked": "Hashtag bloqué",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags uathghinte",
|
"Autogenerated Hashtags": "Hashtags uathghinte",
|
||||||
"Autogenerated Content Warnings": "Rabhaidh Ábhar Uathghinte",
|
"Autogenerated Content Warnings": "Rabhaidh Ábhar Uathghinte",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocáilte"
|
"Hashtag Blocked": "Hashtag Blocáilte",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "ऑटोजेनरेटेड हैशटैग",
|
"Autogenerated Hashtags": "ऑटोजेनरेटेड हैशटैग",
|
||||||
"Autogenerated Content Warnings": "स्वतः प्राप्त सामग्री चेतावनी",
|
"Autogenerated Content Warnings": "स्वतः प्राप्त सामग्री चेतावनी",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "हैशटैग अवरुद्ध"
|
"Hashtag Blocked": "हैशटैग अवरुद्ध",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtag generati automaticamente",
|
"Autogenerated Hashtags": "Hashtag generati automaticamente",
|
||||||
"Autogenerated Content Warnings": "Avvisi sui contenuti generati automaticamente",
|
"Autogenerated Content Warnings": "Avvisi sui contenuti generati automaticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloccato"
|
"Hashtag Blocked": "Hashtag bloccato",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "自動生成されたハッシュタグ",
|
"Autogenerated Hashtags": "自動生成されたハッシュタグ",
|
||||||
"Autogenerated Content Warnings": "自動生成されたコンテンツの警告",
|
"Autogenerated Content Warnings": "自動生成されたコンテンツの警告",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "ハッシュタグがブロックされました"
|
"Hashtag Blocked": "ハッシュタグがブロックされました",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -283,5 +283,6 @@
|
||||||
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
"Autogenerated Hashtags": "Autogenerated Hashtags",
|
||||||
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
"Autogenerated Content Warnings": "Autogenerated Content Warnings",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag Blocked"
|
"Hashtag Blocked": "Hashtag Blocked",
|
||||||
|
"This is a blogging instance": "This is a blogging instance"
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Hashtags autogeradas",
|
"Autogenerated Hashtags": "Hashtags autogeradas",
|
||||||
"Autogenerated Content Warnings": "Avisos de conteúdo gerado automaticamente",
|
"Autogenerated Content Warnings": "Avisos de conteúdo gerado automaticamente",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Hashtag bloqueada"
|
"Hashtag Blocked": "Hashtag bloqueada",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "Автоматически сгенерированные хештеги",
|
"Autogenerated Hashtags": "Автоматически сгенерированные хештеги",
|
||||||
"Autogenerated Content Warnings": "Автоматические предупреждения о содержании",
|
"Autogenerated Content Warnings": "Автоматические предупреждения о содержании",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "Хештег заблокирован"
|
"Hashtag Blocked": "Хештег заблокирован",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -287,5 +287,6 @@
|
||||||
"Autogenerated Hashtags": "自动生成的标签",
|
"Autogenerated Hashtags": "自动生成的标签",
|
||||||
"Autogenerated Content Warnings": "自动生成的内容警告",
|
"Autogenerated Content Warnings": "自动生成的内容警告",
|
||||||
"Indymedia": "Indymedia",
|
"Indymedia": "Indymedia",
|
||||||
"Hashtag Blocked": "标签被阻止"
|
"Hashtag Blocked": "标签被阻止",
|
||||||
|
"This is a blogging instance": ""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1230,6 +1230,7 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
|
||||||
notifyLikes = ''
|
notifyLikes = ''
|
||||||
hideLikeButton = ''
|
hideLikeButton = ''
|
||||||
mediaInstanceStr = ''
|
mediaInstanceStr = ''
|
||||||
|
blogsInstanceStr = ''
|
||||||
displayNickname = nickname
|
displayNickname = nickname
|
||||||
bioStr = ''
|
bioStr = ''
|
||||||
donateUrl = ''
|
donateUrl = ''
|
||||||
|
@ -1287,6 +1288,13 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
|
||||||
if mediaInstance:
|
if mediaInstance:
|
||||||
if mediaInstance is True:
|
if mediaInstance is True:
|
||||||
mediaInstanceStr = 'checked'
|
mediaInstanceStr = 'checked'
|
||||||
|
blogsInstanceStr = ''
|
||||||
|
|
||||||
|
blogsInstance = getConfigParam(baseDir, "blogInstance")
|
||||||
|
if blogsInstance:
|
||||||
|
if blogsInstance is True:
|
||||||
|
blogsInstanceStr = 'checked'
|
||||||
|
mediaInstanceStr = ''
|
||||||
|
|
||||||
filterStr = ''
|
filterStr = ''
|
||||||
filterFilename = \
|
filterFilename = \
|
||||||
|
@ -1607,6 +1615,19 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
' <input type="text" name="passwordconfirm" value="">\n'
|
' <input type="text" name="passwordconfirm" value="">\n'
|
||||||
editProfileForm += ' </div>\n'
|
editProfileForm += ' </div>\n'
|
||||||
|
|
||||||
|
if path.startswith('/users/' + adminNickname + '/'):
|
||||||
|
editProfileForm += ' <div class="container">\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="mediaInstance" ' + mediaInstanceStr + '> ' + \
|
||||||
|
translate['This is a media instance'] + '<br>\n'
|
||||||
|
editProfileForm += \
|
||||||
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
'name="blogsInstance" ' + blogsInstanceStr + '> ' + \
|
||||||
|
translate['This is a blogging instance'] + '<br>\n'
|
||||||
|
editProfileForm += ' </div>\n'
|
||||||
|
|
||||||
editProfileForm += ' <div class="container">\n'
|
editProfileForm += ' <div class="container">\n'
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
|
@ -1628,11 +1649,6 @@ def htmlEditProfile(translate: {}, baseDir: str, path: str,
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
'name="removeTwitter" ' + removeTwitter + '> ' + \
|
'name="removeTwitter" ' + removeTwitter + '> ' + \
|
||||||
translate['Remove Twitter posts'] + '<br>\n'
|
translate['Remove Twitter posts'] + '<br>\n'
|
||||||
if path.startswith('/users/' + adminNickname + '/'):
|
|
||||||
editProfileForm += \
|
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
|
||||||
'name="mediaInstance" ' + mediaInstanceStr + '> ' + \
|
|
||||||
translate['This is a media instance'] + '<br>\n'
|
|
||||||
editProfileForm += \
|
editProfileForm += \
|
||||||
' <input type="checkbox" class="profilecheckbox" ' + \
|
' <input type="checkbox" class="profilecheckbox" ' + \
|
||||||
'name="notifyLikes" ' + notifyLikes + '> ' + \
|
'name="notifyLikes" ' + notifyLikes + '> ' + \
|
||||||
|
|
Loading…
Reference in New Issue