shorter links

pull/225/head
Aevann 2024-03-05 05:14:39 +02:00
parent 6955d48e92
commit d64699948d
3 changed files with 3 additions and 5 deletions

View File

@ -102,15 +102,13 @@ def approve_art(v, id):
move(old, filename)
process_image(filename, v, resize=entry.resize, trim=True)
entry_url = filename.replace('files', SITE_FULL_IMAGES)
author = request.values.get('author').strip()
author = get_user(author)
entry.author_id = author.id
g.db.add(entry)
badge_grant(author, entry.badge_id)
entry_url = f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/{entry.location_kind}/{entry.id}.webp"
if v.id != author.id:
msg = f"@{v.username} (a site admin) has approved a {entry.formatted_kind} you made:\n{entry_url}"

View File

@ -20,7 +20,7 @@
</a>
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/assets/images/WPD/sidebar/1.webp?x=7" %}
{% set image = SITE_FULL_IMAGES + "/i/WPD/sidebar/1.webp?x=7" %}
{% elif IS_FISTMAS() %}
{% set image = macros.random_image("assets/events/" ~ IS_EVENT() ~ "/images/sidebar/" ~ SITE_NAME ) %}
{% elif IS_EVENT() %}

View File

@ -17,7 +17,7 @@
{# DELETE_ME_PLS #}
{% if not v %}
{% set image = SITE_FULL_IMAGES + "/assets/images/rDrama/sidebar/63.webp?x=7" %}
{% set image = SITE_FULL_IMAGES + "/i/rDrama/sidebar/63.webp?x=7" %}
{% elif hole and hole.sidebarurls %}
{% set image = hole.random_sidebar %}
{% elif IS_FISTMAS() %}