summaryrefslogtreecommitdiff
path: root/lib/VNDB/Handler/Users.pm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-10-08 18:16:46 +0200
committerYorhel <git@yorhel.nl>2019-10-10 16:40:30 +0200
commitb3a9130763879d60c0e413c724a759860bd396af (patch)
tree2de6f9d21d4ce9f00fc11595906570be43d8ae5c /lib/VNDB/Handler/Users.pm
parent4c1dfc8bb62171c4c21057c47f238c8747bac3f8 (diff)
rewards: Apply supporters badge and unicode name (almost) everywhere
Only place where this isn't applied (yet?): Sorting user lists still goes by the old username and board names don't use the new unicode names. I have to say, I quite like the sql_user() and user_() pattern. It's not without problems when applied to everything, but it's good enough for several use cases.
Diffstat (limited to 'lib/VNDB/Handler/Users.pm')
-rw-r--r--lib/VNDB/Handler/Users.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm
index 32648ee4..e31dbd77 100644
--- a/lib/VNDB/Handler/Users.pm
+++ b/lib/VNDB/Handler/Users.pm
@@ -34,13 +34,13 @@ sub posts {
my($posts, $np) = $self->dbPostGet(uid => $uid, hide => 1, what => 'thread', page => $f->{p}, sort => 'date', reverse => 1);
- my $title = "Posts made by $u->{username}";
+ my $title = 'Posts made by '.VNWeb::HTML::user_displayname($u);
$self->htmlHeader(title => $title, noindex => 1);
$self->htmlMainTabs(u => $u, 'posts');
div class => 'mainbox';
h1 $title;
if(!@$posts) {
- p "$u->{username} hasn't made any posts yet.";
+ p VNWeb::HTML::user_displayname($u)." hasn't made any posts yet.";
}
end;
@@ -168,7 +168,7 @@ sub list {
my($s, $n, $l) = @_;
Tr;
td class => 'tc1';
- a href => '/u'.$l->{id}, $l->{username};
+ VNWeb::HTML::user_($l);
end;
td class => 'tc2', fmtdate $l->{registered};
td class => 'tc3'.($l->{hide_list} && $self->authCan('usermod') ? ' linethrough' : '');
@@ -283,11 +283,10 @@ sub notifies {
a href => "/u$uid/notify/$l->{id}", "$l->{ltype}$l->{iid}".($l->{subid}?".$l->{subid}":'');
end;
td class => 'tc5 clickable', id => "notify_$l->{id}";
- lit sprintf
- $l->{ltype} ne 't' ? 'Edit of %s by %s' :
- $l->{subid} == 1 ? 'New thread %s by %s' : 'Reply to %s by %s',
- sprintf('<i>%s</i>', xml_escape $l->{c_title}),
- sprintf('<i>%s</i>', xml_escape $l->{username});
+ txt $l->{ltype} eq 't' ? 'Edit of ' : $l->{subid} == 1 ? 'New thread ' : 'Reply to ';
+ i $l->{c_title};
+ txt ' by ';
+ i VNWeb::HTML::user_displayname($l);
end;
end 'tr';
},