From 8028813e0f7c4916d767f013ce84f582fbe79305 Mon Sep 17 00:00:00 2001
From: Jeremy Zhang
Date: Sat, 13 Jan 2018 18:37:42 +0000
Subject: [PATCH] Remove discordio partnership and repurpose it to custom
invite link field
---
discordbot/titanembeds/database/guilds.py | 2 +-
...repurposed_discordio_column_to_generic_.py | 28 ++++++++++++++++++
webapp/titanembeds/blueprints/admin/admin.py | 12 ++++----
webapp/titanembeds/blueprints/embed/embed.py | 10 ++++++-
webapp/titanembeds/blueprints/user/user.py | 12 ++++----
webapp/titanembeds/database/guilds.py | 2 +-
.../static/img/partners/discordio.png | Bin 9986 -> 0 bytes
.../static/js/administrate_guild.js | 8 ++---
webapp/titanembeds/templates/about.html.j2 | 19 ------------
.../templates/administrate_guild.html.j2 | 6 ++--
webapp/titanembeds/templates/embed.html.j2 | 4 +--
11 files changed, 60 insertions(+), 43 deletions(-)
create mode 100644 webapp/alembic/versions/0b7761d85555_repurposed_discordio_column_to_generic_.py
delete mode 100644 webapp/titanembeds/static/img/partners/discordio.png
diff --git a/discordbot/titanembeds/database/guilds.py b/discordbot/titanembeds/database/guilds.py
index 164382e..80ed764 100644
--- a/discordbot/titanembeds/database/guilds.py
+++ b/discordbot/titanembeds/database/guilds.py
@@ -19,7 +19,7 @@ class Guilds(Base):
emojis = db.Column(db.Text().with_variant(db.Text(length=4294967295), 'mysql')) # Guild Emojis
owner_id = db.Column(db.String(255)) # Snowflake of the owner
icon = db.Column(db.String(255)) # The icon string, null if none
- discordio = db.Column(db.String(255)) # Custom Discord.io Invite Link
+ invite_link = db.Column(db.String(255)) # Custom Discord Invite Link
def __init__(self, guild_id, name, roles, channels, webhooks, emojis, owner_id, icon):
self.guild_id = guild_id
diff --git a/webapp/alembic/versions/0b7761d85555_repurposed_discordio_column_to_generic_.py b/webapp/alembic/versions/0b7761d85555_repurposed_discordio_column_to_generic_.py
new file mode 100644
index 0000000..851b495
--- /dev/null
+++ b/webapp/alembic/versions/0b7761d85555_repurposed_discordio_column_to_generic_.py
@@ -0,0 +1,28 @@
+"""Repurposed discordio column to generic invite_link
+
+Revision ID: 0b7761d85555
+Revises: f146d173e028
+Create Date: 2018-01-13 18:13:51.542372
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '0b7761d85555'
+down_revision = 'f146d173e028'
+branch_labels = None
+depends_on = None
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.alter_column('guilds', 'discordio', new_column_name='invite_link')
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.alter_column('guilds', 'invite_link', new_column_name='discordio')
+ # ### end Alembic commands ###
diff --git a/webapp/titanembeds/blueprints/admin/admin.py b/webapp/titanembeds/blueprints/admin/admin.py
index 8bd3e8b..e30b30b 100644
--- a/webapp/titanembeds/blueprints/admin/admin.py
+++ b/webapp/titanembeds/blueprints/admin/admin.py
@@ -178,7 +178,7 @@ def administrate_guild(guild_id):
"mentions_limit": db_guild.mentions_limit,
"unauth_captcha": db_guild.unauth_captcha,
"icon": db_guild.icon,
- "discordio": db_guild.discordio if db_guild.discordio != None else "",
+ "invite_link": db_guild.invite_link if db_guild.invite_link != None else "",
"guest_icon": db_guild.guest_icon if db_guild.guest_icon != None else "",
}
return render_template("administrate_guild.html.j2", guild=dbguild_dict, members=users, permissions=permissions, cosmetics=cosmetics)
@@ -194,10 +194,10 @@ def update_administrate_guild(guild_id):
db_guild.bracket_links = request.form.get("bracket_links", db_guild.bracket_links) in ["true", True]
db_guild.mentions_limit = request.form.get("mentions_limit", db_guild.mentions_limit)
db_guild.unauth_captcha = request.form.get("unauth_captcha", db_guild.unauth_captcha) in ["true", True]
- discordio = request.form.get("discordio", db_guild.discordio)
- if discordio != None and discordio.strip() == "":
- discordio = None
- db_guild.discordio = discordio
+ invite_link = request.form.get("invite_link", db_guild.invite_link)
+ if invite_link != None and invite_link.strip() == "":
+ invite_link = None
+ db_guild.invite_link = invite_link
guest_icon = request.form.get("guest_icon", db_guild.guest_icon)
if guest_icon != None and guest_icon.strip() == "":
guest_icon = None
@@ -213,7 +213,7 @@ def update_administrate_guild(guild_id):
chat_links=db_guild.chat_links,
bracket_links=db_guild.bracket_links,
mentions_limit=db_guild.mentions_limit,
- discordio=db_guild.discordio,
+ invite_link=db_guild.invite_link,
guest_icon=db_guild.guest_icon,
unauth_captcha=db_guild.unauth_captcha,
)
diff --git a/webapp/titanembeds/blueprints/embed/embed.py b/webapp/titanembeds/blueprints/embed/embed.py
index 8d1bc93..bd352f4 100644
--- a/webapp/titanembeds/blueprints/embed/embed.py
+++ b/webapp/titanembeds/blueprints/embed/embed.py
@@ -6,6 +6,7 @@ from titanembeds.database import db, Guilds, UserCSS, list_disabled_guilds
from config import config
import random
import json
+from urllib.parse import urlparse
embed = Blueprint("embed", __name__)
@@ -52,6 +53,12 @@ def parse_css_variable(css):
return CSS_VARIABLES_TEMPLATE % variables
return None
+def parse_url_domain(url):
+ parsed = urlparse(url)
+ if parsed.netloc != "":
+ return parsed.netloc
+ return url
+
@embed.route("/")
def guild_embed(guild_id):
if check_guild_existance(guild_id):
@@ -61,7 +68,8 @@ def guild_embed(guild_id):
"name": guild.name,
"unauth_users": guild.unauth_users,
"icon": guild.icon,
- "discordio": guild.discordio,
+ "invite_link": guild.invite_link,
+ "invite_domain": parse_url_domain(guild.invite_link),
}
customcss = get_custom_css()
return render_template("embed.html.j2",
diff --git a/webapp/titanembeds/blueprints/user/user.py b/webapp/titanembeds/blueprints/user/user.py
index 34ad933..f5ef15f 100644
--- a/webapp/titanembeds/blueprints/user/user.py
+++ b/webapp/titanembeds/blueprints/user/user.py
@@ -215,7 +215,7 @@ def administrate_guild(guild_id):
"mentions_limit": db_guild.mentions_limit,
"unauth_captcha": db_guild.unauth_captcha,
"icon": db_guild.icon,
- "discordio": db_guild.discordio if db_guild.discordio != None else "",
+ "invite_link": db_guild.invite_link if db_guild.invite_link != None else "",
"guest_icon": db_guild.guest_icon if db_guild.guest_icon != None else "",
}
return render_template("administrate_guild.html.j2", guild=dbguild_dict, members=users, permissions=permissions, cosmetics=cosmetics, disabled=(guild_id in list_disabled_guilds()))
@@ -240,10 +240,10 @@ def update_administrate_guild(guild_id):
db_guild.mentions_limit = request.form.get("mentions_limit", db_guild.mentions_limit)
db_guild.unauth_captcha = request.form.get("unauth_captcha", db_guild.unauth_captcha) in ["true", True]
- discordio = request.form.get("discordio", db_guild.discordio)
- if discordio != None and discordio.strip() == "":
- discordio = None
- db_guild.discordio = discordio
+ invite_link = request.form.get("invite_link", db_guild.invite_link)
+ if invite_link != None and invite_link.strip() == "":
+ invite_link = None
+ db_guild.invite_link = invite_link
guest_icon = request.form.get("guest_icon", db_guild.guest_icon)
if guest_icon != None and guest_icon.strip() == "":
@@ -261,7 +261,7 @@ def update_administrate_guild(guild_id):
chat_links=db_guild.chat_links,
bracket_links=db_guild.bracket_links,
mentions_limit=db_guild.mentions_limit,
- discordio=db_guild.discordio,
+ invite_link=db_guild.invite_link,
guest_icon=guest_icon,
unauth_captcha=db_guild.unauth_captcha,
)
diff --git a/webapp/titanembeds/database/guilds.py b/webapp/titanembeds/database/guilds.py
index 6d6b956..13741b5 100644
--- a/webapp/titanembeds/database/guilds.py
+++ b/webapp/titanembeds/database/guilds.py
@@ -19,7 +19,7 @@ class Guilds(db.Model):
emojis = db.Column(db.Text().with_variant(db.Text(4294967295), 'mysql'), nullable=False) # Guild Emojis
owner_id = db.Column(db.String(255), nullable=False) # Snowflake of the owner
icon = db.Column(db.String(255)) # The icon string, null if none
- discordio = db.Column(db.String(255)) # Custom Discord.io Invite Link
+ invite_link = db.Column(db.String(255)) # Custom Discord Invite Link
def __init__(self, guild_id, name, roles, channels, webhooks, emojis, owner_id, icon):
self.guild_id = guild_id
diff --git a/webapp/titanembeds/static/img/partners/discordio.png b/webapp/titanembeds/static/img/partners/discordio.png
deleted file mode 100644
index 5e876f2f920ce9eb37036ce4ae464835387ef045..0000000000000000000000000000000000000000
GIT binary patch
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*@N6sp^UHrRnWVY4Jr&jtzve*)dC@Op0N>22Pq2W5G6?&L57(%agE
zpGI!Ym6X-Tb67MBUK&Gh#H{8I{!AU8VRbdT9o@
z7>d$m*WW*tv%8-2Wj4P-%0@AiW14$R(Oxn0lDX${cg1jctU$fa5v1kl=r~YP(1+xA
za{Q&r;9GgzO_8IBGxoow$mZddTe|(4Z2L#^b&hL^fArBdgt+3ccXM+J30|bCe3GV@gAp
zXnFM=lcp0BaEikBixWnk3lu+0|H%cpqzs{=gT__xMsOt}_i)iCiAhmN#;IK&-X4*1
zEC>Nj4-QTTtqZ!4SAwkPIT1!y{AnL+v$7*MP;qmD2}+ZmRRa$%C^h}axSmEd&sBbE|FX9e=)2O&Xx8W_)w5vv4G=yF5)sWj#j~06GU^X%GTh4_ILJd
zXCi*l0DPa;X~B&nGXpFjBKYWT;+r3$Z)Kj5J{vDxcwA$}>w*oPi9IF->OnNefl{HI
z!fCNi-nkG~!v^XgNP@d>P>Xx)CA#7jAq|s@ePe^BY&z!BNJph)4}T8c4E##03NRE~
z{%|qXx3)OdOAeQ!_}N%AQ{do5%gmVrsB39&x5(H#twZf(z>P9LYSI~ia{vu&(*c~O
j2Ivig|4(4&73sBuR>-0U^5?&78$eZ2Q=v}IGVK2Vf7bH&
diff --git a/webapp/titanembeds/static/js/administrate_guild.js b/webapp/titanembeds/static/js/administrate_guild.js
index 1af3c9f..1d5dba7 100644
--- a/webapp/titanembeds/static/js/administrate_guild.js
+++ b/webapp/titanembeds/static/js/administrate_guild.js
@@ -54,13 +54,13 @@ $("#mentions_limit").keyup(function(event){
}
});
-$("#discordio").keyup(function(event){
+$("#invite_link").keyup(function(event){
if(event.keyCode == 13){
var pathname = window.location.pathname;
- var value = $("#discordio").val()
- var payload = {"discordio": value}
+ var value = $("#invite_link").val()
+ var payload = {"invite_link": value}
$.post(pathname, payload, function(data) {
- Materialize.toast('Updated Discord.io setting!', 2000)
+ Materialize.toast('Updated invite link setting!', 2000)
});
}
});
diff --git a/webapp/titanembeds/templates/about.html.j2 b/webapp/titanembeds/templates/about.html.j2
index 173f855..0bc36d3 100644
--- a/webapp/titanembeds/templates/about.html.j2
+++ b/webapp/titanembeds/templates/about.html.j2
@@ -206,25 +206,6 @@ etc.
Partners
These are awesome communities that offers amazing tools to enhance your Discord experience and are willing to promote us! So do we!! #TitanThoughtOfTheDay
-
-
-
-
-
-
-
-
-
Discord.io
-
Personalized Discord Invites
-
Are you tired of having random Discord.gg invite links? Wouldn't it be better if you could customize the letters in your link? Well look no further, we have the perfect solution for you! Discord.io is an unofficial project, which focuses around giving companies and communities on Discord, the option to create their very own personal invitation links.
-
Website
-
Discord Server
-
-
-
-
-
-
diff --git a/webapp/titanembeds/templates/administrate_guild.html.j2 b/webapp/titanembeds/templates/administrate_guild.html.j2
index 81feb26..bf972bf 100644
--- a/webapp/titanembeds/templates/administrate_guild.html.j2
+++ b/webapp/titanembeds/templates/administrate_guild.html.j2
@@ -134,10 +134,10 @@
-
Custom Discord.io Link
-
Because we are a partner with Discord.io , we enable you to enter your custom discord.io link and replace the discord.gg link on the embed!
+
Custom Invite Link
+
Have a permanent invite that you really want to use? Something like discord.io on your mind? Enter your custom invite link here to replace the default one on the embed!
(Leave blank if none - enter to submit)
-
+
diff --git a/webapp/titanembeds/templates/embed.html.j2 b/webapp/titanembeds/templates/embed.html.j2
index 5d72ff8..45b83f2 100644
--- a/webapp/titanembeds/templates/embed.html.j2
+++ b/webapp/titanembeds/templates/embed.html.j2
@@ -99,8 +99,8 @@
{% endif %}
{{ guild['name']|e }}
- {% if guild["discordio"] %}
-
discord.io/{{ guild["discordio"]|e }}
+ {% if guild["invite_link"] %}
+
{{ guild["invite_domain"]|e }}
{% else %}
discord.gg
{% endif %}