Best way to check if you are guest in hook

NodeBB Development

Suggested Topics

  • 0 Votes
    5 Posts

    @pitaj That makes sense.

    Thank you, I think that answers my question.

  • 1 Votes
    1 Posts

    I need a little guidance here. I run a self-hosted NodeBB forum with the default Persona theme and no skin. I would like to switch to the Flatly skin, because its style closely resembles the main site (which is a wordpress thing). But unfortunately when I switch to Flatly some elements become invisible.

    For example the header in the chat window looks like this, when no skin is selected:

    But it looks like this when the Flatly skin is selected:

    The button glyphs are there, but they are hard to find because their foreground color is the same as the background color.
    Similarly when I watch the forum on my smartphone I cannot see the (black) Chat glyph on the black header background, so it seems like the chat feature is missing.

    So, I guess I should override or subclass or modify the Flatly skin somehow, or at least some parts of it. And while I am at it I may also change some colors, slightly.

    But I have no clue where the resources are that I need to edit. So my question is: where in the nodebb directories are the Flatly skin files, and how should I proceed in a way that my modifications don't get lost after a nodebb upgrade?


  • 9 Votes
    10 Posts

    @Schamper said:

    Maybe should show some information as to why it's your best post? E.g. views/replies/upvotes.

    I imagine it's purely based on upvotes. None of NodeBB's subjective algorithms are complex in any way, really 😆 (mainly talking about "popular" here)

  • 0 Votes
    2 Posts

    @ludam you can set the minimum & maximum tags for a post in ACP -> Settings -> Tags page. I don't think there is any option to set which tags a user would be able to use.

  • 0 Votes
    6 Posts

    Hey, get ready to be confused @frissdiegurke -- there's a third type of hook, rounding out the behaviours 😆

    action hooks are, as @Mega describes, fired when something happens, and NodeBB doesn't care about the response. filters are fired when plugins might change things. The majority of hooks in NodeBB are filters. static hooks are fired when you need NodeBB to wait until your plugin is complete in order to do something. There is only one static hook available right now: static:app.load, which is fired on startup.

    In this case, since the post is already slated to be deleted, but you want to do something before it is deleted... we may want to consider adding a new hook called static:post.purge.