Post Views Counter

I created this theme about a year ago for client and I thought I’d like to share this to the community. This theme will show the views (reads) count for posts, that’s it!

Screenshot:

Repo:

I hope someone found this useful :smiley:

Note: only tested on tests-passed branch

20 个赞

Hi! The administrators of the site where I am registered have installed you theme component, but the counter always stays at 0

Is there any way to fix it? :thinking:

The site is:

2 个赞

Sorry for the issue. Let me know if this fixes it:
https://github.com/muhlisbc/discourse-post-views-counter-theme/commit/84c5631dfa9197e3f7a218d22e440ac9f6e9cb9e

3 个赞

It worked perfect! Thank you!

2 个赞

Can you provide the option to hide the number of views in the replies?

自上次 Discourse 升级以来,我认为它已损坏。

1 个赞

如果还有人使用此组件并在升级 Discourse 到 2.9.0.beta3 后遇到问题,可以试试我的修复:GitHub - freemdict/discourse-post-views-counter-theme. :slight_smile: 记住要禁用或移除该组件的先前版本。

我基本上只更改了一行代码:Fix bug brought by Discourse 2.9.0.beta3 · freemdict/discourse-post-views-counter-theme@3f337c0 · GitHub.

4 个赞

非常感谢,您的版本奏效了 @mdict_free (2022年10月)

1 个赞

太棒的组件!它非常有用。但是最近才注意到它在我 2 台服务器上停止显示了。我的一台运行的是 Stable 版本,另一台是测试版本(2023 年 1 月)。

https://community.openmr.com/

您最近在使用此功能时遇到问题了吗?

我试过了,它什么也没显示,我也找不到任何错误。它曾经奏效过,但我无法确定何时以及情况如何改变——主要是因为之前有一些布局问题,但主要是因为我觉得我得不到任何有用的优点。

现在我重新尝试了一下,它就是不起作用。而“不起作用”是指平板电脑和手机,所以它可能在真正的台式电脑上运行;但一切都必须在手机上运行,因为它们是当今最主要的设备群。如果某些东西在手机上不起作用,那它就是为少数人准备的,而它能给社区和管理员带来的只是另一个可能破坏地方的部分。

而且我已将时间格式更改为长日期,因为 Discourse 的方式确实……过于美式,难以理解,至少在欧洲这部分地区是这样。但这就是我们拥有自定义一切工具的原因。仍然存在一个悬而未决的问题,即这是否给插件带来了困难。

但对我来说,这是一个损坏的插件。

1 个赞

也许团队中的一员可以看一下,因为核心更改可能需要部分返工?

我真的很讨厌失去这个功能,因为它非常方便。

他的修订版正在运行。

我认为这个组件已被弃用且不再工作。它应该被标记为损坏。

2 个赞

上面的帖子是一个可用的分支。也许 @mdict_free 愿意接任维护者。

1 个赞