forked from MarseyWorld/MarseyWorld
sfdsfdfsd
parent
c953fcd164
commit
5090fcd105
|
@ -54,7 +54,6 @@ app.config["SPAM_SIMILAR_COUNT_THRESHOLD"] = int(environ.get("SPAM_SIMILAR_COUNT
|
||||||
app.config["SPAM_URL_SIMILARITY_THRESHOLD"] = float(environ.get("SPAM_URL_SIMILARITY_THRESHOLD", 0.5))
|
app.config["SPAM_URL_SIMILARITY_THRESHOLD"] = float(environ.get("SPAM_URL_SIMILARITY_THRESHOLD", 0.5))
|
||||||
app.config["COMMENT_SPAM_SIMILAR_THRESHOLD"] = float(environ.get("COMMENT_SPAM_SIMILAR_THRESHOLD", 0.5))
|
app.config["COMMENT_SPAM_SIMILAR_THRESHOLD"] = float(environ.get("COMMENT_SPAM_SIMILAR_THRESHOLD", 0.5))
|
||||||
app.config["COMMENT_SPAM_COUNT_THRESHOLD"] = int(environ.get("COMMENT_SPAM_COUNT_THRESHOLD", 0.5))
|
app.config["COMMENT_SPAM_COUNT_THRESHOLD"] = int(environ.get("COMMENT_SPAM_COUNT_THRESHOLD", 0.5))
|
||||||
app.config["VIDEO_COIN_REQUIREMENT"] = int(environ.get("VIDEO_COIN_REQUIREMENT", 0))
|
|
||||||
app.config["READ_ONLY"]=bool(int(environ.get("READ_ONLY", "0")))
|
app.config["READ_ONLY"]=bool(int(environ.get("READ_ONLY", "0")))
|
||||||
app.config["BOT_DISABLE"]=bool(int(environ.get("BOT_DISABLE", False)))
|
app.config["BOT_DISABLE"]=bool(int(environ.get("BOT_DISABLE", False)))
|
||||||
app.config["RATELIMIT_KEY_PREFIX"] = "flask_limiting_"
|
app.config["RATELIMIT_KEY_PREFIX"] = "flask_limiting_"
|
||||||
|
|
|
@ -216,8 +216,8 @@ def sanitize(sanitized, noimages=False):
|
||||||
htmlsource += '"></lite-youtube>'
|
htmlsource += '"></lite-youtube>'
|
||||||
|
|
||||||
sanitized = sanitized.replace(replacing, htmlsource)
|
sanitized = sanitized.replace(replacing, htmlsource)
|
||||||
for i in re.finditer('<p>(https:.*?\.(mp4|webm))</p>', sanitized):
|
for i in re.finditer('>(https://.*?\.(mp4|webm|mov))</a></p>', sanitized):
|
||||||
sanitized = sanitized.replace(i.group(0), f'<p><video controls preload="none" class="embedvid"><source src="{i.group(1)}" type="video/{i.group(2)}"></video>')
|
sanitized = sanitized.replace(f'<p><a href="{i.group(1)}" rel="nofollow noopener noreferrer" target="_blank">{i.group(1)}</a></p>', f'<p><video controls preload="none" class="embedvid"><source src="{i.group(1)}" type="video/{i.group(2)}"></video>')
|
||||||
|
|
||||||
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
|
||||||
sanitized = sanitized.replace(rd, "https://old.reddit.com/")
|
sanitized = sanitized.replace(rd, "https://old.reddit.com/")
|
||||||
|
|
|
@ -10,10 +10,12 @@ from pusher_push_notifications import PushNotifications
|
||||||
from flask import *
|
from flask import *
|
||||||
from files.__main__ import app, limiter
|
from files.__main__ import app, limiter
|
||||||
from files.helpers.sanitize import filter_emojis_only
|
from files.helpers.sanitize import filter_emojis_only
|
||||||
|
import requests
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
if site == 'pcmemes.net': cc = "SPLASH MOUNTAIN"
|
||||||
else: cc = "COUNTRY CLUB"
|
else: cc = "COUNTRY CLUB"
|
||||||
|
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
||||||
|
|
||||||
beams_client = PushNotifications(
|
beams_client = PushNotifications(
|
||||||
instance_id=PUSHER_INSTANCE_ID,
|
instance_id=PUSHER_INSTANCE_ID,
|
||||||
|
@ -190,13 +192,17 @@ def api_comment(v):
|
||||||
|
|
||||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||||
file=request.files["file"]
|
file=request.files["file"]
|
||||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
if file.content_type.startswith('image/'):
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
url = process_image(name)
|
url = process_image(name)
|
||||||
|
elif file.content_type.startswith('video/'):
|
||||||
|
file.save("video.mp4")
|
||||||
|
with open("video.mp4", 'rb') as f:
|
||||||
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
body += f"\n\n![]({url})"
|
body += f"\n\n{url}"
|
||||||
|
|
||||||
if v.agendaposter and not v.marseyawarded:
|
if v.agendaposter and not v.marseyawarded:
|
||||||
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
for k, l in AJ_REPLACEMENTS.items(): body = body.replace(k, l)
|
||||||
|
@ -720,13 +726,17 @@ def edit_comment(cid, v):
|
||||||
|
|
||||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||||
file=request.files["file"]
|
file=request.files["file"]
|
||||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
if file.content_type.startswith('image/'):
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
url = process_image(name)
|
url = process_image(name)
|
||||||
|
elif file.content_type.startswith('video/'):
|
||||||
|
file.save("video.mp4")
|
||||||
|
with open("video.mp4", 'rb') as f:
|
||||||
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
body += f"\n\n![]({url})"
|
body += f"\n\n{url}"
|
||||||
body_md = CustomRenderer().render(mistletoe.Document(body))
|
body_md = CustomRenderer().render(mistletoe.Document(body))
|
||||||
body_html = sanitize(body_md)
|
body_html = sanitize(body_md)
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ from PIL import Image as PILimage
|
||||||
from .front import frontlist, changeloglist
|
from .front import frontlist, changeloglist
|
||||||
from urllib.parse import ParseResult, urlunparse, urlparse, quote
|
from urllib.parse import ParseResult, urlunparse, urlparse, quote
|
||||||
from os import path
|
from os import path
|
||||||
|
import requests
|
||||||
|
|
||||||
site = environ.get("DOMAIN").strip()
|
site = environ.get("DOMAIN").strip()
|
||||||
site_name = environ.get("SITE_NAME").strip()
|
site_name = environ.get("SITE_NAME").strip()
|
||||||
|
@ -420,13 +421,17 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
if request.files.get("file") and request.headers.get("cf-ipcountry") != "T1":
|
||||||
file=request.files["file"]
|
file=request.files["file"]
|
||||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
if file.content_type.startswith('image/'):
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
url = process_image(name)
|
url = process_image(name)
|
||||||
|
elif file.content_type.startswith('video/'):
|
||||||
|
file.save("video.mp4")
|
||||||
|
with open("video.mp4", 'rb') as f:
|
||||||
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
else: return {"error": f"Image/Video files only"}, 400
|
||||||
|
|
||||||
body += f"\n\n![]({url})"
|
body += f"\n\n{url}"
|
||||||
|
|
||||||
if body != p.body:
|
if body != p.body:
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE):
|
||||||
|
@ -916,13 +921,19 @@ def submit_post(v):
|
||||||
|
|
||||||
if request.files.get("file2") and request.headers.get("cf-ipcountry") != "T1":
|
if request.files.get("file2") and request.headers.get("cf-ipcountry") != "T1":
|
||||||
file=request.files["file2"]
|
file=request.files["file2"]
|
||||||
if not file.content_type.startswith('image/'): return {"error": "That wasn't an image!"}, 400
|
if file.content_type.startswith('image/'):
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
url = process_image(name)
|
url = process_image(name)
|
||||||
|
elif file.content_type.startswith('video/'):
|
||||||
|
file.save("video.mp4")
|
||||||
|
with open("video.mp4", 'rb') as f:
|
||||||
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
else:
|
||||||
|
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
||||||
|
else: return render_template("submit.html", v=v, error=f"Image/Video files only."), 400
|
||||||
|
|
||||||
body += f"\n\n![]({url})"
|
body += f"\n\n{url}"
|
||||||
|
|
||||||
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
body_html = sanitize(CustomRenderer().render(mistletoe.Document(body)))
|
||||||
|
|
||||||
|
@ -1003,20 +1014,6 @@ def submit_post(v):
|
||||||
if request.headers.get("Authorization"): return {"error": f"File type not allowed"}, 400
|
if request.headers.get("Authorization"): return {"error": f"File type not allowed"}, 400
|
||||||
else: return render_template("submit.html", v=v, error=f"File type not allowed.", title=title, body=request.values.get("body", "")), 400
|
else: return render_template("submit.html", v=v, error=f"File type not allowed.", title=title, body=request.values.get("body", "")), 400
|
||||||
|
|
||||||
if file.content_type.startswith('video/') and v.truecoins < app.config["VIDEO_COIN_REQUIREMENT"] and v.admin_level < 1:
|
|
||||||
if request.headers.get("Authorization"):
|
|
||||||
return {
|
|
||||||
"error": f"You need at least {app.config['VIDEO_COIN_REQUIREMENT']} coins to upload videos"
|
|
||||||
}, 403
|
|
||||||
else:
|
|
||||||
return render_template(
|
|
||||||
"submit.html",
|
|
||||||
v=v,
|
|
||||||
error=f"You need at least {app.config['VIDEO_COIN_REQUIREMENT']} coins to upload videos.",
|
|
||||||
title=title,
|
|
||||||
body=request.values.get("body", "")
|
|
||||||
), 403
|
|
||||||
|
|
||||||
if file.content_type.startswith('image/'):
|
if file.content_type.startswith('image/'):
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
|
@ -1025,7 +1022,7 @@ def submit_post(v):
|
||||||
elif file.content_type.startswith('video/'):
|
elif file.content_type.startswith('video/'):
|
||||||
file.save("video.mp4")
|
file.save("video.mp4")
|
||||||
with open("video.mp4", 'rb') as f:
|
with open("video.mp4", 'rb') as f:
|
||||||
new_post.url = requests.post('https://catbox.moe/user/api.php', timeout=5, data={'userhash':CATBOX_KEY, 'reqtype':'fileupload'}, files={'fileToUpload':f}).text
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
|
||||||
g.db.add(new_post)
|
g.db.add(new_post)
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ YOUTUBE_KEY = environ.get("YOUTUBE_KEY", "").strip()
|
||||||
COINS_NAME = environ.get("COINS_NAME").strip()
|
COINS_NAME = environ.get("COINS_NAME").strip()
|
||||||
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
GUMROAD_TOKEN = environ.get("GUMROAD_TOKEN", "").strip()
|
||||||
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
SITE_NAME = environ.get("SITE_NAME", "").strip()
|
||||||
|
CATBOX_KEY = environ.get("CATBOX_KEY").strip()
|
||||||
|
|
||||||
tiers={
|
tiers={
|
||||||
"(Paypig)": 1,
|
"(Paypig)": 1,
|
||||||
|
@ -116,50 +117,6 @@ def settings_profile_post(v):
|
||||||
updated = True
|
updated = True
|
||||||
v.is_nofollow = request.values.get("nofollow", None) == 'true'
|
v.is_nofollow = request.values.get("nofollow", None) == 'true'
|
||||||
|
|
||||||
elif request.values.get("bio") or request.files.get('file') and request.headers.get("cf-ipcountry") != "T1":
|
|
||||||
bio = request.values.get("bio")[:1500]
|
|
||||||
|
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', bio, re.MULTILINE):
|
|
||||||
if "wikipedia" not in i.group(1): bio = bio.replace(i.group(1), f'![]({i.group(1)})')
|
|
||||||
|
|
||||||
if request.files.get('file'):
|
|
||||||
file = request.files['file']
|
|
||||||
if not file.content_type.startswith('image/'):
|
|
||||||
if request.headers.get("Authorization"): return {"error": f"Image files only"}, 400
|
|
||||||
else: return render_template("settings_profile.html", v=v, error=f"Image files only."), 400
|
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
|
||||||
file.save(name)
|
|
||||||
url = process_image(name)
|
|
||||||
|
|
||||||
bio += f"\n\n![]({url})"
|
|
||||||
|
|
||||||
bio_html = CustomRenderer().render(mistletoe.Document(bio))
|
|
||||||
bio_html = sanitize(bio_html)
|
|
||||||
bans = filter_comment_html(bio_html)
|
|
||||||
|
|
||||||
if bans:
|
|
||||||
ban = bans[0]
|
|
||||||
reason = f"Remove the {ban.domain} link from your bio and try again."
|
|
||||||
if ban.reason:
|
|
||||||
reason += f" {ban.reason}"
|
|
||||||
|
|
||||||
return {"error": reason}, 401
|
|
||||||
|
|
||||||
if len(bio_html) > 10000:
|
|
||||||
return render_template("settings_profile.html",
|
|
||||||
v=v,
|
|
||||||
error="Your bio is too long")
|
|
||||||
|
|
||||||
v.bio = bio[:1500]
|
|
||||||
v.bio_html=bio_html
|
|
||||||
g.db.add(v)
|
|
||||||
g.db.commit()
|
|
||||||
return render_template("settings_profile.html",
|
|
||||||
v=v,
|
|
||||||
msg="Your bio has been updated.")
|
|
||||||
|
|
||||||
|
|
||||||
elif request.values.get("bio") == "":
|
elif request.values.get("bio") == "":
|
||||||
v.bio = None
|
v.bio = None
|
||||||
v.bio_html = None
|
v.bio_html = None
|
||||||
|
@ -314,15 +271,19 @@ def settings_profile_post(v):
|
||||||
|
|
||||||
if request.files.get('file'):
|
if request.files.get('file'):
|
||||||
file = request.files['file']
|
file = request.files['file']
|
||||||
if not file.content_type.startswith('image/'):
|
if file.content_type.startswith('image/'):
|
||||||
if request.headers.get("Authorization"): return {"error": f"Image files only"}, 400
|
|
||||||
else: return render_template("settings_profile.html", v=v, error=f"Image files only."), 400
|
|
||||||
|
|
||||||
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
name = f'/images/{time.time()}'.replace('.','')[:-5] + '.webp'
|
||||||
file.save(name)
|
file.save(name)
|
||||||
url = process_image(name)
|
url = process_image(name)
|
||||||
|
elif file.content_type.startswith('video/'):
|
||||||
|
file.save("video.mp4")
|
||||||
|
with open("video.mp4", 'rb') as f:
|
||||||
|
url = requests.request("POST", "https://api.imgur.com/3/upload", headers={'Authorization': f'Client-ID {CATBOX_KEY}'}, files=[('video', f)]).json()['data']['link']
|
||||||
|
else:
|
||||||
|
if request.headers.get("Authorization"): return {"error": f"Image/Video files only"}, 400
|
||||||
|
else: return render_template("settings_profile.html", v=v, error=f"Image/Video files only."), 400
|
||||||
|
|
||||||
bio += f"\n\n![]({url})"
|
bio += f"\n\n{url}"
|
||||||
|
|
||||||
bio_html = CustomRenderer().render(mistletoe.Document(bio))
|
bio_html = CustomRenderer().render(mistletoe.Document(bio))
|
||||||
bio_html = sanitize(bio_html)
|
bio_html = sanitize(bio_html)
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<div id="filename-edit-reply-{{c.id}}">
|
<div id="filename-edit-reply-{{c.id}}">
|
||||||
<i class="fas fa-camera fa-fw fa-sm"></i>
|
<i class="fas fa-camera fa-fw fa-sm"></i>
|
||||||
</div>
|
</div>
|
||||||
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
|
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
|
||||||
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="hidden d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
|
<a id="cancel-edit-{{c.id}}" href="javascript:void(0)" onclick="toggleEdit('{{c.id}}')" class="hidden d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div id="filename-show-reply-{{p.fullname}}">
|
<div id="filename-show-reply-{{p.fullname}}">
|
||||||
<i class="fas fa-camera fa-fw fa-sm"></i>
|
<i class="fas fa-camera fa-fw fa-sm"></i>
|
||||||
</div>
|
</div>
|
||||||
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image';" hidden>
|
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<div id="filename-show-reply-{{c.fullname}}">
|
<div id="filename-show-reply-{{c.fullname}}">
|
||||||
<i class="fas fa-camera fa-fw fa-sm"></i>
|
<i class="fas fa-camera fa-fw fa-sm"></i>
|
||||||
</div>
|
</div>
|
||||||
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -67,7 +67,7 @@
|
||||||
|
|
||||||
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
|
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
|
||||||
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*, video/*" onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('hidden')" class="hidden d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
|
<a href="javascript:void(0)" onclick="document.getElementById('reply-to-{{c.id}}').classList.add('hidden')" class="hidden d-md-block btn btn-link text-muted ml-auto cancel-form">Cancel</a>
|
||||||
<a id="save-reply-to-{{c.fullname}}" class="hidden d-md-block btn btn-primary text-muted ml-2" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" href="javascript:void(0)">Comment</a>
|
<a id="save-reply-to-{{c.fullname}}" class="hidden d-md-block btn btn-primary text-muted ml-2" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" href="javascript:void(0)">Comment</a>
|
||||||
|
|
|
@ -96,7 +96,7 @@
|
||||||
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
|
<form action="/settings/images/banner" method="post" enctype="multipart/form-data">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
<label class="btn btn-secondary text-capitalize mr-2 mb-0">
|
||||||
Update<input type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" hidden name="banner" onchange="form.submit()">
|
Update<input type="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" hidden name="banner" onchange="form.submit()">
|
||||||
</label>
|
</label>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@
|
||||||
|
|
||||||
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
|
<label class="btn btn-secondary format d-inline-block m-0" for="file-edit-reply-{{c.id}}">
|
||||||
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
<div id="filename-edit-reply-{{c.id}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
<input id="file-edit-reply-{{c.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-edit-reply-{{c.id}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0)" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
<a href="javascript:void(0)" form="comment-edit-form-{{c.id}}" class="btn btn-primary ml-2 fl-r commentmob" onclick="comment_edit('{{c.id}}')">Save Edit</a>
|
||||||
|
@ -464,7 +464,7 @@
|
||||||
|
|
||||||
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
|
<label class="btn btn-secondary format d-inline-block m-0" for="file-upload-reply-{{c.fullname}}">
|
||||||
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
<div id="filename-show-reply-{{c.fullname}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
<input id="file-upload-reply-{{c.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{c.fullname}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<a id="save-reply-to-{{c.fullname}}" class="btn btn-primary text-white ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" href="javascript:void(0)">Comment</a>
|
<a id="save-reply-to-{{c.fullname}}" class="btn btn-primary text-white ml-2 fl-r commentmob" onclick="post_comment('{{c.fullname}}', '{{c.post.id}}');" href="javascript:void(0)">Comment</a>
|
||||||
|
|
|
@ -544,7 +544,7 @@
|
||||||
|
|
||||||
<label class="btn btn-secondary format d-inline-block m-0">
|
<label class="btn btn-secondary format d-inline-block m-0">
|
||||||
<div id="filename-show"><i class="far fa-image"></i></div>
|
<div id="filename-show"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*" onchange="document.getElementById('filename-show').innerHTML='image';" hidden>
|
<input id="file-upload" type="file" name="file" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} accept="image/*, video/*" onchange="document.getElementById('filename-show').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
|
@ -477,7 +477,7 @@
|
||||||
|
|
||||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-edit-{{p.id}}">
|
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-edit-{{p.id}}">
|
||||||
<div id="filename-show-edit-{{p.id}}"><i class="far fa-image"></i></div>
|
<div id="filename-show-edit-{{p.id}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload-edit-{{p.id}}" type="file" name="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-edit-{{p.id}}').innerHTML='image';" hidden>
|
<input id="file-upload-edit-{{p.id}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-edit-{{p.id}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<small class="format d-none"><i class="fas fa-link" aria-hidden="true"></i></small>
|
<small class="format d-none"><i class="fas fa-link" aria-hidden="true"></i></small>
|
||||||
|
@ -751,7 +751,7 @@
|
||||||
</label>
|
</label>
|
||||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
|
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-reply-{{p.fullname}}">
|
||||||
<div id="filename-show-reply-{{p.fullname}}"><i class="far fa-image"></i></div>
|
<div id="filename-show-reply-{{p.fullname}}"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image';" hidden>
|
<input id="file-upload-reply-{{p.fullname}}" type="file" name="file" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-reply-{{p.fullname}}').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
<a id="save-reply-to-{{p.fullname}}" href="javascript:void(0)" form="reply-to-{{p.fullname}}" class="btn btn-primary text-whitebtn ml-auto fl-r" onclick="post_comment('{{p.fullname}}', '{{p.id}}')">Comment</a>
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-submit">
|
<label class="format btn btn-secondary m-0 ml-1 {% if v %}d-inline-block{% else %}d-none{% endif %}" for="file-upload-submit">
|
||||||
<div id="filename-show-submit"><i class="far fa-image"></i></div>
|
<div id="filename-show-submit"><i class="far fa-image"></i></div>
|
||||||
<input id="file-upload-submit" type="file" name="file2" accept="image/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-submit').innerHTML='image';" hidden>
|
<input id="file-upload-submit" type="file" name="file2" accept="image/*, video/*" {% if request.headers.get('cf-ipcountry')=="T1" %}disabled{% endif %} onchange="document.getElementById('filename-show-submit').innerHTML='image';" hidden>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<pre></pre>
|
<pre></pre>
|
||||||
|
|
Loading…
Reference in New Issue