New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "About This Forum" page with statistics, description, admins/mods, etc. #134

Open
tobscure opened this Issue Jun 20, 2015 · 9 comments

Comments

Projects
None yet
5 participants
@tobscure
Member

tobscure commented Jun 20, 2015

In the left side of the footer, like in esoTalk: show the number of discussions, posts, users, online users.

Need to track this information somewhere (a new "statistics" table?) — counting the tables is flawed, because (1) I believe it requires a full table scan for InnoDB and (2) it would include invisible/private/deketed discussions/posts.

@franzliedke

This comment has been minimized.

Show comment
Hide comment
@franzliedke

franzliedke Jun 20, 2015

Member

Maybe store it in the cache? We'd have to ensure it's transaction-safe, though...

Member

franzliedke commented Jun 20, 2015

Maybe store it in the cache? We'd have to ensure it's transaction-safe, though...

@franzliedke

This comment has been minimized.

Show comment
Hide comment
@franzliedke

franzliedke Jun 20, 2015

Member

Should this be an extension?

Member

franzliedke commented Jun 20, 2015

Should this be an extension?

@tobscure

This comment has been minimized.

Show comment
Hide comment
@tobscure

tobscure Jun 20, 2015

Member

Hmm yes you're right I think it should be a default extension.

Cache should work. The way I'm thinking of implementing it is similar to Flarum\Tags\Handlers\TagMetadataUpdater: on certain events, +1 or -1 the numbers (rather than recalculating them completely). Storing in cache would allow them to be recalculated by clearing the cache in case they got out of sync.

Member

tobscure commented Jun 20, 2015

Hmm yes you're right I think it should be a default extension.

Cache should work. The way I'm thinking of implementing it is similar to Flarum\Tags\Handlers\TagMetadataUpdater: on certain events, +1 or -1 the numbers (rather than recalculating them completely). Storing in cache would allow them to be recalculated by clearing the cache in case they got out of sync.

@tobscure tobscure added this to the 1.0 Beta 2 milestone Jun 25, 2015

@tobscure tobscure changed the title from Add forum footer statistics to Add "About This Forum" page with statistics, description, admins/mods, etc. Jul 30, 2015

@tobscure

This comment has been minimized.

Show comment
Hide comment
@tobscure

tobscure Aug 27, 2015

Member

We want to add an "About This Forum" page, probably linked to from the discussion list sidebar, that contains:

  • The forum description
  • Statistics: total posts, discussions, users
  • A list of admins and users in other select groups

What needs to be done:

  • Design this page.
  • Add a setting to groups to determine whether or not a group and its members will be displayed on this page.
  • Add relevant information to the /forum API endpoint. Statistics should be cached somehow.
  • Build the page.
Member

tobscure commented Aug 27, 2015

We want to add an "About This Forum" page, probably linked to from the discussion list sidebar, that contains:

  • The forum description
  • Statistics: total posts, discussions, users
  • A list of admins and users in other select groups

What needs to be done:

  • Design this page.
  • Add a setting to groups to determine whether or not a group and its members will be displayed on this page.
  • Add relevant information to the /forum API endpoint. Statistics should be cached somehow.
  • Build the page.

@tobscure tobscure removed this from the 1.0 Beta 2 milestone Aug 27, 2015

@tobscure tobscure referenced this issue Aug 28, 2015

Closed

v0.1.0 roadmap (old) #74

19 of 53 tasks complete

@justjavac justjavac referenced this issue Sep 7, 2015

Open

Flarum v0.1.0 开发路线图 #3

18 of 53 tasks complete
@dcsjapan

This comment has been minimized.

Show comment
Hide comment
@dcsjapan

dcsjapan Apr 3, 2016

Member

The proposed option to hide specific groups (#845) may impact this part:

A list of admins and users in other select groups

Perhaps it would be possible to combine the two into one "Display options" dropdown, the options being:

  • Hide group badge
  • Show group badge
  • Include members on "About this forum" page

It's possible that an admin might want to hide the group badge but include the group on the "About this forum" page ... but probably rather unlikely.

Member

dcsjapan commented Apr 3, 2016

The proposed option to hide specific groups (#845) may impact this part:

A list of admins and users in other select groups

Perhaps it would be possible to combine the two into one "Display options" dropdown, the options being:

  • Hide group badge
  • Show group badge
  • Include members on "About this forum" page

It's possible that an admin might want to hide the group badge but include the group on the "About this forum" page ... but probably rather unlikely.

@franzliedke franzliedke added this to the 0.1.x milestone Apr 7, 2016

@tobscure tobscure removed this from the 0.1.x milestone Jul 22, 2017

@BartVB

This comment has been minimized.

Show comment
Hide comment
@BartVB

BartVB Aug 17, 2017

I only did a cursory look but it seems like the cache in Flarum can be local. I.e. specific to a webserver (for example the APC usercache) as opposed to distributed (like Redis/Memcache).

If that's the case then storing this in the cache is not going to work properly.
Another problem is that calculating this can become quite problematic on a cache clear if you have a large database. A simple select count(*) from posts takes 40 seconds on my DB with 100MM posts on a pretty beefy server.

Imagine what happens when you have 1000 users online and the cache is cleared 😱

BartVB commented Aug 17, 2017

I only did a cursory look but it seems like the cache in Flarum can be local. I.e. specific to a webserver (for example the APC usercache) as opposed to distributed (like Redis/Memcache).

If that's the case then storing this in the cache is not going to work properly.
Another problem is that calculating this can become quite problematic on a cache clear if you have a large database. A simple select count(*) from posts takes 40 seconds on my DB with 100MM posts on a pretty beefy server.

Imagine what happens when you have 1000 users online and the cache is cleared 😱

@dav-is

This comment has been minimized.

Show comment
Hide comment
@dav-is

dav-is Aug 17, 2017

Contributor

@BartVB The caching system in Flarum is minimal right now. They need to improve that before this issue is implemented.

Contributor

dav-is commented Aug 17, 2017

@BartVB The caching system in Flarum is minimal right now. They need to improve that before this issue is implemented.

@franzliedke

This comment has been minimized.

Show comment
Hide comment
@franzliedke
Member

franzliedke commented Jan 10, 2018

@tobscure Do you plan to integrate this into https://github.com/flarum/flarum-ext-statistics?

@tobscure

This comment has been minimized.

Show comment
Hide comment
@tobscure

tobscure Jan 10, 2018

Member

No, flarum-ext-statistics is purely for admins.

Member

tobscure commented Jan 10, 2018

No, flarum-ext-statistics is purely for admins.

@franzliedke franzliedke removed the UX label Jul 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment