mirror of
				https://github.com/TitanEmbeds/Titan.git
				synced 2025-11-04 07:47:10 +01:00 
			
		
		
		
	Change referrer url to the vote page
This commit is contained in:
		@@ -73,7 +73,7 @@ def privacy():
 | 
			
		||||
 | 
			
		||||
@app.route("/vote")
 | 
			
		||||
def vote():
 | 
			
		||||
    return render_template("discordbotsorg_vote.html.j2")
 | 
			
		||||
    return render_template("discordbotsorg_vote.html.j2", referrer=request.args.get("referrer", None))
 | 
			
		||||
 | 
			
		||||
@app.before_first_request
 | 
			
		||||
def before_first_request():
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@
 | 
			
		||||
        <p>You'll receive a <em class="orange-text">GOLDEN NAME</em> in chat and have <em>a chance to win</em> one of the <strong>heroic</strong> prizes!</p>
 | 
			
		||||
        <p>Prizes include (but not limited to) Titan Tokens and $4.99 Discord Nitro (Paypal)! Vote often, and <strong>daily</strong>, to increase your chances of winning!</p>
 | 
			
		||||
        <br>
 | 
			
		||||
        <a class="waves-effect waves-light btn" href="https://discordbots.org/bot/Titan/vote" target="_blank">Visit Discord Bots!</a>
 | 
			
		||||
        <a class="waves-effect waves-light btn" href="https://discordbots.org/bot/Titan/vote{% if referrer %}?referrer={{ referrer }}{% endif %}" target="_blank">Visit Discord Bots!</a>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -24,7 +24,7 @@
 | 
			
		||||
        <p>Give your pals a personalized referral link and get rewarded for being a <em>great referrer</em>!</p>
 | 
			
		||||
        <br>
 | 
			
		||||
        {% if "user_id" in session and not session["unauthenticated"] %}
 | 
			
		||||
        <input readonly value="https://discordbots.org/bot/Titan/vote?referrer={{ session["user_id"] }}" id="disabled" type="text" onClick="this.setSelectionRange(0, this.value.length)">
 | 
			
		||||
        <input readonly value="{{ url_for("vote", referrer=session["user_id"], _external=True) }}" id="disabled" type="text" onClick="this.setSelectionRange(0, this.value.length)">
 | 
			
		||||
        {% else %}
 | 
			
		||||
        <p class="red-text">Please <a href="{{ url_for("user.login_authenticated", redirect=url_for("vote")) }}">Login</a> to view your personalized referral link.</p>
 | 
			
		||||
        {% endif %}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user