tshenry
(Taylor)
2018 年2 月 24 日 00:58
1
此主题组件允许您在用户资料卡中包含“最后活跃时间”统计信息。
\u003e 仓库: GitHub - tshenry/discourse-last-seen-user-card-theme-component
\u003ch4\u003e之前\u003c/h4\u003e
\u003ch4\u003e之后\u003c/h4\u003e
\u003ch2\u003e关于\u003c/h2\u003e
除了我本人希望将此统计信息添加到用户卡片之外,此处的一些讨论也启发了该主题组件的创建:
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…
\u003ch2\u003e安装\u003c/h2\u003e
请按照以下指南操作:
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…
如有任何疑问、问题或建议,欢迎随时发帖!
46 个赞
McBlu
(Blu McCormick)
2018 年3 月 15 日 19: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 日 04: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 日 04:14
4
I don’t mind where it is so long as it is there.
1 个赞
tshenry
(Taylor)
2018 年3 月 22 日 09: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 日 18: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 日 21: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:
committed 09:30PM - 25 Nov 19 UTC
8 个赞
I’ve got the update, thanks.
2 个赞
jrgong
(jrgong)
2021 年7 月 26 日 19:04
11
重新提起这个话题:只是想确认它依然运行得完美无缺,而且超级实用!
这让检查用户是否确实仍是活跃成员变得极其快捷简便。以前,我总得打开完整个人资料,才能判断是否值得花时间给该用户发送私信。
非常希望能在核心功能中看到它!
4 个赞
jrgong:
希望在核心中看到这个!
是的!!依我看,这绝对应该包含在核心中。在此之前,非常感谢 @tshenry !
3 个赞
Roi
2024 年8 月 7 日 15:47
13
我注意到自从上次 Discourse 更新以来,用户卡片中的“最后 seen”文本比其他文本大得多,而且是粗体。我检查了一下,发现它被包裹在 <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 日 02:38
18
主题组件更新与核心更新完全分开,您可以随时从管理员界面更新它们,而无需考虑核心更新。
2 个赞
哎呀,抱歉,我忘了这是一个主题组件,而不是核心部分。
2 个赞
Zomb
(Ro)
2024 年11 月 10 日 04:03
20
运行效果很好,但不知何故,它在我这里显示为列表中的最后一个(在“cheers”之后)。
1 个赞