forked from rDrama/rDrama
fdfd
parent
5e27a120ca
commit
ef1e3f2b4d
|
@ -483,20 +483,14 @@ def unfollow_user(username, v):
|
|||
return "", 204
|
||||
|
||||
|
||||
@app.route("/@<username>/pic/profile")
|
||||
@app.route("/uid/<id>/pic/profile")
|
||||
@limiter.exempt
|
||||
def user_profile(username):
|
||||
x = get_user(username)
|
||||
return redirect(x.profile_url)
|
||||
|
||||
@app.route("/uid/<uid>/pic/profile")
|
||||
@limiter.exempt
|
||||
def user_profile_uid(uid):
|
||||
try: uid = int(uid)
|
||||
def user_profile_uid(id):
|
||||
try: id = int(id)
|
||||
except:
|
||||
try: uid = int(uid, 36)
|
||||
try: id = int(id, 36)
|
||||
except: abort(404)
|
||||
x=get_account(uid)
|
||||
x=get_account(id)
|
||||
return redirect(x.profile_url)
|
||||
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
</thead>
|
||||
{% for user in badmins %}
|
||||
<tr>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold;">{% if user.ban_reason %}{{user.ban_reason}}{% endif %}</td>
|
||||
<td>{% if user.banned_by %}<a {% if user.banned_by.animatedname %}class="{% if user.banned_by.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.banned_by.namecolor}}; font-weight:bold;" href="/@{{user.banned_by.username}}"><img src="/@{{user.banned_by.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.banned_by.username}}</a>{% endif %}</td>
|
||||
<td>{% if user.banned_by %}<a {% if user.banned_by.animatedname %}class="{% if user.banned_by.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.banned_by.namecolor}}; font-weight:bold;" href="/@{{user.banned_by.username}}"><img src="/uid/{{user.banned_by.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.banned_by.username}}</a>{% endif %}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td style="font-weight: bold">{{users.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
{% for user in users1 %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users1.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.dramacoins}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -42,7 +42,7 @@
|
|||
{% for user in users2 %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users2.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.stored_subscriber_count}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -67,7 +67,7 @@
|
|||
{% for user in users3 %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users3.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.post_count}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
@ -92,7 +92,7 @@
|
|||
{% for user in users4 %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users4.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold; fonts" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td style="font-weight:bold; text-align:right;">{{user.comment_count}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td style="font-weight:bold;">{{users.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
|
||||
<td><img style="width: 32px; height: 32px" src="/assets/images/badges/patron-{{user.patron}}.gif"></td>
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
{% for user in users %}
|
||||
<tr>
|
||||
<td style="font-weight: bold">{{users.index(user)+1}}</td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/@{{user.username}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
<td><a {% if user.animatedname %}class="{% if user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1">{{user.username}}</a></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</thead>
|
||||
{% for view in viewers %}
|
||||
<tr>
|
||||
<td style="font-weight: bold"><a {% if view.viewer.animatedname %}class="{% if view.viewer.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color: #{{view.viewer.namecolor}}" href="/@{{view.viewer.username}}"><img src="/@{{view.viewer.username}}/pic/profile" class="profile-pic-20 mr-1">{{view.viewer.username}}</a></td>
|
||||
<td style="font-weight: bold"><a {% if view.viewer.animatedname %}class="{% if view.viewer.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color: #{{view.viewer.namecolor}}" href="/@{{view.viewer.username}}"><img src="/uid/{{view.viewer.id}}/pic/profile" class="profile-pic-20 mr-1">{{view.viewer.username}}</a></td>
|
||||
<td style="font-weight: bold">{{view.last_view_string}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
||||
|
||||
{% for vote in ups %}
|
||||
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/@{{vote.user.username}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
<thead class="bg-primary text-white"><tr><th>User</th></tr></thead>
|
||||
|
||||
{% for vote in downs %}
|
||||
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/@{{vote.user.username}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
<tr><td><a {% if vote.user.animatedname %}class="{% if vote.user.patron %}patron{% else %}leaderboard{% endif %}"{% endif %} style="color:#{{vote.user.namecolor}}; font-weight:bold;" href="/@{{vote.user.username}}"><img src="/uid/{{vote.user.id}}/pic/profile" class="profile-pic-20 mr-1">{{vote.user.username}}</a></td></tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
|
Loading…
Reference in New Issue