tshenry
(Taylor)
2018 年 2 月 24 日午前 12:58
1
This theme component will allow you to include the “last seen” user statistic in user profile cards.
Repo: GitHub - tshenry/discourse-last-seen-user-card-theme-component
Before
After
About
In addition to my own interest in having this stat added to user cards, there’s been some discussion on here that inspired this theme component’s creation:
I think we should expand our user card to include post counts:
[image]
Additionally maybe consider adding a row for Last Seen - perhaps a separate feature req/
Thoughts?
I think “Last Seen” is a more useful data point than “Last Post”, at least as far as the profile card pop-up is concerned. I propose to swap out “Last Post” for “Last Seen” in the profile card.
Take the user @Cafeine for instance (sorry about the unmerited mention mate )
If you find an old discussion with a post of his that you might want to address with a reply or private message, you might think twice when you see his profile:
[image]
By the looks of it, he hasn’t been…
Installation
Follow this guide here:
This is a guide for installing and managing themes and theme components in Discourse.
Required user level: Administrator
Installing and customizing themes can significantly improve the look and feel of your Discourse site. You can easily import and manage themes and their components through the Discourse admin panel.
This guide covers:
Importing new themes and theme components
Adding theme components to a theme
Managing automatic updates
Additional resourc…
Please feel free to post if there are any questions, problems, or suggestions!
「いいね!」 45
McBlu
(Blu McCormick)
2018 年 3 月 15 日午後 7:44
2
This is fantastic. I will use this function a lot as I assess new members’ engagement and chase particular people down who I work with closely.
「いいね!」 2
tshenry
(Taylor)
2018 年 3 月 16 日午前 4:07
3
This has had a minor update:
Reduced the amount of code by switching from a full template override to using the existing plugin outlet to achieve the same positioning.
For anyone that uses this or is interested in using it, there are four metadata positions on the user card. Currently, starting from the left it goes last post, date joined, last seen, and time read. Which position would you prefer the "last seen" metadata to be displayed?
First
Second
Third (where it is currently)
Fourth
I imagine it’s not extremely important to most, but I’m curious if there is a preference that I can consider for a future update.
「いいね!」 4
McBlu
(Blu McCormick)
2018 年 3 月 16 日午前 4:14
4
I don’t mind where it is so long as it is there.
「いいね!」 1
tshenry
(Taylor)
2018 年 3 月 22 日午前 9:43
5
I’ve update this to position “Last Seen” first in the list. Thanks to all that voiced their opinion
「いいね!」 8
@tshenry Is it compatible with latest Discourse? It’s not working although installed.
tshenry
(Taylor)
2019 年 11 月 25 日午後 6:01
7
I just checked and it’s working on the latest tests-passed. Did you make sure to refresh the page after adding the component to your main theme?
「いいね!」 3
Did you check on mobile view as well?
「いいね!」 1
tshenry
(Taylor)
2019 年 11 月 25 日午後 9:38
9
Ah, good point! Fun fact - this component was created before mobile user cards existed! Because of that, it was only set up to work on desktop.
I’ve just pushed an update that should support both environments:
https://github.com/tshenry/discourse-last-seen-user-card-theme-component/commit/fdbdb65320d18ac3b466fb3c81e902add7499e0b
「いいね!」 8
I’ve got the update, thanks.
「いいね!」 2
jrgong
(jrgong)
2021 年 7 月 26 日午後 7:04
11
Reviving this one: Just to confirm that it still works like a charm and is super useful!
This makes it super quick easy to check if the user is in fact still an active member. Before I always had to open full profile to decide if it’s worth the time so send a private message to the user.
Would love to see that in core!
「いいね!」 4
jrgong:
ぜひコア機能に加えてほしいです!
はい!IMOでは間違いなくコア機能になるはずです。それまでは@tshenryに大変感謝しています!
「いいね!」 3
Roi
2024 年 8 月 7 日午後 3:47
13
前回のDiscourseアップデート以降、ユーザーカードの「最終アクティビティ」のテキストが他のテキストよりもはるかに大きく太字になっていることに気づきました。確認したところ、<h3>タグで囲まれていたため、テーマのCSSに以下を追加して元に戻しました。
#user-card .last-seen-metadata h3 {
font-size: unset;
font-weight: unset;
}
これが意図した効果なのか不明なため、私の経験を共有したいと思いました。
「いいね!」 2
Discourse の変更に合わせて、コンポーネントのヘッダータグを削除するためのプルリクエストをこちらに追加しました。
main ← awesomerobot:patch-1
opened 05:44PM - 07 Aug 24 UTC
We removed heading tags from the user card in core, because they're not technica… lly supposed to be used like this
「いいね!」 8
この修正をありがとうございます!3.3.x stable ブランチにも取り込まれますか?
Firepup650
(Firepup Sixfifty)
2024 年 8 月 9 日午前 2:38
18
テーマコンポーネントのアップデートはコアのアップデートとは完全に別であり、コアのアップデートに関係なく、いつでも管理UIからアップデートできます。
「いいね!」 2
おっと、これはコアの一部ではなく、テーマコンポーネントであることを忘れました。
「いいね!」 2
Zomb
(Ro)
2024 年 11 月 10 日午前 4:03
20
素晴らしい動作ですが、なぜか私のリストでは最後(cheersの後)に表示されています。
「いいね!」 1