• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Post count : how can I meddle with what's counted

Scheduled Pinned Locked Moved Technical Support
8 Posts 4 Posters 598 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CaptainKC Offline
    CaptainKC Offline
    CaptainK
    wrote on last edited by
    #1

    Hello !
    Here's my question : I'd like to know if it's possible (through the acp, a plugin or something) to ignore some categories in the post count that's displayed on people's profiles.
    I'd prefer it if the posts made in the administration zone of my forum didn't appear in the stats, so I can keep track of the actual public activity on my forum.
    Can anyone help with that ?

    1 Reply Last reply
    0
  • CaptainKC Offline
    CaptainKC Offline
    CaptainK
    wrote on last edited by
    #2

    Anyone ? 🙏

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #3

    Ah, that's something nobody's ever asked before, actually 😆 the post count is quite baked in to NodeBB's core code, so I don't actually know if there's a way to count only specific categories...

    CaptainKC 1 Reply Last reply
    0
  • CaptainKC Offline
    CaptainKC Offline
    CaptainK
    replied to julian on last edited by
    #4

    @julian Well thank you for your answer anyway 😊
    I'll keep checking this topic in case someone comes up with an idea !

    1 Reply Last reply
    0
  • dave1904D Offline
    dave1904D Offline
    dave1904
    wrote on last edited by
    #5

    Hi, quite old topic but this issue is current for me right now because we have an off-topic category where posts should not be counted. Is there any news about until today? Thanks in advance 🙂

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #6

    Since this topic was active?

    Ah, it seems we're no longer just blindly incrementing the post count, but recalculating it based on the user's actual posts... Users.updatePostCount();

    It doesn't fire off any hooks, but if you want to exclude certain categories we could theoretically add a hook in here for you to consume, and adjust the post count.

    1 Reply Last reply
    1
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #7

    Just FYI on the user profile page the count only shows what you can actually see. https://github.com/NodeBB/NodeBB/blob/master/src/controllers/accounts/helpers.js#L154-L156 So if the user has posts in a hidden category those won't show up in the count if you don't have access to that category.

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #8

    Learn something new every day 😄

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development