diff options
author | Yorhel <git@yorhel.nl> | 2019-10-08 18:16:46 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-10-10 16:40:30 +0200 |
commit | b3a9130763879d60c0e413c724a759860bd396af (patch) | |
tree | 2de6f9d21d4ce9f00fc11595906570be43d8ae5c /lib/VNDB/Handler/Misc.pm | |
parent | 4c1dfc8bb62171c4c21057c47f238c8747bac3f8 (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/Misc.pm')
-rw-r--r-- | lib/VNDB/Handler/Misc.pm | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/VNDB/Handler/Misc.pm b/lib/VNDB/Handler/Misc.pm index 9b4073ce..76663601 100644 --- a/lib/VNDB/Handler/Misc.pm +++ b/lib/VNDB/Handler/Misc.pm @@ -85,7 +85,8 @@ sub homepage { li; txt "$_->{type}:"; a href => "/$_->{type}$_->{itemid}.$_->{rev}", title => $_->{ioriginal}||$_->{ititle}, shorten $_->{ititle}, 33; - lit " by ".fmtuser($_); + lit " by "; + VNWeb::HTML::user_($_); end; } end; @@ -120,9 +121,10 @@ sub homepage { for (@$posts) { my $boards = join ', ', map $BOARD_TYPE{$_->{type}}{txt}.($_->{iid}?' > '.$_->{title}:''), @{$_->{boards}}; li; - txt fmtage($_->{ldate}).' '; + txt fmtage($_->{lastpost_date}).' '; a href => "/t$_->{id}.$_->{count}", title => "Posted in $boards", shorten $_->{title}, 25; - lit ' by '.fmtuser($_->{luid}, $_->{lusername}); + lit ' by '; + VNWeb::HTML::user_($_, 'lastpost_'); end; } end; |